Documentation
¶
Index ¶
- Constants
- func AddAsResponseHeader(w http.ResponseWriter, token *Token)
- func ContainsLatest(ctx context.Context) bool
- func GetClientPassedWookieFromRequestContext(ctx context.Context) (string, error)
- func WithLatest(parent context.Context) context.Context
- func WookieMiddleware(next http.Handler) http.Handler
- type ClientPassedWookieCtxKey
- type ServerCreatedWookieCtxKey
- 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 GetClientPassedWookieFromRequestContext ¶ added in v0.42.0
func WithLatest ¶
Return a context with wookie set to 'latest'.
Types ¶
type ClientPassedWookieCtxKey ¶ added in v0.42.0
type ClientPassedWookieCtxKey struct{}
type ServerCreatedWookieCtxKey ¶ added in v0.42.0
type ServerCreatedWookieCtxKey struct{}
type Token ¶ added in v0.39.0
func FromString ¶ added in v0.39.0
De-serialize token from string (from header).
func GetServerCreatedWookieFromRequestContext ¶ added in v0.42.0
Click to show internal directories.
Click to hide internal directories.