Documentation
¶
Index ¶
- func DefaultMenu() []system.SysBaseMenu
- type AddMenuAuthorityInfo
- type AutoCode
- type AutoCodeField
- type AutoFunc
- type BaseClaims
- type CasbinInReceive
- type CasbinInfo
- type ChangePasswordReq
- type ChangeUserInfo
- type CustomClaims
- type DataSource
- type GetUserList
- type InitApi
- type InitDB
- func (i *InitDB) MssqlEmptyDsn() string
- func (i *InitDB) MysqlEmptyDsn() string
- func (i *InitDB) PgsqlEmptyDsn() string
- func (i *InitDB) SqliteEmptyDsn() string
- func (i *InitDB) ToMssqlConfig() config.Mssql
- func (i *InitDB) ToMysqlConfig() config.Mysql
- func (i *InitDB) ToPgsqlConfig() config.Pgsql
- func (i *InitDB) ToSqliteConfig() config.Sqlite
- type InitMenu
- type LLMAutoCode
- type Login
- type Register
- type SearchApiParams
- type SetUserAuth
- type SetUserAuthorities
- type SysAuthorityBtnReq
- type SysAutoCodePackageCreate
- type SysAutoHistoryCreate
- type SysAutoHistoryRollBack
- type SysDictionaryDetailSearch
- type SysExportTemplateSearch
- type SysOperationRecordSearch
- type SysParamsSearch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultMenu ¶
func DefaultMenu() []system.SysBaseMenu
Types ¶
type AddMenuAuthorityInfo ¶
type AddMenuAuthorityInfo struct {
Menus []system.SysBaseMenu `json:"menus"`
AuthorityId uint `json:"authorityId"` // 角色ID
}
Add menu authority info structure
type AutoCode ¶
type AutoCode struct {
Package string `json:"package"`
PackageT string `json:"-"`
TableName string `json:"tableName" example:"表名"` // 表名
BusinessDB string `json:"businessDB" example:"业务数据库"` // 业务数据库
StructName string `json:"structName" example:"Struct名称"` // Struct名称
PackageName string `json:"packageName" example:"文件名称"` // 文件名称
Description string `json:"description" example:"Struct中文名称"` // Struct中文名称
Abbreviation string `json:"abbreviation" example:"Struct简称"` // Struct简称
HumpPackageName string `json:"humpPackageName" example:"go文件名称"` // go文件名称
GvaModel bool `json:"gvaModel" example:"false"` // 是否使用gva默认Model
AutoMigrate bool `json:"autoMigrate" example:"false"` // 是否自动迁移表结构
AutoCreateResource bool `json:"autoCreateResource" example:"false"` // 是否自动创建资源标识
AutoCreateApiToSql bool `json:"autoCreateApiToSql" example:"false"` // 是否自动创建api
AutoCreateMenuToSql bool `json:"autoCreateMenuToSql" example:"false"` // 是否自动创建menu
AutoCreateBtnAuth bool `json:"autoCreateBtnAuth" example:"false"` // 是否自动创建按钮权限
OnlyTemplate bool `json:"onlyTemplate" example:"false"` // 是否只生成模板
IsAdd bool `json:"isAdd" example:"false"` // 是否新增
Fields []*AutoCodeField `json:"fields"`
Module string `json:"-"`
DictTypes []string `json:"-"`
PrimaryField *AutoCodeField `json:"primaryField"`
DataSourceMap map[string]*DataSource `json:"-"`
HasPic bool `json:"-"`
HasFile bool `json:"-"`
HasTimer bool `json:"-"`
NeedSort bool `json:"-"`
NeedJSON bool `json:"-"`
HasRichText bool `json:"-"`
HasDataSource bool `json:"-"`
HasSearchTimer bool `json:"-"`
HasArray bool `json:"-"`
HasExcel bool `json:"-"`
}
func (*AutoCode) History ¶
func (r *AutoCode) History() SysAutoHistoryCreate
func (*AutoCode) Pretreatment ¶
Pretreatment 预处理 Author [SliverHorn](https://github.com/SliverHorn)
type AutoCodeField ¶
type AutoCodeField struct {
FieldName string `json:"fieldName"` // Field名
FieldDesc string `json:"fieldDesc"` // 中文名
FieldType string `json:"fieldType"` // Field数据类型
FieldJson string `json:"fieldJson"` // FieldJson
DataTypeLong string `json:"dataTypeLong"` // 数据库字段长度
Comment string `json:"comment"` // 数据库字段描述
ColumnName string `json:"columnName"` // 数据库字段
FieldSearchType string `json:"fieldSearchType"` // 搜索条件
FieldSearchHide bool `json:"fieldSearchHide"` // 是否隐藏查询条件
DictType string `json:"dictType"` // 字典
//Front bool `json:"front"` // 是否前端可见
Form bool `json:"form"` // 是否前端新建/编辑
Table bool `json:"table"` // 是否前端表格列
Desc bool `json:"desc"` // 是否前端详情
Excel bool `json:"excel"` // 是否导入/导出
Require bool `json:"require"` // 是否必填
DefaultValue string `json:"defaultValue"` // 是否必填
ErrorText string `json:"errorText"` // 校验失败文字
Clearable bool `json:"clearable"` // 是否可清空
Sort bool `json:"sort"` // 是否增加排序
PrimaryKey bool `json:"primaryKey"` // 是否主键
DataSource *DataSource `json:"dataSource"` // 数据源
CheckDataSource bool `json:"checkDataSource"` // 是否检查数据源
FieldIndexType string `json:"fieldIndexType"` // 索引类型
}
type AutoFunc ¶
type AutoFunc struct {
Package string `json:"package"`
FuncName string `json:"funcName"` // 方法名称
Router string `json:"router"` // 路由名称
FuncDesc string `json:"funcDesc"` // 方法介绍
BusinessDB string `json:"businessDB"` // 业务库
StructName string `json:"structName"` // Struct名称
PackageName string `json:"packageName"` // 文件名称
Description string `json:"description"` // Struct中文名称
Abbreviation string `json:"abbreviation"` // Struct简称
HumpPackageName string `json:"humpPackageName"` // go文件名称
Method string `json:"method"` // 方法
IsPlugin bool `json:"isPlugin"` // 是否插件
IsAuth bool `json:"isAuth"` // 是否鉴权
IsPreview bool `json:"isPreview"` // 是否预览
IsAi bool `json:"isAi"` // 是否AI
ApiFunc string `json:"apiFunc"` // API方法
ServerFunc string `json:"serverFunc"` // 服务方法
JsFunc string `json:"jsFunc"` // JS方法
}
type BaseClaims ¶
type CasbinInReceive ¶
type CasbinInReceive struct {
AuthorityId uint `json:"authorityId"` // 权限id
CasbinInfos []CasbinInfo `json:"casbinInfos"`
}
Casbin structure for input parameters
type ChangePasswordReq ¶
type ChangePasswordReq struct {
ID uint `json:"-"` // 从 JWT 中提取 user id,避免越权
Password string `json:"password"` // 密码
NewPassword string `json:"newPassword"` // 新密码
}
Modify password structure
type ChangeUserInfo ¶
type ChangeUserInfo struct {
ID uint `gorm:"primarykey"` // 主键ID
NickName string `json:"nickName" gorm:"default:系统用户;comment:用户昵称"` // 用户昵称
Phone string `json:"phone" gorm:"comment:用户手机号"` // 用户手机号
AuthorityIds []uint `json:"authorityIds" gorm:"-"` // 角色ID
Email string `json:"email" gorm:"comment:用户邮箱"` // 用户邮箱
HeaderImg string `json:"headerImg" gorm:"default:https://qmplusimg.henrongyi.top/gva_header.jpg;comment:用户头像"` // 用户头像
SideMode string `json:"sideMode" gorm:"comment:用户侧边主题"` // 用户侧边主题
Enable int `json:"enable" gorm:"comment:冻结用户"` //冻结用户
Authorities []system.SysAuthority `json:"-" gorm:"many2many:sys_user_authority;"`
}
type CustomClaims ¶
type CustomClaims struct {
BaseClaims
BufferTime int64
jwt.RegisteredClaims
}
Custom claims structure
type DataSource ¶
type GetUserList ¶
type InitDB ¶
type InitDB struct {
AdminPassword string `json:"adminPassword" binding:"required"`
DBType string `json:"dbType"` // 数据库类型
Host string `json:"host"` // 服务器地址
Port string `json:"port"` // 数据库连接端口
UserName string `json:"userName"` // 数据库用户名
Password string `json:"password"` // 数据库密码
DBName string `json:"dbName" binding:"required"` // 数据库名
DBPath string `json:"dbPath"` // sqlite数据库文件路径
}
func (*InitDB) MssqlEmptyDsn ¶
func (*InitDB) MysqlEmptyDsn ¶
MysqlEmptyDsn msyql 空数据库 建库链接 Author SliverHorn
func (*InitDB) PgsqlEmptyDsn ¶
PgsqlEmptyDsn pgsql 空数据库 建库链接 Author SliverHorn
func (*InitDB) SqliteEmptyDsn ¶
SqliteEmptyDsn sqlite 空数据库 建库链接 Author Kafumio
func (*InitDB) ToMssqlConfig ¶
func (*InitDB) ToMysqlConfig ¶
ToMysqlConfig 转换 config.Mysql Author [SliverHorn](https://github.com/SliverHorn)
func (*InitDB) ToPgsqlConfig ¶
ToPgsqlConfig 转换 config.Pgsql Author [SliverHorn](https://github.com/SliverHorn)
func (*InitDB) ToSqliteConfig ¶
ToSqliteConfig 转换 config.Sqlite Author [Kafumio](https://github.com/Kafumio)
type LLMAutoCode ¶
type Login ¶
type Login struct {
Username string `json:"username"` // 用户名
Password string `json:"password"` // 密码
Captcha string `json:"captcha"` // 验证码
CaptchaId string `json:"captchaId"` // 验证码ID
}
User login structure
type Register ¶
type Register struct {
Username string `json:"userName" example:"用户名"`
Password string `json:"passWord" example:"密码"`
NickName string `json:"nickName" example:"昵称"`
HeaderImg string `json:"headerImg" example:"头像链接"`
AuthorityId uint `json:"authorityId" swaggertype:"string" example:"int 角色id"`
Enable int `json:"enable" swaggertype:"string" example:"int 是否启用"`
AuthorityIds []uint `json:"authorityIds" swaggertype:"string" example:"[]uint 角色id"`
Phone string `json:"phone" example:"电话号码"`
Email string `json:"email" example:"电子邮箱"`
}
Register User register structure
type SearchApiParams ¶
type SearchApiParams struct {
system.SysApi
request.PageInfo
OrderKey string `json:"orderKey"` // 排序
Desc bool `json:"desc"` // 排序方式:升序false(默认)|降序true
}
api分页条件查询及排序结构体
type SetUserAuth ¶
type SetUserAuth struct {
AuthorityId uint `json:"authorityId"` // 角色ID
}
Modify user's auth structure
type SetUserAuthorities ¶
Modify user's auth structure
type SysAuthorityBtnReq ¶
type SysAutoCodePackageCreate ¶
type SysAutoCodePackageCreate struct {
Desc string `json:"desc" example:"描述"`
Label string `json:"label" example:"展示名"`
Template string `json:"template" example:"模版"`
PackageName string `json:"packageName" example:"包名"`
Module string `json:"-" example:"模块"`
}
func (*SysAutoCodePackageCreate) AutoCode ¶
func (r *SysAutoCodePackageCreate) AutoCode() AutoCode
func (*SysAutoCodePackageCreate) Create ¶
func (r *SysAutoCodePackageCreate) Create() model.SysAutoCodePackage
type SysAutoHistoryCreate ¶
type SysAutoHistoryCreate struct {
Table string // 表名
Package string // 模块名/插件名
Request string // 前端传入的结构化信息
StructName string // 结构体名称
BusinessDB string // 业务库
Description string // Struct中文名称
Injections map[string]string // 注入路径
Templates map[string]string // 模板信息
ApiIDs []uint // api表注册内容
MenuID uint // 菜单ID
ExportTemplateID uint // 导出模板ID
}
func (*SysAutoHistoryCreate) Create ¶
func (r *SysAutoHistoryCreate) Create() model.SysAutoCodeHistory
type SysAutoHistoryRollBack ¶
type SysAutoHistoryRollBack struct {
common.GetById
DeleteApi bool `json:"deleteApi" form:"deleteApi"` // 是否删除接口
DeleteMenu bool `json:"deleteMenu" form:"deleteMenu"` // 是否删除菜单
DeleteTable bool `json:"deleteTable" form:"deleteTable"` // 是否删除表
}
func (*SysAutoHistoryRollBack) ApiIds ¶
func (r *SysAutoHistoryRollBack) ApiIds(entity model.SysAutoCodeHistory) common.IdsReq
type SysDictionaryDetailSearch ¶
type SysDictionaryDetailSearch struct {
system.SysDictionaryDetail
request.PageInfo
}
type SysExportTemplateSearch ¶
type SysOperationRecordSearch ¶
type SysOperationRecordSearch struct {
system.SysOperationRecord
request.PageInfo
}