Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ServiceErrorsHTTPMapping = map[error]struct { HTTPCode int ErrCode string }{ userland.ErrUserNotFound: { HTTPCode: http.StatusNotFound, ErrCode: "ErrUserNotFound", }, authentication.ErrUserRegistered: { HTTPCode: http.StatusBadRequest, ErrCode: "ErrUserRegistered", }, authentication.ErrWrongOTP: { HTTPCode: http.StatusBadRequest, ErrCode: "ErrWrongOTP", }, authentication.ErrWrongPassword: { HTTPCode: http.StatusBadRequest, ErrCode: "ErrWrongPassword", }, authentication.ErrUserNotVerified: { HTTPCode: http.StatusBadRequest, ErrCode: "ErrUserNotVerified", }, authentication.ErrOTPInvalid: { HTTPCode: http.StatusBadRequest, ErrCode: "ErrOTPInvalid", }, profile.ErrWrongOTP: { HTTPCode: http.StatusNotFound, ErrCode: "ErrWrongOTP", }, profile.ErrWrongPassword: { HTTPCode: http.StatusNotFound, ErrCode: "ErrWrongPassword", }, profile.ErrEmailAlreadyUsed: { HTTPCode: http.StatusNotFound, ErrCode: "ErrEmailAlreadyUsed", }, } )
Functions ¶
This section is empty.
Types ¶
type AuthenticationHandler ¶
type AuthenticationHandler struct {
Authenticator middlewares.Middleware
RateLimiter middlewares.MiddlewareWithArgs
Authorization middlewares.MiddlewareWithArgs
AuthenticationService authentication.Service
SessionService session.Service
ProfileService profile.Service
EventService event.Service
}
func (AuthenticationHandler) RegisterRoutes ¶
func (h AuthenticationHandler) RegisterRoutes(router *mux.Router)
type HealthzHandler ¶
type HealthzHandler struct{}
func (HealthzHandler) RegisterRoutes ¶
func (h HealthzHandler) RegisterRoutes(router *mux.Router)
type MetricHandler ¶
type MetricHandler struct{}
func (MetricHandler) RegisterRoutes ¶
func (h MetricHandler) RegisterRoutes(router *mux.Router)
type ProfileHandler ¶
type ProfileHandler struct {
Authorization middlewares.MiddlewareWithArgs
Authenticator middlewares.Middleware
RateLimiter middlewares.MiddlewareWithArgs
ProfileService profile.Service
EventService event.Service
}
func (ProfileHandler) RegisterRoutes ¶
func (h ProfileHandler) RegisterRoutes(router *mux.Router)
type SessionHandler ¶
type SessionHandler struct {
Authorization middlewares.MiddlewareWithArgs
Authenticator middlewares.Middleware
SessionService session.Service
ProfileService profile.Service
}
func (SessionHandler) RegisterRoutes ¶
func (h SessionHandler) RegisterRoutes(router *mux.Router)
Click to show internal directories.
Click to hide internal directories.