Documentation ¶
Index ¶
- Variables
- type AlarmPageBiz
- func (p *AlarmPageBiz) BindUserPages(ctx context.Context, userId uint32, pageIds []uint32) error
- func (p *AlarmPageBiz) CountAlarmPageByIds(ctx context.Context, ids ...uint32) (map[uint32]int64, error)
- func (p *AlarmPageBiz) GetStrategyIds(ctx context.Context, ids ...uint32) ([]uint32, error)
- func (p *AlarmPageBiz) GetUserAlarmPages(ctx context.Context, userId uint32) ([]*bo.DictBO, error)
- type AlarmRealtimeBiz
- func (l *AlarmRealtimeBiz) AlarmIntervene(ctx context.Context, id uint32, req *bo.AlarmInterveneBO) error
- func (l *AlarmRealtimeBiz) AlarmSuppress(ctx context.Context, id uint32, req *bo.AlarmSuppressBO) error
- func (l *AlarmRealtimeBiz) AlarmUpgrade(ctx context.Context, id uint32, req *bo.AlarmUpgradeBO) error
- func (l *AlarmRealtimeBiz) GetRealtimeDetailById(ctx context.Context, id uint32) (*bo.AlarmRealtimeBO, error)
- func (l *AlarmRealtimeBiz) GetRealtimeList(ctx context.Context, req *bo.ListRealtimeReq) ([]*bo.AlarmRealtimeBO, error)
- func (l *AlarmRealtimeBiz) HandleRealtime(ctx context.Context, req ...*bo.AlarmRealtimeBO) ([]*bo.AlarmRealtimeBO, error)
- type ApiBiz
- func (b *ApiBiz) CreateApi(ctx context.Context, apiBoList ...*bo.ApiBO) ([]*bo.ApiBO, error)
- func (b *ApiBiz) DeleteApiById(ctx context.Context, id uint32) error
- func (b *ApiBiz) GetApiById(ctx context.Context, id uint32) (*bo.ApiBO, error)
- func (b *ApiBiz) ListAllApi(ctx context.Context) ([]*bo.ApiBO, error)
- func (b *ApiBiz) ListApi(ctx context.Context, params *bo.ApiListApiReq) ([]*bo.ApiBO, bo.Pagination, error)
- func (b *ApiBiz) UpdateApiById(ctx context.Context, id uint32, apiBO *bo.ApiBO) (*bo.ApiBO, error)
- func (b *ApiBiz) UpdateApiStatusById(ctx context.Context, status vobj.Status, ids []uint32) error
- type CaptchaBiz
- type ChatGroupBiz
- func (b *ChatGroupBiz) CreateChatGroup(ctx context.Context, chatGroup *bo.ChatGroupBO) (*bo.ChatGroupBO, error)
- func (b *ChatGroupBiz) DeleteChatGroupById(ctx context.Context, id uint32) error
- func (b *ChatGroupBiz) GetChatGroupById(ctx context.Context, id uint32) (*bo.ChatGroupBO, error)
- func (b *ChatGroupBiz) ListChatGroup(ctx context.Context, req *bo.ListChatGroupReq) ([]*bo.ChatGroupBO, error)
- func (b *ChatGroupBiz) UpdateChatGroupById(ctx context.Context, chatGroup *bo.ChatGroupBO, id uint32) error
- type DashboardBiz
- func (l *DashboardBiz) CreateChart(ctx context.Context, chartInfo *bo.MyChartBO) (*bo.MyChartBO, error)
- func (l *DashboardBiz) CreateDashboard(ctx context.Context, dashboardInfo *bo.MyDashboardConfigBO) (*bo.MyDashboardConfigBO, error)
- func (l *DashboardBiz) DeleteChartById(ctx context.Context, chartId uint32) error
- func (l *DashboardBiz) DeleteDashboardById(ctx context.Context, dashboardId uint32) error
- func (l *DashboardBiz) GetChartDetail(ctx context.Context, chartId uint32) (*bo.MyChartBO, error)
- func (l *DashboardBiz) GetDashboardById(ctx context.Context, dashboardId uint32) (*bo.MyDashboardConfigBO, error)
- func (l *DashboardBiz) ListChartByPage(ctx context.Context, pgInfo bo.Pagination, scopes ...basescopes.ScopeMethod) ([]*bo.MyChartBO, error)
- func (l *DashboardBiz) ListDashboard(ctx context.Context, req *bo.ListDashboardReq) ([]*bo.MyDashboardConfigBO, error)
- func (l *DashboardBiz) UpdateChartById(ctx context.Context, chartId uint32, chartInfo *bo.MyChartBO) (*bo.MyChartBO, error)
- func (l *DashboardBiz) UpdateDashboardById(ctx context.Context, dashboardId uint32, dashboardInfo *bo.MyDashboardConfigBO) (*bo.MyDashboardConfigBO, error)
- type DictBiz
- func (b *DictBiz) BatchUpdateDictStatus(ctx context.Context, status vobj.Status, ids []uint32) error
- func (b *DictBiz) CreateDict(ctx context.Context, dict *bo.DictBO) (*bo.DictBO, error)
- func (b *DictBiz) DeleteDictByIds(ctx context.Context, id ...uint32) error
- func (b *DictBiz) GetDictById(ctx context.Context, id uint32) (*bo.DictBO, error)
- func (b *DictBiz) ListDict(ctx context.Context, req *bo.ListDictRequest) ([]*bo.DictBO, error)
- func (b *DictBiz) UpdateDict(ctx context.Context, dictBO *bo.DictBO) (*bo.DictBO, error)
- type EndpointBiz
- func (b *EndpointBiz) AppendEndpoint(ctx context.Context, endpoint *bo.CreateEndpointReq) (*bo.EndpointBO, error)
- func (b *EndpointBiz) DeleteEndpointById(ctx context.Context, ids ...uint32) error
- func (b *EndpointBiz) DetailById(ctx context.Context, id uint32) (*bo.EndpointBO, error)
- func (b *EndpointBiz) ListEndpoint(ctx context.Context, params *bo.ListEndpointReq) ([]*bo.EndpointBO, error)
- func (b *EndpointBiz) UpdateEndpointById(ctx context.Context, endpoint *bo.UpdateEndpointReq) (*bo.EndpointBO, error)
- func (b *EndpointBiz) UpdateStatusByIds(ctx context.Context, ids []uint32, status vobj.Status) error
- type HistoryBiz
- func (a *HistoryBiz) GetHistoryDetail(ctx context.Context, id uint32) (*bo.AlarmHistoryBO, error)
- func (a *HistoryBiz) HandleHistory(ctx context.Context, historyBO ...*bo.AlarmHistoryBO) ([]*bo.AlarmHistoryBO, error)
- func (a *HistoryBiz) ListHistory(ctx context.Context, req *bo.ListHistoryRequest) ([]*bo.AlarmHistoryBO, error)
- type NotifyBiz
- func (b *NotifyBiz) CheckNotifyName(ctx context.Context, name string, id ...uint32) error
- func (b *NotifyBiz) CreateNotify(ctx context.Context, notifyBo *bo.NotifyBO) (*bo.NotifyBO, error)
- func (b *NotifyBiz) DeleteNotifyById(ctx context.Context, id uint32) error
- func (b *NotifyBiz) GetNotifyById(ctx context.Context, id uint32) (*bo.NotifyBO, error)
- func (b *NotifyBiz) ListNotify(ctx context.Context, req *bo.ListNotifyRequest) ([]*bo.NotifyBO, error)
- func (b *NotifyBiz) TestNotifyTemplate(ctx context.Context, req *bo.TestNotifyTemplateParams) error
- func (b *NotifyBiz) UpdateNotifyById(ctx context.Context, id uint32, notifyBo *bo.NotifyBO) error
- type NotifyTemplateBiz
- func (n *NotifyTemplateBiz) CreateTemplate(ctx context.Context, req *bo.NotifyTemplateCreateBO) (*bo.NotifyTemplateBO, error)
- func (n *NotifyTemplateBiz) DeleteTemplate(ctx context.Context, templateId uint32) error
- func (n *NotifyTemplateBiz) GetTemplate(ctx context.Context, templateId uint32) (*bo.NotifyTemplateBO, error)
- func (n *NotifyTemplateBiz) ListTemplate(ctx context.Context, req *bo.NotifyTemplateListBo) ([]*bo.NotifyTemplateBO, error)
- func (n *NotifyTemplateBiz) UpdateTemplate(ctx context.Context, req *bo.NotifyTemplateUpdateBo) error
- type PingBiz
- type RoleBiz
- func (b *RoleBiz) CreateRole(ctx context.Context, roleBO *bo.RoleBO) (*bo.RoleBO, error)
- func (b *RoleBiz) DeleteRoleByIds(ctx context.Context, ids []uint32) error
- func (b *RoleBiz) GetRoleById(ctx context.Context, id uint32) (*bo.RoleBO, error)
- func (b *RoleBiz) ListRole(ctx context.Context, req *bo.ListRoleReq) ([]*bo.RoleBO, error)
- func (b *RoleBiz) RelateApiById(ctx context.Context, roleId uint32, apiIds []uint32) error
- func (b *RoleBiz) UpdateRoleById(ctx context.Context, roleBO *bo.RoleBO) (*bo.RoleBO, error)
- func (b *RoleBiz) UpdateRoleStatusById(ctx context.Context, status vobj.Status, ids []uint32) error
- type StrategyBiz
- func (b *StrategyBiz) BatchUpdateStrategyStatusByIds(ctx context.Context, status vobj.Status, ids []uint32) error
- func (b *StrategyBiz) BindStrategyNotifyObject(ctx context.Context, strategyId uint32, notifyIds []uint32) error
- func (b *StrategyBiz) CreateStrategy(ctx context.Context, strategyBO *bo.StrategyBO) (*bo.StrategyBO, error)
- func (b *StrategyBiz) DeleteStrategyByIds(ctx context.Context, ids ...uint32) error
- func (b *StrategyBiz) ExportStrategy(ctx context.Context, req *bo.ExportStrategyRequest) ([]*bo.StrategyBO, error)
- func (b *StrategyBiz) GetStrategyById(ctx context.Context, id uint32) (*bo.StrategyBO, error)
- func (b *StrategyBiz) GetStrategyWithNotifyObjectById(ctx context.Context, id uint32) (*bo.StrategyBO, error)
- func (b *StrategyBiz) ListStrategy(ctx context.Context, req *bo.ListStrategyRequest) ([]*bo.StrategyBO, error)
- func (b *StrategyBiz) SelectStrategy(ctx context.Context, req *bo.SelectStrategyRequest) ([]*bo.StrategyBO, error)
- func (b *StrategyBiz) UpdateStrategyById(ctx context.Context, id uint32, strategyBO *bo.StrategyBO) (*bo.StrategyBO, error)
- type StrategyGroupBiz
- func (l *StrategyGroupBiz) BatchCreate(ctx context.Context, strategyGroups []*bo.StrategyGroupBO) ([]*bo.StrategyGroupBO, error)
- func (l *StrategyGroupBiz) BatchUpdateStatus(ctx context.Context, status vobj.Status, ids []uint32) error
- func (l *StrategyGroupBiz) Create(ctx context.Context, strategyGroup *bo.StrategyGroupBO) (*bo.StrategyGroupBO, error)
- func (l *StrategyGroupBiz) DeleteByIds(ctx context.Context, ids ...uint32) error
- func (l *StrategyGroupBiz) GetById(ctx context.Context, id uint32) (*bo.StrategyGroupBO, error)
- func (l *StrategyGroupBiz) List(ctx context.Context, req *bo.ListGroupReq) ([]*bo.StrategyGroupBO, error)
- func (l *StrategyGroupBiz) ListAllGroupDetail(ctx context.Context, params *bo.ListAllGroupDetailParams) ([]*bo.StrategyGroupBO, error)
- func (l *StrategyGroupBiz) ListAllLimit(ctx context.Context, limit int, scopes ...basescopes.ScopeMethod) ([]*bo.StrategyGroupBO, error)
- func (l *StrategyGroupBiz) UpdateById(ctx context.Context, strategyGroup *bo.StrategyGroupBO) (*bo.StrategyGroupBO, error)
- type SysLogBiz
- type UserBiz
- func (b *UserBiz) CheckNewUser(ctx context.Context, userBo *bo.UserBO) error
- func (b *UserBiz) CreateUser(ctx context.Context, userBo *bo.UserBO) (*bo.UserBO, error)
- func (b *UserBiz) DeleteUserByIds(ctx context.Context, ids []uint32) error
- func (b *UserBiz) EditUserPassword(ctx context.Context, authClaims *middler.AuthClaims, ...) (*bo.UserBO, error)
- func (b *UserBiz) GetUserInfoById(ctx context.Context, id uint32) (*bo.UserBO, error)
- func (b *UserBiz) GetUserList(ctx context.Context, params *bo.GetUserListReq) ([]*bo.UserBO, error)
- func (b *UserBiz) LoginByUsernameAndPassword(ctx context.Context, username, pwd string) (userBO *bo.UserBO, token string, err error)
- func (b *UserBiz) Logout(ctx context.Context, authClaims *middler.AuthClaims) error
- func (b *UserBiz) RefreshToken(ctx context.Context, authClaims *middler.AuthClaims, roleId uint32) (userBO *bo.UserBO, token string, err error)
- func (b *UserBiz) RelateRoles(ctx context.Context, userId uint32, roleIds []uint32) error
- func (b *UserBiz) UpdateUserById(ctx context.Context, id uint32, userBo *bo.UserBO) (*bo.UserBO, error)
- func (b *UserBiz) UpdateUserRoleRelation(userId uint32)
- func (b *UserBiz) UpdateUserStatusById(ctx context.Context, status vobj.Status, ids []uint32) error
Constants ¶
This section is empty.
Variables ¶
var ProviderSetBiz = wire.NewSet( NewPingRepo, NewDictBiz, NewHistoryBiz, NewPageBiz, NewStrategyBiz, NewStrategyGroupBiz, NewUserBiz, NewRoleBiz, NewEndpointBiz, NewApiBiz, NewCaptchaBiz, NewChatGroupBiz, NewNotifyBiz, NewAlarmRealtime, NewDashboardBiz, NewSysLogBiz, NewNotifyTemplateBiz, )
ProviderSetBiz 注入biz依赖
Functions ¶
This section is empty.
Types ¶
type AlarmPageBiz ¶
type AlarmPageBiz struct {
// contains filtered or unexported fields
}
func NewPageBiz ¶
func NewPageBiz(pageRepo repository.PageRepo, realtimeRepo repository.AlarmRealtimeRepo, logX repository.SysLogRepo, logger log.Logger) *AlarmPageBiz
NewPageBiz 实例化页面业务
func (*AlarmPageBiz) BindUserPages ¶
BindUserPages 绑定用户页面
func (*AlarmPageBiz) CountAlarmPageByIds ¶
func (p *AlarmPageBiz) CountAlarmPageByIds(ctx context.Context, ids ...uint32) (map[uint32]int64, error)
CountAlarmPageByIds 通过id列表获取各页面报警数量
func (*AlarmPageBiz) GetStrategyIds ¶
GetStrategyIds 获取策略id列表
func (*AlarmPageBiz) GetUserAlarmPages ¶
GetUserAlarmPages 获取用户告警页面列表
type AlarmRealtimeBiz ¶
type AlarmRealtimeBiz struct {
// contains filtered or unexported fields
}
func NewAlarmRealtime ¶
func NewAlarmRealtime( dataRepo repository.DataRepo, realtimeRepo repository.AlarmRealtimeRepo, alarmPageRepo repository.PageRepo, logger log.Logger, ) *AlarmRealtimeBiz
func (*AlarmRealtimeBiz) AlarmIntervene ¶
func (l *AlarmRealtimeBiz) AlarmIntervene(ctx context.Context, id uint32, req *bo.AlarmInterveneBO) error
AlarmIntervene 告警干预/介入
func (*AlarmRealtimeBiz) AlarmSuppress ¶
func (l *AlarmRealtimeBiz) AlarmSuppress(ctx context.Context, id uint32, req *bo.AlarmSuppressBO) error
AlarmSuppress 告警抑制
func (*AlarmRealtimeBiz) AlarmUpgrade ¶
func (l *AlarmRealtimeBiz) AlarmUpgrade(ctx context.Context, id uint32, req *bo.AlarmUpgradeBO) error
AlarmUpgrade 告警升级
func (*AlarmRealtimeBiz) GetRealtimeDetailById ¶
func (l *AlarmRealtimeBiz) GetRealtimeDetailById(ctx context.Context, id uint32) (*bo.AlarmRealtimeBO, error)
GetRealtimeDetailById 通过id获取实时告警详情
func (*AlarmRealtimeBiz) GetRealtimeList ¶
func (l *AlarmRealtimeBiz) GetRealtimeList(ctx context.Context, req *bo.ListRealtimeReq) ([]*bo.AlarmRealtimeBO, error)
GetRealtimeList 获取实时告警列表
func (*AlarmRealtimeBiz) HandleRealtime ¶
func (l *AlarmRealtimeBiz) HandleRealtime(ctx context.Context, req ...*bo.AlarmRealtimeBO) ([]*bo.AlarmRealtimeBO, error)
HandleRealtime 创建实时告警
type ApiBiz ¶
type ApiBiz struct {
// contains filtered or unexported fields
}
func NewApiBiz ¶
func NewApiBiz( repo repository.ApiRepo, dataRepo repository.DataRepo, logX repository.SysLogRepo, logger log.Logger, ) *ApiBiz
func (*ApiBiz) DeleteApiById ¶
DeleteApiById 删除api
func (*ApiBiz) GetApiById ¶
GetApiById 获取api
func (*ApiBiz) ListAllApi ¶
ListAllApi 获取api列表
func (*ApiBiz) ListApi ¶
func (b *ApiBiz) ListApi(ctx context.Context, params *bo.ApiListApiReq) ([]*bo.ApiBO, bo.Pagination, error)
ListApi 获取api列表
func (*ApiBiz) UpdateApiById ¶
UpdateApiById 更新api
type CaptchaBiz ¶
type CaptchaBiz struct {
// contains filtered or unexported fields
}
func NewCaptchaBiz ¶
func NewCaptchaBiz(captchaRepo repository.CaptchaRepo, logger log.Logger) *CaptchaBiz
func (*CaptchaBiz) GenerateCaptcha ¶
func (b *CaptchaBiz) GenerateCaptcha(ctx context.Context, captchaType captcha.Type, theme captcha.Theme, size ...int) (*bo.CaptchaBO, error)
GenerateCaptcha 生成验证码
func (*CaptchaBiz) VerifyCaptcha ¶
func (b *CaptchaBiz) VerifyCaptcha(ctx context.Context, codeId, codeValue string) error
VerifyCaptcha 验证验证码
type ChatGroupBiz ¶
type ChatGroupBiz struct {
// contains filtered or unexported fields
}
func NewChatGroupBiz ¶
func NewChatGroupBiz(chatGroupRepo repository.ChatGroupRepo, logX repository.SysLogRepo, logger log.Logger) *ChatGroupBiz
NewChatGroupBiz .
func (*ChatGroupBiz) CreateChatGroup ¶
func (b *ChatGroupBiz) CreateChatGroup(ctx context.Context, chatGroup *bo.ChatGroupBO) (*bo.ChatGroupBO, error)
CreateChatGroup 创建通知群机器人hook
func (*ChatGroupBiz) DeleteChatGroupById ¶
func (b *ChatGroupBiz) DeleteChatGroupById(ctx context.Context, id uint32) error
DeleteChatGroupById 删除通知群机器人hook
func (*ChatGroupBiz) GetChatGroupById ¶
func (b *ChatGroupBiz) GetChatGroupById(ctx context.Context, id uint32) (*bo.ChatGroupBO, error)
GetChatGroupById 获取通知群机器人hook
func (*ChatGroupBiz) ListChatGroup ¶
func (b *ChatGroupBiz) ListChatGroup(ctx context.Context, req *bo.ListChatGroupReq) ([]*bo.ChatGroupBO, error)
ListChatGroup 获取通知群机器人hook列表
func (*ChatGroupBiz) UpdateChatGroupById ¶
func (b *ChatGroupBiz) UpdateChatGroupById(ctx context.Context, chatGroup *bo.ChatGroupBO, id uint32) error
UpdateChatGroupById 更新通知群机器人hook
type DashboardBiz ¶
type DashboardBiz struct {
// contains filtered or unexported fields
}
func NewDashboardBiz ¶
func NewDashboardBiz( dashboardRepo repository.DashboardRepo, chartRepo repository.ChartRepo, logX repository.SysLogRepo, logger log.Logger, ) *DashboardBiz
func (*DashboardBiz) CreateChart ¶
func (l *DashboardBiz) CreateChart(ctx context.Context, chartInfo *bo.MyChartBO) (*bo.MyChartBO, error)
CreateChart 创建图表
func (*DashboardBiz) CreateDashboard ¶
func (l *DashboardBiz) CreateDashboard(ctx context.Context, dashboardInfo *bo.MyDashboardConfigBO) (*bo.MyDashboardConfigBO, error)
CreateDashboard 创建dashboard
func (*DashboardBiz) DeleteChartById ¶
func (l *DashboardBiz) DeleteChartById(ctx context.Context, chartId uint32) error
DeleteChartById 删除图表
func (*DashboardBiz) DeleteDashboardById ¶
func (l *DashboardBiz) DeleteDashboardById(ctx context.Context, dashboardId uint32) error
DeleteDashboardById 删除dashboard
func (*DashboardBiz) GetChartDetail ¶
GetChartDetail 获取图表详情
func (*DashboardBiz) GetDashboardById ¶
func (l *DashboardBiz) GetDashboardById(ctx context.Context, dashboardId uint32) (*bo.MyDashboardConfigBO, error)
GetDashboardById 获取dashboard详情
func (*DashboardBiz) ListChartByPage ¶
func (l *DashboardBiz) ListChartByPage(ctx context.Context, pgInfo bo.Pagination, scopes ...basescopes.ScopeMethod) ([]*bo.MyChartBO, error)
ListChartByPage 查询图表列表
func (*DashboardBiz) ListDashboard ¶
func (l *DashboardBiz) ListDashboard(ctx context.Context, req *bo.ListDashboardReq) ([]*bo.MyDashboardConfigBO, error)
ListDashboard 查询dashboard列表
func (*DashboardBiz) UpdateChartById ¶
func (l *DashboardBiz) UpdateChartById(ctx context.Context, chartId uint32, chartInfo *bo.MyChartBO) (*bo.MyChartBO, error)
UpdateChartById 更新图表
func (*DashboardBiz) UpdateDashboardById ¶
func (l *DashboardBiz) UpdateDashboardById(ctx context.Context, dashboardId uint32, dashboardInfo *bo.MyDashboardConfigBO) (*bo.MyDashboardConfigBO, error)
UpdateDashboardById 更新dashboard
type DictBiz ¶
type DictBiz struct {
// contains filtered or unexported fields
}
func NewDictBiz ¶
func NewDictBiz(dictRepo repository.PromDictRepo, logX repository.SysLogRepo, logger log.Logger) *DictBiz
NewDictBiz 实例化字典业务
func (*DictBiz) BatchUpdateDictStatus ¶
func (b *DictBiz) BatchUpdateDictStatus(ctx context.Context, status vobj.Status, ids []uint32) error
BatchUpdateDictStatus 批量更新字典状态
func (*DictBiz) CreateDict ¶
CreateDict 创建字典
func (*DictBiz) DeleteDictByIds ¶
DeleteDictByIds 删除字典
func (*DictBiz) GetDictById ¶
GetDictById 获取字典详情
type EndpointBiz ¶
type EndpointBiz struct {
// contains filtered or unexported fields
}
func NewEndpointBiz ¶
func NewEndpointBiz(endpointRepo repository.EndpointRepo, logX repository.SysLogRepo, logger log.Logger) *EndpointBiz
func (*EndpointBiz) AppendEndpoint ¶
func (b *EndpointBiz) AppendEndpoint(ctx context.Context, endpoint *bo.CreateEndpointReq) (*bo.EndpointBO, error)
AppendEndpoint 新增
func (*EndpointBiz) DeleteEndpointById ¶
func (b *EndpointBiz) DeleteEndpointById(ctx context.Context, ids ...uint32) error
DeleteEndpointById 删除
func (*EndpointBiz) DetailById ¶
func (b *EndpointBiz) DetailById(ctx context.Context, id uint32) (*bo.EndpointBO, error)
DetailById 查询详情
func (*EndpointBiz) ListEndpoint ¶
func (b *EndpointBiz) ListEndpoint(ctx context.Context, params *bo.ListEndpointReq) ([]*bo.EndpointBO, error)
ListEndpoint 查询
func (*EndpointBiz) UpdateEndpointById ¶
func (b *EndpointBiz) UpdateEndpointById(ctx context.Context, endpoint *bo.UpdateEndpointReq) (*bo.EndpointBO, error)
UpdateEndpointById 更新
func (*EndpointBiz) UpdateStatusByIds ¶
func (b *EndpointBiz) UpdateStatusByIds(ctx context.Context, ids []uint32, status vobj.Status) error
UpdateStatusByIds 批量更新状态
type HistoryBiz ¶
type HistoryBiz struct {
// contains filtered or unexported fields
}
HistoryBiz .
func NewHistoryBiz ¶
func NewHistoryBiz( historyRepo repository.HistoryRepo, alarmPageRepo repository.PageRepo, msgRepo repository.MsgRepo, strategyRepo repository.StrategyRepo, alarmRealtimeBiz *AlarmRealtimeBiz, logX repository.SysLogRepo, logger log.Logger, ) *HistoryBiz
NewHistoryBiz .
func (*HistoryBiz) GetHistoryDetail ¶
func (a *HistoryBiz) GetHistoryDetail(ctx context.Context, id uint32) (*bo.AlarmHistoryBO, error)
GetHistoryDetail 查询历史详情
func (*HistoryBiz) HandleHistory ¶
func (a *HistoryBiz) HandleHistory(ctx context.Context, historyBO ...*bo.AlarmHistoryBO) ([]*bo.AlarmHistoryBO, error)
HandleHistory 维护告警数据
func (*HistoryBiz) ListHistory ¶
func (a *HistoryBiz) ListHistory(ctx context.Context, req *bo.ListHistoryRequest) ([]*bo.AlarmHistoryBO, error)
ListHistory 查询历史列表
type NotifyBiz ¶
type NotifyBiz struct {
// contains filtered or unexported fields
}
func NewNotifyBiz ¶
func NewNotifyBiz( repo repository.NotifyRepo, logX repository.SysLogRepo, msgRepo repository.MsgRepo, strategyRepo repository.StrategyRepo, userRepo repository.UserRepo, logger log.Logger, ) *NotifyBiz
func (*NotifyBiz) CheckNotifyName ¶
CheckNotifyName 检查通知名称是否存在
func (*NotifyBiz) CreateNotify ¶
CreateNotify 创建通知对象
func (*NotifyBiz) DeleteNotifyById ¶
DeleteNotifyById 删除通知对象
func (*NotifyBiz) GetNotifyById ¶
GetNotifyById 获取通知对象
func (*NotifyBiz) ListNotify ¶
func (b *NotifyBiz) ListNotify(ctx context.Context, req *bo.ListNotifyRequest) ([]*bo.NotifyBO, error)
ListNotify 获取通知对象列表
func (*NotifyBiz) TestNotifyTemplate ¶
TestNotifyTemplate 测试告警消息
type NotifyTemplateBiz ¶
type NotifyTemplateBiz struct { repository.NotifyTemplateRepo // contains filtered or unexported fields }
func NewNotifyTemplateBiz ¶
func NewNotifyTemplateBiz( repo repository.NotifyTemplateRepo, logger log.Logger, ) *NotifyTemplateBiz
func (*NotifyTemplateBiz) CreateTemplate ¶
func (n *NotifyTemplateBiz) CreateTemplate(ctx context.Context, req *bo.NotifyTemplateCreateBO) (*bo.NotifyTemplateBO, error)
CreateTemplate 创建通知模板
func (*NotifyTemplateBiz) DeleteTemplate ¶
func (n *NotifyTemplateBiz) DeleteTemplate(ctx context.Context, templateId uint32) error
DeleteTemplate 删除通知模板
func (*NotifyTemplateBiz) GetTemplate ¶
func (n *NotifyTemplateBiz) GetTemplate(ctx context.Context, templateId uint32) (*bo.NotifyTemplateBO, error)
GetTemplate 获取通知模板详情
func (*NotifyTemplateBiz) ListTemplate ¶
func (n *NotifyTemplateBiz) ListTemplate(ctx context.Context, req *bo.NotifyTemplateListBo) ([]*bo.NotifyTemplateBO, error)
ListTemplate 获取通知模板列表
func (*NotifyTemplateBiz) UpdateTemplate ¶
func (n *NotifyTemplateBiz) UpdateTemplate(ctx context.Context, req *bo.NotifyTemplateUpdateBo) error
UpdateTemplate 更新通知模板
type PingBiz ¶
type PingBiz struct {
// contains filtered or unexported fields
}
PingBiz is a Ping useCase.
func NewPingRepo ¶
func NewPingRepo(repo repository.PingRepo, logger log.Logger) *PingBiz
NewPingRepo new a Ping useCase.
type RoleBiz ¶
type RoleBiz struct {
// contains filtered or unexported fields
}
func NewRoleBiz ¶
func NewRoleBiz(roleRepo repository.RoleRepo, apiRepo repository.ApiRepo, dataRepo repository.DataRepo, logX repository.SysLogRepo, logger log.Logger) *RoleBiz
func (*RoleBiz) CreateRole ¶
CreateRole 创建角色
func (*RoleBiz) DeleteRoleByIds ¶
DeleteRoleByIds 删除角色
func (*RoleBiz) GetRoleById ¶
GetRoleById 获取角色
func (*RoleBiz) RelateApiById ¶
RelateApiById 关联角色和api
func (*RoleBiz) UpdateRoleById ¶
UpdateRoleById 更新角色
type StrategyBiz ¶
type StrategyBiz struct {
// contains filtered or unexported fields
}
func NewStrategyBiz ¶
func NewStrategyBiz(strategyRepo repository.StrategyRepo, notifyRepo repository.NotifyRepo, logX repository.SysLogRepo, logger log.Logger) *StrategyBiz
NewStrategyBiz 创建策略业务对象
func (*StrategyBiz) BatchUpdateStrategyStatusByIds ¶
func (b *StrategyBiz) BatchUpdateStrategyStatusByIds(ctx context.Context, status vobj.Status, ids []uint32) error
BatchUpdateStrategyStatusByIds 批量更新策略状态
func (*StrategyBiz) BindStrategyNotifyObject ¶
func (b *StrategyBiz) BindStrategyNotifyObject(ctx context.Context, strategyId uint32, notifyIds []uint32) error
BindStrategyNotifyObject 绑定策略的通知对象
func (*StrategyBiz) CreateStrategy ¶
func (b *StrategyBiz) CreateStrategy(ctx context.Context, strategyBO *bo.StrategyBO) (*bo.StrategyBO, error)
CreateStrategy 创建策略
func (*StrategyBiz) DeleteStrategyByIds ¶
func (b *StrategyBiz) DeleteStrategyByIds(ctx context.Context, ids ...uint32) error
DeleteStrategyByIds 删除策略
func (*StrategyBiz) ExportStrategy ¶
func (b *StrategyBiz) ExportStrategy(ctx context.Context, req *bo.ExportStrategyRequest) ([]*bo.StrategyBO, error)
ExportStrategy 导出策略
func (*StrategyBiz) GetStrategyById ¶
func (b *StrategyBiz) GetStrategyById(ctx context.Context, id uint32) (*bo.StrategyBO, error)
GetStrategyById 获取策略详情
func (*StrategyBiz) GetStrategyWithNotifyObjectById ¶
func (b *StrategyBiz) GetStrategyWithNotifyObjectById(ctx context.Context, id uint32) (*bo.StrategyBO, error)
GetStrategyWithNotifyObjectById 获取策略详情(包含通知对象)
func (*StrategyBiz) ListStrategy ¶
func (b *StrategyBiz) ListStrategy(ctx context.Context, req *bo.ListStrategyRequest) ([]*bo.StrategyBO, error)
ListStrategy 获取策略列表
func (*StrategyBiz) SelectStrategy ¶
func (b *StrategyBiz) SelectStrategy(ctx context.Context, req *bo.SelectStrategyRequest) ([]*bo.StrategyBO, error)
SelectStrategy 查询策略
func (*StrategyBiz) UpdateStrategyById ¶
func (b *StrategyBiz) UpdateStrategyById(ctx context.Context, id uint32, strategyBO *bo.StrategyBO) (*bo.StrategyBO, error)
UpdateStrategyById 更新策略
type StrategyGroupBiz ¶
type StrategyGroupBiz struct {
// contains filtered or unexported fields
}
func NewStrategyGroupBiz ¶
func NewStrategyGroupBiz(strategyGroupRepo repository.StrategyGroupRepo, logX repository.SysLogRepo, logger log.Logger) *StrategyGroupBiz
func (*StrategyGroupBiz) BatchCreate ¶
func (l *StrategyGroupBiz) BatchCreate(ctx context.Context, strategyGroups []*bo.StrategyGroupBO) ([]*bo.StrategyGroupBO, error)
BatchCreate 批量创建
func (*StrategyGroupBiz) BatchUpdateStatus ¶
func (*StrategyGroupBiz) Create ¶
func (l *StrategyGroupBiz) Create(ctx context.Context, strategyGroup *bo.StrategyGroupBO) (*bo.StrategyGroupBO, error)
func (*StrategyGroupBiz) DeleteByIds ¶
func (l *StrategyGroupBiz) DeleteByIds(ctx context.Context, ids ...uint32) error
func (*StrategyGroupBiz) GetById ¶
func (l *StrategyGroupBiz) GetById(ctx context.Context, id uint32) (*bo.StrategyGroupBO, error)
func (*StrategyGroupBiz) List ¶
func (l *StrategyGroupBiz) List(ctx context.Context, req *bo.ListGroupReq) ([]*bo.StrategyGroupBO, error)
func (*StrategyGroupBiz) ListAllGroupDetail ¶ added in v0.0.16
func (l *StrategyGroupBiz) ListAllGroupDetail(ctx context.Context, params *bo.ListAllGroupDetailParams) ([]*bo.StrategyGroupBO, error)
ListAllGroupDetail 获取所有策略组详情
func (*StrategyGroupBiz) ListAllLimit ¶
func (l *StrategyGroupBiz) ListAllLimit(ctx context.Context, limit int, scopes ...basescopes.ScopeMethod) ([]*bo.StrategyGroupBO, error)
func (*StrategyGroupBiz) UpdateById ¶
func (l *StrategyGroupBiz) UpdateById(ctx context.Context, strategyGroup *bo.StrategyGroupBO) (*bo.StrategyGroupBO, error)
type SysLogBiz ¶
type SysLogBiz struct { repository.SysLogRepo // contains filtered or unexported fields }
func NewSysLogBiz ¶
func NewSysLogBiz(repo repository.SysLogRepo, logger log.Logger) *SysLogBiz
func (*SysLogBiz) ListSysLog ¶
ListSysLog 获取日志列表
type UserBiz ¶
type UserBiz struct {
// contains filtered or unexported fields
}
func NewUserBiz ¶
func NewUserBiz( userRepo repository.UserRepo, dataRepo repository.DataRepo, roleRepo repository.RoleRepo, logX repository.SysLogRepo, logger log.Logger, ) *UserBiz
func (*UserBiz) CheckNewUser ¶
CheckNewUser 检查新用户信息
func (*UserBiz) CreateUser ¶
CreateUser 创建用户
func (*UserBiz) DeleteUserByIds ¶
DeleteUserByIds 删除用户
func (*UserBiz) EditUserPassword ¶
func (b *UserBiz) EditUserPassword(ctx context.Context, authClaims *middler.AuthClaims, oldPassword, newPassword string) (*bo.UserBO, error)
EditUserPassword 修改密码
func (*UserBiz) GetUserInfoById ¶
GetUserInfoById 获取用户信息
func (*UserBiz) GetUserList ¶
GetUserList 获取用户列表
func (*UserBiz) LoginByUsernameAndPassword ¶
func (b *UserBiz) LoginByUsernameAndPassword(ctx context.Context, username, pwd string) (userBO *bo.UserBO, token string, err error)
LoginByUsernameAndPassword 登录
func (*UserBiz) RefreshToken ¶
func (b *UserBiz) RefreshToken(ctx context.Context, authClaims *middler.AuthClaims, roleId uint32) (userBO *bo.UserBO, token string, err error)
RefreshToken 刷新token
func (*UserBiz) RelateRoles ¶
RelateRoles 关联角色
func (*UserBiz) UpdateUserById ¶
func (b *UserBiz) UpdateUserById(ctx context.Context, id uint32, userBo *bo.UserBO) (*bo.UserBO, error)
UpdateUserById 更新用户信息
func (*UserBiz) UpdateUserRoleRelation ¶
UpdateUserRoleRelation 更新用户角色关系