Documentation ¶
Index ¶
- 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) 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 WebSocketHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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) 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 WebSocketHandler ¶ added in v0.11.0
Click to show internal directories.
Click to hide internal directories.