Documentation
¶
Index ¶
- Constants
- func AddAsResponseHeader(w http.ResponseWriter, token *Token)
- func ContainsLatest(ctx context.Context) bool
- func WarrantTokenMiddleware(next http.Handler) http.Handler
- func WithLatest(parent context.Context) context.Context
- func WithWookie(parent context.Context, wookie *Token) context.Context
- type Token
Constants ¶
View Source
const HeaderName = "Warrant-Token"
View Source
const Latest = "latest"
Variables ¶
This section is empty.
Functions ¶
func AddAsResponseHeader ¶ added in v0.42.0
func AddAsResponseHeader(w http.ResponseWriter, token *Token)
func ContainsLatest ¶
Returns true if ctx contains wookie set to 'latest', false otherwise.
func WarrantTokenMiddleware ¶ added in v0.43.0
func WithLatest ¶
Return a context with Warrant-Token set to 'latest'.
Types ¶
type Token ¶ added in v0.39.0
func FromString ¶ added in v0.39.0
De-serialize token from string (from header).
func GetWookieFromContext ¶ added in v0.46.0
Click to show internal directories.
Click to hide internal directories.