Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotAdminUser = errors.Unauthorized(unauthorized, "not admin user") ErrMissingUserId = errors.Unauthorized(unauthorized, "missing userid") ErrInternalServer = errors.InternalServer(unauthorized, "internal server error") )
View Source
var ErrGetSessionStoreFail = errors.Unauthorized(unauthorized, "get session error")
Functions ¶
func Admin ¶
func Admin(uu *biz.UserUsecase, logger log.Logger) middleware.Middleware
func Info ¶
func Info() middleware.Middleware
func Session ¶
func Session(store *sessions.RedisStore, name string, _ log.Logger) middleware.Middleware
Types ¶
type ContextKey ¶
type ContextKey string
const ( ContextKeyUserId ContextKey = "userid" ContextKeyUserK ContextKey = "user-srp-k" ContextKeyRemoteAddr ContextKey = "remote-addr" )
type SessionKey ¶
type SessionKey string
const ( SessionKeyUserId SessionKey = "userid" SessionKeyUserK SessionKey = "user-srp-k" )
Click to show internal directories.
Click to hide internal directories.