Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterRouter ¶
func RegisterRouter(r *gin.RouterGroup, handle *jwt.GinJWTMiddleware)
Types ¶
type RegisterRequest ¶
type RegisterRequest struct { Username string `json:"username" form:"username" binding:"required,min=4,max=20" msg:"Username must be between 4 and 20 characters"` Password string `json:"password" form:"password" binding:"required,min=6,max=32" msg:"Password must be between 6 and 32 characters"` AuthMethod string `json:"auth_method" form:"auth_method" binding:"required,oneof=telegram email" msg:"Auth method now only supports telegram"` Code string `json:"code" form:"code" binding:"required,min=6,max=6" msg:"Code must be 6 characters"` TelegramID int64 `json:"telegram_id" form:"telegram_id" binding:"omitempty" msg:"Invalid telegram ID"` Email string `json:"email" form:"email" binding:"omitempty,email" msg:"Invalid email"` }
type SendCodeRequest ¶
Click to show internal directories.
Click to hide internal directories.