Documentation
¶
Index ¶
- Constants
- Variables
- type AddMenuRoleInfo
- type CasbinInReceive
- type CasbinInfo
- type CasbinService
- type ChangePasswordReq
- type ChangeUserInfo
- type Cpu
- type Disk
- type Empty
- type GetById
- type GetRoleId
- type IdsReq
- type Login
- type LoginResponse
- type MenuRole
- type Meta
- type ModApi
- type ModBase
- type ModDict
- type ModDictail
- type ModMenu
- type ModRole
- type Os
- type PageInfo
- type PolicyPathResponse
- type Ram
- type Register
- type Role2Apis
- type Role2Menus
- type Role2SubRoles
- type Role2Users
- type RoleUserMenu
- type SearchApiParams
- type SearchInfoApi
- type SearchInfoDict
- type SearchInfoDictail
- type SearchInfoRecord
- type Server
- type SetUserAuth
- type SetUserAuthorities
- type SwaDictSearch
- type SwaDictailSearch
- type SwaRecord
- type SwaRecordSearch
- type SwaRole
- type SwaRoleBtn
- type SwaRoleBtnReq
- type SwaRoleBtnRes
- type SwaRoleChildren
- type SwaRoleCopyResponse
- type SwaRoleMenu
- type SwaRoleResponse
- type SysAPIListResponse
- type SysAPIResponse
- type SysBaseMenu
- type SysBaseMenuBtn
- type SysBaseMenuParameter
- type SysBaseMenuResponse
- type SysBaseMenusResponse
- type SysMenu
- type SysMenusResponse
- type SysUser
- type SysUserResponse
- type T
- type TApi
- type TBlacklist
- type TCasbin
- type TDict
- type TDictail
- type TMenu
- type TRecord
- type TRole
- type TSystem
- type TUser
- type UserRole
Constants ¶
View Source
const ( B = 1 KB = 1024 * B MB = 1024 * KB GB = 1024 * MB )
Variables ¶
View Source
var ErrRoleExistence = errors.New("存在相同角色id")
View Source
var StateDict = map[string]string{
"os": "操作系统",
"cpu": "处理器",
"ram": "内存",
"disk": "硬盘",
"goos": "适配系统",
"numCpu": "cpu个数",
"compiler": "编译器",
"goVersion": "go版本",
"numGoroutine": "协程数量",
"cores": "内核数",
"usedMb": "已用(GB)",
"totalMb": "共计(GB)",
"usedPercent": "使用率",
"usedGb": "已用(GB)",
"totalGb": "容量(GB)",
}
Functions ¶
This section is empty.
Types ¶
type AddMenuRoleInfo ¶
type AddMenuRoleInfo struct { Menus []SysBaseMenu `json:"menus"` RoleId uint `json:"roleId"` }
type CasbinInReceive ¶
type CasbinInReceive struct { RoleId uint `json:"roleId"` CasbinInfos []CasbinInfo `json:"casbinInfos"` }
type CasbinInfo ¶
type CasbinInfo struct { weaver.AutoMarshal Path string `json:"path"` Method string `json:"method"` }
func DefaultCasbin ¶
func DefaultCasbin() []CasbinInfo
func (*CasbinInfo) WeaverMarshal ¶
func (x *CasbinInfo) WeaverMarshal(enc *codegen.Encoder)
func (*CasbinInfo) WeaverUnmarshal ¶
func (x *CasbinInfo) WeaverUnmarshal(dec *codegen.Decoder)
type CasbinService ¶
type CasbinService struct{}
type ChangePasswordReq ¶
type ChangeUserInfo ¶
type ChangeUserInfo struct { ID uint `gorm:"primarykey"` NickName string `json:"nickName" gorm:"default:系统用户;comment:用户昵称"` Phone string `json:"phone" gorm:"comment:用户手机号"` RoleIds []uint `json:"roleIds" gorm:"-"` Email string `json:"email" gorm:"comment:用户邮箱"` HeaderImg string `json:"headerImg" gorm:"comment:用户头像"` SideMode string `json:"sideMode" gorm:"comment:用户侧边主题"` Enable int `json:"enable" gorm:"comment:冻结用户"` Authorities []SwaRole `json:"-" gorm:"many2many:swa_user_role;"` }
type Cpu ¶
type Cpu struct { weaver.AutoMarshal Cpus []float64 `json:"cpus"` Cores int `json:"cores"` }
func (*Cpu) WeaverMarshal ¶
func (*Cpu) WeaverUnmarshal ¶
type Disk ¶
type Disk struct { weaver.AutoMarshal UsedGB int `json:"usedGb"` TotalGB int `json:"totalGb"` UsedPercent int `json:"usedPercent"` }
func (*Disk) WeaverMarshal ¶
func (*Disk) WeaverUnmarshal ¶
type LoginResponse ¶
type MenuRole ¶
type MenuRole struct { Menu SysBaseMenu Roles []SwaRole `json:"roles" gorm:"-"` Parameters []SysBaseMenuParameter `json:"parameters" gorm:"-"` MenuBtn []SysBaseMenuBtn `json:"menuBtn" gorm:"-"` }
type Meta ¶
type Meta struct { weaver.AutoMarshal ActiveName string `json:"activeName" gorm:"comment:高亮菜单"` KeepAlive bool `json:"keepAlive" gorm:"comment:是否缓存"` DefaultMenu bool `json:"defaultMenu" gorm:"comment:是否是基础路由(开发中)"` Title string `json:"title" gorm:"comment:菜单名"` Icon string `json:"icon" gorm:"comment:菜单图标"` CloseTab bool `json:"closeTab" gorm:"comment:自动关闭tab"` }
func (*Meta) WeaverMarshal ¶
func (*Meta) WeaverUnmarshal ¶
type ModApi ¶
type ModApi struct { weaver.AutoMarshal ModBase AppID uint `json:"appID" gorm:"comment:appID"` TableID uint `json:"tableID" gorm:"comment:tableID"` Path string `json:"path" gorm:"comment:api路径"` Description string `json:"description" gorm:"comment:api中文描述"` ApiGroup string `json:"apiGroup" gorm:"comment:api组"` Method string `json:"method" gorm:"default:POST;comment:方法"` }
func (*ModApi) WeaverMarshal ¶
func (*ModApi) WeaverUnmarshal ¶
type ModBase ¶
type ModBase struct { weaver.AutoMarshal ID uint `gorm:"primarykey"` CreatedAt time.Time UpdatedAt time.Time DeletedAt time.Time `gorm:"index" json:"-"` CreatedBy uint `json:"createdBy" gorm:"column:createdBy;comment:创建者"` UpdatedBy uint `json:"updatedBy" gorm:"column:updatedBy;comment:更新者"` DeletedBy uint `json:"deletedBy" gorm:"column:deletedBy"` }
func (*ModBase) WeaverMarshal ¶
func (*ModBase) WeaverUnmarshal ¶
type ModDict ¶
type ModDict struct { weaver.AutoMarshal ModBase Name string `json:"name" form:"name" gorm:"column:name;comment:字典名(中)"` Type string `json:"type" form:"type" gorm:"column:type;comment:字典名(英)"` Status *bool `json:"status" form:"status" gorm:"column:status;comment:状态"` Detail string `json:"detail" form:"detail" gorm:"column:detail;comment:描述"` ModDictails []ModDictail `json:"swaDictail" gorm:"-"` }
func (*ModDict) WeaverMarshal ¶
func (*ModDict) WeaverUnmarshal ¶
type ModDictail ¶
type ModDictail struct { weaver.AutoMarshal ModBase Label string `json:"label" form:"label" gorm:"column:label;comment:展示值"` Value int `json:"value" form:"value" gorm:"column:value;comment:字典值"` Status *bool `json:"status" form:"status" gorm:"column:status;comment:启用状态"` Sort int `json:"sort" form:"sort" gorm:"column:sort;comment:排序标记"` SwaDictID int `json:"swaDictID" form:"swaDictID" gorm:"column:swaDictID;comment:关联标记"` }
func (ModDictail) TableName ¶
func (ModDictail) TableName() string
func (*ModDictail) WeaverMarshal ¶
func (x *ModDictail) WeaverMarshal(enc *codegen.Encoder)
func (*ModDictail) WeaverUnmarshal ¶
func (x *ModDictail) WeaverUnmarshal(dec *codegen.Decoder)
type ModMenu ¶
type ModMenu struct { weaver.AutoMarshal ModBase MenuLevel uint `json:"-"` ParentId string `json:"parentId" gorm:"comment:父菜单ID"` Path string `json:"path" gorm:"comment:路由path"` Name string `json:"name" gorm:"comment:路由name"` Hidden bool `json:"hidden" gorm:"comment:是否在列表隐藏"` Component string `json:"component" gorm:"comment:对应前端文件路径"` Sort int `json:"sort" gorm:"comment:排序标记"` Meta `json:"meta" gorm:"embedded;comment:附加属性"` }
func (*ModMenu) WeaverMarshal ¶
func (*ModMenu) WeaverUnmarshal ¶
type ModRole ¶
type ModRole struct { weaver.AutoMarshal ModBase RoleId uint `json:"roleId" gorm:"column:roleId;not null;comment:角色ID;size:90"` RoleName string `json:"roleName" gorm:"column:roleName;comment:角色名"` ParentId uint `json:"parentId" gorm:"column:parentId;comment:父角色ID"` DefaultRouter string `json:"defaultRouter" gorm:"column:defaultRouter;comment:默认菜单;default:dashboard"` }
func (*ModRole) WeaverMarshal ¶
func (*ModRole) WeaverUnmarshal ¶
type Os ¶
type Os struct { weaver.AutoMarshal GOOS string `json:"goos"` NumCPU int `json:"numCpu"` Compiler string `json:"compiler"` GoVersion string `json:"goVersion"` NumGoroutine int `json:"numGoroutine"` }
func (*Os) WeaverMarshal ¶
func (*Os) WeaverUnmarshal ¶
type PageInfo ¶
type PageInfo struct { weaver.AutoMarshal Page int `json:"page" form:"page"` // --页码 PageSize int `json:"pageSize" form:"pageSize"` // --每页大小 Keyword string `json:"keyword" form:"keyword"` // --关键字 }
func (*PageInfo) WeaverMarshal ¶
func (*PageInfo) WeaverUnmarshal ¶
type PolicyPathResponse ¶
type PolicyPathResponse struct {
Paths []CasbinInfo `json:"paths"`
}
type Ram ¶
type Ram struct { weaver.AutoMarshal UsedMB int `json:"usedMb"` TotalMB int `json:"totalMb"` UsedPercent int `json:"usedPercent"` }
func (*Ram) WeaverMarshal ¶
func (*Ram) WeaverUnmarshal ¶
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:"头像链接"` RoleId uint `json:"roleId" swaggertype:"string" example:"int 角色id"` Enable int `json:"enable" swaggertype:"string" example:"int 是否启用"` RoleIds []uint `json:"roleIds" swaggertype:"string" example:"[]uint 角色id"` Phone string `json:"phone" example:"电话号码"` Email string `json:"email" example:"电子邮箱"` }
type Role2Menus ¶
func (Role2Menus) TableName ¶
func (Role2Menus) TableName() string
type Role2SubRoles ¶
func (Role2SubRoles) TableName ¶
func (Role2SubRoles) TableName() string
type Role2Users ¶
func (Role2Users) TableName ¶
func (Role2Users) TableName() string
type RoleUserMenu ¶
type RoleUserMenu struct { weaver.AutoMarshal ModRole Users []SysUser `json:"users" gorm:"-"` SysBaseMenus []SysBaseMenu `json:"menus" gorm:"-"` }
func (*RoleUserMenu) WeaverMarshal ¶
func (x *RoleUserMenu) WeaverMarshal(enc *codegen.Encoder)
func (*RoleUserMenu) WeaverUnmarshal ¶
func (x *RoleUserMenu) WeaverUnmarshal(dec *codegen.Decoder)
type SearchApiParams ¶
type SearchInfoApi ¶
type SearchInfoApi struct { weaver.AutoMarshal ModApi PageInfo StartCreatedAt time.Time `json:"startCreatedAt" form:"startCreatedAt"` EndCreatedAt time.Time `json:"endCreatedAt" form:"endCreatedAt"` OrderKey string `json:"orderKey"` Desc bool `json:"desc"` }
func (*SearchInfoApi) WeaverMarshal ¶
func (x *SearchInfoApi) WeaverMarshal(enc *codegen.Encoder)
func (*SearchInfoApi) WeaverUnmarshal ¶
func (x *SearchInfoApi) WeaverUnmarshal(dec *codegen.Decoder)
type SearchInfoDict ¶
type SearchInfoDict struct { weaver.AutoMarshal ModDict PageInfo StartCreatedAt time.Time `json:"startCreatedAt" form:"startCreatedAt"` EndCreatedAt time.Time `json:"endCreatedAt" form:"endCreatedAt"` OrderKey string `json:"orderKey"` Desc bool `json:"desc"` }
func (*SearchInfoDict) WeaverMarshal ¶
func (x *SearchInfoDict) WeaverMarshal(enc *codegen.Encoder)
func (*SearchInfoDict) WeaverUnmarshal ¶
func (x *SearchInfoDict) WeaverUnmarshal(dec *codegen.Decoder)
type SearchInfoDictail ¶
type SearchInfoDictail struct { weaver.AutoMarshal ModDictail PageInfo StartCreatedAt time.Time `json:"startCreatedAt" form:"startCreatedAt"` EndCreatedAt time.Time `json:"endCreatedAt" form:"endCreatedAt"` OrderKey string `json:"orderKey"` Desc bool `json:"desc"` }
func (*SearchInfoDictail) WeaverMarshal ¶
func (x *SearchInfoDictail) WeaverMarshal(enc *codegen.Encoder)
func (*SearchInfoDictail) WeaverUnmarshal ¶
func (x *SearchInfoDictail) WeaverUnmarshal(dec *codegen.Decoder)
type SearchInfoRecord ¶
type SearchInfoRecord struct { weaver.AutoMarshal SwaRecord PageInfo StartCreatedAt time.Time `json:"startCreatedAt" form:"startCreatedAt"` EndCreatedAt time.Time `json:"endCreatedAt" form:"endCreatedAt"` OrderKey string `json:"orderKey"` Desc bool `json:"desc"` }
func (*SearchInfoRecord) WeaverMarshal ¶
func (x *SearchInfoRecord) WeaverMarshal(enc *codegen.Encoder)
func (*SearchInfoRecord) WeaverUnmarshal ¶
func (x *SearchInfoRecord) WeaverUnmarshal(dec *codegen.Decoder)
type Server ¶
type Server struct { weaver.AutoMarshal Os Os `json:"os"` Cpu Cpu `json:"cpu"` Ram Ram `json:"ram"` Disk Disk `json:"disk"` }
func (*Server) WeaverMarshal ¶
func (*Server) WeaverUnmarshal ¶
type SetUserAuth ¶
type SetUserAuth struct {
RoleId uint `json:"roleId"`
}
type SetUserAuthorities ¶
type SwaDictSearch ¶
type SwaDictSearch struct { weaver.AutoMarshal ModDict PageInfo }
func (*SwaDictSearch) WeaverMarshal ¶
func (x *SwaDictSearch) WeaverMarshal(enc *codegen.Encoder)
func (*SwaDictSearch) WeaverUnmarshal ¶
func (x *SwaDictSearch) WeaverUnmarshal(dec *codegen.Decoder)
type SwaDictailSearch ¶
type SwaDictailSearch struct { weaver.AutoMarshal ModDictail PageInfo }
func (*SwaDictailSearch) WeaverMarshal ¶
func (x *SwaDictailSearch) WeaverMarshal(enc *codegen.Encoder)
func (*SwaDictailSearch) WeaverUnmarshal ¶
func (x *SwaDictailSearch) WeaverUnmarshal(dec *codegen.Decoder)
type SwaRecord ¶
type SwaRecord struct { weaver.AutoMarshal ModBase Ip string `json:"ip" form:"ip" gorm:"column:ip;comment:请求ip"` Method string `json:"method" form:"method" gorm:"column:method;comment:请求方法"` Path string `json:"path" form:"path" gorm:"column:path;comment:请求路径"` Status int `json:"status" form:"status" gorm:"column:status;comment:请求状态"` Latency time.Duration `json:"latency" form:"latency" gorm:"column:latency;comment:延迟" swaggertype:"string"` Agent string `json:"agent" form:"agent" gorm:"type:text;column:agent;comment:代理"` ErrorMessage string `json:"error_message" form:"error_message" gorm:"type:text;column:error_message;comment:错误信息"` Body string `json:"body" form:"body" gorm:"type:text;column:body;comment:请求Body"` Resp string `json:"resp" form:"resp" gorm:"type:text;column:resp;comment:响应Body"` UserID int `json:"user_id" form:"user_id" gorm:"column:user_id;comment:用户id"` User SysUser `json:"user"` }
func (*SwaRecord) WeaverMarshal ¶
func (*SwaRecord) WeaverUnmarshal ¶
type SwaRecordSearch ¶
type SwaRecordSearch struct { weaver.AutoMarshal SwaRecord PageInfo }
func (*SwaRecordSearch) WeaverMarshal ¶
func (x *SwaRecordSearch) WeaverMarshal(enc *codegen.Encoder)
func (*SwaRecordSearch) WeaverUnmarshal ¶
func (x *SwaRecordSearch) WeaverUnmarshal(dec *codegen.Decoder)
type SwaRole ¶
type SwaRole struct { weaver.AutoMarshal ModRole SubRoles []ModRole `json:"subRoles" gorm:"-"` RoleMenus []ModMenu `json:"menus" gorm:"-"` }
func (*SwaRole) WeaverMarshal ¶
func (*SwaRole) WeaverUnmarshal ¶
type SwaRoleBtn ¶
type SwaRoleBtn struct { RoleId uint `gorm:"comment:角色ID"` SysMenuID uint `gorm:"comment:菜单ID"` SysBaseMenuBtnID uint `gorm:"comment:菜单按钮ID"` SysBaseMenuBtn SysBaseMenuBtn ` gorm:"comment:按钮详情"` }
func (SwaRoleBtn) TableName ¶
func (SwaRoleBtn) TableName() string
type SwaRoleBtnReq ¶
type SwaRoleBtnRes ¶
type SwaRoleBtnRes struct {
Selected []uint `json:"selected"`
}
type SwaRoleChildren ¶
type SwaRoleChildren struct { SwaRole `json:"swaRole"` Children []SwaRoleChildren `json:"children" gorm:"-"` }
type SwaRoleCopyResponse ¶
type SwaRoleCopyResponse struct { SwaRole SwaRoleChildren `json:"swaRole"` OldRoleId uint `json:"oldRoleId"` // --旧角色ID }
type SwaRoleMenu ¶
type SwaRoleMenu struct { MenuId string `json:"menuId" gorm:"comment:菜单ID;column:sys_base_menu_id"` RoleId string `json:"-" gorm:"comment:角色ID;column:sys_role_role_id"` }
func (SwaRoleMenu) TableName ¶
func (SwaRoleMenu) TableName() string
type SwaRoleResponse ¶
type SwaRoleResponse struct {
SwaRole SwaRole `json:"swaRole"`
}
type SysAPIListResponse ¶
type SysAPIListResponse struct {
Apis []ModApi `json:"apis"`
}
type SysAPIResponse ¶
type SysAPIResponse struct {
Api ModApi `json:"api"`
}
type SysBaseMenu ¶
type SysBaseMenu struct { weaver.AutoMarshal ModMenu SwaRoles []SwaRole `json:"roles" gorm:"many2many:swa_menu_role;"` Parameters []SysBaseMenuParameter `json:"parameters" gorm:"-"` MenuBtn []SysBaseMenuBtn `json:"menuBtn" gorm:"-"` Meta `json:"meta" gorm:"embedded;comment:附加属性"` }
func DefaultMenu ¶
func DefaultMenu() []SysBaseMenu
func (SysBaseMenu) TableName ¶
func (m SysBaseMenu) TableName() string
func (*SysBaseMenu) WeaverMarshal ¶
func (x *SysBaseMenu) WeaverMarshal(enc *codegen.Encoder)
func (*SysBaseMenu) WeaverUnmarshal ¶
func (x *SysBaseMenu) WeaverUnmarshal(dec *codegen.Decoder)
type SysBaseMenuBtn ¶
type SysBaseMenuBtn struct { weaver.AutoMarshal ModBase Name string `json:"name" gorm:"comment:按钮关键key"` Desc string `json:"desc" gorm:"按钮备注"` SysBaseMenuID uint `json:"sysBaseMenuID" gorm:"comment:菜单ID"` }
func (SysBaseMenuBtn) TableName ¶
func (SysBaseMenuBtn) TableName() string
func (*SysBaseMenuBtn) WeaverMarshal ¶
func (x *SysBaseMenuBtn) WeaverMarshal(enc *codegen.Encoder)
func (*SysBaseMenuBtn) WeaverUnmarshal ¶
func (x *SysBaseMenuBtn) WeaverUnmarshal(dec *codegen.Decoder)
type SysBaseMenuParameter ¶
type SysBaseMenuParameter struct { weaver.AutoMarshal ModBase SysBaseMenuID uint `json:"menuId"` Type string `json:"type" gorm:"comment:地址栏携带参数为params还是query"` Key string `json:"key" gorm:"comment:地址栏携带参数的key"` Value string `json:"value" gorm:"comment:地址栏携带参数的值"` }
func (SysBaseMenuParameter) TableName ¶
func (SysBaseMenuParameter) TableName() string
func (*SysBaseMenuParameter) WeaverMarshal ¶
func (x *SysBaseMenuParameter) WeaverMarshal(enc *codegen.Encoder)
func (*SysBaseMenuParameter) WeaverUnmarshal ¶
func (x *SysBaseMenuParameter) WeaverUnmarshal(dec *codegen.Decoder)
type SysBaseMenuResponse ¶
type SysBaseMenuResponse struct {
Menu SysBaseMenu `json:"menu"`
}
type SysBaseMenusResponse ¶
type SysBaseMenusResponse struct {
Menus []SysBaseMenu `json:"menus"`
}
type SysMenu ¶
type SysMenu struct { SysBaseMenu MenuId string `json:"menuId" gorm:"comment:菜单ID"` RoleId uint `json:"-" gorm:"comment:角色ID"` Parameters []SysBaseMenuParameter `json:"parameters" gorm:"-"` Children []SysMenu `json:"children" gorm:"-"` Btns map[string]uint `json:"btns" gorm:"-"` }
type SysMenusResponse ¶
type SysMenusResponse struct {
Menus []SysMenu `json:"menus"`
}
type SysUser ¶
type SysUser struct { weaver.AutoMarshal ModBase UUID uuid.UUID `json:"uuid" gorm:"index;comment:用户UUID"` Username string `json:"userName" gorm:"index;comment:用户登录名"` Password string `json:"-" gorm:"comment:用户登录密码"` NickName string `json:"nickName" gorm:"default:系统用户;comment:用户昵称"` SideMode string `json:"sideMode" gorm:"default:dark;comment:用户侧边主题"` HeaderImg string `json:"headerImg" gorm:"comment:用户头像"` BaseColor string `json:"baseColor" gorm:"default:#fff;comment:基础颜色"` ActiveColor string `json:"activeColor" gorm:"default:#1890ff;comment:活跃颜色"` Phone string `json:"phone" gorm:"comment:用户手机号"` Email string `json:"email" gorm:"comment:用户邮箱"` Team string `json:"team" gorm:"comment:项目组"` Dept string `json:"dept" gorm:"comment:部门"` Company string `json:"company" gorm:"comment:公司/组织"` Enable int `json:"enable" gorm:"default:1;comment:用户是否被冻结 1正常 2冻结"` RoleId uint `json:"roleId" gorm:"default:888;comment:用户角色ID"` RoleIds []uint `json:"roleIds" gorm:"-"` SwaRole SwaRole `json:"swaRole" gorm:"-"` Authorities []SwaRole `json:"authorities" gorm:"-"` }
func (*SysUser) WeaverMarshal ¶
func (*SysUser) WeaverUnmarshal ¶
type SysUserResponse ¶
type SysUserResponse struct {
User SysUser `json:"user"`
}
type TApi ¶
type TApi interface { CreateApi(_ context.Context, api ModApi) (err error) DeleteApi(_ context.Context, api ModApi) (err error) GetAPIInfoList(_ context.Context, api ModApi, info PageInfo, order string, desc bool) (list []ModApi, total int64, err error) GetAllApis(_ context.Context) (apis []ModApi, err error) GetApiById(_ context.Context, id int) (api ModApi, err error) UpdateApi(_ context.Context, api ModApi) (err error) DeleteApisByIds(_ context.Context, ids []uint) (err error) }
type TBlacklist ¶
type TDict ¶
type TDict interface { CreateSwaDict(_ context.Context, swaDict ModDict) (err error) DeleteSwaDict(_ context.Context, swaDict ModDict) (err error) UpdateSwaDict(_ context.Context, swaDict ModDict) (err error) GetSwaDict(_ context.Context, Type string, Id uint, status *bool) (swaDict ModDict, err error) GetSwaDictInfoList(_ context.Context, info SwaDictSearch) (list []ModDict, total int64, err error) }
type TDictail ¶
type TDictail interface { CreateSwaDictail(_ context.Context, swaDictail ModDictail) (err error) DeleteSwaDictail(_ context.Context, swaDictail ModDictail) (err error) UpdateSwaDictail(_ context.Context, swaDictail ModDictail) (err error) GetSwaDictail(_ context.Context, id uint) (swaDictail ModDictail, err error) GetSwaDictailInfoList(_ context.Context, info SwaDictailSearch) (list []ModDictail, total int64, err error) }
type TMenu ¶
type TMenu interface { GetRoleMenu(ctx context.Context, roleId uint) ([]SysBaseMenu, error) GetInfoList(ctx context.Context) (list []SysBaseMenu, total int64, err error) AddMenuRole(ctx context.Context, menus []SysBaseMenu, roleId uint) (err error) GetBaseMenuById(_ context.Context, id int) (menu SysBaseMenu, err error) GetAllBaseMenu(_ context.Context) (menus []SysBaseMenu, err error) AddBaseMenu(_ context.Context, menu SysBaseMenu) error DeleteBaseMenu(_ context.Context, id int) (err error) UpdateBaseMenu(ctx context.Context, menu SysBaseMenu) (err error) GetMenuRole(_ context.Context, id uint) (menus []SysBaseMenu, err error) }
type TRecord ¶
type TRecord interface { CreateSwaRecord(_ context.Context, swaRecord SwaRecord) (err error) DeleteSwaRecordByIds(_ context.Context, ids []uint) (err error) DeleteSwaRecord(_ context.Context, swaRecord SwaRecord) (err error) GetSwaRecord(_ context.Context, id uint) (swaRecord SwaRecord, err error) GetSwaRecordInfoList(_ context.Context, info SwaRecordSearch) (list []SwaRecord, total int64, err error) }
type TRole ¶
type TRole interface { CreateRole(_ context.Context, auth SwaRole) (swaRole SwaRole, err error) UpdateRole(_ context.Context, auth SwaRole) (swaRole SwaRole, err error) DeleteRole(_ context.Context, auth RoleUserMenu) (err error) GetRoleList(_ context.Context, info PageInfo) (list []SwaRole, total int64, err error) GetRoleInfo(_ context.Context, id uint) (sa SwaRole, err error) SetSubRoles(_ context.Context, auth SwaRole) error SetRoleMenus(_ context.Context, auth SwaRole) error GetSubRoles(_ context.Context, id uint) (subRoles []SwaRole, err error) }
type TUser ¶
type TUser interface { Login(ctx context.Context, m SysUser) (SysUser, error) GetUserInfo(ctx context.Context, uuid uuid.UUID) (SysUser, error) Register(ctx context.Context, m SysUser) (SysUser, error) ChangePassword(ctx context.Context, uid uint, oldPassword string, newPassword string) (userInter *SysUser, err error) GetUserInfoList(ctx context.Context, page PageInfo) (list []SysUser, total int64, err error) SetUserRole(_ context.Context, id uint, roleId uint) (err error) SetUserAuthorities(_ context.Context, id uint, roleIds []uint) (err error) SetUserInfo(_ context.Context, req SysUser) error DeleteUser(_ context.Context, id int) (err error) SetSelfInfo(_ context.Context, req SysUser) error ResetPassword(_ context.Context, ID uint) (err error) GetUserDict(_ context.Context) (user []SysUser, err error) }
Source Files
¶
- api_mod.go
- api_srvc.go
- blacklist_srvc.go
- casbin_mod.go
- casbin_srvc.go
- dict_mod.go
- dict_srvc.go
- dictail_mod.go
- dictail_srvc.go
- init_swa.go
- menu_mod.go
- menu_srvc.go
- mod_base.go
- record_mod.go
- record_srvc.go
- role_mod.go
- role_srvc.go
- state_mod.go
- state_srvc.go
- sys_authority_btn.go
- sys_user.go
- user_mod.go
- user_srv.go
- weaver_gen.go
Click to show internal directories.
Click to hide internal directories.