Documentation
¶
Index ¶
- type CasbinRule
- type DataPerm
- type DataPermQuery
- type Department
- type Domain
- type EmailSetting
- type GetByRoleIdData
- type LdapSetting
- type LoginLog
- type Menu
- type MenuPermAlias
- type OperationLog
- type Pagination
- type Role
- type RoleDataPerm
- type RoleEntity
- type User
- type UserClaims
- type UserOAuth
- type UserRole
- type UserSecret
- type UserSecretQuery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CasbinRule ¶
type CasbinRule struct {
Id int
PType string
V0 string
V1 string
V2 string
V3 string
V4 string
V5 string
}
func (CasbinRule) TableName ¶
func (CasbinRule) TableName() string
type DataPerm ¶
type DataPerm struct {
Id int `json:"id"` // 自增ID
ParentId int `json:"parent_id"` // 父级id
Name string `json:"name"` // 名称
Perms string `json:"perms"` // 数据权限标识
PermsRule string `json:"perms_rule"` // 数据规则
PermsType int `json:"perms_type"` // 类型 1=分类 2=数据权限
OrderNum int `json:"order_num"` // 排序字段
DomainId int `json:"domain_id"`
Remarks string `json:"remarks"` // 说明
}
type DataPermQuery ¶
type DataPermQuery struct {
DomainId int
Name string
Pagination *Pagination
}
type Department ¶
type Department struct {
Id int `json:"id"`
Name string `json:"name"`
OrderNum int `json:"order_num"`
ParentId int `json:"parent_id"`
ExtendField string `json:"extend_field"`
}
func (Department) TableName ¶
func (Department) TableName() string
type Domain ¶
type Domain struct {
Id int `json:"id"`
Name string `json:"name"`
Callbackurl string `json:"callbackurl"`
Remark string `json:"remark"`
Code string `json:"code"`
CreateTime time.Time `json:"create_time" gorm:"column:create_time;not null;default:CURRENT_TIMESTAMP"`
LastUpdateTime time.Time `json:"updated_time" gorm:"column:last_update_time;not null;default:CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP"`
}
type EmailSetting ¶
type GetByRoleIdData ¶
type LdapSetting ¶
type LdapSetting struct {
LdapUrl string `json:"ldapUrl"`
LdapSearchDN string `json:"ldapSearchDN"`
LdapSearchPassword string `json:"ldapSearchPassword"`
LdapBaseDN string `json:"ldapBaseDN"`
LdapFilter string `json:"ldapFilter"`
LdapUID string `json:"ldapUID"`
LdapGroupBaseDN string `json:"ldapGroupBaseDN"`
LdapGroupFilter string `json:"ldapGroupFilter"`
LdapGroupGID string `json:"ldapGroupGID"`
LdapGroupAdminDN string `json:"ldapGroupAdminDN"`
}
type LoginLog ¶
type LoginLog struct {
Id int `json:"id"`
UserId int `form:"user_id" json:"user_id" binding:"required"`
Client string `form:"client" json:"client"`
Platform string `form:"platform" json:"platform"`
LoginResult string `form:"login_result" json:"login_result"`
LoginStatus int `form:"login_status" json:"login_status"`
LoginTime time.Time `gorm:"-" json:"login_time"`
Ip string `form:"ip" json:"ip"`
IpLocation string `json:"ip_location"`
OperationTime string `gorm:"-" json:"operation_time"`
OperationContent string `form:"operation_content" json:"operation_content"`
CreateTime time.Time `gorm:"-" json:"-"`
LastUpdateTime time.Time `gorm:"-" json:"-"`
}
login log mapping
type Menu ¶
type Menu struct {
Id int `json:"id"`
ParentId int `json:"parent_id"`
DomainId int `json:"domain_id"`
Domain Domain `json:"domain"`
Name string `json:"name"`
Url string `json:"url"`
Perms string `json:"perms"`
Alias string `json:"alias"`
MenuType int `json:"menu_type"`
Icon string `json:"icon"`
OrderNum int `json:"order_num"`
CreateTime time.Time `` /* 126-byte string literal not displayed */
LastUpdateTime time.Time `` /* 145-byte string literal not displayed */
}
type MenuPermAlias ¶
type MenuPermAlias struct {
Id int `json:"id"`
Perms string `json:"perms"`
Alias string `json:"alias"`
DomainId int `json:"domain_id"`
CreatedTime int64 `json:"created_time"`
UpdatedTime int64 `json:"updated_time"`
}
func (*MenuPermAlias) TableName ¶
func (*MenuPermAlias) TableName() string
type OperationLog ¶
type OperationLog struct {
Id int `json:"id"`
LogNo string `form:"log_no" json:"log_no" binding:"required"`
Module string `form:"module" json:"module"`
RequestUrl string `form:"request_url" json:"request_url"`
OperationMethod string `form:"operation_method" json:"operation_method"`
Params string `form:"params" json:"params"`
ExceptionStack string `form:"exception_stack" json:"exception_stack"`
OperationResult string `form:"operation_result" json:"operation_result"`
OperationSuccess int `form:"operation_success" json:"operation_success"`
OperationTime time.Time `gorm:"-" form:"operation_time" json:"operation_time"`
UserId int `form:"user_id" json:"user_id"`
Ip string `form:"ip" json:"ip"`
IpLocation string `form:"ip_location" json:"ip_location"`
OperationContent string `form:"operation_content" json:"operation_content"`
CreateTime time.Time `json:"create_time" gorm:"column:create_time;not null;default:CURRENT_TIMESTAMP"`
LastUpdateTime time.Time `json:"updated_time" gorm:"column:last_update_time;not null;default:CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP"`
}
operation log mapping
func (*OperationLog) TableName ¶
func (log *OperationLog) TableName() string
type Pagination ¶
type Role ¶
type Role struct {
Id int `json:"id"`
Name string `json:"name"`
DomainId int `json:"domain_id"`
Domain Domain `json:"domain"`
RoleName string `json:"role_name"`
Remark string `json:"remark"`
//Users []*User `json:"users" orm:"reverse(many)"`
MenuIds string `json:"menu_ids"`
MenuIdsEle string `json:"menu_ids_ele"`
}
Role model
type RoleDataPerm ¶
type RoleDataPerm struct {
Id int `json:"id"`
RoleId int `json:"role_id"`
DataPermId int `json:"data_perm_id"`
}
func (*RoleDataPerm) TableName ¶
func (r *RoleDataPerm) TableName() string
type RoleEntity ¶
type RoleEntity struct {
Id int `json:"id"`
Name string `json:"name"`
DomainId int `json:"domain_id"`
RoleName string `json:"role_name"`
Remark string `json:"remark"`
MenuIds string `json:"menu_ids"`
MenuIdsEle string `json:"menu_ids_ele"`
}
for更新创建
type User ¶
type User struct {
Id int `json:"id" example:"1"`
Username string `json:"username" example:"wutongci"`
Mobile string `json:"mobile" example:"186000000"`
Sex int `json:"sex" example:"1"`
Realname string `json:"realname" example:"黄梧桐"`
Password string `json:"-"`
Salt string `json:"-"`
DepartmentId int `json:"department_id" example:"1"`
Department Department `json:"department" example:"1"`
Faceicon string `json:"faceicon" example:"http://xxx.com"`
Email string `json:"email" example:"xxxx@hotmail.com"`
Title string `json:"title" example:"title"`
Status int `json:"status" example:"1"`
CreateTime time.Time `` /* 126-byte string literal not displayed */
LastLoginTime time.Time `` /* 130-byte string literal not displayed */
}
type UserClaims ¶
type UserOAuth ¶
type UserOAuth struct {
Id int `json:"id"`
From int `json:"from"`
User_id int `json:"user_id"`
Openid string `json:"openid"`
Unionid string `json:"unionid"`
Avatar string `json:"avatar"`
Extra string `json:"extra"`
Name string `json:"name"`
CreateTime time.Time `gorm:"type:time;column:create_time;not null;default:CURRENT_TIMESTAMP" json:"create_time,omitempty" example:"2019-07-10 0:39"`
UpdateTime time.Time `` /* 153-byte string literal not displayed */
}
type UserSecret ¶
type UserSecret struct {
Id int `json:"id"`
User_id int `json:"user_id"`
Account_name string `json:"account_name"`
Secret string `json:"secret"`
Is_open int `json:"is_open"`
CreateTime time.Time `json:"create_time"`
UpdateTime time.Time `json:"update_time"`
}
func (*UserSecret) TableName ¶
func (ur *UserSecret) TableName() string
type UserSecretQuery ¶
Click to show internal directories.
Click to hide internal directories.