secondsToDuration() — fiber Function Reference
Architecture documentation for the secondsToDuration() function in limiter_sliding.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 36168803_1865_ee58_b1bd_854a1d54fa97["secondsToDuration()"] 91ff16cc_5e69_6619_dbd9_17643ce37c22["limiter_sliding.go"] 36168803_1865_ee58_b1bd_854a1d54fa97 -->|defined in| 91ff16cc_5e69_6619_dbd9_17643ce37c22 4f1a0f84_edfe_7c73_bc9e_b52bd4457510["ttlDuration()"] 4f1a0f84_edfe_7c73_bc9e_b52bd4457510 -->|calls| 36168803_1865_ee58_b1bd_854a1d54fa97 style 36168803_1865_ee58_b1bd_854a1d54fa97 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
middleware/limiter/limiter_sliding.go lines 221–229
func secondsToDuration(seconds uint64) (time.Duration, bool) {
const maxSeconds = math.MaxInt64 / int64(time.Second)
if seconds > uint64(maxSeconds) {
return time.Duration(math.MaxInt64), false
}
return time.Duration(seconds) * time.Second, true
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does secondsToDuration() do?
secondsToDuration() is a function in the fiber codebase, defined in middleware/limiter/limiter_sliding.go.
Where is secondsToDuration() defined?
secondsToDuration() is defined in middleware/limiter/limiter_sliding.go at line 221.
What calls secondsToDuration()?
secondsToDuration() is called by 1 function(s): ttlDuration.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free