Documentation ¶
Index ¶
- type Account
- func (a *Account) ForgotPassword(w http.ResponseWriter, r *http.Request)
- func (a *Account) Login(w http.ResponseWriter, r *http.Request)
- func (a *Account) Logout(w http.ResponseWriter, r *http.Request)
- func (a *Account) Register(w http.ResponseWriter, r *http.Request)
- func (a *Account) ResetPassword(w http.ResponseWriter, r *http.Request)
- func (a *Account) VerifyEmailToken(w http.ResponseWriter, r *http.Request)
- func (a *Account) VerifyPasswordResetToken(w http.ResponseWriter, r *http.Request)
- type ErrorResponse
- type ForgotPasswordRequest
- type LoginRequest
- type PasswordResetTokenRequest
- type RegisterRequest
- type ResetPasswordRequest
- type Response
- type VerifyEmailTokenRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
// contains filtered or unexported fields
}
Account handler all http request related to account
func NewAccount ¶
func NewAccount(account service.AccountService) *Account
NewAccount create new account handler
func (*Account) ForgotPassword ¶
func (a *Account) ForgotPassword(w http.ResponseWriter, r *http.Request)
func (*Account) ResetPassword ¶
func (a *Account) ResetPassword(w http.ResponseWriter, r *http.Request)
func (*Account) VerifyEmailToken ¶
func (a *Account) VerifyEmailToken(w http.ResponseWriter, r *http.Request)
func (*Account) VerifyPasswordResetToken ¶
func (a *Account) VerifyPasswordResetToken(w http.ResponseWriter, r *http.Request)
type ErrorResponse ¶
ErrorResponse error json api response
type ForgotPasswordRequest ¶
type ForgotPasswordRequest struct {
Email string `json:"email"`
}
type LoginRequest ¶
type PasswordResetTokenRequest ¶
type PasswordResetTokenRequest struct {
Token string `json:"token"`
}
type RegisterRequest ¶
type ResetPasswordRequest ¶
type Response ¶
type Response struct { Error *ErrorResponse `json:"error,omitempty"` Data interface{} `json:"data,omitempty"` }
Response general json api response
type VerifyEmailTokenRequest ¶
type VerifyEmailTokenRequest struct {
Token string `json:"token"`
}
Click to show internal directories.
Click to hide internal directories.