Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoLogin ¶
DoLogin perform login @Summary Login generates the authentication token @Produce json @Param username body string true "Username" @Param password body string true "Password" @Success 200 {string} json "{"code":0,"message":"OK","data":{"token":"eyJhbGciOiJIUzI1NiIsInR7HXsSLfebw92DKd1JQ"}}" @Router /login [post]
Types ¶
type CreateRequest ¶
type CreateRequest struct { Username string `json:"username"` Password string `json:"password"` Email string `json:"email"` }
CreateRequest create request
type ListRequest ¶
type ListRequest struct { Username string `json:"username"` Offset int `json:"offset"` Limit int `json:"limit"` }
ListRequest list request
type LoginCredentials ¶
type LoginCredentials struct { Email string `json:"email" form:"email"` Password string `json:"password" form:"password"` }
LoginCredentials login request
type RegisterRequest ¶
type RegisterRequest struct { Username string `json:"username" form:"username"` Email string `json:"email" form:"email"` Password string `json:"password" form:"password"` ConfirmPassword string `json:"confirm_password" form:"confirm_password"` }
RegisterRequest register request
type RegisterResponse ¶
type RegisterResponse struct {
ID uint64 `json:"id"`
}
RegisterResponse register response
Click to show internal directories.
Click to hide internal directories.