Documentation ¶
Overview ¶
* @Description:用户相关model * @Author: gphper * @Date: 2021-07-04 11:58:45
* @Description: * @Author: gphper * @Date: 2021-10-17 14:17:14
* @Description: * @Author: gphper * @Date: 2021-10-17 14:17:14
* @Description: * @Author: gphper * @Date: 2021-10-20 20:59:47
* @Description: * @Author: gphper * @Date: 2021-07-26 21:00:10
* @Description: * @Author: gphper * @Date: 2021-07-08 20:12:04
Index ¶
- Variables
- func GetModels() []interface{}
- func RegisterCallback()
- type AdminGroup
- type AdminGroupSaveReq
- type AdminUserEditPassReq
- type AdminUserIndexReq
- type AdminUserSaveReq
- type AdminUserSkinReq
- type AdminUsers
- type Article
- type ArticleIndexReq
- type ArticleReq
- type BaseModle
- type Collections
- type GaTabler
- type MinerIndexReq
- type UploadHtmlReq
- type UploadReq
- type UploadType
- type User
- type UserLoginReq
- type UserLoginRes
- type UserRefreshTokenReq
- type UserRegisterReq
- type UserReq
Constants ¶
This section is empty.
Variables ¶
View Source
var Db *gorm.DB
Functions ¶
func RegisterCallback ¶
func RegisterCallback()
Types ¶
type AdminGroup ¶
type AdminGroup struct { BaseModle GroupId uint `gorm:"primary_key;auto_increment"` GroupName string `gorm:"size:20;comment:'用户组名称'"` Privs string `gorm:"type:text;comment:'权限'"` CreatedAt time.Time `gorm:"size:0"` UpdatedAt time.Time `gorm:"size:0"` }
func (*AdminGroup) FillData ¶
func (ag *AdminGroup) FillData()
func (*AdminGroup) TableName ¶
func (ag *AdminGroup) TableName() string
type AdminGroupSaveReq ¶
type AdminUserEditPassReq ¶
type AdminUserIndexReq ¶
type AdminUserSaveReq ¶
type AdminUserSaveReq struct { Username string `form:"username" label:"用户名" binding:"required"` Password string `form:"password"` Nickname string `form:"nickname" label:"姓名" binding:"required"` Phone string `form:"phone"` GroupName []string `form:"groupname[]" label:"用户组" binding:"required"` Uid uint `form:"uid"` }
type AdminUserSkinReq ¶
type AdminUsers ¶
type AdminUsers struct { BaseModle Uid uint `gorm:"primary_key;auto_increment"` GroupName string `gorm:"size:20;comment:'用户组名称'"` Username string `gorm:"size:100;comment:'用户名'"` Nickname string `gorm:"size:100;comment:'姓名'"` Password string `gorm:"size:200;comment:'密码'"` Phone string `gorm:"size:20;comment:'手机号'"` LastLogin string `gorm:"size:30;comment:'最后登录ip地址'"` Salt string `gorm:"size:32;comment:'密码盐'"` ApiToken string `gorm:"size:32;comment:'用户登录凭证'"` Header string `gorm:"size:20;comment:'头部皮肤'"` Logo string `gorm:"size:20;comment:'logo皮肤'"` Side string `gorm:"size:20;comment:'侧边栏皮肤'"` CreatedAt time.Time UpdatedAt time.Time }
func (*AdminUsers) FillData ¶
func (au *AdminUsers) FillData()
func (*AdminUsers) TableName ¶
func (au *AdminUsers) TableName() string
type Article ¶
type Article struct { BaseModle ArticleId uint `gorm:"primary_key;auto_increment"` Title string `gorm:"size:100;comment:'标题'"` Desc string `gorm:"size:100;comment:'描述'"` CoverImg string `gorm:"size:100;comment:'封面图'"` Content string `gorm:"type:text;comment:'文章内容'"` CreatedAt time.Time UpdatedAt time.Time }
type ArticleIndexReq ¶
type ArticleReq ¶
type ArticleReq struct { ArticleId int `form:"article_id"` Title string `form:"title" label:"标题" binding:"required"` CoverImg string `form:"cover_img" label:"封面图" binding:"required"` Content string `form:"content" label:"文章详情" binding:"required"` Desc string `form:"desc" label:"文章描述" binding:"required"` }
type Collections ¶
type Collections struct { BaseModle MachineId int `json:"machine_id"` IPAddress string `json:"ip_address"` MachineTag string `json:"machine_tag"` WorkStatus string `json:"work_status"` CPUUsage string `json:"cpu_usage"` MemUsage string `json:"mem_usage"` MinerCount string `json:"miner_count"` NodeCount string `json:"node_count"` NodeGraffi string `json:"node_graffi"` NodeHeight string `json:"node_height"` NodeVersion string `json:"node_version"` UpdateTime string `json:"update_time"` }
func (*Collections) TableName ¶
func (a *Collections) TableName() string
type MinerIndexReq ¶
type UploadHtmlReq ¶
type UploadReq ¶
type UploadReq struct { File *multipart.FileHeader `form:"file" label:"文件" binding:"required"` Dst string `form:"dst"` }
type UploadType ¶
type UploadType struct { BaseModle Id uint `gorm:"primary_key;auto_increment"` TypeName string `gorm:"size:100;comment:'类型名称'"` StoragePath string `gorm:"size:100;comment:'存储路径'"` Description string `gorm:"size:100;comment:'描述'"` AllowType string `gorm:"size:100;comment:'允许上传的资源类型'"` AllowSize uint `gorm:"comment:'允许上传的资源大小,单位KB'"` AllowNum uint `gorm:"comment:'允许上传的资源个数'"` }
func (*UploadType) FillData ¶
func (u *UploadType) FillData()
func (*UploadType) TableName ¶
func (u *UploadType) TableName() string
type User ¶
type User struct { BaseModle Uid uint `gorm:"primary_key;auto_increment"` Nickname string `json:"nickname" form:"nickanme"` Email string `json:"email" form:"email"` Password string `json:"password" form:"password"` Salt string `json:"salt" form:"salt"` RefreshToken sql.NullString `json:"refresh_token"` ExpirTime sql.NullTime `json:"expir_time"` }
type UserLoginReq ¶
type UserLoginRes ¶
type UserRefreshTokenReq ¶
type UserRefreshTokenReq struct {
Retoken string `json:"retoken" form:"retoken" binding:"required"`
}
type UserRegisterReq ¶
type UserRegisterReq struct { Nickname string `json:"nickname" form:"nickname" binding:"required" label:"昵称"` Email string `json:"email" form:"email" binding:"required,email" label:"邮箱"` Password string `json:"password" form:"password" binding:"required" label:"密码"` ConfirmPassword string `json:"confirm_password" form:"confirm_password" binding:"required,eqfield=Password" label:"确认密码"` }
Click to show internal directories.
Click to hide internal directories.