Documentation ¶
Index ¶
- Variables
- type AlarmBiz
- func (b *AlarmBiz) CreateAlarmInfo(ctx context.Context, params *bo.CreateAlarmHookRawParams) error
- func (b *AlarmBiz) CreateAlarmRawInfo(ctx context.Context, param *bo.CreateAlarmHookRawParams) ([]*alarmmodel.AlarmRaw, error)
- func (b *AlarmBiz) GetRealTimeAlarm(ctx context.Context, params *bo.GetRealTimeAlarmParams) (*alarmmodel.RealtimeAlarm, error)
- func (b *AlarmBiz) ListRealTimeAlarms(ctx context.Context, params *bo.GetRealTimeAlarmsParams) ([]*alarmmodel.RealtimeAlarm, error)
- func (b *AlarmBiz) SaveAlarmInfoDB(ctx context.Context, params *bo.CreateAlarmInfoParams) error
- func (b *AlarmBiz) SaveAlertQueue(param *bo.CreateAlarmHookRawParams) error
- func (b *AlarmBiz) SendAlertMsg(ctx context.Context, params *bo.SendMsg)
- type AlarmGroupBiz
- func (s *AlarmGroupBiz) CreateAlarmGroup(ctx context.Context, params *bo.CreateAlarmNoticeGroupParams) (*bizmodel.AlarmNoticeGroup, error)
- func (s *AlarmGroupBiz) DeleteAlarmGroup(ctx context.Context, alarmID uint32) error
- func (s *AlarmGroupBiz) GetAlarmGroupDetail(ctx context.Context, groupID uint32) (*bizmodel.AlarmNoticeGroup, error)
- func (s *AlarmGroupBiz) ListPage(ctx context.Context, params *bo.QueryAlarmNoticeGroupListParams) ([]*bizmodel.AlarmNoticeGroup, error)
- func (s *AlarmGroupBiz) MyAlarmGroups(ctx context.Context, params *bo.MyAlarmGroupListParams) ([]*bizmodel.AlarmNoticeGroup, error)
- func (s *AlarmGroupBiz) UpdateAlarmGroup(ctx context.Context, params *bo.UpdateAlarmNoticeGroupParams) error
- func (s *AlarmGroupBiz) UpdateStatus(ctx context.Context, params *bo.UpdateAlarmNoticeGroupStatusParams) error
- type AlarmHistoryBiz
- type AlarmHookBiz
- func (s *AlarmHookBiz) CreateAlarmHook(ctx context.Context, params *bo.CreateAlarmHookParams) (*bizmodel.AlarmHook, error)
- func (s *AlarmHookBiz) DeleteAlarmHook(ctx context.Context, ID uint32) error
- func (s *AlarmHookBiz) GetAlarmHook(ctx context.Context, ID uint32) (*bizmodel.AlarmHook, error)
- func (s *AlarmHookBiz) ListPage(ctx context.Context, params *bo.QueryAlarmHookListParams) ([]*bizmodel.AlarmHook, error)
- func (s *AlarmHookBiz) UpdateAlarmHook(ctx context.Context, params *bo.UpdateAlarmHookParams) error
- func (s *AlarmHookBiz) UpdateStatus(ctx context.Context, params *bo.UpdateAlarmHookStatusParams) error
- type AlarmPageBiz
- func (b *AlarmPageBiz) GetAlertCounts(ctx context.Context, pageIDs []uint32) map[int32]int64
- func (b *AlarmPageBiz) ListAlarmPage(ctx context.Context, userID uint32) ([]*bizmodel.AlarmPageSelf, error)
- func (b *AlarmPageBiz) UpdateAlarmPage(ctx context.Context, userID uint32, alarmPageIDs []uint32) error
- type AlarmSendBiz
- func (a *AlarmSendBiz) GetAlarmSendDetail(ctx context.Context, param *bo.GetAlarmSendHistoryParams) (*alarmmodel.AlarmSendHistory, error)
- func (a *AlarmSendBiz) ListAlarmSendHistories(ctx context.Context, param *bo.QueryAlarmSendHistoryListParams) ([]*alarmmodel.AlarmSendHistory, error)
- func (a *AlarmSendBiz) RetryAlarmSend(ctx context.Context, param *bo.RetryAlarmSendParams) error
- type AuthorizationBiz
- func (b *AuthorizationBiz) CheckPermission(ctx context.Context, req *bo.CheckPermissionParams) error
- func (b *AuthorizationBiz) CheckToken(ctx context.Context, req *bo.CheckTokenParams) (*model.SysUser, error)
- func (b *AuthorizationBiz) EmailLoginVerifyEmail(ctx context.Context, req *auth.EmailLoginParams) error
- func (b *AuthorizationBiz) GetOAuthConf(provider vobj.OAuthAPP) *oauth2.Config
- func (b *AuthorizationBiz) Login(ctx context.Context, req *bo.LoginParams) (*bo.LoginReply, error)
- func (b *AuthorizationBiz) Logout(ctx context.Context, params *bo.LogoutParams) error
- func (b *AuthorizationBiz) OAuthLogin(ctx context.Context, provider vobj.OAuthAPP, code string) (string, error)
- func (b *AuthorizationBiz) OAuthLoginVerifyEmail(ctx context.Context, e string) error
- func (b *AuthorizationBiz) OAuthLoginWithEmail(ctx context.Context, oauthParams *auth.OauthLoginParams) (*bo.RefreshTokenReply, error)
- func (b *AuthorizationBiz) RefreshToken(ctx context.Context, req *bo.RefreshTokenParams) (*bo.RefreshTokenReply, error)
- func (b *AuthorizationBiz) RegisterWithEmail(ctx context.Context, req *auth.RegisterWithEmailParams) (*bo.RefreshTokenReply, error)
- type CaptchaBiz
- type DashboardBiz
- func (b *DashboardBiz) BatchUpdateDashboardStatus(ctx context.Context, params *bo.BatchUpdateDashboardStatusParams) error
- func (b *DashboardBiz) CreateDashboard(ctx context.Context, req *bo.AddDashboardParams) error
- func (b *DashboardBiz) DeleteDashboard(ctx context.Context, req *bo.DeleteDashboardParams) error
- func (b *DashboardBiz) GetDashboard(ctx context.Context, id uint32) (*bizmodel.Dashboard, error)
- func (b *DashboardBiz) ListDashboard(ctx context.Context, params *bo.ListDashboardParams) ([]*bizmodel.Dashboard, error)
- func (b *DashboardBiz) UpdateDashboard(ctx context.Context, req *bo.UpdateDashboardParams) error
- type DatasourceBiz
- func (b *DatasourceBiz) CreateDatasource(ctx context.Context, datasource *bo.CreateDatasourceParams) (*bizmodel.Datasource, error)
- func (b *DatasourceBiz) DeleteDatasource(ctx context.Context, id uint32) error
- func (b *DatasourceBiz) GetDatasource(ctx context.Context, id uint32) (*bizmodel.Datasource, error)
- func (b *DatasourceBiz) GetDatasourceSelect(ctx context.Context, params *bo.QueryDatasourceListParams) ([]*bo.SelectOptionBo, error)
- func (b *DatasourceBiz) ListDatasource(ctx context.Context, params *bo.QueryDatasourceListParams) ([]*bizmodel.Datasource, error)
- func (b *DatasourceBiz) Query(ctx context.Context, params *bo.DatasourceQueryParams) ([]*bo.MetricQueryData, error)
- func (b *DatasourceBiz) SyncDatasourceMetaV2(ctx context.Context, id uint32) (err error)
- func (b *DatasourceBiz) UpdateDatasourceBaseInfo(ctx context.Context, datasource *bo.UpdateDatasourceBaseInfoParams) error
- func (b *DatasourceBiz) UpdateDatasourceConfig(ctx context.Context, datasource *bo.UpdateDatasourceConfigParams) error
- func (b *DatasourceBiz) UpdateDatasourceStatus(ctx context.Context, status vobj.Status, ids ...uint32) error
- type DictBiz
- func (b *DictBiz) CreateDict(ctx context.Context, dictParam *bo.CreateDictParams) (imodel.IDict, error)
- func (b *DictBiz) DeleteDictByID(ctx context.Context, id uint32) error
- func (b *DictBiz) GetDict(ctx context.Context, id uint32) (imodel.IDict, error)
- func (b *DictBiz) ListDict(ctx context.Context, listParam *bo.QueryDictListParams) ([]imodel.IDict, error)
- func (b *DictBiz) UpdateDict(ctx context.Context, updateParam *bo.UpdateDictParams) error
- func (b *DictBiz) UpdateDictStatusByIds(ctx context.Context, updateParams *bo.UpdateDictStatusParams) error
- type FileBiz
- type InviteBiz
- func (i *InviteBiz) DeleteInvite(ctx context.Context, inviteID uint32) error
- func (i *InviteBiz) GetTeamMapByIds(ctx context.Context, teamIds []uint32) map[uint32]*model.SysTeam
- func (i *InviteBiz) GetTeamRoles(ctx context.Context, teamID uint32, roleIds []uint32) []*bizmodel.SysTeamRole
- func (i *InviteBiz) InviteUser(ctx context.Context, params *bo.InviteUserParams) error
- func (i *InviteBiz) TeamInviteDetail(ctx context.Context, inviteID uint32) (*model.SysTeamInvite, error)
- func (i *InviteBiz) UpdateInviteStatus(ctx context.Context, params *bo.UpdateInviteStatusParams) error
- func (i *InviteBiz) UserInviteList(ctx context.Context, params *bo.QueryInviteListParams) ([]*model.SysTeamInvite, error)
- type MenuBiz
- func (b *MenuBiz) BatchCreateMenu(ctx context.Context, params []*bo.CreateMenuParams) error
- func (b *MenuBiz) DeleteMenu(ctx context.Context, menuID uint32) error
- func (b *MenuBiz) GetMenu(ctx context.Context, menuID uint32) (*model.SysMenu, error)
- func (b *MenuBiz) ListMenuPage(ctx context.Context, params *bo.QueryMenuListParams) ([]*model.SysMenu, error)
- func (b *MenuBiz) MenuAllList(ctx context.Context) ([]*model.SysMenu, error)
- func (b *MenuBiz) MenuList(ctx context.Context) ([]*bizmodel.SysTeamMenu, error)
- func (b *MenuBiz) UpdateMenu(ctx context.Context, params *bo.UpdateMenuParams) error
- func (b *MenuBiz) UpdateMenuStatus(ctx context.Context, params *bo.UpdateMenuStatusParams) error
- func (b *MenuBiz) UpdateMenuTypes(ctx context.Context, params *bo.UpdateMenuTypeParams) error
- type MetricBiz
- func (b *MetricBiz) CreateMetric(ctx context.Context, params *bo.CreateMetricParams) error
- func (b *MetricBiz) DeleteMetricByID(ctx context.Context, id uint32) error
- func (b *MetricBiz) GetMetricByID(ctx context.Context, params *bo.GetMetricParams) (detail *bizmodel.DatasourceMetric, err error)
- func (b *MetricBiz) GetMetricLabelCount(ctx context.Context, metricID uint32) (uint32, error)
- func (b *MetricBiz) ListMetric(ctx context.Context, params *bo.QueryMetricListParams) ([]*bizmodel.DatasourceMetric, error)
- func (b *MetricBiz) SelectMetric(ctx context.Context, params *bo.QueryMetricListParams) ([]*bo.SelectOptionBo, error)
- func (b *MetricBiz) UpdateMetricByID(ctx context.Context, params *bo.UpdateMetricParams) error
- type MqDataSourceBiz
- func (m *MqDataSourceBiz) CreateMqDataSource(ctx context.Context, params *bo.CreateMqDatasourceParams) error
- func (m *MqDataSourceBiz) DeleteMqDatasource(ctx context.Context, id uint32) error
- func (m *MqDataSourceBiz) GetMqDataSource(ctx context.Context, ID uint32) (*bizmodel.MqDatasource, error)
- func (m *MqDataSourceBiz) GetMqDatasourceSelect(ctx context.Context, param *bo.QueryMqDatasourceListParams) ([]*bizmodel.MqDatasource, error)
- func (m *MqDataSourceBiz) MqDataSourceList(ctx context.Context, params *bo.QueryMqDatasourceListParams) ([]*bizmodel.MqDatasource, error)
- func (m *MqDataSourceBiz) UpdateMqDataSource(ctx context.Context, param *bo.UpdateMqDatasourceParams) error
- func (m *MqDataSourceBiz) UpdateMqDataSourceStatus(ctx context.Context, params *bo.UpdateMqDatasourceStatusParams) error
- type ResourceBiz
- func (b *ResourceBiz) GetResource(ctx context.Context, id uint32) (imodel.IResource, error)
- func (b *ResourceBiz) GetResourceSelectList(ctx context.Context, params *bo.QueryResourceListParams) ([]*bo.SelectOptionBo, error)
- func (b *ResourceBiz) ListResource(ctx context.Context, params *bo.QueryResourceListParams) ([]imodel.IResource, error)
- func (b *ResourceBiz) UpdateResourceStatus(ctx context.Context, status vobj.Status, ids ...uint32) error
- type ServerRegisterBiz
- type StrategyBiz
- func (b *StrategyBiz) CopyStrategy(ctx context.Context, strategyID uint32) (*bizmodel.Strategy, error)
- func (b *StrategyBiz) CreateStrategy(ctx context.Context, param *bo.CreateStrategyParams) (*bizmodel.Strategy, error)
- func (b *StrategyBiz) DeleteByID(ctx context.Context, strategyID uint32) error
- func (b *StrategyBiz) Eval(ctx context.Context, strategy *bo.Strategy) (*bo.Alarm, error)
- func (b *StrategyBiz) GetStrategy(ctx context.Context, strategyID uint32) (*bizmodel.Strategy, error)
- func (b *StrategyBiz) GetStrategyLevel(ctx context.Context, strategyID uint32, strategyType vobj.StrategyType) (*bo.StrategyLevelDetailModel, error)
- func (b *StrategyBiz) PushStrategy(ctx context.Context, strategies *strategyapi.PushStrategyRequest) error
- func (b *StrategyBiz) StrategyPage(ctx context.Context, param *bo.QueryStrategyListParams) ([]*bizmodel.Strategy, error)
- func (b *StrategyBiz) SyncStrategy(ctx context.Context, id uint32) error
- func (b *StrategyBiz) UpdateByID(ctx context.Context, param *bo.UpdateStrategyParams) error
- func (b *StrategyBiz) UpdateStatus(ctx context.Context, param *bo.UpdateStrategyStatusParams) error
- type StrategyCountBiz
- type StrategyGroupBiz
- func (s *StrategyGroupBiz) CreateStrategyGroup(ctx context.Context, params *bo.CreateStrategyGroupParams) (*bizmodel.StrategyGroup, error)
- func (s *StrategyGroupBiz) DeleteStrategyGroup(ctx context.Context, params *bo.DelStrategyGroupParams) error
- func (s *StrategyGroupBiz) GetStrategyGroupDetail(ctx context.Context, groupID uint32) (*bizmodel.StrategyGroup, error)
- func (s *StrategyGroupBiz) ListPage(ctx context.Context, params *bo.QueryStrategyGroupListParams) ([]*bizmodel.StrategyGroup, error)
- func (s *StrategyGroupBiz) UpdateStatus(ctx context.Context, params *bo.UpdateStrategyGroupStatusParams) error
- func (s *StrategyGroupBiz) UpdateStrategyGroup(ctx context.Context, params *bo.UpdateStrategyGroupParams) error
- type SubscriberBiz
- func (s *SubscriberBiz) StrategySubscribersList(ctx context.Context, params *bo.QueryStrategySubscriberParams) ([]*bizmodel.StrategySubscriber, error)
- func (s *SubscriberBiz) UnSubscriptionStrategy(ctx context.Context, params *bo.UnSubscriberStrategyParams) error
- func (s *SubscriberBiz) UserSubscriptionStrategy(ctx context.Context, params *bo.SubscriberStrategyParams) error
- func (s *SubscriberBiz) UserSubscriptionStrategyList(ctx context.Context, params *bo.QueryUserSubscriberParams) ([]*bizmodel.StrategySubscriber, error)
- type SystemBiz
- type TeamBiz
- func (t *TeamBiz) AddTeamMember(ctx context.Context, params *bo.AddTeamMemberParams) error
- func (t *TeamBiz) CreateTeam(ctx context.Context, params *bo.CreateTeamParams) (*model.SysTeam, error)
- func (t *TeamBiz) GetTeam(ctx context.Context, teamID uint32) (*model.SysTeam, error)
- func (t *TeamBiz) GetTeamMailConfig(ctx context.Context) (*model.SysTeamEmail, error)
- func (t *TeamBiz) GetTeamMemberDetail(ctx context.Context, memberID uint32) (*bizmodel.SysTeamMember, error)
- func (t *TeamBiz) GetUserTeamList(ctx context.Context, userID uint32) ([]*model.SysTeam, error)
- func (t *TeamBiz) ListTeam(ctx context.Context, params *bo.QueryTeamListParams) ([]*model.SysTeam, error)
- func (t *TeamBiz) ListTeamMember(ctx context.Context, params *bo.ListTeamMemberParams) ([]*bizmodel.SysTeamMember, error)
- func (t *TeamBiz) RemoveTeamMember(ctx context.Context, params *bo.RemoveTeamMemberParams) error
- func (t *TeamBiz) SetMemberRole(ctx context.Context, params *bo.SetMemberRoleParams) error
- func (t *TeamBiz) SetTeamAdmin(ctx context.Context, params *bo.SetMemberAdminParams) error
- func (t *TeamBiz) SetTeamMailConfig(ctx context.Context, params *bo.SetTeamMailConfigParams) error
- func (t *TeamBiz) TransferTeamLeader(ctx context.Context, params *bo.TransferTeamLeaderParams) error
- func (t *TeamBiz) UpdateTeam(ctx context.Context, team *bo.UpdateTeamParams) error
- func (t *TeamBiz) UpdateTeamMemberStatus(ctx context.Context, status vobj.Status, ids ...uint32) error
- func (t *TeamBiz) UpdateTeamStatus(ctx context.Context, status vobj.Status, ids ...uint32) error
- type TeamRoleBiz
- func (b *TeamRoleBiz) CreateTeamRole(ctx context.Context, teamRole *bo.CreateTeamRoleParams) (*bizmodel.SysTeamRole, error)
- func (b *TeamRoleBiz) DeleteTeamRole(ctx context.Context, id uint32) error
- func (b *TeamRoleBiz) GetTeamRole(ctx context.Context, id uint32) (*bizmodel.SysTeamRole, error)
- func (b *TeamRoleBiz) ListTeamRole(ctx context.Context, params *bo.ListTeamRoleParams) ([]*bizmodel.SysTeamRole, error)
- func (b *TeamRoleBiz) UpdateTeamRole(ctx context.Context, teamRole *bo.UpdateTeamRoleParams) error
- func (b *TeamRoleBiz) UpdateTeamRoleStatus(ctx context.Context, status vobj.Status, ids ...uint32) error
- type TemplateBiz
- func (b *TemplateBiz) CreateTemplateStrategy(ctx context.Context, templateStrategy *bo.CreateTemplateStrategyParams) error
- func (b *TemplateBiz) DeleteTemplateStrategy(ctx context.Context, id uint32) error
- func (b *TemplateBiz) GetTemplateStrategy(ctx context.Context, id uint32) (*model.StrategyTemplate, error)
- func (b *TemplateBiz) ListTemplateStrategy(ctx context.Context, params *bo.QueryTemplateStrategyListParams) ([]*model.StrategyTemplate, error)
- func (b *TemplateBiz) UpdateTemplateStrategy(ctx context.Context, templateStrategy *bo.UpdateTemplateStrategyParams) error
- func (b *TemplateBiz) UpdateTemplateStrategyStatus(ctx context.Context, params *bo.UpdateTemplateStrategyStatusParams) error
- type UserBiz
- func (b *UserBiz) BatchUpdateUserStatus(ctx context.Context, params *bo.BatchUpdateUserStatusParams) error
- func (b *UserBiz) CreateUser(ctx context.Context, user *bo.CreateUserParams) (*model.SysUser, error)
- func (b *UserBiz) DeleteUser(ctx context.Context, id uint32) error
- func (b *UserBiz) GetUser(ctx context.Context, id uint32) (*model.SysUser, error)
- func (b *UserBiz) GetUserSelectList(ctx context.Context, params *bo.QueryUserSelectParams) ([]*bo.SelectOptionBo, error)
- func (b *UserBiz) ListUser(ctx context.Context, params *bo.QueryUserListParams) ([]*model.SysUser, error)
- func (b *UserBiz) ResetUserPasswordBySelf(ctx context.Context, req *bo.ResetUserPasswordBySelfParams) error
- func (b *UserBiz) UpdateUser(ctx context.Context, user *bo.UpdateUserParams) error
- func (b *UserBiz) UpdateUserAvatar(ctx context.Context, req *bo.UpdateUserAvatarRequest) error
- func (b *UserBiz) UpdateUserBaseInfo(ctx context.Context, user *bo.UpdateUserBaseParams) error
- func (b *UserBiz) UpdateUserEmail(ctx context.Context, req *bo.UpdateUserEmailRequest) error
- func (b *UserBiz) UpdateUserPhone(ctx context.Context, req *bo.UpdateUserPhoneRequest) error
- type UserMessageBiz
- func (b *UserMessageBiz) CancelUserMessage(ctx context.Context, id uint32) error
- func (b *UserMessageBiz) ConfirmUserMessage(ctx context.Context, id uint32) error
- func (b *UserMessageBiz) DeleteAllUserMessage(ctx context.Context) error
- func (b *UserMessageBiz) DeleteUserMessage(ctx context.Context, ids []uint32) error
- func (b *UserMessageBiz) ListUserMessage(ctx context.Context, params *bo.QueryUserMessageListParams) ([]*model.SysUserMessage, error)
Constants ¶
This section is empty.
Variables ¶
var ProviderSetBiz = wire.NewSet( NewUserBiz, NewCaptchaBiz, NewAuthorizationBiz, NewResourceBiz, NewTeamBiz, NewTeamRoleBiz, NewMenuBiz, NewDatasourceBiz, NewStrategyBiz, NewStrategyGroupBiz, NewStrategyCountBiz, NewMetricBiz, NewDictBiz, NewTemplateBiz, NewAlarmBiz, NewDashboardBiz, NewAlarmGroupBiz, NewAlarmPageBiz, NewSubscriptionStrategyBiz, NewAlarmHookBiz, NewAlarmHistoryBiz, NewInviteBiz, NewUserMessageBiz, NewServerRegisterBiz, NewFileBiz, NewSystemBiz, NewAlarmSendBiz, NewMqDataSourceBiz, )
ProviderSetBiz is biz providers.
var RuntimeCache repository.Cache
RuntimeCache 运行时缓存
Functions ¶
This section is empty.
Types ¶
type AlarmBiz ¶
type AlarmBiz struct {
// contains filtered or unexported fields
}
AlarmBiz 告警相关业务逻辑
func NewAlarmBiz ¶
func NewAlarmBiz( alarmRepository repository.Alarm, alarmRawRepository repository.AlarmRaw, strategyRepository repository.Strategy, datasourceRepository repository.Datasource, historyRepository repository.HistoryRepository, sendAlert microrepository.SendAlert, ) *AlarmBiz
NewAlarmBiz 创建告警相关业务逻辑
func (*AlarmBiz) CreateAlarmInfo ¶ added in v1.1.0
CreateAlarmInfo 创建告警信息
func (*AlarmBiz) CreateAlarmRawInfo ¶ added in v1.1.0
func (b *AlarmBiz) CreateAlarmRawInfo(ctx context.Context, param *bo.CreateAlarmHookRawParams) ([]*alarmmodel.AlarmRaw, error)
CreateAlarmRawInfo 创建告警原始信息
func (*AlarmBiz) GetRealTimeAlarm ¶
func (b *AlarmBiz) GetRealTimeAlarm(ctx context.Context, params *bo.GetRealTimeAlarmParams) (*alarmmodel.RealtimeAlarm, error)
GetRealTimeAlarm 获取实时告警明细
func (*AlarmBiz) ListRealTimeAlarms ¶
func (b *AlarmBiz) ListRealTimeAlarms(ctx context.Context, params *bo.GetRealTimeAlarmsParams) ([]*alarmmodel.RealtimeAlarm, error)
ListRealTimeAlarms 获取实时告警列表
func (*AlarmBiz) SaveAlarmInfoDB ¶ added in v1.1.0
SaveAlarmInfoDB 保存告警信息db(告警历史、实时告警)
func (*AlarmBiz) SaveAlertQueue ¶ added in v1.1.0
func (b *AlarmBiz) SaveAlertQueue(param *bo.CreateAlarmHookRawParams) error
SaveAlertQueue 保存告警队列
type AlarmGroupBiz ¶
type AlarmGroupBiz struct {
// contains filtered or unexported fields
}
AlarmGroupBiz 告警分组业务
func NewAlarmGroupBiz ¶
func NewAlarmGroupBiz(strategy repository.AlarmGroup) *AlarmGroupBiz
NewAlarmGroupBiz 创建告警分组业务
func (*AlarmGroupBiz) CreateAlarmGroup ¶
func (s *AlarmGroupBiz) CreateAlarmGroup(ctx context.Context, params *bo.CreateAlarmNoticeGroupParams) (*bizmodel.AlarmNoticeGroup, error)
CreateAlarmGroup 创建告警分组
func (*AlarmGroupBiz) DeleteAlarmGroup ¶
func (s *AlarmGroupBiz) DeleteAlarmGroup(ctx context.Context, alarmID uint32) error
DeleteAlarmGroup 删除告警分组
func (*AlarmGroupBiz) GetAlarmGroupDetail ¶
func (s *AlarmGroupBiz) GetAlarmGroupDetail(ctx context.Context, groupID uint32) (*bizmodel.AlarmNoticeGroup, error)
GetAlarmGroupDetail 获取告警分组详情
func (*AlarmGroupBiz) ListPage ¶
func (s *AlarmGroupBiz) ListPage(ctx context.Context, params *bo.QueryAlarmNoticeGroupListParams) ([]*bizmodel.AlarmNoticeGroup, error)
ListPage 分页查询告警分组
func (*AlarmGroupBiz) MyAlarmGroups ¶
func (s *AlarmGroupBiz) MyAlarmGroups(ctx context.Context, params *bo.MyAlarmGroupListParams) ([]*bizmodel.AlarmNoticeGroup, error)
MyAlarmGroups 查询我的告警分组
func (*AlarmGroupBiz) UpdateAlarmGroup ¶
func (s *AlarmGroupBiz) UpdateAlarmGroup(ctx context.Context, params *bo.UpdateAlarmNoticeGroupParams) error
UpdateAlarmGroup 更新告警分组
func (*AlarmGroupBiz) UpdateStatus ¶
func (s *AlarmGroupBiz) UpdateStatus(ctx context.Context, params *bo.UpdateAlarmNoticeGroupStatusParams) error
UpdateStatus 更新告警分组状态
type AlarmHistoryBiz ¶ added in v1.1.0
type AlarmHistoryBiz struct {
// contains filtered or unexported fields
}
AlarmHistoryBiz 告警历史相关业务逻辑
func NewAlarmHistoryBiz ¶ added in v1.1.0
func NewAlarmHistoryBiz(historyRepository repository.HistoryRepository) *AlarmHistoryBiz
NewAlarmHistoryBiz 创建告警历史业务逻辑
func (*AlarmHistoryBiz) GetAlarmHistory ¶ added in v1.1.0
func (a *AlarmHistoryBiz) GetAlarmHistory(ctx context.Context, param *bo.GetAlarmHistoryParams) (*alarmmodel.AlarmHistory, error)
GetAlarmHistory 获取告警历史
func (*AlarmHistoryBiz) ListAlarmHistories ¶ added in v1.1.0
func (a *AlarmHistoryBiz) ListAlarmHistories(ctx context.Context, param *bo.QueryAlarmHistoryListParams) ([]*alarmmodel.AlarmHistory, error)
ListAlarmHistories 获取告警历史列表
type AlarmHookBiz ¶
type AlarmHookBiz struct {
// contains filtered or unexported fields
}
AlarmHookBiz is a greeter service.
func NewAlarmHookBiz ¶
func NewAlarmHookBiz(alarmHook repository.AlarmHook) *AlarmHookBiz
NewAlarmHookBiz new AlarmHookBiz
func (*AlarmHookBiz) CreateAlarmHook ¶
func (s *AlarmHookBiz) CreateAlarmHook(ctx context.Context, params *bo.CreateAlarmHookParams) (*bizmodel.AlarmHook, error)
CreateAlarmHook create alarm hook
func (*AlarmHookBiz) DeleteAlarmHook ¶
func (s *AlarmHookBiz) DeleteAlarmHook(ctx context.Context, ID uint32) error
DeleteAlarmHook delete alarm hook
func (*AlarmHookBiz) GetAlarmHook ¶
GetAlarmHook get alarm hook
func (*AlarmHookBiz) ListPage ¶
func (s *AlarmHookBiz) ListPage(ctx context.Context, params *bo.QueryAlarmHookListParams) ([]*bizmodel.AlarmHook, error)
ListPage list alarm hook page
func (*AlarmHookBiz) UpdateAlarmHook ¶
func (s *AlarmHookBiz) UpdateAlarmHook(ctx context.Context, params *bo.UpdateAlarmHookParams) error
UpdateAlarmHook update alarm hook
func (*AlarmHookBiz) UpdateStatus ¶
func (s *AlarmHookBiz) UpdateStatus(ctx context.Context, params *bo.UpdateAlarmHookStatusParams) error
UpdateStatus update alarm hook status
type AlarmPageBiz ¶
type AlarmPageBiz struct {
// contains filtered or unexported fields
}
AlarmPageBiz 告警页面管理功能
func NewAlarmPageBiz ¶
func NewAlarmPageBiz(alarmPageRepository repository.AlarmPage) *AlarmPageBiz
NewAlarmPageBiz 创建告警页面管理功能
func (*AlarmPageBiz) GetAlertCounts ¶ added in v1.1.0
GetAlertCounts 获取告警数量
func (*AlarmPageBiz) ListAlarmPage ¶
func (b *AlarmPageBiz) ListAlarmPage(ctx context.Context, userID uint32) ([]*bizmodel.AlarmPageSelf, error)
ListAlarmPage 告警页面列表
func (*AlarmPageBiz) UpdateAlarmPage ¶
func (b *AlarmPageBiz) UpdateAlarmPage(ctx context.Context, userID uint32, alarmPageIDs []uint32) error
UpdateAlarmPage 更新告警页面
type AlarmSendBiz ¶ added in v1.1.31
type AlarmSendBiz struct {
// contains filtered or unexported fields
}
AlarmSendBiz 告警发送相关业务
func NewAlarmSendBiz ¶ added in v1.1.31
func NewAlarmSendBiz(alarmSendRepository repository.AlarmSendRepository) *AlarmSendBiz
NewAlarmSendBiz 创建告警发送相关业务
func (*AlarmSendBiz) GetAlarmSendDetail ¶ added in v1.1.31
func (a *AlarmSendBiz) GetAlarmSendDetail(ctx context.Context, param *bo.GetAlarmSendHistoryParams) (*alarmmodel.AlarmSendHistory, error)
GetAlarmSendDetail 获取告警发送详情
func (*AlarmSendBiz) ListAlarmSendHistories ¶ added in v1.1.31
func (a *AlarmSendBiz) ListAlarmSendHistories(ctx context.Context, param *bo.QueryAlarmSendHistoryListParams) ([]*alarmmodel.AlarmSendHistory, error)
ListAlarmSendHistories 获取告警发送历史列表
func (*AlarmSendBiz) RetryAlarmSend ¶ added in v1.1.31
func (a *AlarmSendBiz) RetryAlarmSend(ctx context.Context, param *bo.RetryAlarmSendParams) error
RetryAlarmSend 重试告警发送
type AuthorizationBiz ¶
type AuthorizationBiz struct {
// contains filtered or unexported fields
}
AuthorizationBiz 授权业务
func NewAuthorizationBiz ¶
func NewAuthorizationBiz( bc *palaceconf.Bootstrap, userRepo repository.User, teamRepo repository.Team, cacheRepo repository.Cache, teamRoleRepo repository.TeamRole, resourceRepo repository.Resource, teamResourceRepo repository.TeamResource, oAuthRepo repository.OAuth, ) *AuthorizationBiz
NewAuthorizationBiz 创建授权业务
func (*AuthorizationBiz) CheckPermission ¶
func (b *AuthorizationBiz) CheckPermission(ctx context.Context, req *bo.CheckPermissionParams) error
CheckPermission 检查用户是否有该资源权限
func (*AuthorizationBiz) CheckToken ¶
func (b *AuthorizationBiz) CheckToken(ctx context.Context, req *bo.CheckTokenParams) (*model.SysUser, error)
CheckToken 检查token
func (*AuthorizationBiz) EmailLoginVerifyEmail ¶ added in v1.1.27
func (b *AuthorizationBiz) EmailLoginVerifyEmail(ctx context.Context, req *auth.EmailLoginParams) error
EmailLoginVerifyEmail 验证邮箱
func (*AuthorizationBiz) GetOAuthConf ¶
func (b *AuthorizationBiz) GetOAuthConf(provider vobj.OAuthAPP) *oauth2.Config
GetOAuthConf 获取oauth配置
func (*AuthorizationBiz) Login ¶
func (b *AuthorizationBiz) Login(ctx context.Context, req *bo.LoginParams) (*bo.LoginReply, error)
Login 登录
func (*AuthorizationBiz) Logout ¶
func (b *AuthorizationBiz) Logout(ctx context.Context, params *bo.LogoutParams) error
Logout 登出
func (*AuthorizationBiz) OAuthLogin ¶
func (b *AuthorizationBiz) OAuthLogin(ctx context.Context, provider vobj.OAuthAPP, code string) (string, error)
OAuthLogin oauth登录
func (*AuthorizationBiz) OAuthLoginVerifyEmail ¶
func (b *AuthorizationBiz) OAuthLoginVerifyEmail(ctx context.Context, e string) error
OAuthLoginVerifyEmail 验证邮箱
func (*AuthorizationBiz) OAuthLoginWithEmail ¶ added in v1.1.0
func (b *AuthorizationBiz) OAuthLoginWithEmail(ctx context.Context, oauthParams *auth.OauthLoginParams) (*bo.RefreshTokenReply, error)
OAuthLoginWithEmail oauth登录并绑定邮箱
func (*AuthorizationBiz) RefreshToken ¶
func (b *AuthorizationBiz) RefreshToken(ctx context.Context, req *bo.RefreshTokenParams) (*bo.RefreshTokenReply, error)
RefreshToken 刷新token
func (*AuthorizationBiz) RegisterWithEmail ¶ added in v1.1.27
func (b *AuthorizationBiz) RegisterWithEmail(ctx context.Context, req *auth.RegisterWithEmailParams) (*bo.RefreshTokenReply, error)
RegisterWithEmail 邮箱注册
type CaptchaBiz ¶
type CaptchaBiz struct {
// contains filtered or unexported fields
}
CaptchaBiz 验证码业务
func NewCaptchaBiz ¶
func NewCaptchaBiz(captchaRepo repository.Captcha) *CaptchaBiz
NewCaptchaBiz 创建验证码业务
func (*CaptchaBiz) GenerateCaptcha ¶
func (l *CaptchaBiz) GenerateCaptcha(ctx context.Context, params *bo.GenerateCaptchaParams) (*bo.CaptchaItem, error)
GenerateCaptcha 生成验证码
func (*CaptchaBiz) VerifyCaptcha ¶
func (l *CaptchaBiz) VerifyCaptcha(ctx context.Context, params *bo.ValidateCaptchaParams) error
VerifyCaptcha 验证验证码
type DashboardBiz ¶
type DashboardBiz struct {
// contains filtered or unexported fields
}
DashboardBiz 仪表盘业务
func NewDashboardBiz ¶
func NewDashboardBiz(dashboardRepository repository.Dashboard) *DashboardBiz
NewDashboardBiz 创建仪表盘业务
func (*DashboardBiz) BatchUpdateDashboardStatus ¶ added in v1.1.0
func (b *DashboardBiz) BatchUpdateDashboardStatus(ctx context.Context, params *bo.BatchUpdateDashboardStatusParams) error
BatchUpdateDashboardStatus 批量更新仪表盘状态
func (*DashboardBiz) CreateDashboard ¶
func (b *DashboardBiz) CreateDashboard(ctx context.Context, req *bo.AddDashboardParams) error
CreateDashboard 创建仪表盘
func (*DashboardBiz) DeleteDashboard ¶
func (b *DashboardBiz) DeleteDashboard(ctx context.Context, req *bo.DeleteDashboardParams) error
DeleteDashboard 删除仪表盘
func (*DashboardBiz) GetDashboard ¶
GetDashboard 获取仪表盘
func (*DashboardBiz) ListDashboard ¶
func (b *DashboardBiz) ListDashboard(ctx context.Context, params *bo.ListDashboardParams) ([]*bizmodel.Dashboard, error)
ListDashboard 获取仪表盘列表
func (*DashboardBiz) UpdateDashboard ¶
func (b *DashboardBiz) UpdateDashboard(ctx context.Context, req *bo.UpdateDashboardParams) error
UpdateDashboard 更新仪表盘
type DatasourceBiz ¶
type DatasourceBiz struct {
// contains filtered or unexported fields
}
DatasourceBiz 数据源业务
func NewDatasourceBiz ¶
func NewDatasourceBiz( datasourceRepository repository.Datasource, datasourceMetricRepository repository.DatasourceMetric, datasourceMetricMicroRepository microrepository.DatasourceMetric, lock repository.Lock, ) *DatasourceBiz
NewDatasourceBiz 创建数据源业务
func (*DatasourceBiz) CreateDatasource ¶
func (b *DatasourceBiz) CreateDatasource(ctx context.Context, datasource *bo.CreateDatasourceParams) (*bizmodel.Datasource, error)
CreateDatasource 创建数据源
func (*DatasourceBiz) DeleteDatasource ¶
func (b *DatasourceBiz) DeleteDatasource(ctx context.Context, id uint32) error
DeleteDatasource 删除数据源
func (*DatasourceBiz) GetDatasource ¶
func (b *DatasourceBiz) GetDatasource(ctx context.Context, id uint32) (*bizmodel.Datasource, error)
GetDatasource 获取数据源详情
func (*DatasourceBiz) GetDatasourceSelect ¶
func (b *DatasourceBiz) GetDatasourceSelect(ctx context.Context, params *bo.QueryDatasourceListParams) ([]*bo.SelectOptionBo, error)
GetDatasourceSelect 获取数据源下拉列表
func (*DatasourceBiz) ListDatasource ¶
func (b *DatasourceBiz) ListDatasource(ctx context.Context, params *bo.QueryDatasourceListParams) ([]*bizmodel.Datasource, error)
ListDatasource 获取数据源列表
func (*DatasourceBiz) Query ¶
func (b *DatasourceBiz) Query(ctx context.Context, params *bo.DatasourceQueryParams) ([]*bo.MetricQueryData, error)
Query 查询数据
func (*DatasourceBiz) SyncDatasourceMetaV2 ¶
func (b *DatasourceBiz) SyncDatasourceMetaV2(ctx context.Context, id uint32) (err error)
SyncDatasourceMetaV2 同步数据源元数据
func (*DatasourceBiz) UpdateDatasourceBaseInfo ¶
func (b *DatasourceBiz) UpdateDatasourceBaseInfo(ctx context.Context, datasource *bo.UpdateDatasourceBaseInfoParams) error
UpdateDatasourceBaseInfo 更新数据源
func (*DatasourceBiz) UpdateDatasourceConfig ¶
func (b *DatasourceBiz) UpdateDatasourceConfig(ctx context.Context, datasource *bo.UpdateDatasourceConfigParams) error
UpdateDatasourceConfig 更新数据源配置
func (*DatasourceBiz) UpdateDatasourceStatus ¶
func (b *DatasourceBiz) UpdateDatasourceStatus(ctx context.Context, status vobj.Status, ids ...uint32) error
UpdateDatasourceStatus 更新数据源状态
type DictBiz ¶
type DictBiz struct {
// contains filtered or unexported fields
}
DictBiz 字典业务
func NewDictBiz ¶
func NewDictBiz(dictRepo repository.Dict, teamDictRepo repository.TeamDict) *DictBiz
NewDictBiz 创建字典业务
func (*DictBiz) CreateDict ¶
func (b *DictBiz) CreateDict(ctx context.Context, dictParam *bo.CreateDictParams) (imodel.IDict, error)
CreateDict 创建字典
func (*DictBiz) DeleteDictByID ¶
DeleteDictByID 删除字典
func (*DictBiz) ListDict ¶
func (b *DictBiz) ListDict(ctx context.Context, listParam *bo.QueryDictListParams) ([]imodel.IDict, error)
ListDict 列表字典
func (*DictBiz) UpdateDict ¶
UpdateDict 更新字典
func (*DictBiz) UpdateDictStatusByIds ¶
func (b *DictBiz) UpdateDictStatusByIds(ctx context.Context, updateParams *bo.UpdateDictStatusParams) error
UpdateDictStatusByIds 更新字典状态
type FileBiz ¶ added in v1.1.0
type FileBiz struct {
// contains filtered or unexported fields
}
FileBiz file 业务
func NewFileBiz ¶ added in v1.1.0
func NewFileBiz(fileRepo repository.FileRepository) *FileBiz
NewFileBiz new file biz
func (*FileBiz) DownLoadFile ¶ added in v1.1.0
func (y *FileBiz) DownLoadFile(ctx context.Context, param *bo.DownLoadFileParams) (io.ReadCloser, error)
DownLoadFile 下载本地文件
func (*FileBiz) UploadFile ¶ added in v1.1.0
UploadFile 解析上传文件
type InviteBiz ¶ added in v1.0.2
type InviteBiz struct {
// contains filtered or unexported fields
}
InviteBiz 邀请业务对象
func NewInviteBiz ¶ added in v1.0.2
func NewInviteBiz( inviteRepo repository.TeamInvite, userRepo repository.User, teamRepo repository.Team, teamRoleRepo repository.TeamRole, userMessageRepo repository.UserMessage, ) *InviteBiz
NewInviteBiz 创建邀请业务对象
func (*InviteBiz) DeleteInvite ¶ added in v1.0.2
DeleteInvite 删除邀请记录
func (*InviteBiz) GetTeamMapByIds ¶ added in v1.0.2
func (i *InviteBiz) GetTeamMapByIds(ctx context.Context, teamIds []uint32) map[uint32]*model.SysTeam
GetTeamMapByIds 根据ID获取团队信息
func (*InviteBiz) GetTeamRoles ¶ added in v1.0.2
func (i *InviteBiz) GetTeamRoles(ctx context.Context, teamID uint32, roleIds []uint32) []*bizmodel.SysTeamRole
GetTeamRoles 获取团队角色
func (*InviteBiz) InviteUser ¶ added in v1.0.2
InviteUser 邀请用户
func (*InviteBiz) TeamInviteDetail ¶ added in v1.0.2
func (i *InviteBiz) TeamInviteDetail(ctx context.Context, inviteID uint32) (*model.SysTeamInvite, error)
TeamInviteDetail 团队邀请记录详情
func (*InviteBiz) UpdateInviteStatus ¶ added in v1.0.2
func (i *InviteBiz) UpdateInviteStatus(ctx context.Context, params *bo.UpdateInviteStatusParams) error
UpdateInviteStatus 更新邀请状态
func (*InviteBiz) UserInviteList ¶ added in v1.0.2
func (i *InviteBiz) UserInviteList(ctx context.Context, params *bo.QueryInviteListParams) ([]*model.SysTeamInvite, error)
UserInviteList 当前用户邀请列表
type MenuBiz ¶
type MenuBiz struct {
// contains filtered or unexported fields
}
MenuBiz 菜单业务
func NewMenuBiz ¶
func NewMenuBiz(teamMenuRepo repository.TeamMenu, msgRepo repository.Msg, menuRepo repository.Menu) *MenuBiz
NewMenuBiz 菜单业务
func (*MenuBiz) BatchCreateMenu ¶
BatchCreateMenu 批量创建菜单
func (*MenuBiz) DeleteMenu ¶
DeleteMenu 删除菜单
func (*MenuBiz) ListMenuPage ¶
func (b *MenuBiz) ListMenuPage(ctx context.Context, params *bo.QueryMenuListParams) ([]*model.SysMenu, error)
ListMenuPage 分页菜单列表
func (*MenuBiz) MenuAllList ¶
MenuAllList 获取所有菜单
func (*MenuBiz) UpdateMenu ¶
UpdateMenu 更新菜单
func (*MenuBiz) UpdateMenuStatus ¶
UpdateMenuStatus 更新菜单状态
func (*MenuBiz) UpdateMenuTypes ¶
UpdateMenuTypes 更新菜单类型
type MetricBiz ¶
type MetricBiz struct {
// contains filtered or unexported fields
}
MetricBiz 指标业务
func NewMetricBiz ¶
func NewMetricBiz(metricRepository repository.Metric, lock repository.Lock) *MetricBiz
NewMetricBiz 创建指标业务
func (*MetricBiz) CreateMetric ¶
CreateMetric 创建指标信息
func (*MetricBiz) DeleteMetricByID ¶
DeleteMetricByID 通过ID删除指标信息
func (*MetricBiz) GetMetricByID ¶
func (b *MetricBiz) GetMetricByID(ctx context.Context, params *bo.GetMetricParams) (detail *bizmodel.DatasourceMetric, err error)
GetMetricByID 通过ID获取指标信息
func (*MetricBiz) GetMetricLabelCount ¶
GetMetricLabelCount 获取指标标签数量
func (*MetricBiz) ListMetric ¶
func (b *MetricBiz) ListMetric(ctx context.Context, params *bo.QueryMetricListParams) ([]*bizmodel.DatasourceMetric, error)
ListMetric 获取指标列表
func (*MetricBiz) SelectMetric ¶
func (b *MetricBiz) SelectMetric(ctx context.Context, params *bo.QueryMetricListParams) ([]*bo.SelectOptionBo, error)
SelectMetric 获取指标列表
func (*MetricBiz) UpdateMetricByID ¶
UpdateMetricByID 通过ID修改指标信息
type MqDataSourceBiz ¶ added in v1.1.37
type MqDataSourceBiz struct {
// contains filtered or unexported fields
}
MqDataSourceBiz mq datasource biz
func NewMqDataSourceBiz ¶ added in v1.1.37
func NewMqDataSourceBiz(datasourceRepo repository.MQDataSource) *MqDataSourceBiz
NewMqDataSourceBiz 创建 mq 数据源业务
func (*MqDataSourceBiz) CreateMqDataSource ¶ added in v1.1.37
func (m *MqDataSourceBiz) CreateMqDataSource(ctx context.Context, params *bo.CreateMqDatasourceParams) error
CreateMqDataSource 创建 mq 数据源
func (*MqDataSourceBiz) DeleteMqDatasource ¶ added in v1.1.37
func (m *MqDataSourceBiz) DeleteMqDatasource(ctx context.Context, id uint32) error
DeleteMqDatasource 删除 mq 数据源
func (*MqDataSourceBiz) GetMqDataSource ¶ added in v1.1.37
func (m *MqDataSourceBiz) GetMqDataSource(ctx context.Context, ID uint32) (*bizmodel.MqDatasource, error)
GetMqDataSource 获取 mq 数据源详情
func (*MqDataSourceBiz) GetMqDatasourceSelect ¶ added in v1.1.37
func (m *MqDataSourceBiz) GetMqDatasourceSelect(ctx context.Context, param *bo.QueryMqDatasourceListParams) ([]*bizmodel.MqDatasource, error)
GetMqDatasourceSelect 获取 mq 数据源选择列表
func (*MqDataSourceBiz) MqDataSourceList ¶ added in v1.1.37
func (m *MqDataSourceBiz) MqDataSourceList(ctx context.Context, params *bo.QueryMqDatasourceListParams) ([]*bizmodel.MqDatasource, error)
MqDataSourceList 获取 mq 数据源列表
func (*MqDataSourceBiz) UpdateMqDataSource ¶ added in v1.1.37
func (m *MqDataSourceBiz) UpdateMqDataSource(ctx context.Context, param *bo.UpdateMqDatasourceParams) error
UpdateMqDataSource 更新 mq 数据源
func (*MqDataSourceBiz) UpdateMqDataSourceStatus ¶ added in v1.1.37
func (m *MqDataSourceBiz) UpdateMqDataSourceStatus(ctx context.Context, params *bo.UpdateMqDatasourceStatusParams) error
UpdateMqDataSourceStatus 更新 mq 数据源状态
type ResourceBiz ¶
type ResourceBiz struct {
// contains filtered or unexported fields
}
ResourceBiz 资源业务
func NewResourceBiz ¶
func NewResourceBiz(resourceRepo repository.Resource, teamResourceRepo repository.TeamResource) *ResourceBiz
NewResourceBiz 创建资源业务
func (*ResourceBiz) GetResource ¶
GetResource 获取资源详情
func (*ResourceBiz) GetResourceSelectList ¶
func (b *ResourceBiz) GetResourceSelectList(ctx context.Context, params *bo.QueryResourceListParams) ([]*bo.SelectOptionBo, error)
GetResourceSelectList 获取资源下拉列表
func (*ResourceBiz) ListResource ¶
func (b *ResourceBiz) ListResource(ctx context.Context, params *bo.QueryResourceListParams) ([]imodel.IResource, error)
ListResource 获取资源列表
func (*ResourceBiz) UpdateResourceStatus ¶
func (b *ResourceBiz) UpdateResourceStatus(ctx context.Context, status vobj.Status, ids ...uint32) error
UpdateResourceStatus 更新资源状态
type ServerRegisterBiz ¶ added in v1.1.0
type ServerRegisterBiz struct {
// contains filtered or unexported fields
}
ServerRegisterBiz 服务器注册业务对象
func NewServerRegisterBiz ¶ added in v1.1.0
func NewServerRegisterBiz(serverRegisterRepository microrepository.ServerRegister) *ServerRegisterBiz
NewServerRegisterBiz 创建服务器注册业务对象
func (*ServerRegisterBiz) GetServerList ¶ added in v1.1.29
func (s *ServerRegisterBiz) GetServerList(ctx context.Context, request *api.GetServerListRequest) (*api.GetServerListReply, error)
GetServerList 获取服务器列表
func (*ServerRegisterBiz) Heartbeat ¶ added in v1.1.0
func (s *ServerRegisterBiz) Heartbeat(ctx context.Context, request *api.HeartbeatRequest) error
Heartbeat 心跳
type StrategyBiz ¶
type StrategyBiz struct {
// contains filtered or unexported fields
}
StrategyBiz 策略业务
func NewStrategyBiz ¶
func NewStrategyBiz(dictRepo repository.Strategy, strategyRPCRepo microrepository.Strategy) *StrategyBiz
NewStrategyBiz 创建策略业务
func (*StrategyBiz) CopyStrategy ¶
func (b *StrategyBiz) CopyStrategy(ctx context.Context, strategyID uint32) (*bizmodel.Strategy, error)
CopyStrategy 复制策略
func (*StrategyBiz) CreateStrategy ¶
func (b *StrategyBiz) CreateStrategy(ctx context.Context, param *bo.CreateStrategyParams) (*bizmodel.Strategy, error)
CreateStrategy 创建策略
func (*StrategyBiz) DeleteByID ¶
func (b *StrategyBiz) DeleteByID(ctx context.Context, strategyID uint32) error
DeleteByID 删除策略
func (*StrategyBiz) GetStrategy ¶
func (b *StrategyBiz) GetStrategy(ctx context.Context, strategyID uint32) (*bizmodel.Strategy, error)
GetStrategy 获取策略
func (*StrategyBiz) GetStrategyLevel ¶ added in v1.1.38
func (b *StrategyBiz) GetStrategyLevel(ctx context.Context, strategyID uint32, strategyType vobj.StrategyType) (*bo.StrategyLevelDetailModel, error)
GetStrategyLevel 获取策略层级详情
func (*StrategyBiz) PushStrategy ¶
func (b *StrategyBiz) PushStrategy(ctx context.Context, strategies *strategyapi.PushStrategyRequest) error
PushStrategy 推送策略
func (*StrategyBiz) StrategyPage ¶
func (b *StrategyBiz) StrategyPage(ctx context.Context, param *bo.QueryStrategyListParams) ([]*bizmodel.Strategy, error)
StrategyPage 获取策略分页
func (*StrategyBiz) SyncStrategy ¶ added in v1.1.0
func (b *StrategyBiz) SyncStrategy(ctx context.Context, id uint32) error
SyncStrategy 同步策略
func (*StrategyBiz) UpdateByID ¶
func (b *StrategyBiz) UpdateByID(ctx context.Context, param *bo.UpdateStrategyParams) error
UpdateByID 更新策略
func (*StrategyBiz) UpdateStatus ¶
func (b *StrategyBiz) UpdateStatus(ctx context.Context, param *bo.UpdateStrategyStatusParams) error
UpdateStatus 更新策略状态
type StrategyCountBiz ¶
type StrategyCountBiz struct {
// contains filtered or unexported fields
}
StrategyCountBiz 策略计数业务
func NewStrategyCountBiz ¶
func NewStrategyCountBiz(strategyCount repository.StrategyCountRepo) *StrategyCountBiz
NewStrategyCountBiz 创建策略计数业务
func (*StrategyCountBiz) StrategyCount ¶
func (b *StrategyCountBiz) StrategyCount(ctx context.Context, params *bo.GetStrategyCountParams) []*bo.StrategyCountModel
StrategyCount 策略分组关联策略总数
type StrategyGroupBiz ¶
type StrategyGroupBiz struct {
// contains filtered or unexported fields
}
StrategyGroupBiz 策略分组业务
func NewStrategyGroupBiz ¶
func NewStrategyGroupBiz(strategy repository.StrategyGroup) *StrategyGroupBiz
NewStrategyGroupBiz 创建策略分组业务
func (*StrategyGroupBiz) CreateStrategyGroup ¶
func (s *StrategyGroupBiz) CreateStrategyGroup(ctx context.Context, params *bo.CreateStrategyGroupParams) (*bizmodel.StrategyGroup, error)
CreateStrategyGroup 创建策略分组
func (*StrategyGroupBiz) DeleteStrategyGroup ¶
func (s *StrategyGroupBiz) DeleteStrategyGroup(ctx context.Context, params *bo.DelStrategyGroupParams) error
DeleteStrategyGroup 删除策略分组
func (*StrategyGroupBiz) GetStrategyGroupDetail ¶
func (s *StrategyGroupBiz) GetStrategyGroupDetail(ctx context.Context, groupID uint32) (*bizmodel.StrategyGroup, error)
GetStrategyGroupDetail 获取策略分组详情
func (*StrategyGroupBiz) ListPage ¶
func (s *StrategyGroupBiz) ListPage(ctx context.Context, params *bo.QueryStrategyGroupListParams) ([]*bizmodel.StrategyGroup, error)
ListPage 分页查询策略分组
func (*StrategyGroupBiz) UpdateStatus ¶
func (s *StrategyGroupBiz) UpdateStatus(ctx context.Context, params *bo.UpdateStrategyGroupStatusParams) error
UpdateStatus 更新策略分组状态
func (*StrategyGroupBiz) UpdateStrategyGroup ¶
func (s *StrategyGroupBiz) UpdateStrategyGroup(ctx context.Context, params *bo.UpdateStrategyGroupParams) error
UpdateStrategyGroup 更新策略分组
type SubscriberBiz ¶
type SubscriberBiz struct {
// contains filtered or unexported fields
}
SubscriberBiz 订阅相关业务
func NewSubscriptionStrategyBiz ¶
func NewSubscriptionStrategyBiz(strategyRepo repository.SubscriberStrategy) *SubscriberBiz
NewSubscriptionStrategyBiz 创建订阅相关业务
func (*SubscriberBiz) StrategySubscribersList ¶
func (s *SubscriberBiz) StrategySubscribersList(ctx context.Context, params *bo.QueryStrategySubscriberParams) ([]*bizmodel.StrategySubscriber, error)
StrategySubscribersList 策略订阅用户列表
func (*SubscriberBiz) UnSubscriptionStrategy ¶
func (s *SubscriberBiz) UnSubscriptionStrategy(ctx context.Context, params *bo.UnSubscriberStrategyParams) error
UnSubscriptionStrategy 取消订阅策略
func (*SubscriberBiz) UserSubscriptionStrategy ¶
func (s *SubscriberBiz) UserSubscriptionStrategy(ctx context.Context, params *bo.SubscriberStrategyParams) error
UserSubscriptionStrategy 当前用户订阅策略
func (*SubscriberBiz) UserSubscriptionStrategyList ¶
func (s *SubscriberBiz) UserSubscriptionStrategyList(ctx context.Context, params *bo.QueryUserSubscriberParams) ([]*bizmodel.StrategySubscriber, error)
UserSubscriptionStrategyList 当前用户订阅策略列表
type SystemBiz ¶ added in v1.1.0
type SystemBiz struct {
// contains filtered or unexported fields
}
SystemBiz 系统业务对象
func NewSystemBiz ¶ added in v1.1.0
func NewSystemBiz(systemRepository repository.System, teamRepository repository.Team) *SystemBiz
NewSystemBiz 创建系统业务对象
type TeamBiz ¶
type TeamBiz struct {
// contains filtered or unexported fields
}
TeamBiz 团队业务
func NewTeamBiz ¶
func NewTeamBiz(teamRepo repository.Team, cacheRepo repository.Cache) *TeamBiz
NewTeamBiz 创建团队业务
func (*TeamBiz) AddTeamMember ¶
AddTeamMember 添加团队成员
func (*TeamBiz) CreateTeam ¶
func (t *TeamBiz) CreateTeam(ctx context.Context, params *bo.CreateTeamParams) (*model.SysTeam, error)
CreateTeam 创建团队
func (*TeamBiz) GetTeamMailConfig ¶ added in v1.1.0
GetTeamMailConfig 获取团队邮件配置
func (*TeamBiz) GetTeamMemberDetail ¶ added in v1.1.0
func (t *TeamBiz) GetTeamMemberDetail(ctx context.Context, memberID uint32) (*bizmodel.SysTeamMember, error)
GetTeamMemberDetail 获取团队成员详情
func (*TeamBiz) GetUserTeamList ¶
GetUserTeamList 获取用户团队列表
func (*TeamBiz) ListTeam ¶
func (t *TeamBiz) ListTeam(ctx context.Context, params *bo.QueryTeamListParams) ([]*model.SysTeam, error)
ListTeam 获取团队列表
func (*TeamBiz) ListTeamMember ¶
func (t *TeamBiz) ListTeamMember(ctx context.Context, params *bo.ListTeamMemberParams) ([]*bizmodel.SysTeamMember, error)
ListTeamMember 获取团队成员列表
func (*TeamBiz) RemoveTeamMember ¶
RemoveTeamMember 移除团队成员
func (*TeamBiz) SetMemberRole ¶
SetMemberRole 设置团队成员角色
func (*TeamBiz) SetTeamAdmin ¶
SetTeamAdmin 设置团队管理员
func (*TeamBiz) SetTeamMailConfig ¶
SetTeamMailConfig 设置团队邮件配置
func (*TeamBiz) TransferTeamLeader ¶
func (t *TeamBiz) TransferTeamLeader(ctx context.Context, params *bo.TransferTeamLeaderParams) error
TransferTeamLeader 移交团队领导
func (*TeamBiz) UpdateTeam ¶
UpdateTeam 更新团队
type TeamRoleBiz ¶
type TeamRoleBiz struct {
// contains filtered or unexported fields
}
TeamRoleBiz 团队角色业务
func NewTeamRoleBiz ¶
func NewTeamRoleBiz(teamRoleRepo repository.TeamRole) *TeamRoleBiz
NewTeamRoleBiz 创建团队角色业务
func (*TeamRoleBiz) CreateTeamRole ¶
func (b *TeamRoleBiz) CreateTeamRole(ctx context.Context, teamRole *bo.CreateTeamRoleParams) (*bizmodel.SysTeamRole, error)
CreateTeamRole 创建团队角色
func (*TeamRoleBiz) DeleteTeamRole ¶
func (b *TeamRoleBiz) DeleteTeamRole(ctx context.Context, id uint32) error
DeleteTeamRole 删除团队角色
func (*TeamRoleBiz) GetTeamRole ¶
func (b *TeamRoleBiz) GetTeamRole(ctx context.Context, id uint32) (*bizmodel.SysTeamRole, error)
GetTeamRole 获取团队角色
func (*TeamRoleBiz) ListTeamRole ¶
func (b *TeamRoleBiz) ListTeamRole(ctx context.Context, params *bo.ListTeamRoleParams) ([]*bizmodel.SysTeamRole, error)
ListTeamRole 获取团队角色列表
func (*TeamRoleBiz) UpdateTeamRole ¶
func (b *TeamRoleBiz) UpdateTeamRole(ctx context.Context, teamRole *bo.UpdateTeamRoleParams) error
UpdateTeamRole 更新团队角色
func (*TeamRoleBiz) UpdateTeamRoleStatus ¶
func (b *TeamRoleBiz) UpdateTeamRoleStatus(ctx context.Context, status vobj.Status, ids ...uint32) error
UpdateTeamRoleStatus 更新团队角色状态
type TemplateBiz ¶
type TemplateBiz struct {
// contains filtered or unexported fields
}
TemplateBiz 模板管理业务
func NewTemplateBiz ¶
func NewTemplateBiz(templateRepository repository.Template) *TemplateBiz
NewTemplateBiz 创建模板管理业务
func (*TemplateBiz) CreateTemplateStrategy ¶
func (b *TemplateBiz) CreateTemplateStrategy(ctx context.Context, templateStrategy *bo.CreateTemplateStrategyParams) error
CreateTemplateStrategy 创建模板策略
func (*TemplateBiz) DeleteTemplateStrategy ¶
func (b *TemplateBiz) DeleteTemplateStrategy(ctx context.Context, id uint32) error
DeleteTemplateStrategy 删除模板策略
func (*TemplateBiz) GetTemplateStrategy ¶
func (b *TemplateBiz) GetTemplateStrategy(ctx context.Context, id uint32) (*model.StrategyTemplate, error)
GetTemplateStrategy 获取模板策略详情
func (*TemplateBiz) ListTemplateStrategy ¶
func (b *TemplateBiz) ListTemplateStrategy(ctx context.Context, params *bo.QueryTemplateStrategyListParams) ([]*model.StrategyTemplate, error)
ListTemplateStrategy 获取模板策略列表
func (*TemplateBiz) UpdateTemplateStrategy ¶
func (b *TemplateBiz) UpdateTemplateStrategy(ctx context.Context, templateStrategy *bo.UpdateTemplateStrategyParams) error
UpdateTemplateStrategy 更新模板策略
func (*TemplateBiz) UpdateTemplateStrategyStatus ¶
func (b *TemplateBiz) UpdateTemplateStrategyStatus(ctx context.Context, params *bo.UpdateTemplateStrategyStatusParams) error
UpdateTemplateStrategyStatus 更新模板策略状态
type UserBiz ¶
type UserBiz struct {
// contains filtered or unexported fields
}
UserBiz 用户业务
func (*UserBiz) BatchUpdateUserStatus ¶
func (b *UserBiz) BatchUpdateUserStatus(ctx context.Context, params *bo.BatchUpdateUserStatusParams) error
BatchUpdateUserStatus 批量更新用户状态
func (*UserBiz) CreateUser ¶
func (b *UserBiz) CreateUser(ctx context.Context, user *bo.CreateUserParams) (*model.SysUser, error)
CreateUser 创建用户
func (*UserBiz) DeleteUser ¶
DeleteUser 删除用户
func (*UserBiz) GetUserSelectList ¶
func (b *UserBiz) GetUserSelectList(ctx context.Context, params *bo.QueryUserSelectParams) ([]*bo.SelectOptionBo, error)
GetUserSelectList 获取用户下拉列表
func (*UserBiz) ListUser ¶
func (b *UserBiz) ListUser(ctx context.Context, params *bo.QueryUserListParams) ([]*model.SysUser, error)
ListUser 获取用户列表
func (*UserBiz) ResetUserPasswordBySelf ¶
func (b *UserBiz) ResetUserPasswordBySelf(ctx context.Context, req *bo.ResetUserPasswordBySelfParams) error
ResetUserPasswordBySelf 重置自己的密码
func (*UserBiz) UpdateUser ¶
UpdateUser 更新用户
func (*UserBiz) UpdateUserAvatar ¶
UpdateUserAvatar 更新用户头像
func (*UserBiz) UpdateUserBaseInfo ¶
UpdateUserBaseInfo 更新用户基础信息
func (*UserBiz) UpdateUserEmail ¶
UpdateUserEmail 更新用户邮箱
func (*UserBiz) UpdateUserPhone ¶
UpdateUserPhone 更新用户手机号
type UserMessageBiz ¶ added in v1.0.2
type UserMessageBiz struct {
// contains filtered or unexported fields
}
UserMessageBiz .
func NewUserMessageBiz ¶ added in v1.0.2
func NewUserMessageBiz(userMessageRepository repository.UserMessage, inviteBiz *InviteBiz) *UserMessageBiz
NewUserMessageBiz .
func (*UserMessageBiz) CancelUserMessage ¶ added in v1.1.0
func (b *UserMessageBiz) CancelUserMessage(ctx context.Context, id uint32) error
CancelUserMessage 取消用户通知消息
func (*UserMessageBiz) ConfirmUserMessage ¶ added in v1.1.0
func (b *UserMessageBiz) ConfirmUserMessage(ctx context.Context, id uint32) error
ConfirmUserMessage 确认用户通知消息
根据不同的业务类型,完成不同的业务动作
func (*UserMessageBiz) DeleteAllUserMessage ¶ added in v1.0.2
func (b *UserMessageBiz) DeleteAllUserMessage(ctx context.Context) error
DeleteAllUserMessage 删除用户通知消息-所有
func (*UserMessageBiz) DeleteUserMessage ¶ added in v1.0.2
func (b *UserMessageBiz) DeleteUserMessage(ctx context.Context, ids []uint32) error
DeleteUserMessage 删除用户通知消息
func (*UserMessageBiz) ListUserMessage ¶ added in v1.0.2
func (b *UserMessageBiz) ListUserMessage(ctx context.Context, params *bo.QueryUserMessageListParams) ([]*model.SysUserMessage, error)
ListUserMessage 获取用户通知消息列表
Source Files ¶
- alarm.go
- alarm_group.go
- alarm_page.go
- alarm_send.go
- authorization.go
- captcha.go
- dashboard.go
- datasource.go
- dict.go
- file.go
- history.go
- hook.go
- invite.go
- menu.go
- metric.go
- mq_datasource.go
- register.go
- resource.go
- server_register.go
- strategy.go
- strategy_group.go
- subscriber.go
- system.go
- team.go
- team_role.go
- template.go
- user.go
- user_message.go