Documentation
¶
Index ¶
- type Codec
- type Decoder
- type Encoder
- type ItfAccreditController
- type ItfAdmin
- type ItfAdminLog
- type ItfAdminLogController
- type ItfAdminManageController
- type ItfAdminService
- type ItfApiServer
- type ItfApp
- type ItfAuthController
- type ItfAuthService
- type ItfBaseDataController
- type ItfBlockContent
- type ItfCaptchaController
- type ItfDistributeLocker
- type ItfGinApiServer
- type ItfGormDB
- type ItfJwtParser
- type ItfMigrate
- type ItfOptimisticLock
- type ItfOrganize
- type ItfRbac
- type ItfRbacManageController
- type ItfRbacRole
- type ItfResponseController
- type ItfSetting
- type ItfStatistical
- type ItfSupportModule
- type ItfUser
- type ItfUserAccount
- type ItfUserAuthController
- type ItfUserCenterController
- type ItfUserGenericRecord
- type ItfUserLoginRecord
- type ItfUserManageController
- type ItfUserService
- type ItfUserThird
- type ItfVerifyCode
- type ItfVerifyCodeController
- type ItfWorker
- type PasswdBuilder
- type PasswdChecker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Encoder ¶
type Encoder interface { // Marshal returns the wire format of v. Marshal(v interface{}) ([]byte, error) }
Encoder 编码器
type ItfAccreditController ¶
type ItfAccreditController interface { AccreditInfo(ctx *gin.Context) //权限信息 CheckAccreditHandler() gin.HandlerFunc //权限检查校验的handler Permissions() []*dto.PermissionItem }
type ItfAdmin ¶
type ItfAdmin interface { Search(search *dto.SearchAdminParams, pa *paginate.Pager) ([]*models.Admin, *paginate.Pager, error) Query(id int64) (*models.Admin, error) QueryByAccount(string) (*models.Admin, error) QueryPassword(id int64) (string, string, error) Add(*models.Admin) (int64, error) AddCheckAccount(*models.Admin) (int64, error) Update(id int64, admin *models.Admin) (int64, error) Delete(id int64) (int64, error) ResetStatus(id int64, status int) (int64, error) ResetPassword(id int64, password string, noRoot bool) (int64, error) UpdateProInfo(id int64, admin *models.Admin) (int64, error) LoginNote(id int64, info *dto.LoginInfoParam) (int64, error) //登录记录 Use(db *gorm.DB) ItfAdmin //使用db ItfMigrate ItfGormDB }
type ItfAdminLog ¶
type ItfAdminLogController ¶
type ItfAdminLogController interface { SearchAdminLog(ctx *gin.Context) LogHandler() gin.HandlerFunc //日志记录的handler }
ItfAdminLogController 管理员日志管理
type ItfAdminManageController ¶
type ItfAdminManageController interface { SearchAdmin(ctx *gin.Context) QueryAdmin(ctx *gin.Context) SaveAdmin(ctx *gin.Context) DisableAdmin(ctx *gin.Context) DeleteAdmin(ctx *gin.Context) }
ItfAdminManageController 管理员管理
type ItfAdminService ¶ added in v1.0.1
type ItfApiServer ¶
type ItfAuthController ¶
type ItfAuthController interface { AuthLogin(ctx *gin.Context) //登录 AuthLogout(ctx *gin.Context) //登出 AuthInfo(ctx *gin.Context) //获取认证信息 AuthFreshToken(ctx *gin.Context) //token刷新 }
ItfAuthController 通用授权模块
type ItfAuthService ¶
type ItfAuthService interface {
DoAuth(*dto.AccountLoginParams) (*dto.AuthInfo, error)
}
type ItfBaseDataController ¶
ItfBaseDataController 基本数据
type ItfBlockContent ¶
type ItfBlockContent interface { Search(search *dto.SearchBlockContentParams, pa *paginate.Pager) ([]*models.BlockContent, *paginate.Pager, error) Query(id int64) (*models.BlockContent, error) QueryByCode(code string) (*models.BlockContent, error) Add(code *models.BlockContent) (int64, error) Delete(id int64) (int64, error) Use(db *gorm.DB) ItfBlockContent //使用db ItfMigrate ItfGormDB }
ItfBlockContent 块内容操作接口
type ItfCaptchaController ¶
type ItfCaptchaController interface { GetCaptcha(ctx *gin.Context) VerifyCaptcha(ctx *gin.Context) VerifyHandler() gin.HandlerFunc //验证handler,用于中间件 }
ItfCaptchaController 图片验证码相关
type ItfDistributeLocker ¶
type ItfDistributeLocker interface { Lock(key string, ttl int64) (bool, error) //加锁 Release(key string) error //释放锁 Delay(key string, ttl int64) error //延迟锁,对锁进行续期延长 TTL(key string) (int64, error) //锁剩余时间 }
ItfDistributeLocker 分布式锁接口
type ItfGinApiServer ¶
type ItfGinApiServer interface { ItfApiServer InitRouterForGin(engine *gin.Engine) }
type ItfJwtParser ¶
type ItfMigrate ¶
type ItfOptimisticLock ¶
ItfOptimisticLock 乐观锁实现
type ItfOrganize ¶
type ItfOrganize interface { Search(search *dto.SearchOrganizeParams, pa *paginate.Pager) ([]*models.Organize, *paginate.Pager, error) Query(id int64) (*models.Organize, error) Add(org *models.Organize) (int64, error) Update(id int64, org *models.Organize) (int64, error) Delete(id int64) (int64, error) DeleteByPid(pid int64) (int64, error) ResetStatus(id int64, status int) (int64, error) SearchOrganizeExtras(orgId int64) ([]*models.OrganizeExtra, error) AddOrganizeExtra(*models.OrganizeExtra) (int64, error) ClearOrganizeExtra(orgId int64) (int64, error) Use(db *gorm.DB) ItfOrganize //使用db ItfMigrate ItfGormDB }
ItfOrganize 组织相关
type ItfRbac ¶
type ItfRbac interface { UserRoles(uid int64) ([]*models.RbacRole, error) UserPerms(uid int64) ([]*models.RbacPermission, error) UserPermIds(uid int64) ([]int64, error) //用户关联角色 UserRoleIds(uid int64) ([]int64, error) UserRelateRoles(uid int64, roleIds []int64) error //角色相关 SearchRoles(search *dto.SearchRbacRoleParams, pa *paginate.Pager) ([]*models.RbacRole, *paginate.Pager, error) Roles() ([]*models.RbacRole, error) QueryRole(id int64) (*models.RbacRole, error) AddRole(*models.RbacRole) (int64, error) UpdateRole(int64, *models.RbacRole) (int64, error) DeleteRole(id int64) error ResetRoleStatus(id int64, status int) (int64, error) //角色关联权限 RolePermIds(roleId int64, moreRoles ...int64) ([]int64, error) RoleRelatePerms(roleId int64, permIds []int64) error //权限相关 Perms() ([]*models.RbacPermission, error) QueryPerm(id int64) (*models.RbacPermission, error) AddPerm(*models.RbacPermission) (int64, error) BatchAddPerm(...*models.RbacPermission) (int64, error) UpdatePerm(int64, *models.RbacPermission) (int64, error) DeletePerm(id int64) error //simple相关 SimplePerms() ([]*dto.RbacPermissionSimple, error) Use(db *gorm.DB) ItfRbac //使用db ItfMigrate ItfGormDB }
type ItfRbacManageController ¶
type ItfRbacManageController interface { //用户与角色绑定关系维护 SearchUserRoles(ctx *gin.Context) //用户绑定roles列表搜索 BindUserRoles(ctx *gin.Context) //用户绑定roles操作 //角色管理 SearchRoles(ctx *gin.Context) SimpleRoles(ctx *gin.Context) QueryRole(ctx *gin.Context) SaveRole(ctx *gin.Context) DisableRole(ctx *gin.Context) DeleteRole(ctx *gin.Context) //角色和权限绑定关系维护 SearchRolePermissions(ctx *gin.Context) SaveRolePermissions(ctx *gin.Context) //权限管理 SearchPermissions(ctx *gin.Context) DeletePermission(ctx *gin.Context) SavePermission(ctx *gin.Context) }
ItfRbacManageController RBAC管理
type ItfRbacRole ¶
type ItfRbacRole interface { Search(search *dto.SearchRbacRoleParams, pa *paginate.Pager) ([]*models.RbacRole, *paginate.Pager, error) Query(id int64) (*models.RbacRole, error) Add(*models.RbacRole) (int64, error) Update(int64, *models.RbacRole) (int64, error) Delete(id int64) error ResetStatus(id int64, status int) (int64, error) Use(db *gorm.DB) ItfRbacRole //使用db ItfMigrate ItfGormDB }
ItfRbacRole 角色相关
type ItfResponseController ¶
type ItfSetting ¶
type ItfStatistical ¶
type ItfStatistical interface { Search(search *dto.SearchStatisticalParams, pa *paginate.Pager) ([]*models.Statistical, *paginate.Pager, error) Query(search *dto.SearchStatisticalParams) (*models.Statistical, error) Add(st *models.Statistical) (int64, error) Delete(id int64) (int64, error) DeleteByName(name, date string) (int64, error) Use(db *gorm.DB) ItfStatistical //使用db ItfMigrate ItfGormDB }
ItfStatistical 统计相关
type ItfSupportModule ¶
type ItfSupportModule interface {
WithModule(t bool)
}
ItfSupportModule 支持模块服务
type ItfUser ¶
type ItfUser interface { Search(search *dto.SearchUserParams, pa *paginate.Pager) ([]*models.User, *paginate.Pager, error) Query(id int64) (*models.User, error) QueryByAccount(string) (*models.User, error) QueryByPhone(string) (*models.User, error) QueryByEmail(string) (*models.User, error) Add(*models.User) (int64, error) Update(id int64, user *models.User) (int64, error) Delete(id int64) (int64, error) LoginNote(id int64, info *dto.LoginInfoParam) (int64, error) //登录记录 ResetStatus(id int64, status int) (int64, error) ResetPassword(id int64, password string) (int64, error) UpdateProInfo(id int64, user *models.User) (int64, error) Use(db *gorm.DB) ItfUser //使用db ItfMigrate ItfGormDB }
type ItfUserAccount ¶
type ItfUserAccount interface { QueryByAccount(string) (*models.UserAccount, error) Add(*models.UserAccount) (int64, error) Delete(id int64) (int64, error) Use(db *gorm.DB) ItfUserAccount //使用db ItfMigrate ItfGormDB }
type ItfUserAuthController ¶
type ItfUserAuthController interface { SignUp(ctx *gin.Context) //注册 AuthByWxCode(ctx *gin.Context) //微信登录 AuthByQQ(ctx *gin.Context) //QQ登录 //debug用 DebugAuthByThird(ctx *gin.Context) ItfAuthController }
ItfUserAuthController 用户授权模块
type ItfUserCenterController ¶
type ItfUserCenterController interface { ResetPassword(ctx *gin.Context) //重置密码 BindEmailPhone(ctx *gin.Context) //绑定邮箱 LoginRecord(ctx *gin.Context) //登录记录 ModifyInfo(ctx *gin.Context) //修改个人信息 ModifyPassword(ctx *gin.Context) //修改密码 }
ItfUserCenterController 用户中心模块
type ItfUserGenericRecord ¶
type ItfUserGenericRecord interface { Search(search *dto.SearchGenericRecordParams, pa *paginate.Pager) ([]*models.UserGenericRecord, *paginate.Pager, error) Add(code *models.UserGenericRecord) (int64, error) Delete(id int64) (int64, error) Use(db *gorm.DB) ItfUserGenericRecord //使用db ItfMigrate ItfGormDB }
ItfUserGenericRecord 用户通用记录
type ItfUserLoginRecord ¶
type ItfUserLoginRecord interface { Search(search *dto.SearchLoginRecordParams, pa *paginate.Pager) ([]*models.UserLoginRecord, *paginate.Pager, error) Add(code *models.UserLoginRecord) (int64, error) Use(db *gorm.DB) ItfUserLoginRecord //使用db ItfMigrate ItfGormDB }
ItfUserLoginRecord 用户登录记录
type ItfUserManageController ¶
type ItfUserManageController interface { SearchUser(ctx *gin.Context) QueryUser(ctx *gin.Context) SaveUser(ctx *gin.Context) DeleteUser(ctx *gin.Context) DisableUser(ctx *gin.Context) ResetUserPassword(ctx *gin.Context) }
ItfUserManageController 用户管理
type ItfUserService ¶
type ItfUserService interface {
SignUp(*dto.UserRegisterParams) (int64, error)
}
type ItfUserThird ¶
type ItfUserThird interface { Search(search *dto.SearchUserThirdParams, pa *paginate.Pager) ([]*models.UserThird, *paginate.Pager, error) Query(id int64) (*models.UserThird, error) QueryByThirdId(thirdType string, thirdId string) (*models.UserThird, error) QueryByThirdUnionId(thirdType string, unionId string) (*models.UserThird, error) Add(*models.UserThird) (int64, error) Delete(id int64) (int64, error) Use(db *gorm.DB) ItfUserThird //使用db ItfMigrate ItfGormDB }
type ItfVerifyCode ¶
type ItfVerifyCode interface { Query(id int64) (*models.VerifyCode, error) QueryByTarget(target string) (*models.VerifyCode, error) Verify(target string, code string) (bool, error) Add(code *models.VerifyCode) (int64, error) Delete(id int64) (int64, error) Use(db *gorm.DB) ItfVerifyCode //使用db ItfMigrate ItfGormDB }
ItfVerifyCode 验证码相关db操作接口
type ItfVerifyCodeController ¶
type ItfVerifyCodeController interface { SendCode(ctx *gin.Context) VerifyCode(ctx *gin.Context) VerifyHandler() gin.HandlerFunc //验证handler,用于中间件 }
ItfVerifyCodeController 发送验证码相关
type PasswdBuilder ¶
PasswdBuilder 密码生成
type PasswdChecker ¶
PasswdChecker 密码校验
Click to show internal directories.
Click to hide internal directories.