Documentation ¶
Index ¶
- func AuthorizeAdmin(user database.UserOut) bool
- type AuthenticationMiddleware
- func (a *AuthenticationMiddleware) AuthUser(ctx context.Context) (database.UserOut, error)
- func (a *AuthenticationMiddleware) GetAll(ctx context.Context) ([]database.UserOut, error)
- func (a *AuthenticationMiddleware) Login(ctx context.Context, username string, password string) (database.UserOut, string, error)
- func (a *AuthenticationMiddleware) Register(ctx context.Context, user database.UserIn) (string, error)
- type AuthorizationMiddleware
- func (a *AuthorizationMiddleware) AuthUser(ctx context.Context) (database.UserOut, error)
- func (a *AuthorizationMiddleware) GetAll(ctx context.Context) ([]database.UserOut, error)
- func (a *AuthorizationMiddleware) Login(ctx context.Context, username string, password string) (database.UserOut, string, error)
- func (a *AuthorizationMiddleware) Register(ctx context.Context, user database.UserIn) (string, error)
- type InstrumentingMiddleware
- func (i *InstrumentingMiddleware) AuthUser(ctx context.Context) (user database.UserOut, err error)
- func (i *InstrumentingMiddleware) GetAll(ctx context.Context) (users []database.UserOut, err error)
- func (i *InstrumentingMiddleware) Login(ctx context.Context, username string, password string) (user database.UserOut, token string, err error)
- func (i *InstrumentingMiddleware) Register(ctx context.Context, user database.UserIn) (msg string, err error)
- type LoggingMiddleware
- func (l *LoggingMiddleware) AuthUser(ctx context.Context) (user database.UserOut, err error)
- func (l *LoggingMiddleware) GetAll(ctx context.Context) (users []database.UserOut, err error)
- func (l *LoggingMiddleware) Login(ctx context.Context, username string, password string) (user database.UserOut, token string, err error)
- func (l *LoggingMiddleware) Register(ctx context.Context, user database.UserIn) (msg string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthorizeAdmin ¶
Types ¶
type AuthenticationMiddleware ¶
type AuthorizationMiddleware ¶
type InstrumentingMiddleware ¶
type InstrumentingMiddleware struct { RequestCount metrics.Counter RequestLatency metrics.Histogram Next service.Service }
Click to show internal directories.
Click to hide internal directories.