Documentation ¶
Index ¶
- Variables
- func NewWebsocket(handler WebSocketHandler, w http.ResponseWriter, r *http.Request)
- func ReadFromRequest(request *http.Request, v interface{}) error
- func WriteErrorResponse(response http.ResponseWriter, message string, code int)
- func WriteResponse(response http.ResponseWriter, bytes []byte)
- type AdminHandler
- type AllUsersResponse
- type AuthHandler
- func (a *AuthHandler) GetAllUsersHandler(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func (a *AuthHandler) Login(w http.ResponseWriter, r *http.Request)
- func (a *AuthHandler) Logout(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func (a *AuthHandler) OptionsLogin(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func (a *AuthHandler) RefreshToken(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func (this *AuthHandler) RegisterRoutes(mux *bone.Mux)
- func (a *AuthHandler) RequireTokenAuthentication(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
- type ErrorView
- type HealthHandler
- type HealthView
- type WebSocketHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var EnableCors bool
Functions ¶
func NewWebsocket ¶ added in v0.11.0
func NewWebsocket(handler WebSocketHandler, w http.ResponseWriter, r *http.Request)
func ReadFromRequest ¶ added in v0.11.0
func WriteErrorResponse ¶
func WriteErrorResponse(response http.ResponseWriter, message string, code int)
func WriteResponse ¶
func WriteResponse(response http.ResponseWriter, bytes []byte)
Types ¶
type AdminHandler ¶
type AdminHandler interface {
RegisterRoutes(*bone.Mux, *AuthHandler)
}
type AllUsersResponse ¶
type AuthHandler ¶
type AuthHandler struct { AB backends.Authentication SecretKey []byte JWTExpirationDelta int Enabled bool }
func (*AuthHandler) GetAllUsersHandler ¶
func (a *AuthHandler) GetAllUsersHandler(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
GetAllUsersHandler - returns a list of all users
func (*AuthHandler) Login ¶
func (a *AuthHandler) Login(w http.ResponseWriter, r *http.Request)
func (*AuthHandler) Logout ¶
func (a *AuthHandler) Logout(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (*AuthHandler) OptionsLogin ¶ added in v0.12.0
func (a *AuthHandler) OptionsLogin(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (*AuthHandler) RefreshToken ¶
func (a *AuthHandler) RefreshToken(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (*AuthHandler) RegisterRoutes ¶
func (this *AuthHandler) RegisterRoutes(mux *bone.Mux)
func (*AuthHandler) RequireTokenAuthentication ¶
func (a *AuthHandler) RequireTokenAuthentication(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
type HealthHandler ¶ added in v0.14.1
type HealthHandler struct{}
func (*HealthHandler) Get ¶ added in v0.14.1
func (this *HealthHandler) Get(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
func (*HealthHandler) RegisterRoutes ¶ added in v0.14.1
func (this *HealthHandler) RegisterRoutes(mux *bone.Mux, am *AuthHandler)
type HealthView ¶ added in v0.14.1
type HealthView struct {
Message string `json:"message"`
}
type WebSocketHandler ¶ added in v0.11.0
Click to show internal directories.
Click to hide internal directories.