Documentation ¶
Index ¶
- func RegisterArea(i IArea)
- func RegisterCaptcha(i ICaptcha)
- func RegisterCasbin(i ICasbin)
- func RegisterFile(i IFile)
- func RegisterJwt(i IJwt)
- func RegisterMiddleware(i IMiddleware)
- func RegisterSdkAliyun(i ISdkAliyun)
- func RegisterSdkBaidu(i ISdkBaidu)
- func RegisterSdkCtyun(i ISdkCtyun)
- func RegisterSdkHuawei(i ISdkHuawei)
- func RegisterSdkTencent(i ISdkTencent)
- func RegisterSessionError(i ISessionError)
- func RegisterSysAudit(i ISysAudit)
- func RegisterSysAuth(i ISysAuth)
- func RegisterSysLicense(i ISysLicense)
- func RegisterSysLogs(i ISysLogs)
- func RegisterSysMenu(i ISysMenu)
- func RegisterSysOrganization(i ISysOrganization)
- func RegisterSysPermission(i ISysPermission)
- func RegisterSysRole(i ISysRole)
- func RegisterSysSession(i ISysSession)
- func RegisterSysSettings(i ISysSettings)
- func RegisterSysSms(i ISysSms)
- func RegisterSysUser(i ISysUser)
- type IArea
- type ICaptcha
- type ICasbin
- type IFile
- type IJwt
- type IMiddleware
- type ISdkAliyun
- type ISdkBaidu
- type ISdkCtyun
- type ISdkHuawei
- type ISdkTencent
- type ISessionError
- type ISysAudit
- type ISysAuth
- type ISysLicense
- type ISysLogs
- type ISysMenu
- type ISysOrganization
- type ISysPermission
- type ISysRole
- type ISysSession
- type ISysSettings
- type ISysSms
- type ISysUser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterArea ¶
func RegisterArea(i IArea)
func RegisterCaptcha ¶
func RegisterCaptcha(i ICaptcha)
func RegisterCasbin ¶
func RegisterCasbin(i ICasbin)
func RegisterFile ¶
func RegisterFile(i IFile)
func RegisterJwt ¶
func RegisterJwt(i IJwt)
func RegisterMiddleware ¶
func RegisterMiddleware(i IMiddleware)
func RegisterSdkAliyun ¶
func RegisterSdkAliyun(i ISdkAliyun)
func RegisterSdkBaidu ¶
func RegisterSdkBaidu(i ISdkBaidu)
func RegisterSdkCtyun ¶
func RegisterSdkCtyun(i ISdkCtyun)
func RegisterSdkHuawei ¶
func RegisterSdkHuawei(i ISdkHuawei)
func RegisterSdkTencent ¶
func RegisterSdkTencent(i ISdkTencent)
func RegisterSessionError ¶
func RegisterSessionError(i ISessionError)
func RegisterSysAudit ¶
func RegisterSysAudit(i ISysAudit)
func RegisterSysAuth ¶
func RegisterSysAuth(i ISysAuth)
func RegisterSysLicense ¶
func RegisterSysLicense(i ISysLicense)
func RegisterSysLogs ¶
func RegisterSysLogs(i ISysLogs)
func RegisterSysMenu ¶
func RegisterSysMenu(i ISysMenu)
func RegisterSysOrganization ¶
func RegisterSysOrganization(i ISysOrganization)
func RegisterSysPermission ¶
func RegisterSysPermission(i ISysPermission)
func RegisterSysRole ¶
func RegisterSysRole(i ISysRole)
func RegisterSysSession ¶
func RegisterSysSession(i ISysSession)
func RegisterSysSettings ¶ added in v0.4.2
func RegisterSysSettings(i ISysSettings)
func RegisterSysSms ¶
func RegisterSysSms(i ISysSms)
func RegisterSysUser ¶
func RegisterSysUser(i ISysUser)
Types ¶
type IArea ¶
type ICaptcha ¶
type ICasbin ¶
type ICasbin interface { InstallHook(userType sys_enum.UserType, hookFunc sys_hook.CasbinHookFunc) int64 UnInstallHook(savedHookId int64) CleanAllHook() Check() error Enforcer() *casbin.Enforcer AddRoleForUserInDomain(userName string, roleName string, domain string) (bool, error) DeleteRoleForUserInDomain(userName, roleName string, domain string) (bool, error) DeleteRolesForUser(userName string, domain string) (bool, error) AddPermissionForUser(roleName, path, method string) (bool, error) AddPermissionsForUser(roleName string, path []string) (bool, error) DeletePermissionForUser(roleName, path, method string) (bool, error) DeletePermissionsForUser(roleName string) (bool, error) EnforceCheck(userName, path, role, method interface{}) (bool, error) }
type IFile ¶
type IFile interface { InstallHook(state sys_enum.UploadEventState, hookFunc sys_hook.FileHookFunc) int64 UnInstallHook(savedHookId int64) CleanAllHook() Upload(ctx context.Context, in sys_model.FileUploadInput) (*sys_entity.SysFile, error) GetUploadFile(ctx context.Context, uploadId int64, userId int64, message ...string) (*sys_model.FileInfo, error) SaveFile(ctx context.Context, storageAddr string, info *sys_model.FileInfo) (*sys_model.FileInfo, error) UploadIDCard(ctx context.Context, in sys_model.OCRIDCardFileUploadInput) (*sys_model.IDCardWithOCR, error) UploadBankCard(ctx context.Context, in sys_model.BankCardWithOCRInput) (*sys_model.BankCardWithOCR, error) UploadBusinessLicense(ctx context.Context, in sys_model.OCRBusinessLicense) (*sys_model.BusinessLicenseWithOCR, error) DownLoadFile(ctx context.Context, savePath string, url string) (string, error) GetUrlById(id int64) string GetFileById(ctx context.Context, id int64, errorMessage string) (*sys_model.FileInfo, error) MakeFileUrl(ctx context.Context, id int64) string MakeFileUrlByPath(ctx context.Context, path string) string GetFile(ctx context.Context, sign, srcBase64 string, id int64, cId int64) (*sys_model.FileInfo, error) UseFile(ctx context.Context, src string) }
type IJwt ¶
type IJwt interface { InstallHook(userType sys_enum.UserType, hookFunc sys_hook.JwtHookFunc) int64 UnInstallHook(savedHookId int64) CleanAllHook() GenerateToken(ctx context.Context, user *sys_model.SysUser) (response *sys_model.TokenInfo, err error) CreateToken(claims *sys_model.JwtCustomClaims) (string, error) RefreshToken(oldToken string, claims *sys_model.JwtCustomClaims) (string, error) Middleware(r *ghttp.Request) MakeSession(ctx context.Context, tokenString string) *sys_model.JwtCustomClaims }
type IMiddleware ¶
type IMiddleware interface { Auth(r *ghttp.Request) CTX(r *ghttp.Request) CORS(r *ghttp.Request) ResponseHandler(r *ghttp.Request) }
func Middleware ¶
func Middleware() IMiddleware
type ISdkAliyun ¶
type ISdkAliyun interface { GetAliyunSdkToken(ctx context.Context, tokenInfo sys_model.AliyunSdkConfToken, err error) GetAliyunSdkConfToken(ctx context.Context, identifier string) (tokenInfo *sys_model.AliyunSdkConfToken, err error) GetAliyunSdkConfList(ctx context.Context) ([]*sys_model.AliyunSdkConf, error) GetAliyunSdkConf(ctx context.Context, identifier string) (tokenInfo *sys_model.AliyunSdkConf, err error) SaveAliyunSdkConf(ctx context.Context, info *sys_model.AliyunSdkConf, isCreate bool) (*sys_model.AliyunSdkConf, error) DeleteAliyunSdkConf(ctx context.Context, identifier string) (bool, error) }
func SdkAliyun ¶
func SdkAliyun() ISdkAliyun
type ISdkBaidu ¶
type ISdkBaidu interface { GetBaiduSdkConfToken(ctx context.Context, identifier string) (tokenInfo *sys_model.BaiduSdkConfToken, err error) GetBaiduSdkConfList(ctx context.Context) ([]*sys_model.BaiduSdkConf, error) GetBaiduSdkConf(ctx context.Context, identifier string) (*sys_model.BaiduSdkConf, error) SaveBaiduSdkConf(ctx context.Context, info *sys_model.BaiduSdkConf, isCreate bool) (*sys_model.BaiduSdkConf, error) DeleteBaiduSdkConf(ctx context.Context, identifier string) (bool, error) OCRBankCard(ctx context.Context, imageBase64 string) (*sys_model.OCRBankCard, error) OCRIDCard(ctx context.Context, imageBase64 string, detectRisk string, idCardSide string) (*sys_model.BaiduSdkOCRIDCard, error) OCRBusinessLicense(ctx context.Context, imageBase64 string) (*sys_model.BusinessLicenseOCR, error) }
type ISdkCtyun ¶
type ISdkCtyun interface { GetCtyunSdkConfList(ctx context.Context) ([]*sys_model.CtyunSdkConf, error) GetCtyunSdkConf(ctx context.Context, identifier string) (tokenInfo *sys_model.CtyunSdkConf, err error) SaveCtyunSdkConf(ctx context.Context, info *sys_model.CtyunSdkConf, isCreate bool) (*sys_model.CtyunSdkConf, error) DeleteCtyunSdkConf(ctx context.Context, identifier string) (bool, error) }
type ISdkHuawei ¶
type ISdkHuawei interface { GetHuaweiSdkConfToken(ctx context.Context, identifier string) (tokenInfo *sys_model.HuaweiSdkConfToken, err error) GetHuaweiSdkConfList(ctx context.Context) ([]*sys_model.HuaweiSdkConf, error) GetHuaweiSdkConf(ctx context.Context, identifier string) (tokenInfo *sys_model.HuaweiSdkConf, err error) SaveHuaweiSdkConf(ctx context.Context, info *sys_model.HuaweiSdkConf, isCreate bool) (*sys_model.HuaweiSdkConf, error) DeleteHuaweiSdkConf(ctx context.Context, identifier string) (bool, error) }
func SdkHuawei ¶
func SdkHuawei() ISdkHuawei
type ISdkTencent ¶
type ISdkTencent interface { GetTencentSdkConfToken(ctx context.Context, identifier string) (tokenInfo *sys_model.TencentSdkConfToken, err error) GetTencentSdkConfList(ctx context.Context) ([]*sys_model.TencentSdkConf, error) GetTencentSdkConf(ctx context.Context, identifier string) (tokenInfo *sys_model.TencentSdkConf, err error) SaveTencentSdkConf(ctx context.Context, info *sys_model.TencentSdkConf, isCreate bool) (*sys_model.TencentSdkConf, error) DeleteTencentSdkConf(ctx context.Context, identifier string) (bool, error) }
func SdkTencent ¶
func SdkTencent() ISdkTencent
type ISessionError ¶
type ISessionError interface { Append(ctx context.Context, error error) error HasError(ctx context.Context, err error) (response bool) Iterator(ctx context.Context, f func(k int, err error) bool) }
func SessionError ¶
func SessionError() ISessionError
type ISysAudit ¶
type ISysAudit interface { InstallHook(state sys_enum.AuditEvent, category int, hookFunc sys_hook.AuditHookFunc) int64 UnInstallHook(savedHookId int64) CleanAllHook() QueryAuditList(ctx context.Context, filter *base_model.SearchParams) (*sys_model.AuditListRes, error) GetAuditById(ctx context.Context, id int64) *sys_entity.SysAudit GetAuditByLatestUnionMainId(ctx context.Context, unionMainId int64) *sys_entity.SysAudit CreateAudit(ctx context.Context, info sys_model.CreateSysAudit) (*sys_entity.SysAudit, error) UpdateAudit(ctx context.Context, id int64, state int, reply string, auditUserId int64) (bool, error) }
type ISysAuth ¶
type ISysAuth interface { InstallHook(actionType sys_enum.AuthActionType, userType sys_enum.UserType, hookFunc sys_hook.AuthHookFunc) int64 UnInstallHook(savedHookId int64) CleanAllHook() Login(ctx context.Context, req sys_model.LoginInfo, needCaptcha ...bool) (*sys_model.TokenInfo, error) InnerLogin(ctx context.Context, user *sys_model.SysUser) (*sys_model.TokenInfo, error) LoginByMobile(ctx context.Context, req sys_model.LoginByMobileInfo) (*sys_model.LoginByMobileRes, error) Register(ctx context.Context, info sys_model.SysUserRegister) (*sys_model.SysUser, error) ForgotPassword(ctx context.Context, info sys_model.ForgotPassword) (int64, error) ResetPassword(ctx context.Context, password string, confirmPassword string, idKey string) (bool, error) }
type ISysLicense ¶
type ISysLicense interface { GetLicenseById(ctx context.Context, id int64) (*sys_entity.SysLicense, error) QueryLicenseList(ctx context.Context, search base_model.SearchParams) (*sys_model.LicenseListRes, error) CreateLicense(ctx context.Context, info sys_model.License) (*sys_entity.SysLicense, error) UpdateLicense(ctx context.Context, info sys_model.License, id int64) (*sys_entity.SysLicense, error) GetLicenseByLatestAuditId(ctx context.Context, auditId int64) *sys_entity.SysLicense SetLicenseState(ctx context.Context, id int64, state int) (bool, error) SetLicenseAuditNumber(ctx context.Context, id int64, auditNumber string) (bool, error) DeleteLicense(ctx context.Context, id int64, flag bool) (bool, error) UpdateLicenseAuditLogId(ctx context.Context, id int64, latestAuditLogId int64) (bool, error) Masker(license *sys_entity.SysLicense) *sys_entity.SysLicense }
func SysLicense ¶
func SysLicense() ISysLicense
type ISysLogs ¶
type ISysLogs interface { Write(ctx context.Context, err error, info sys_entity.SysLogs) error Error(ctx context.Context, err error, info sys_entity.SysLogs) error ErrorSimple(ctx context.Context, err error, context string, category string) error Info(ctx context.Context, err error, info sys_entity.SysLogs) error InfoSimple(ctx context.Context, err error, context string, category string) error Warn(ctx context.Context, err error, info sys_entity.SysLogs) error WarnSimple(ctx context.Context, err error, context string, category string) error }
type ISysMenu ¶
type ISysMenu interface { GetMenuById(ctx context.Context, menuId int64) (*sys_entity.SysMenu, error) CreateMenu(ctx context.Context, info *sys_model.SysMenu) (*sys_entity.SysMenu, error) UpdateMenu(ctx context.Context, info *sys_model.SysMenu) (*sys_entity.SysMenu, error) SaveMenu(ctx context.Context, info *sys_model.SysMenu) (*sys_entity.SysMenu, error) DeleteMenu(ctx context.Context, id int64) (bool, error) MakeMenuTree(ctx context.Context, parentId int64, isMakeNodeFun func(ctx context.Context, cruuentMenu *sys_entity.SysMenu) bool) ([]*sys_model.SysMenuTreeRes, error) GetMenuTree(ctx context.Context, parentId int64) ([]*sys_model.SysMenuTreeRes, error) GetMenuList(ctx context.Context, parentId int64, IsRecursive bool, limitChildrenIds ...int64) ([]*sys_entity.SysMenu, error) }
type ISysOrganization ¶
type ISysOrganization interface { QueryOrganizationList(ctx context.Context, info base_model.SearchParams) (*sys_model.OrganizationInfoListRes, error) GetOrganizationList(ctx context.Context, parentId int64, IsRecursive bool) ([]*sys_entity.SysOrganization, int, error) GetOrganizationTree(ctx context.Context, parentId int64) ([]*sys_model.SysOrganizationTree, error) CreateOrganizationInfo(ctx context.Context, info sys_model.SysOrganizationInfo) (*sys_entity.SysOrganization, error) UpdateOrganizationInfo(ctx context.Context, info sys_model.SysOrganizationInfo) (*sys_entity.SysOrganization, error) SaveOrganizationInfo(ctx context.Context, info sys_model.SysOrganizationInfo) (*sys_entity.SysOrganization, error) GetOrganizationInfo(ctx context.Context, id int64) (*sys_entity.SysOrganization, error) DeleteOrganizationInfo(ctx context.Context, id int64) (bool, error) }
func SysOrganization ¶
func SysOrganization() ISysOrganization
type ISysPermission ¶
type ISysPermission interface { GetPermissionById(ctx context.Context, permissionId int64) (*sys_entity.SysPermission, error) GetPermissionByIdentifier(ctx context.Context, identifier string) (*sys_entity.SysPermission, error) QueryPermissionList(ctx context.Context, info base_model.SearchParams) (*sys_model.SysPermissionInfoListRes, error) GetPermissionsByResource(ctx context.Context, resource string) ([]int64, error) GetPermissionList(ctx context.Context, parentId int64, IsRecursive bool) ([]*sys_entity.SysPermission, error) GetPermissionTree(ctx context.Context, parentId int64) ([]*sys_model.SysPermissionTree, error) CreatePermission(ctx context.Context, info sys_model.SysPermission) (*sys_entity.SysPermission, error) UpdatePermission(ctx context.Context, info sys_model.SysPermission) (*sys_entity.SysPermission, error) SetPermissionsByResource(ctx context.Context, resourceIdentifier string, permissionIds []int64) (response bool, err error) ImportPermissionTree(ctx context.Context, permissionTreeArr []*sys_model.SysPermissionTree, parent *sys_entity.SysPermission) error SavePermission(ctx context.Context, info sys_model.SysPermission) (*sys_entity.SysPermission, error) DeletePermission(ctx context.Context, permissionId int64) (bool, error) GetPermissionTreeIdByUrl(ctx context.Context, path string) (*sys_entity.SysPermission, error) CheckPermission(ctx context.Context, tree ...*sys_model.SysPermissionTree) (has bool, err error) CheckPermissionOr(ctx context.Context, tree ...*sys_model.SysPermissionTree) (has bool, err error) CheckPermissionByIdentifier(ctx context.Context, identifier string) (bool, error) PermissionTypeForm(code int64, mapItems *gmap.StrAnyMap) *sys_model.SysPermission }
func SysPermission ¶
func SysPermission() ISysPermission
type ISysRole ¶
type ISysRole interface { QueryRoleList(ctx context.Context, info base_model.SearchParams, unionMainId int64) (*sys_model.RoleListRes, error) GetRoleById(ctx context.Context, id int64) (*sys_entity.SysRole, error) Create(ctx context.Context, info sys_model.SysRole) (*sys_entity.SysRole, error) Update(ctx context.Context, info sys_model.SysRole) (*sys_entity.SysRole, error) Save(ctx context.Context, info sys_model.SysRole) (*sys_entity.SysRole, error) Delete(ctx context.Context, roleId int64) (bool, error) SetRoleMember(ctx context.Context, roleId int64, userIds []int64, makeUserUnionMainId int64) (bool, error) RemoveRoleMember(ctx context.Context, roleId int64, userId int64) (bool, error) GetRoleMemberIds(ctx context.Context, roleId int64, makeUserUnionMainId int64) ([]int64, error) GetRoleMemberList(ctx context.Context, roleId int64, makeUserUnionMainId int64) ([]*sys_model.SysUser, error) GetRoleByUserIdList(ctx context.Context, userId int64) ([]*sys_entity.SysRole, error) SetRolePermissions(ctx context.Context, roleId int64, permissionIds []int64, makeUserUnionMainId int64) (bool, error) }
type ISysSession ¶
type ISysSession interface { Init(sessionContext *sys_model.SessionContext, r *ghttp.Request, ctx ...*context.Context) NewSessionCtx(ctx context.Context) context.Context HasCustom(ctx context.Context) bool Get(ctx context.Context) *sys_model.SessionContext SetUserById(ctx *context.Context, userId int64) *sys_model.SessionContext SetUser(ctx context.Context, claimsUser *sys_model.JwtCustomClaims) }
func SysSession ¶
func SysSession() ISysSession
type ISysSettings ¶ added in v0.4.2
type ISysSettings interface { QueryList(ctx context.Context, params *base_model.SearchParams, isExport bool) (*sys_model.SysSettingListRes, error) GetByName(ctx context.Context, name string, info *base_model.SearchParams) (*sys_model.SysSettingsRes, error) Save(ctx context.Context, info *sys_model.SysSettings) (*sys_model.SysSettingsRes, error) Create(ctx context.Context, info *sys_model.SysSettings) (*sys_model.SysSettingsRes, error) Update(ctx context.Context, info *sys_model.SysSettings) (*sys_model.SysSettingsRes, error) Delete(ctx context.Context, name string, unionMainId int64) (bool, error) }
func SysSettings ¶ added in v0.4.2
func SysSettings() ISysSettings
type ISysSms ¶
type ISysUser ¶
type ISysUser interface { InstallHook(event sys_enum.UserEvent, hookFunc sys_hook.UserHookFunc) int64 UnInstallHook(savedHookId int64) CleanAllHook() QueryUserList(ctx context.Context, info *base_model.SearchParams, unionMainId int64, isExport bool) (response *sys_model.SysUserListRes, err error) SetUserRoleIds(ctx context.Context, roleIds []int64, userId int64) (bool, error) CreateUser(ctx context.Context, info sys_model.UserInnerRegister, userState sys_enum.UserState, userType sys_enum.UserType, customId ...int64) (*sys_model.SysUser, error) SetUserPermissions(ctx context.Context, userId int64, permissionIds []int64) (bool, error) GetSysUserByUsername(ctx context.Context, username string) (response *sys_model.SysUser, err error) CheckPassword(ctx context.Context, userId int64, password string) (bool, error) HasSysUserByUsername(ctx context.Context, username string) bool GetSysUserById(ctx context.Context, userId int64) (*sys_model.SysUser, error) MakeSession(ctx context.Context, userId int64) SetUserPermissionIds(ctx context.Context, userId int64, permissionIds []int64) (bool, error) DeleteUser(ctx context.Context, id int64) (bool, error) SetUsername(ctx context.Context, newUsername string, userId int64) (bool, error) SetUserState(ctx context.Context, userId int64, state sys_enum.UserType) (bool, error) UpdateUserPassword(ctx context.Context, info sys_model.UpdateUserPassword, userId int64) (bool, error) ResetUserPassword(ctx context.Context, userId int64, password string, confirmPassword string) (bool, error) SetUserRoles(ctx context.Context, userId int64, roleIds []int64, makeUserUnionMainId int64) (bool, error) UpdateUserExDetail(ctx context.Context, user *sys_model.SysUser) (*sys_model.SysUser, error) GetUserDetail(ctx context.Context, userId int64) (*sys_model.SysUser, error) GetUserListByMobile(ctx context.Context, mobile string) (*sys_model.SysUserListRes, error) SetUserMobile(ctx context.Context, newMobile, captcha, password string, userId int64) (bool, error) }
Source Files ¶
- sdk_aliyun.go
- sdk_baidu.go
- sdk_ctyun.go
- sdk_huawei.go
- sdk_tencent.go
- sys_area.go
- sys_audit.go
- sys_auth.go
- sys_captcha.go
- sys_casbin.go
- sys_file.go
- sys_jwt.go
- sys_license.go
- sys_logs.go
- sys_menu.go
- sys_middleware.go
- sys_organization.go
- sys_permission.go
- sys_role.go
- sys_session.go
- sys_settings.go
- sys_sms.go
- sys_user.go
Click to show internal directories.
Click to hide internal directories.