Documentation ¶
Index ¶
- func BasicAuth(realm string, deps func() settings.Values) func(next http.Handler) http.Handler
- func ContextWithVisitor(ctx context.Context, id uniq.Hash) context.Context
- func Hash(in HashInput) string
- func IsAdmin(ctx context.Context) bool
- func MaybeAuth(deps settings.Values) func(next http.Handler) http.Handler
- func SetAdmin(ctx context.Context) context.Context
- func VisitorFromContext(ctx context.Context) uniq.Hash
- func VisitorMiddleware(logger ctxd.Logger, cfg settings.Values) func(handler http.Handler) http.Handler
- type HashInput
- type Salt
- type Visitor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BasicAuth ¶
BasicAuth implements a simple middleware handler for adding basic http auth to a route.
func ContextWithVisitor ¶
ContextWithVisitor adds visitor id to context.
func VisitorFromContext ¶
VisitorFromContext returns visitor hash or 0.
Types ¶
Click to show internal directories.
Click to hide internal directories.