wookie

package
v1.15.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const HeaderName = "Warrant-Token"
View Source
const Latest = "latest"

Variables

This section is empty.

Functions

func ContainsLatest

func ContainsLatest(ctx context.Context) bool

Returns true if ctx contains wookie set to 'latest', false otherwise.

func WarrantTokenMiddleware added in v0.43.0

func WarrantTokenMiddleware(next http.Handler) http.Handler

func WithLatest

func WithLatest(parent context.Context) context.Context

Return a context with Warrant-Token set to 'latest'.

Types

type Token added in v0.39.0

type Token struct {
	ID        int64
	Version   int64
	Timestamp time.Time
}

func FromString added in v0.39.0

func FromString(wookieString string) (*Token, error)

De-serialize token from string (from header).

func (Token) String added in v0.39.0

func (t Token) String() string

Get string representation of token (to set as header).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL