Documentation ¶
Index ¶
- func DeleteAPIKey(c *gin.Context)
- func DeleteLogout(c *gin.Context)
- func GetIndex(c *gin.Context)
- func PostAPIKey(c *gin.Context)
- func PostForgot(c *gin.Context)
- func PostForgotVerify(c *gin.Context)
- func PostLogin(c *gin.Context)
- func PostRegister(c *gin.Context)
- func PostVerify(c *gin.Context)
- type APIKeyDTO
- type APIKeyResponse
- type ForgotDTO
- type ForgotVerifyDTO
- type LoginDTO
- type RegisterDTO
- type VerifyDTO
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteAPIKey ¶
Delete API Key godoc @Summary Delete API Key @Description Delete API Key @Tags user @Accept json,xml,application/x-yaml @Produce json,xml,application/x-yaml @Param id path string true "API Key ID" @Success 204 @Failure 403 {object} response.R @Failure 404 {object} response.R @Failure 500 {object} response.R @Router /v1/user/apikey/{id} [delete]
func DeleteLogout ¶
Logout from account godoc @Summary Logout from account @Description Logout from account @Tags user @Accept json,xml,application/x-yaml @Produce json,xml,application/x-yaml @Success 201 @Failure 500 {object} response.R @Router /v1/user/delete [delete,get]
func PostAPIKey ¶
Create API Key godoc @Summary Create API Key @Description Create API Key @Tags user @Accept json,xml,application/x-yaml @Produce json,xml,application/x-yaml @Param dto body user.APIKeyDTO true @Success 201 {object} user.APIKeyResponse @Failure 400 {object} response.R @Failure 403 {object} response.R @Failure 500 {object} response.R @Router /v1/user/apikey [post]
func PostForgot ¶
Request and send forgot password verification code godoc @Summary Request and send forgot password verification code @Description Request and send forgot password verification code @Tags user @Accept json,xml,application/x-yaml @Produce json,xml,application/x-yaml @Param dto body user.ForgotDTO true @Success 201 @Failure 400 {object} response.R @Failure 500 {object} response.R @Router /v1/user/forgot [post]
func PostForgotVerify ¶
Check verify code and set new password godoc @Summary Request and send forgot password verification code @Description Request and send forgot password verification code @Tags user @Accept json,xml,application/x-yaml @Produce json,xml,application/x-yaml @Param dto body user.ForgotVerifyDTO true @Success 204 @Failure 400 {object} response.R @Failure 403 {object} response.R @Failure 500 {object} response.R @Router /v1/user/forgot-verify [post]
func PostLogin ¶
Login to account godoc @Summary Login to account @Description Login to account @Tags user @Accept json,xml,application/x-yaml @Produce json,xml,application/x-yaml @Param dto body user.LoginDTO true @Success 201 @Failure 400 {object} response.R @Failure 403 {object} response.R @Failure 500 {object} response.R @Router /v1/user/login [post]
func PostRegister ¶
Register godoc @Summary Register a new user @Description Register a new user @Tags user @Accept json,xml,application/x-yaml @Produce json,xml,application/x-yaml @Param dto body user.RegisterDTO true "Register DTO" @Success 201 @Failure 409 {object} response.R @Failure 400 {object} response.R @Failure 500 {object} response.R @Router /v1/user/register [post]
func PostVerify ¶
Verify account godoc @Summary Verify account @Description Verify account @Tags user @Accept json,xml,application/x-yaml @Produce json,xml,application/x-yaml @Param dto body user.VerifyDTO true "Verify account" @Success 201 @Failure 400 {object} response.R @Failure 404 {object} response.R @Failure 500 {object} response.R @Router /v1/user/verify [post]
Types ¶
type APIKeyResponse ¶
type ForgotDTO ¶
type ForgotDTO struct {
Email string `yaml:"email" xml:"email" json:"email" binding:"required"`
}
type ForgotVerifyDTO ¶
type RegisterDTO ¶
type RegisterDTO struct { Firstname string `yaml:"firstname" xml:"firstname" json:"firstname" binding:"required"` Lastname string `yaml:"lastname" xml:"lastname" json:"lastname" binding:"required"` Email string `yaml:"email" xml:"email" json:"email" binding:"required"` Password string `yaml:"password" xml:"password" json:"password" binding:"required,password_validator"` Address1 string `yaml:"address1" xml:"address1" json:"address1" binding:"required"` Address2 string `yaml:"address2" xml:"address2" json:"address2" binding:"-"` City string `yaml:"city" xml:"city" json:"city" binding:"required"` State string `yaml:"state" xml:"state" json:"state" binding:"required"` Zip string `yaml:"zip" xml:"zip" json:"zip" binding:"required"` Country string `yaml:"country" xml:"country" json:"country" binding:"required"` }