Documentation ¶ Index ¶ func Client(account Account) client.Middleware func FromContext(ctx context.Context) (string, bool) func Server(accounts Accounts, opts ...Option) server.Middleware type Account type Accounts type Option func Realm(realm string) Option Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Client ¶ func Client(account Account) client.Middleware func FromContext ¶ func FromContext(ctx context.Context) (string, bool) func Server ¶ func Server(accounts Accounts, opts ...Option) server.Middleware 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.