Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { global.Model OrganizationId uint `json:"organizationId" gorm:"comment:组织id"` Logo string `json:"logo" gorm:"comment:Logo"` Code string `json:"code" gorm:"comment:应用名称"` Name string `json:"name" gorm:"comment:显示名称"` ClientId string `json:"clientId" gorm:"comment:ClientId"` ClientSecret string `json:"clientSecret" gorm:"comment:ClientSecret"` RedirectUris string `json:"redirectUris" gorm:"comment:重定向url列表"` }
func (*Application) BeforeCreate ¶
func (app *Application) BeforeCreate(tx *gorm.DB) error
func (*Application) CompareHashAndSecret ¶
func (app *Application) CompareHashAndSecret(secret string) bool
CompareHashAndPassword 密码检查 false 校验失败, true 校验成功
func (*Application) TableName ¶
func (app *Application) TableName() string
type ApplicationOauthProvider ¶
type ApplicationOauthProvider struct { global.Model ApplicationId uint `json:"applicationId" gorm:"comment:应用id"` OrganizationId uint `json:"organizationId" gorm:"comment:组织id"` Provider string `json:"provider" gorm:"comment:第三方授权类型"` NotBoundPolicy string `` /* 138-byte string literal not displayed */ }
func (*ApplicationOauthProvider) TableName ¶
func (u *ApplicationOauthProvider) TableName() string
type Casbin ¶
type OauthBound ¶
type OauthBound struct { global.Model ApplicationId uint `json:"applicationId" gorm:"comment:应用id"` OrganizationId uint `json:"organizationId" gorm:"comment:组织id"` UserId uint `json:"userId" gorm:"comment:用户id"` Provider string `json:"provider" gorm:"comment:第三方类型"` OpenId string `json:"openId" gorm:"comment:第三方id"` }
func (*OauthBound) TableName ¶
func (u *OauthBound) TableName() string
type OperationLog ¶
type OperationLog struct { global.Model Status int `json:"status" gorm:"column:status;comment:请求状态"` Ip string `json:"ip" gorm:"column:ip;comment:请求ip"` Path string `json:"path" gorm:"column:path;comment:请求路径"` Method string `json:"method" gorm:"column:method;comment:请求方法"` Agent string `json:"agent" gorm:"column:agent;comment:代理"` Latency time.Duration `json:"latency" gorm:"column:latency;comment:延迟" swaggertype:"string"` Request string `json:"body" gorm:"type:text;column:request;comment:请求body"` Response string `json:"resp" gorm:"type:text;column:response;comment:响应Body"` ErrorMessage string `json:"errorMessage" gorm:"column:error_message;comment:错误信息"` UserId uint `json:"userId" gorm:"column:user_id;comment:用户id"` }
func (*OperationLog) TableName ¶
func (o *OperationLog) TableName() string
type Organization ¶
type Organization struct { global.Model Logo string `json:"logo" gorm:"default:http://qmplusimg.henrongyi.top/head.png;comment:Logo"` // 用户头像 Code string `json:"code" gorm:"comment:组织名称"` Name string `json:"name" gorm:"comment:显示名称"` PhoneCodeSupports string `json:"phoneCodeSupports" gorm:"comment:手机区号支持,为空则支持所有"` RegisterTypeSupports bool `json:"RegisterTypeSupports" gorm:"comment:注册类型支持"` }
func (*Organization) BeforeCreate ¶
func (org *Organization) BeforeCreate(tx *gorm.DB) error
func (*Organization) TableName ¶
func (org *Organization) TableName() string
type Permission ¶
type Permission struct { global.Model ApplicationId uint `json:"applicationId" gorm:"comment:应用id"` OrganizationId uint `json:"organizationId" gorm:"comment:组织id"` ParentId uint `json:"parentId" gorm:"comment:父权限id"` Title string `json:"title" gorm:"not null;comment:资源标题;size:200"` Code string `json:"Code" gorm:"not null;comment:权限代码;size:200"` }
func (*Permission) BeforeCreate ¶
func (a *Permission) BeforeCreate(tx *gorm.DB) error
func (*Permission) TableName ¶
func (a *Permission) TableName() string
type Provider ¶
type Role ¶
type Role struct { global.Model ApplicationId uint `json:"applicationId" gorm:"comment:应用id"` OrganizationId uint `json:"organizationId" gorm:"comment:组织id"` Code string `json:"code" gorm:"comment:角色名"` // 角色名 Name string `json:"name" gorm:"comment:显示名称"` // 角色名 Permissions []Permission `json:"permissions" gorm:"many2many:a_role_permission;"` }
type User ¶
type User struct { global.Model ApplicationId uint `json:"applicationId" gorm:"comment:应用id"` OrganizationId uint `json:"organizationId" gorm:"comment:组织id"` Avatar string `json:"avatar" gorm:"default:http://qmplusimg.henrongyi.top/head.png;comment:用户头像"` Username string `json:"userName" gorm:"comment:用户登录名"` Password string `json:"-" gorm:"comment:用户登录密码"` NickName string `json:"nickName" gorm:"default:系统用户;comment:用户昵称"` PhoneCode string `json:"phoneCode" gorm:"comment:手机区号"` Phone string `json:"phone" gorm:"comment:手机号"` Email string `json:"email" gorm:"comment:邮箱"` Roles []Role `json:"roles" gorm:"many2many:a_user_role;"` }
func (*User) CompareHashAndPassword ¶
CompareHashAndPassword 密码检查 false 校验失败, true 校验成功
Click to show internal directories.
Click to hide internal directories.