Documentation
¶
Overview ¶
Package duration parses Go duration syntax plus d for days of 24 hours.
Index ¶
Constants ¶
View Source
const DefaultPublicMax = 7 * 24 * time.Hour
View Source
const Examples = "90m, 36h, 3d, 1w, 1d12h, until 2030-06-01, until 2030-06-01T18:00, until 2030-06-01T18:00:00Z, never"
View Source
const Suggestions = "1h, 8h, 24h, 3d, 7d"
Variables ¶
This section is empty.
Functions ¶
func ParseRelative ¶
ParseRelative accepts positive decimal components in strictly descending unit order. Exact rational arithmetic rejects overflow and sub-nanoseconds. Days and weeks are elapsed 24h and 168h, including across DST transitions.
Types ¶
type Policy ¶
Policy is shared by people, Funnel, and future guest/approval callers. A zero PublicMax selects the default. Policy validation never uses wall time.
Click to show internal directories.
Click to hide internal directories.