Discover Packages
github.com/xmdhs/authlib-skin
model
package
Version:
v0.0.3
Opens a new window with list of versions in this module.
Published: Nov 25, 2023
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: ? modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
Documentation
Documentation
¶
type API[T any ] struct {
Code APIStatus `json:"code"`
Data T `json:"data"`
Msg string `json:"msg,omitempty"`
}
const (
ErrUnknown APIStatus = iota - 1
OK
ErrInput
ErrService
ErrExistUser
ErrRegLimit
ErrAuth
ErrPassWord
ErrExitsName
ErrNotAdmin
ErrUserDisable
ErrCaptcha
ErrEmailSend
)
type Captcha struct {
Type string `json:"type"`
SiteKey string `json:"siteKey"`
}
type ChangeName struct {
Name string `json:"name" validate:"required,min=3,max=16"`
}
type ChangePasswd struct {
Old string `json:"old"`
New string `json:"new" validate:"required,min=6,max=50"`
}
type EditUser struct {
Email string `json:"email" validate:"omitempty,email"`
Name string `json:"name" validate:"omitempty,min=3,max=16"`
Password string `json:"password"`
IsAdmin *bool `json:"is_admin"`
IsDisable *bool `json:"is_disable"`
DelTextures bool `json:"del_textures"`
}
type ForgotPassword struct {
Email string `json:"email" validate:"required,email"`
EmailJwt string `json:"emailJwt" validate:"required"`
PassWord string `json:"passWord" validate:"required"`
}
type List[T any ] struct {
Total int `json:"total"`
List []T `json:"list"`
}
type Login struct {
Email string `json:"email" validate:"required,email"`
Password string `json:"password"`
CaptchaToken string
}
type LoginRep struct {
Token string `json:"token"`
Name string `json:"name"`
UUID string `json:"uuid"`
}
type SendRegEmail struct {
Email string `json:"email" validate:"required,email"`
CaptchaToken string `json:"captchaToken"`
}
type UserInfo struct {
UID int `json:"uid"`
UUID string `json:"uuid"`
IsAdmin bool `json:"is_admin"`
}
type UserList struct {
UserInfo
Email string `json:"email"`
RegIp string `json:"reg_ip"`
Name string `json:"name"`
IsDisable bool `json:"is_disable"`
}
type UserReg struct {
Email string `validate:"required,email"`
Password string `validate:"required,min=6,max=50"`
Name string `validate:"required,min=3,max=16"`
CaptchaToken string
EmailJwt string
}
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.