Documentation ¶ Index ¶ func FromContext(ctx context.Context) (string, bool) func Middleware(accounts Accounts, opts ...Option) mux.MiddlewareFunc type Account type Accounts type Option func Realm(realm string) Option Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func FromContext ¶ func FromContext(ctx context.Context) (string, bool) func Middleware ¶ func Middleware(accounts Accounts, opts ...Option) mux.MiddlewareFunc Types ¶ type Account ¶ type Account struct { User string Password string } type Accounts ¶ type Accounts []Account type Option ¶ type Option func(o *options) func Realm ¶ func Realm(realm string) Option Source Files ¶ View all Source files middleware.go Click to show internal directories. Click to hide internal directories.