Documentation ¶
Index ¶
- Variables
- func CasbinEnforcer(ctx context.Context) (enforcer *casbin.SyncedEnforcer, err error)
- func GfToken() commonService.IGToken
- type IConfig
- type IContext
- type IDept
- type IDictData
- type IDictType
- type IGenTableColumn
- type IMiddleware
- type IPost
- type IRole
- type IRule
- type ISysGenTable
- type ISysInit
- type ISysJob
- type ISysLoginLog
- type IUser
- type SqlArr
Constants ¶
This section is empty.
Variables ¶
View Source
var SysInitConfig map[string]*gvar.Var
Functions ¶
func CasbinEnforcer ¶
CasbinEnforcer 获取adapter单例对象
func GfToken ¶
func GfToken() commonService.IGToken
Types ¶
type IConfig ¶
type IConfig interface { List(ctx context.Context, req *system.ConfigSearchReq) (res *system.ConfigSearchRes, err error) Add(ctx context.Context, req *system.ConfigAddReq, userId uint64) (err error) Get(ctx context.Context, id int) (res *system.ConfigGetRes, err error) Edit(ctx context.Context, req *system.ConfigEditReq, userId uint64) (err error) Delete(ctx context.Context, ids []int) (err error) }
type IContext ¶
type IDept ¶
type IDept interface { GetList(ctx context.Context, req *system.DeptSearchReq) (list []*entity.SysDept, err error) Add(ctx context.Context, req *system.DeptAddReq) (err error) Edit(ctx context.Context, req *system.DeptEditReq) (err error) GetFromCache(ctx context.Context) (list []*entity.SysDept, err error) Delete(ctx context.Context, id int64) (err error) GetListTree(pid int64, list []*entity.SysDept) (deptTree []*model.SysDeptTreeRes) FindSonByParentId(deptList []*entity.SysDept, deptId int64) []*entity.SysDept }
type IDictData ¶
type IDictData interface { GetDictWithDataByType(ctx context.Context, req *system.GetDictReq) (dict *system.GetDictRes, err error) List(ctx context.Context, req *system.DictDataSearchReq) (res *system.DictDataSearchRes, err error) Add(ctx context.Context, req *system.DictDataAddReq, userId uint64) (err error) Get(ctx context.Context, dictCode uint) (res *system.DictDataGetRes, err error) Edit(ctx context.Context, req *system.DictDataEditReq, userId uint64) (err error) Delete(ctx context.Context, ids []int) (err error) }
type IDictType ¶
type IDictType interface { List(ctx context.Context, req *system.DictTypeSearchReq) (res *system.DictTypeSearchRes, err error) Add(ctx context.Context, req *system.DictTypeAddReq, userId uint64) (err error) Get(ctx context.Context, req *system.DictTypeGetReq) (dictType *entity.SysDictType, err error) Edit(ctx context.Context, req *system.DictTypeEditReq, userId uint64) (err error) Delete(ctx context.Context, dictIds []int) (err error) }
type IGenTableColumn ¶
type IGenTableColumn interface { SelectDbTableColumnsByName(ctx context.Context, tableName string) ([]*entity.SysGenTableColumn, error) InitColumnField(column *entity.SysGenTableColumn, table *entity.SysGenTable) GetDbType(columnType string) string IsExistInArray(value string, array []string) bool GetColumnLength(columnType string) int IsStringObject(dataType string) bool IsTimeObject(dataType string) bool IsNumberObject(dataType string) bool IsNotEdit(name string) bool IsNotList(name string) bool IsNotQuery(name string) bool CheckNameColumn(columnName string) bool CheckStatusColumn(columnName string) bool CheckTypeColumn(columnName string) bool CheckSexColumn(columnName string) bool SelectGenTableColumnListByTableId(ctx context.Context, tableId int64) (list []*entity.SysGenTableColumn, err error) GetAllTableColumns(ctx context.Context) (list []*model.SysGenTableColumn, err error) SetPkColumn(table *sysModel.SysGenTableEntityExtend, columns []*entity.SysGenTableColumn) }
func GenTableColumn ¶
func GenTableColumn() IGenTableColumn
type IMiddleware ¶
func Middleware ¶
func Middleware() IMiddleware
type IPost ¶
type IPost interface { List(ctx context.Context, req *system.PostSearchReq) (res *system.PostSearchRes, err error) Add(ctx context.Context, req *system.PostAddReq) (err error) Edit(ctx context.Context, req *system.PostEditReq) (err error) Delete(ctx context.Context, ids []int) (err error) GetUsedPost(ctx context.Context) (list []*entity.SysPost, err error) }
type IRole ¶
type IRole interface { GetRoleList(ctx context.Context) (list []*entity.SysRole, err error) GetRoleListSearch(ctx context.Context, req *system.RoleListReq) (res *system.RoleListRes, err error) AddRole(ctx context.Context, req *system.RoleAddReq) (err error) Get(ctx context.Context, id uint) (res *entity.SysRole, err error) GetFilteredNamedPolicy(ctx context.Context, id uint) (gpSlice []int, err error) EditRole(ctx context.Context, req *system.RoleEditReq) error DeleteByIds(ctx context.Context, ids []int64) (err error) }
type IRule ¶
type IRule interface { GetIsMenuList(ctx context.Context) ([]*model.SysAuthRuleInfoRes, error) GetMenuList(ctx context.Context) (list []*model.SysAuthRuleInfoRes, err error) GetIsButtonList(ctx context.Context) ([]*model.SysAuthRuleInfoRes, error) Add(ctx context.Context, req *system.RuleAddReq) (err error) Get(ctx context.Context, id uint) (rule *entity.SysAuthRule, err error) GetMenuRoles(ctx context.Context, id uint) (roleIds []uint, err error) Update(ctx context.Context, req *system.RuleUpdateReq) (err error) GetMenuListSearch(ctx context.Context, req *system.RuleSearchReq) (res []*model.SysAuthRuleInfoRes, err error) GetMenuListTree(pid uint, list []*model.SysAuthRuleInfoRes) []*model.SysAuthRuleTreeRes DeleteMenuByIds(ctx context.Context, ids []int) (err error) }
type ISysGenTable ¶
type ISysGenTable interface { SelectListByPage(ctx context.Context, req *system.GenTableSearchReq) (total int, list []*entity.SysGenTable, err error) SelectDbTableList(ctx context.Context, req *system.GenDbSearchReq) (res *system.GenDbSearchRes, err error) SelectDbTableListByNames(ctx context.Context, tableNames []string) ([]*entity.SysGenTable, error) ImportGenTable(ctx context.Context, tableList []*entity.SysGenTable) error Delete(ctx context.Context, ids []int64) error SaveEdit(ctx context.Context, req *system.GenTableEditReq) (err error) GetTableInfoByTableId(ctx context.Context, tableId int64) (info *entity.SysGenTable, err error) GenData(ctx context.Context, tableId int64) (data g.MapStrStr, extendData *model.SysGenTableEntityExtend, err error) BatchGenCode(ctx context.Context, tableIds []int64, r *ghttp.Request) (err error) GenCode(ctx context.Context, ids []int64) (err error) }
func SysGenTable ¶
func SysGenTable() ISysGenTable
type ISysInit ¶
type ISysInit interface { // 生成配置文件 CreateConfigFile(ctx context.Context, req *system.DbInitCreateDbReq) (err error) // 生成数据库 CreateDataBase(ctx context.Context, dbName string) (err error) // 加载配置文件 LoadConfigFile() (err error) // 是否已生成配置文件 IsCreateConfigFile() bool //创建数据库 CreateDataBaseByName(ctx context.Context, req *system.DbInitCreateDbReq) (err error) }
type ISysJob ¶
type ISysJob interface { List(ctx context.Context, req *system.SysJobSearchReq) (total, page int, list []*entity.SysJob, err error) Get(ctx context.Context, id int64) (info *entity.SysJob, err error) Add(ctx context.Context, req *system.SysJobAddReq) (err error) Edit(ctx context.Context, req *system.SysJobEditReq) error DeleteByIds(ctx context.Context, ids []int) (err error) ChangeStatus(ctx context.Context, req *system.SysJobStatusReq) error }
type job struct { } var SysJob = new(job)
type ISysLoginLog ¶
type ISysLoginLog interface { Invoke(ctx context.Context, data *model.LoginLogParams) List(ctx context.Context, req *system.LoginLogSearchReq) (res *system.LoginLogSearchRes, err error) DeleteLoginLogByIds(ctx context.Context, ids []int) (err error) ClearLoginLog(ctx context.Context) (err error) }
func SysLoginLog ¶
func SysLoginLog() ISysLoginLog
type IUser ¶
type IUser interface { GetAdminUserByUsernamePassword(ctx context.Context, req *system.UserLoginReq) (user *model.LoginUserRes, err error) LoginLog(ctx context.Context, params *model.LoginLogParams) UpdateLoginInfo(ctx context.Context, id uint64, ip string) (err error) NotCheckAuthAdminIds(ctx context.Context) *gset.Set GetAdminRules(ctx context.Context, userId uint64) (menuList []*model.UserMenus, permissions []string, err error) List(ctx context.Context, req *system.UserSearchReq) (total int, userList []*entity.SysUser, err error) GetUsersRoleDept(ctx context.Context, userList []*entity.SysUser) (users []*model.SysUserRoleDeptRes, err error) Add(ctx context.Context, req *system.UserAddReq) (err error) GetEditUser(ctx context.Context, id uint64) (res *system.UserGetEditRes, err error) Edit(ctx context.Context, req *system.UserEditReq) (err error) ResetUserPwd(ctx context.Context, req *system.UserResetPwdReq) (err error) ChangeUserStatus(ctx context.Context, req *system.UserStatusReq) (err error) Delete(ctx context.Context, ids []int) (err error) }
Click to show internal directories.
Click to hide internal directories.