Documentation ¶
Index ¶
- type Alarm
- type AlarmGroup
- type AlarmHook
- type AlarmPage
- type AlarmRaw
- type AlarmSendRepository
- type Cache
- type Captcha
- type Dashboard
- type Datasource
- type DatasourceMetric
- type Department
- type Dict
- type FileRepository
- type HistoryRepository
- type Lock
- type MQDataSource
- type Menu
- type Metric
- type Msg
- type OAuth
- type Resource
- type Strategy
- type StrategyCountRepo
- type StrategyGroup
- type SubscriberStrategy
- type System
- type Team
- type TeamDict
- type TeamInvite
- type TeamMenu
- type TeamResource
- type TeamRole
- type Template
- type User
- type UserMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alarm ¶
type Alarm interface { // GetRealTimeAlarm 获取实时告警 GetRealTimeAlarm(ctx context.Context, params *bo.GetRealTimeAlarmParams) (*alarmmodel.RealtimeAlarm, error) // GetRealTimeAlarms 获取实时告警列表 GetRealTimeAlarms(ctx context.Context, params *bo.GetRealTimeAlarmsParams) ([]*alarmmodel.RealtimeAlarm, error) // SaveAlertQueue 保存告警队列 SaveAlertQueue(param *bo.CreateAlarmHookRawParams) error // CreateRealTimeAlarm 创建实时告警 CreateRealTimeAlarm(ctx context.Context, param *bo.CreateAlarmInfoParams) error }
Alarm 告警相关接口定义
type AlarmGroup ¶
type AlarmGroup interface { // CreateAlarmGroup 创建告警组 CreateAlarmGroup(context.Context, *bo.CreateAlarmNoticeGroupParams) (*bizmodel.AlarmNoticeGroup, error) // UpdateAlarmGroup 更新告警组 UpdateAlarmGroup(context.Context, *bo.UpdateAlarmNoticeGroupParams) error // DeleteAlarmGroup 删除告警组 DeleteAlarmGroup(context.Context, uint32) error // GetAlarmGroup 获取告警详情 GetAlarmGroup(context.Context, uint32) (*bizmodel.AlarmNoticeGroup, error) // AlarmGroupPage 告警列表 AlarmGroupPage(context.Context, *bo.QueryAlarmNoticeGroupListParams) ([]*bizmodel.AlarmNoticeGroup, error) // UpdateStatus 更新状态 UpdateStatus(context.Context, *bo.UpdateAlarmNoticeGroupStatusParams) error // MyAlarmGroups 获取我的告警组 MyAlarmGroups(ctx context.Context, params *bo.MyAlarmGroupListParams) ([]*bizmodel.AlarmNoticeGroup, error) }
AlarmGroup 告警组接口
type AlarmHook ¶
type AlarmHook interface { // CreateAlarmHook 创建告警hook CreateAlarmHook(ctx context.Context, params *bo.CreateAlarmHookParams) (*bizmodel.AlarmHook, error) // UpdateAlarmHook 更新告警hook UpdateAlarmHook(ctx context.Context, params *bo.UpdateAlarmHookParams) error // DeleteAlarmHook 删除告警hook DeleteAlarmHook(ctx context.Context, ID uint32) error // GetAlarmHook 获取告警hook GetAlarmHook(ctx context.Context, ID uint32) (*bizmodel.AlarmHook, error) // ListAlarmHook 获取告警hook列表 ListAlarmHook(ctx context.Context, params *bo.QueryAlarmHookListParams) ([]*bizmodel.AlarmHook, error) // UpdateAlarmHookStatus 更新告警hook状态 UpdateAlarmHookStatus(ctx context.Context, params *bo.UpdateAlarmHookStatusParams) error }
AlarmHook 告警hook
type AlarmPage ¶
type AlarmPage interface { // ReplaceAlarmPages 批量替换告警页面 ReplaceAlarmPages(ctx context.Context, userID uint32, alarmPageIDs []uint32) error // ListAlarmPages 获取用户告警页面列表 ListAlarmPages(ctx context.Context, userID uint32) ([]*bizmodel.AlarmPageSelf, error) // GetAlertCounts 获取告警页面的告警数量 GetAlertCounts(ctx context.Context, pageIDs []uint32) map[int32]int64 }
AlarmPage 告警页面管理
type AlarmRaw ¶ added in v1.1.0
type AlarmRaw interface { // CreateAlarmRaws 创建告警原始数据 CreateAlarmRaws(ctx context.Context, params []*bo.CreateAlarmRawParams, teamID uint32) ([]*alarmmodel.AlarmRaw, error) }
AlarmRaw repository
type AlarmSendRepository ¶ added in v1.1.31
type AlarmSendRepository interface { // GetAlarmSendHistory 获取告警发送历史 GetAlarmSendHistory(ctx context.Context, param *bo.GetAlarmSendHistoryParams) (*alarmmodel.AlarmSendHistory, error) // AlarmSendHistoryList 获取告警发送历史列表 AlarmSendHistoryList(ctx context.Context, param *bo.QueryAlarmSendHistoryListParams) ([]*alarmmodel.AlarmSendHistory, error) // SaveAlarmSendHistory 保存告警发送记录 SaveAlarmSendHistory(ctx context.Context, param *bo.CreateAlarmSendParams) error // RetryAlarmSend 重试告警发送 RetryAlarmSend(ctx context.Context, param *bo.RetryAlarmSendParams) error // GetRetryNumberByRequestID 获取重试次数 GetRetryNumberByRequestID(ctx context.Context, requestID string, teamID uint32) (int, error) }
AlarmSendRepository is a AlarmSend repo.
type Cache ¶
type Cache interface { // Cacher 获取缓存实例 Cacher() cache.ICacher // GetUser 获取用户信息 GetUser(ctx context.Context, userID uint32) *model.SysUser // GetTeam 获取团队信息 GetTeam(ctx context.Context, teamID uint32) *model.SysTeam // AppendUser 设置用户信息 AppendUser(ctx context.Context, user *model.SysUser) // AppendTeam 设置团队信息 AppendTeam(ctx context.Context, team *model.SysTeam) // GetUserTeamList 获取用户团队列表 GetUserTeamList(ctx context.Context, userID uint32) []*model.SysTeam // SyncUserTeamList 同步用户团队列表 SyncUserTeamList(ctx context.Context, userID uint32) GetUsers(ctx context.Context, userIDs []uint32) []*model.SysUser }
Cache 缓存接口
type Captcha ¶
type Captcha interface { // CreateCaptcha 创建验证码 CreateCaptcha(ctx context.Context, captcha *bo.ValidateCaptchaItem, duration time.Duration) error // GetCaptchaById 通过id获取验证码详情 GetCaptchaByID(ctx context.Context, id string) (*bo.ValidateCaptchaItem, error) }
Captcha 验证码接口
type Dashboard ¶
type Dashboard interface { // AddDashboard 添加仪表盘 AddDashboard(ctx context.Context, req *bo.AddDashboardParams) error // DeleteDashboard 删除仪表盘 DeleteDashboard(ctx context.Context, req *bo.DeleteDashboardParams) error // UpdateDashboard 更新仪表盘 UpdateDashboard(ctx context.Context, req *bo.UpdateDashboardParams) error // GetDashboard 获取仪表盘详情 GetDashboard(ctx context.Context, id uint32) (*bizmodel.Dashboard, error) // ListDashboard 获取仪表盘列表 ListDashboard(ctx context.Context, params *bo.ListDashboardParams) ([]*bizmodel.Dashboard, error) // BatchUpdateDashboardStatus 批量更新仪表盘状态 BatchUpdateDashboardStatus(ctx context.Context, params *bo.BatchUpdateDashboardStatusParams) error }
Dashboard 仪表盘相关操作接口
type Datasource ¶
type Datasource interface { // CreateDatasource 创建数据源 CreateDatasource(context.Context, *bo.CreateDatasourceParams) (*bizmodel.Datasource, error) // GetDatasource 获取数据源详情 GetDatasource(context.Context, uint32) (*bizmodel.Datasource, error) // GetDatasourceNoAuth 获取数据源详情(不鉴权) GetDatasourceNoAuth(context.Context, uint32, uint32) (*bizmodel.Datasource, error) // ListDatasource 获取数据源列表 ListDatasource(context.Context, *bo.QueryDatasourceListParams) ([]*bizmodel.Datasource, error) // UpdateDatasourceStatus 更新数据源状态 UpdateDatasourceStatus(context.Context, vobj.Status, ...uint32) error // UpdateDatasourceBaseInfo 更新数据源基础信息 UpdateDatasourceBaseInfo(context.Context, *bo.UpdateDatasourceBaseInfoParams) error // UpdateDatasourceConfig 更新数据源配置 UpdateDatasourceConfig(context.Context, *bo.UpdateDatasourceConfigParams) error // DeleteDatasourceByID 删除数据源 DeleteDatasourceByID(context.Context, uint32) error // GetTeamDatasource 获取团队数据源 GetTeamDatasource(ctx context.Context, teamID uint32, ids []uint32) ([]*bizmodel.Datasource, error) }
Datasource .
type DatasourceMetric ¶
type DatasourceMetric interface { // CreateMetrics 创建指标 CreateMetrics(context.Context, ...*bizmodel.DatasourceMetric) error // CreateMetricsNoAuth 创建指标(不鉴权) CreateMetricsNoAuth(context.Context, uint32, ...*bizmodel.DatasourceMetric) error }
DatasourceMetric 数据源指标接口
type Dict ¶
type Dict interface { // Create 创建字典 Create(context.Context, *bo.CreateDictParams) (imodel.IDict, error) // GetByID 通过id 获取字典详情 GetByID(context.Context, uint32) (imodel.IDict, error) // FindByPage 分页查询字典列表 FindByPage(context.Context, *bo.QueryDictListParams) ([]imodel.IDict, error) // DeleteByID 通过ID删除字典 DeleteByID(context.Context, uint32) error // UpdateStatusByIds 通过ID列表批量更新字典状态 UpdateStatusByIds(context.Context, *bo.UpdateDictStatusParams) error // UpdateByID 通过ID更新字典数据 UpdateByID(context.Context, *bo.UpdateDictParams) error }
Dict 字典接口
type FileRepository ¶ added in v1.1.0
type FileRepository interface { // UploadFile 上传文件 UploadFile(ctx context.Context, params *bo.UploadFileParams) (string, error) DownLoadFile(ctx context.Context, params *bo.DownLoadFileParams) (io.ReadCloser, error) }
FileRepository file repository interface
type HistoryRepository ¶ added in v1.1.0
type HistoryRepository interface { // GetAlarmHistory 获取告警历史 GetAlarmHistory(ctx context.Context, param *bo.GetAlarmHistoryParams) (*alarmmodel.AlarmHistory, error) // GetAlarmHistories 获取告警历史列表 GetAlarmHistories(ctx context.Context, param *bo.QueryAlarmHistoryListParams) ([]*alarmmodel.AlarmHistory, error) // CreateAlarmHistory 创建告警历史 CreateAlarmHistory(ctx context.Context, param *bo.CreateAlarmInfoParams) error }
HistoryRepository 告警历史仓库接口
type Lock ¶
type Lock interface { // Lock 加锁 Lock(ctx context.Context, key string, expire time.Duration) error // UnLock 解锁 UnLock(ctx context.Context, key string) error }
Lock .
type MQDataSource ¶ added in v1.1.37
type MQDataSource interface { // CreateMqDatasource 创建MQ数据源 CreateMqDatasource(ctx context.Context, params *bo.CreateMqDatasourceParams) error // DeleteMqDatasource 删除MQ数据源 DeleteMqDatasource(ctx context.Context, id uint32) error // UpdateMqDatasource 更新MQ数据源 UpdateMqDatasource(ctx context.Context, params *bo.UpdateMqDatasourceParams) error // GetMqDatasource 获取MQ数据源 GetMqDatasource(ctx context.Context, id uint32) (*bizmodel.MqDatasource, error) // ListMqDatasource 获取MQ数据源列表 ListMqDatasource(ctx context.Context, params *bo.QueryMqDatasourceListParams) ([]*bizmodel.MqDatasource, error) // UpdateMqDatasourceStatus 更新MQ数据源状态 UpdateMqDatasourceStatus(ctx context.Context, params *bo.UpdateMqDatasourceStatusParams) error }
MQDataSource mq 数据源
type Menu ¶
type Menu interface { // Create 创建系统菜单 Create(context.Context, *bo.CreateMenuParams) (*model.SysMenu, error) // BatchCreate 批量创建系统菜单 BatchCreate(context.Context, []*bo.CreateMenuParams) error // UpdateById 更新系统菜单 UpdateByID(context.Context, *bo.UpdateMenuParams) error // DeleteById 删除系统菜单 DeleteByID(context.Context, uint32) error // GetByID 根据id获取系统菜单 GetByID(context.Context, uint32) (*model.SysMenu, error) // FindByPage 分页查询系统菜单 FindByPage(context.Context, *bo.QueryMenuListParams) ([]*model.SysMenu, error) // ListAll 获取所有系统菜单 ListAll(context.Context) ([]*model.SysMenu, error) // UpdateStatusByIds 更新系统菜单状态 UpdateStatusByIds(context.Context, vobj.Status, ...uint32) error // UpdateTypeByIds 更新系统菜单类型 UpdateTypeByIds(context.Context, vobj.MenuType, ...uint32) error }
Menu 系统菜单接口
type Metric ¶
type Metric interface { // Get 查询指标详情 Get(context.Context, uint32) (*bizmodel.DatasourceMetric, error) // GetWithRelation 查询指标详情(关联其他属性) GetWithRelation(context.Context, uint32) (*bizmodel.DatasourceMetric, error) // Delete 删除指标 Delete(context.Context, uint32) error // List 查询指标列表 List(context.Context, *bo.QueryMetricListParams) ([]*bizmodel.DatasourceMetric, error) // Select 查询指标列表(不关联其他属性) Select(context.Context, *bo.QueryMetricListParams) ([]*bizmodel.DatasourceMetric, error) // Update 更新指标 Update(context.Context, *bo.UpdateMetricParams) error // MetricLabelCount 指标标签数量 MetricLabelCount(context.Context, uint32) (uint32, error) // CreateMetrics 创建指标 CreateMetrics(context.Context, uint32, *bizmodel.DatasourceMetric) error }
Metric .
type OAuth ¶
type OAuth interface { // OAuthUserFirstOrCreate 获取用户信息, 如果没有则创建 OAuthUserFirstOrCreate(context.Context, auth.IOAuthUser) (*model.SysUser, error) // SetEmail 设置电子邮箱 SetEmail(context.Context, uint32, string) (*model.SysUser, error) GetSysUserByOAuthID(context.Context, uint32, vobj.OAuthAPP) (*model.SysOAuthUser, error) SendVerifyEmail(ctx context.Context, email string) error CheckVerifyEmailCode(ctx context.Context, email, code string) error }
OAuth .
type Resource ¶
type Resource interface { // GetByID get resource by id GetByID(context.Context, uint32) (imodel.IResource, error) // CheckPath check resource path CheckPath(context.Context, string) (imodel.IResource, error) // FindByPage find resource by page FindByPage(context.Context, *bo.QueryResourceListParams) ([]imodel.IResource, error) // UpdateStatus update resource status UpdateStatus(context.Context, vobj.Status, ...uint32) error // FindSelectByPage find select resource by page FindSelectByPage(context.Context, *bo.QueryResourceListParams) ([]imodel.IResource, error) }
Resource 资源管理接口
type Strategy ¶
type Strategy interface { // CreateStrategy 创建策略 CreateStrategy(context.Context, *bo.CreateStrategyParams) (*bizmodel.Strategy, error) // UpdateByID 更新策略 UpdateByID(context.Context, *bo.UpdateStrategyParams) error // GetByID 获取策略详情 GetByID(context.Context, uint32) (*bizmodel.Strategy, error) // GetStrategyByIds 批量获取策略详情 GetStrategyByIds(context.Context, []uint32) ([]*bizmodel.Strategy, error) // UpdateStatus 更新状态 UpdateStatus(context.Context, *bo.UpdateStrategyStatusParams) error // FindByPage 策略分页列表 FindByPage(context.Context, *bo.QueryStrategyListParams) ([]*bizmodel.Strategy, error) // DeleteByID 删除策略 DeleteByID(context.Context, uint32) error // CopyStrategy 复制策略 CopyStrategy(context.Context, uint32) (*bizmodel.Strategy, error) // Eval 策略评估 Eval(context.Context, *bo.Strategy) (*bo.Alarm, error) // GetTeamStrategy 获取团队策略 GetTeamStrategy(ctx context.Context, params *bo.GetTeamStrategyParams) (*bizmodel.Strategy, error) // GetTeamStrategyLevelByLevelID 获取团队策略等级 GetTeamStrategyLevelByLevelID(ctx context.Context, params *bo.GetTeamStrategyLevelParams) (*bo.TeamStrategyLevelModel, error) // Sync 同步策略 Sync(ctx context.Context, id uint32) error // GetStrategyMetricLevels 获取Metric策略等级 GetStrategyMetricLevels(ctx context.Context, strategyID []uint32) ([]*bizmodel.StrategyMetricsLevel, error) // GetStrategyMQLevels 获取MQ策略等级 GetStrategyMQLevels(ctx context.Context, strategyIds []uint32) ([]*bizmodel.StrategyMQLevel, error) }
Strategy 策略管理接口
type StrategyCountRepo ¶
type StrategyCountRepo interface { // FindStrategyCount 获取策略总数 FindStrategyCount(context.Context, *bo.GetStrategyCountParams) ([]*bo.StrategyCountModel, error) }
StrategyCountRepo 策略数量接口
type StrategyGroup ¶
type StrategyGroup interface { // CreateStrategyGroup 创建策略组 CreateStrategyGroup(context.Context, *bo.CreateStrategyGroupParams) (*bizmodel.StrategyGroup, error) // UpdateStrategyGroup 更新策略组 UpdateStrategyGroup(context.Context, *bo.UpdateStrategyGroupParams) error // DeleteStrategyGroup 删除策略组 DeleteStrategyGroup(context.Context, *bo.DelStrategyGroupParams) error // GetStrategyGroup 获取策略详情 GetStrategyGroup(context.Context, uint32) (*bizmodel.StrategyGroup, error) // StrategyGroupPage 策略列表 StrategyGroupPage(context.Context, *bo.QueryStrategyGroupListParams) ([]*bizmodel.StrategyGroup, error) // UpdateStatus 更新状态 UpdateStatus(context.Context, *bo.UpdateStrategyGroupStatusParams) error }
StrategyGroup 策略组接口
type SubscriberStrategy ¶
type SubscriberStrategy interface { // UserSubscriberStrategy 用户订阅策略 UserSubscriberStrategy(ctx context.Context, params *bo.SubscriberStrategyParams) error // UserUnSubscriberStrategy 用户取消订阅策略 UserUnSubscriberStrategy(ctx context.Context, params *bo.UnSubscriberStrategyParams) error // UserSubscriberStrategyList 用户订阅策略列表 UserSubscriberStrategyList(ctx context.Context, params *bo.QueryUserSubscriberParams) ([]*bizmodel.StrategySubscriber, error) // StrategySubscriberList 策略订阅用户列表 StrategySubscriberList(ctx context.Context, params *bo.QueryStrategySubscriberParams) ([]*bizmodel.StrategySubscriber, error) }
SubscriberStrategy 订阅仓库接口
type System ¶ added in v1.1.0
type System interface { // ResetTeam 重置团队 ResetTeam(ctx context.Context, teamID uint32) error // RestoreData 还原数据 RestoreData(ctx context.Context, teamID uint32) error // DeleteBackup 删除备份 DeleteBackup(ctx context.Context, teamID uint32) }
System 系统管理模块
type Team ¶
type Team interface { // GetUserTeamByID 查询用户指定团队信息 GetUserTeamByID(context.Context, uint32, uint32) (*bizmodel.SysTeamMember, error) // CreateTeam 创建团队 CreateTeam(context.Context, *bo.CreateTeamParams) (*model.SysTeam, error) // UpdateTeam 更新团队信息 UpdateTeam(context.Context, *bo.UpdateTeamParams) error // GetTeamDetail 获取团队详情 GetTeamDetail(context.Context, uint32) (*model.SysTeam, error) // GetTeamList 获取团队列表 GetTeamList(context.Context, *bo.QueryTeamListParams) ([]*model.SysTeam, error) // UpdateTeamStatus 修改团队状态 UpdateTeamStatus(context.Context, vobj.Status, ...uint32) error // GetUserTeamList 获取用户团队列表 GetUserTeamList(context.Context, uint32) ([]*model.SysTeam, error) // AddTeamMember 添加团队成员 AddTeamMember(context.Context, *bo.AddTeamMemberParams) error // RemoveTeamMember 移除团队成员 RemoveTeamMember(context.Context, *bo.RemoveTeamMemberParams) error // SetMemberAdmin 设置成员角色类型 SetMemberAdmin(context.Context, *bo.SetMemberAdminParams) error // SetMemberRole 设置成员角色类型 SetMemberRole(context.Context, *bo.SetMemberRoleParams) error // ListTeamMember 获取团队成员列表 ListTeamMember(context.Context, *bo.ListTeamMemberParams) ([]*bizmodel.SysTeamMember, error) // TransferTeamLeader 移交团队 TransferTeamLeader(context.Context, *bo.TransferTeamLeaderParams) error // GetTeamMailConfig 获取团队邮件配置 GetTeamMailConfig(context.Context, uint32) (*model.SysTeamEmail, error) // CreateTeamMailConfig 创建团队邮件配置 CreateTeamMailConfig(context.Context, *bo.SetTeamMailConfigParams) error // UpdateTeamMailConfig 更新团队邮件配置 UpdateTeamMailConfig(context.Context, *bo.SetTeamMailConfigParams) error // UpdateTeamMemberStatus 更新团队成员状态 UpdateTeamMemberStatus(context.Context, vobj.Status, ...uint32) error // MemberList 成员列表 MemberList(context.Context, uint32) ([]*bizmodel.SysTeamMember, error) // SyncTeamBaseData 同步团队基础数据 SyncTeamBaseData(context.Context, *model.SysTeam, []*bizmodel.SysTeamMember) error }
Team 团队管理接口
type TeamInvite ¶ added in v1.0.2
type TeamInvite interface { // InviteUser 邀请用户加入团队 InviteUser(ctx context.Context, params *bo.InviteUserParams) (*model.SysTeamInvite, error) // UpdateInviteStatus 更新邀请状态 UpdateInviteStatus(ctx context.Context, params *bo.UpdateInviteStatusParams) error // UserInviteList 受邀请列表 UserInviteList(ctx context.Context, params *bo.QueryInviteListParams) ([]*model.SysTeamInvite, error) // GetInviteUserByUserIDAndType 获取邀请用户信息 GetInviteUserByUserIDAndType(ctx context.Context, params *bo.InviteUserParams) (*model.SysTeamInvite, error) // GetInviteDetail 获取邀请详情 GetInviteDetail(ctx context.Context, inviteID uint32) (*model.SysTeamInvite, error) // DeleteInvite 删除邀请 DeleteInvite(ctx context.Context, inviteID uint32) error }
TeamInvite 团队邀请接口
type TeamMenu ¶
type TeamMenu interface {
GetTeamMenuList(context.Context, *bo.QueryTeamMenuListParams) ([]*bizmodel.SysTeamMenu, error)
}
TeamMenu 团队菜单接口
type TeamRole ¶
type TeamRole interface { // CreateTeamRole 创建团队角色 CreateTeamRole(context.Context, *bo.CreateTeamRoleParams) (*bizmodel.SysTeamRole, error) // UpdateTeamRole 更新团队角色 UpdateTeamRole(context.Context, *bo.UpdateTeamRoleParams) error // DeleteTeamRole 删除团队角色 DeleteTeamRole(context.Context, uint32) error // GetTeamRole 获取团队角色 GetTeamRole(context.Context, uint32) (*bizmodel.SysTeamRole, error) // ListTeamRole 获取团队角色列表 ListTeamRole(context.Context, *bo.ListTeamRoleParams) ([]*bizmodel.SysTeamRole, error) // GetTeamRoleByUserID 获取用户团队角色 GetTeamRoleByUserID(context.Context, uint32, uint32) ([]*bizmodel.SysTeamRole, error) // UpdateTeamRoleStatus 更新团队角色状态 UpdateTeamRoleStatus(context.Context, vobj.Status, ...uint32) error // CheckRbac 检查用户是否有权限 CheckRbac(context.Context, uint32, []uint32, string) (bool, error) // GetBizTeamRolesByIds 获取团队角色列表 GetBizTeamRolesByIds(ctx context.Context, teamID uint32, roleIds []uint32) ([]*bizmodel.SysTeamRole, error) }
TeamRole 团队角色接口
type Template ¶
type Template interface { // CreateTemplateStrategy 创建模板策略 CreateTemplateStrategy(ctx context.Context, templateStrategy *bo.CreateTemplateStrategyParams) error // UpdateTemplateStrategy 更新模板策略 UpdateTemplateStrategy(ctx context.Context, templateStrategy *bo.UpdateTemplateStrategyParams) error // DeleteTemplateStrategy 删除模板策略 DeleteTemplateStrategy(ctx context.Context, id uint32) error // GetTemplateStrategy 获取模板策略 GetTemplateStrategy(ctx context.Context, id uint32) (*model.StrategyTemplate, error) // ListTemplateStrategy 获取模板策略列表 ListTemplateStrategy(ctx context.Context, params *bo.QueryTemplateStrategyListParams) ([]*model.StrategyTemplate, error) // UpdateTemplateStrategyStatus 更新模板策略状态 UpdateTemplateStrategyStatus(ctx context.Context, status vobj.Status, ids ...uint32) error }
Template .
type User ¶
type User interface { // Create a user Create(ctx context.Context, user *bo.CreateUserParams) (*model.SysUser, error) // BatchCreate batch create user BatchCreate(ctx context.Context, users []*bo.CreateUserParams) error // GetByID get user by id GetByID(ctx context.Context, id uint32) (*model.SysUser, error) // GetByUsername get user by username GetByUsername(ctx context.Context, username string) (*model.SysUser, error) // GetByEmail get user by email GetByEmail(ctx context.Context, email string) (*model.SysUser, error) // UpdateByID update user by id UpdateByID(ctx context.Context, user *bo.UpdateUserParams) error // UpdateBaseByID update user base info by id UpdateBaseByID(ctx context.Context, user *bo.UpdateUserBaseParams) error // DeleteByID delete user by id DeleteByID(ctx context.Context, id uint32) error // UpdateStatusByIds update user status by ids UpdateStatusByIds(ctx context.Context, status vobj.Status, ids ...uint32) error // UpdatePassword update user password UpdatePassword(ctx context.Context, id uint32, password types.Password) error // FindByPage find user by page FindByPage(ctx context.Context, page *bo.QueryUserListParams) ([]*model.SysUser, error) // UpdateUser update user UpdateUser(ctx context.Context, user *model.SysUser) error // FindByIds find user by ids FindByIds(ctx context.Context, ids ...uint32) ([]*model.SysUser, error) // GetUserByEmailOrPhone get user by email or phone GetUserByEmailOrPhone(ctx context.Context, emailOrPhone string) (*model.SysUser, error) }
User is the user repository
type UserMessage ¶ added in v1.0.2
type UserMessage interface { // Create 创建用户消息 Create(context.Context, *model.SysUserMessage) error // Delete 删除用户消息 Delete(context.Context, []uint32) error // DeleteAll 删除所有用户消息 DeleteAll(context.Context) error // List 分页查询用户消息 List(context.Context, *bo.QueryUserMessageListParams) ([]*model.SysUserMessage, error) // GetByID 根据ID获取用户消息 GetByID(context.Context, uint32) (*model.SysUserMessage, error) }
UserMessage 用户消息
Source Files ¶
- alarm.go
- alarm_group.go
- alarm_page_self.go
- alarm_raw.go
- alarm_send.go
- cache.go
- captcha.go
- dashboard.go
- datasource.go
- datasource_metric.go
- department.go
- dict.go
- file.go
- history.go
- hook.go
- lock.go
- menu.go
- metric.go
- mqdatasource.go
- msg.go
- oauth_user.go
- resource.go
- strategy.go
- strategy_group.go
- subscriber.go
- system.go
- team.go
- team_dict.go
- team_invite.go
- team_menu.go
- team_resource.go
- team_role.go
- template.go
- user.go
- user_message.go
Click to show internal directories.
Click to hide internal directories.