Documentation ¶
Overview ¶
Created by Degiacomi Simone
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangePasswordHandler ¶
type ChangePasswordHandler struct {
// contains filtered or unexported fields
}
The change password handler depends only by the database
func NewChangePasswordHandler ¶
func NewChangePasswordHandler(db *db.DB) *ChangePasswordHandler
Create a new signup handler
func (*ChangePasswordHandler) ServeHTTP ¶
func (l *ChangePasswordHandler) ServeHTTP(response http.ResponseWriter, request *http.Request)
HTTP Handler
type CheckHandler ¶
type CheckHandler struct {
// contains filtered or unexported fields
}
Check handler need the database and the ejwt. This struct holds these objects
func NewCheckHandler ¶
func NewCheckHandler(db *db.DB, ejwt *utils.EasyJWT) *CheckHandler
Create a new Check handler
func (*CheckHandler) ServeHTTP ¶
func (l *CheckHandler) ServeHTTP(response http.ResponseWriter, request *http.Request)
Serve the HTTP request
type ExistHandler ¶
type ExistHandler struct {
// contains filtered or unexported fields
}
This handler check if a user exists
func (*ExistHandler) ServeHTTP ¶
func (h *ExistHandler) ServeHTTP(response http.ResponseWriter, request *http.Request)
Handler function that checks if the user exist
type ImageHandler ¶
type ImageHandler struct { GetHandler http.HandlerFunc PostHandler http.HandlerFunc // contains filtered or unexported fields }
func NewImageHandler ¶
func NewImageHandler(db *db.DB) *ImageHandler
This handler send and recives account images
func (*ImageHandler) Get ¶
func (h *ImageHandler) Get(response http.ResponseWriter, request *http.Request)
this handler sends the user image
func (*ImageHandler) Post ¶
func (h *ImageHandler) Post(response http.ResponseWriter, request *http.Request)
Handler that recives new images from the client
type LoginHanlder ¶
type LoginHanlder struct {
// contains filtered or unexported fields
}
The login handler need a database and a jwt signer. This struct holds this informationas
func NewLoginHandler ¶
func NewLoginHandler(db *db.DB, ejwt *utils.EasyJWT) *LoginHanlder
Create a new login handler
func (*LoginHanlder) ServeHTTP ¶
func (l *LoginHanlder) ServeHTTP(response http.ResponseWriter, request *http.Request)
This is the 'core' of the handler, where the http request is handled
type LogoutHandler ¶
type LogoutHandler struct {
// contains filtered or unexported fields
}
func (*LogoutHandler) ServeHTTP ¶
func (l *LogoutHandler) ServeHTTP(response http.ResponseWriter, request *http.Request)
Serve the logout http request
type SessionHandler ¶
type SessionHandler struct {
// contains filtered or unexported fields
}
func NewSessionHandler ¶
func NewSessionHandler(db *db.DB) *SessionHandler
func (*SessionHandler) Delete ¶
func (h *SessionHandler) Delete(response http.ResponseWriter, request *http.Request)
func (*SessionHandler) Get ¶
func (h *SessionHandler) Get(response http.ResponseWriter, request *http.Request)
type SignupHandler ¶
type SignupHandler struct {
// contains filtered or unexported fields
}
The signup handler depends by the database and the key for the reCaptcha validation
func NewSignupHandler ¶
Create a new signup handler
func (*SignupHandler) ServeHTTP ¶
func (l *SignupHandler) ServeHTTP(response http.ResponseWriter, request *http.Request)
HTTP Handler