Documentation
¶
Index ¶
- type CacheOption
- func CacheImmutable(b ...bool) CacheOption
- func CacheMaxAge(t time.Duration) CacheOption
- func CacheMustRevalidate(b ...bool) CacheOption
- func CacheMustUnderstand(b ...bool) CacheOption
- func CacheNoCache(b ...bool) CacheOption
- func CacheNoStore(b ...bool) CacheOption
- func CacheNoTransform(b ...bool) CacheOption
- func CachePrivate(b ...bool) CacheOption
- func CacheProxyRevalidate(b ...bool) CacheOption
- func CachePublic(b ...bool) CacheOption
- func CacheSMaxAge(t time.Duration) CacheOption
- func CacheStaleIfError(t time.Duration) CacheOption
- func CacheStaleWhileRevalidate(t time.Duration) CacheOption
- type Middleware
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheOption ¶
type CacheOption func(*directives)
func CacheImmutable ¶
func CacheImmutable(b ...bool) CacheOption
func CacheMaxAge ¶
func CacheMaxAge(t time.Duration) CacheOption
func CacheMustRevalidate ¶
func CacheMustRevalidate(b ...bool) CacheOption
func CacheMustUnderstand ¶
func CacheMustUnderstand(b ...bool) CacheOption
func CacheNoCache ¶
func CacheNoCache(b ...bool) CacheOption
func CacheNoStore ¶
func CacheNoStore(b ...bool) CacheOption
func CacheNoTransform ¶
func CacheNoTransform(b ...bool) CacheOption
func CachePrivate ¶
func CachePrivate(b ...bool) CacheOption
func CacheProxyRevalidate ¶
func CacheProxyRevalidate(b ...bool) CacheOption
func CachePublic ¶
func CachePublic(b ...bool) CacheOption
func CacheSMaxAge ¶
func CacheSMaxAge(t time.Duration) CacheOption
func CacheStaleIfError ¶
func CacheStaleIfError(t time.Duration) CacheOption
func CacheStaleWhileRevalidate ¶
func CacheStaleWhileRevalidate(t time.Duration) CacheOption
type Middleware ¶
func Cache ¶
func Cache(options ...CacheOption) Middleware
func DisableCache ¶
func DisableCache() Middleware
func FormMethod ¶
func FormMethod(key string) Middleware
func Logger ¶
func Logger(logger *slog.Logger) Middleware
func PersistentCache ¶
func PersistentCache(options ...CacheOption) Middleware
TODO: PersistentCache is a smarter implementation of SmartCache that handles requests with authorization, Cache-Control from the client, and stores responses into a persistent storage solution like Redis.
func SmartCache ¶
func SmartCache(options ...CacheOption) Middleware
TODO: SmartCache is a smarter implementation of Cache that handles requests with authorization, Cache-Control from the client, and others.
Click to show internal directories.
Click to hide internal directories.