Documentation ¶
Index ¶
- func BuildApiDuration(duration string) *api.Duration
- func BuildApiDurationString(duration *api.Duration) string
- func ListToApiDictSelectV1(values ...*DictBO) []*api.DictSelectV1
- func ListToApiPromStrategySelectV1(values ...*StrategyBO) []*api.PromStrategySelectV1
- func ListToApiPromStrategyV1(values ...*StrategyBO) []*api.PromStrategyV1
- func MyChartModelToDO(m *MyChartBO) *do.MyChart
- func Page(pgInfo Pagination) basescopes.ScopeMethod
- func WithDefaultCurr(curr int32)
- func WithDefaultSize(size int32)
- type AlarmBeenNotifyMemberBO
- type AlarmBo
- type AlarmHistoryBO
- func (b *AlarmHistoryBO) GetInfo() *AlertBo
- func (b *AlarmHistoryBO) GetLevel() *DictBO
- func (b *AlarmHistoryBO) GetStrategyBO() *StrategyBO
- func (b *AlarmHistoryBO) NewAlarmRealtimeBO() *AlarmRealtimeBO
- func (b *AlarmHistoryBO) String() string
- func (b *AlarmHistoryBO) ToApiV1() *api.AlarmHistoryV1
- func (b *AlarmHistoryBO) ToModel() *do.PromAlarmHistory
- type AlarmInterveneBO
- type AlarmMsgBo
- type AlarmRealtimeBO
- func (l *AlarmRealtimeBO) Bytes() []byte
- func (l *AlarmRealtimeBO) GetAlarmIntervenes() []*AlarmInterveneBO
- func (l *AlarmRealtimeBO) GetAlarmSuppressInfo() *AlarmSuppressBO
- func (l *AlarmRealtimeBO) GetAlarmUpgradeInfo() *AlarmUpgradeBO
- func (l *AlarmRealtimeBO) GetBeNotifiedChatGroups() []*PromAlarmBeenNotifyChatGroupBO
- func (l *AlarmRealtimeBO) GetBeNotifyMemberDetail() []*AlarmBeenNotifyMemberBO
- func (l *AlarmRealtimeBO) GetLevel() *DictBO
- func (l *AlarmRealtimeBO) GetStrategy() *StrategyBO
- func (l *AlarmRealtimeBO) MarshalBinary() (data []byte, err error)
- func (l *AlarmRealtimeBO) String() string
- func (l *AlarmRealtimeBO) ToApi() *api.RealtimeAlarmData
- func (l *AlarmRealtimeBO) ToModel() *do.PromAlarmRealtime
- func (l *AlarmRealtimeBO) UnmarshalBinary(data []byte) error
- type AlarmSuppressBO
- type AlarmUpgradeBO
- type AlertBo
- func (b *AlertBo) Bytes() []byte
- func (b *AlertBo) GetAnnotations() *strategy.Annotations
- func (b *AlertBo) GetLabels() *strategy.Labels
- func (b *AlertBo) GetStatus() string
- func (b *AlertBo) String() string
- func (b *AlertBo) ToAnnotationsMap() map[string]string
- func (b *AlertBo) ToLabelsMap() map[string]string
- func (b *AlertBo) ToMap() map[string]any
- type ApiBO
- type ApiListApiReq
- type CaptchaBO
- type ChangeLogBo
- type ChatGroupBO
- type CommonAnnotations
- type CommonLabels
- type CreateEndpointReq
- type CreateMyDashboardBO
- type DictBO
- type EndpointBO
- func (l *EndpointBO) GetBasicAuth() *strategy.BasicAuth
- func (l *EndpointBO) GetId() uint32
- func (l *EndpointBO) MarshalBinary() (data []byte, err error)
- func (l *EndpointBO) String() string
- func (l *EndpointBO) ToApiSelectV1() *api.PrometheusServerSelectItem
- func (l *EndpointBO) ToApiV1() *api.PrometheusServerItem
- func (l *EndpointBO) ToApiV2() *api.StrategyDatasource
- func (l *EndpointBO) ToModel() *do.Endpoint
- func (l *EndpointBO) UnmarshalBinary(data []byte) error
- type ExportStrategyRequest
- type ExternalCustomerBO
- type ExternalCustomerHookBO
- type ExternalNotifyObjBO
- func (d *ExternalNotifyObjBO) GetCustomerHookList() []*ExternalCustomerHookBO
- func (d *ExternalNotifyObjBO) GetCustomerList() []*ExternalCustomerBO
- func (d *ExternalNotifyObjBO) String() string
- func (d *ExternalNotifyObjBO) ToApi() *api.ExternalNotifyObj
- func (d *ExternalNotifyObjBO) ToModel() *do.ExternalNotifyObj
- type GetUserListReq
- type GroupLabels
- type ListAllGroupDetailParams
- type ListChatGroupReq
- type ListDashboardReq
- type ListDictRequest
- type ListEndpointReq
- type ListGroupReq
- type ListHistoryRequest
- type ListNotifyRequest
- type ListRealtimeReq
- type ListRoleReq
- type ListStrategyRequest
- type ListSyslogReq
- type MyChartBO
- type NotifyBO
- func (d *NotifyBO) GetBeNotifyMembers() []*NotifyMemberBO
- func (d *NotifyBO) GetChatGroups() []*ChatGroupBO
- func (d *NotifyBO) GetExternalNotifyObjs() []*ExternalNotifyObjBO
- func (d *NotifyBO) String() string
- func (d *NotifyBO) ToApi() *api.NotifyV1
- func (d *NotifyBO) ToApiSelectV1() *api.NotifySelectV1
- func (d *NotifyBO) ToModel() *do.PromAlarmNotify
- type NotifyMemberBO
- type NotifyTemplateBO
- type NotifyTemplateCreateBO
- type NotifyTemplateListBo
- type NotifyTemplateUpdateBo
- type Pagination
- type Ping
- type PromAlarmBeenNotifyChatGroupBO
- type RemoveStrategyGroupBO
- type RoleBO
- type SelectStrategyRequest
- type StrategyBO
- func (b *StrategyBO) CategoryInfoToApiSelectV1() []*api.DictSelectV1
- func (b *StrategyBO) GetAlarmLevelInfo() *DictBO
- func (b *StrategyBO) GetAlarmPageIds() []uint32
- func (b *StrategyBO) GetAlarmPages() []*DictBO
- func (b *StrategyBO) GetAlert() string
- func (b *StrategyBO) GetAnnotations() *strategy.Annotations
- func (b *StrategyBO) GetCategories() []*DictBO
- func (b *StrategyBO) GetCategoryIds() []uint32
- func (b *StrategyBO) GetEndpoint() *EndpointBO
- func (b *StrategyBO) GetGroupInfo() *StrategyGroupBO
- func (b *StrategyBO) GetId() uint32
- func (b *StrategyBO) GetLabels() *strategy.Labels
- func (b *StrategyBO) GetPromNotifies() []*NotifyBO
- func (b *StrategyBO) GetPromNotifyUpgrade() []*NotifyBO
- func (b *StrategyBO) GetTemplates() []*NotifyTemplateBO
- func (b *StrategyBO) String() string
- func (b *StrategyBO) ToApiPromStrategySelectV1() *api.PromStrategySelectV1
- func (b *StrategyBO) ToApiSelectV1() []*api.DictSelectV1
- func (b *StrategyBO) ToApiV1() *api.PromStrategyV1
- func (b *StrategyBO) ToApiV2() *api.EvaluateStrategyItem
- func (b *StrategyBO) ToModel() *do.PromStrategy
- func (b *StrategyBO) ToSimpleApi() *api.StrategySimple
- type StrategyGroupBO
- func (b *StrategyGroupBO) GetCategories() []*DictBO
- func (b *StrategyGroupBO) GetCategoryIds() []uint32
- func (b *StrategyGroupBO) GetId() uint32
- func (b *StrategyGroupBO) GetPromStrategies() []*StrategyBO
- func (b *StrategyGroupBO) String() string
- func (b *StrategyGroupBO) ToApiSelectV1() *api.PromGroupSelectV1
- func (b *StrategyGroupBO) ToApiV1() *api.PromGroup
- func (b *StrategyGroupBO) ToApiV2() *api.EvaluateGroup
- func (b *StrategyGroupBO) ToModel() *do.PromStrategyGroup
- func (b *StrategyGroupBO) ToSimpleApi() *api.GroupSimple
- type SysLogBo
- type TestNotifyTemplateParams
- type UpdateEndpointReq
- type UpdateMyDashboardBO
- type UserBO
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildApiDuration ¶
BuildApiDuration 字符串转为api时间
func BuildApiDurationString ¶
BuildApiDurationString 时间转换为字符串
func ListToApiDictSelectV1 ¶
func ListToApiDictSelectV1(values ...*DictBO) []*api.DictSelectV1
func ListToApiPromStrategySelectV1 ¶
func ListToApiPromStrategySelectV1(values ...*StrategyBO) []*api.PromStrategySelectV1
ListToApiPromStrategySelectV1 策略列表转换为api策略列表
func ListToApiPromStrategyV1 ¶
func ListToApiPromStrategyV1(values ...*StrategyBO) []*api.PromStrategyV1
ListToApiPromStrategyV1 策略列表转换为api策略列表
func MyChartModelToDO ¶ added in v0.0.23
MyChartModelToDO MyChartBO 转换为 MyChart
Types ¶
type AlarmBeenNotifyMemberBO ¶
type AlarmBeenNotifyMemberBO struct { ID uint32 `json:"id"` RealtimeAlarmID uint32 `json:"realtimeAlarmID"` Status vobj.Status `json:"status"` NotifyType vobj.NotifyType `json:"notifyType"` MemberId uint32 `json:"memberId"` PromAlarmNotifyID uint32 `json:"promAlarmNotifyID"` Msg string `json:"msg"` Member *UserBO `json:"member"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` DeletedAt int64 `json:"deletedAt"` }
func AlarmBeenNotifyMemberModelToBO ¶
func AlarmBeenNotifyMemberModelToBO(m *do.PromAlarmBeenNotifyMember) *AlarmBeenNotifyMemberBO
func (*AlarmBeenNotifyMemberBO) GetMember ¶
func (l *AlarmBeenNotifyMemberBO) GetMember() *UserBO
GetMember 获取用户
func (*AlarmBeenNotifyMemberBO) ToApi ¶
func (l *AlarmBeenNotifyMemberBO) ToApi() *api.BeNotifyMemberDetail
ToApi 转换为api
func (*AlarmBeenNotifyMemberBO) ToModel ¶
func (l *AlarmBeenNotifyMemberBO) ToModel() *do.PromAlarmBeenNotifyMember
ToModel 转换为model
type AlarmBo ¶
type AlarmBo struct { Receiver string `json:"receiver"` Status string `json:"status"` Alerts []*AlertBo `json:"alerts"` GroupLabels GroupLabels `json:"groupLabels"` CommonLabels CommonLabels `json:"commonLabels"` CommonAnnotations CommonAnnotations `json:"commonAnnotations"` ExternalURL string `json:"externalURL"` Version string `json:"version"` GroupKey string `json:"groupKey"` TruncatedAlerts int32 `json:"truncatedAlerts"` }
type AlarmHistoryBO ¶
type AlarmHistoryBO struct { Id uint32 `json:"id"` Md5 string `json:"md5"` StrategyId uint32 `json:"strategyId"` StrategyBO *StrategyBO `json:"strategyBO"` LevelId uint32 `json:"levelId"` Level *DictBO `json:"level"` Status vobj.AlarmStatus `json:"status"` StartsAt int64 `json:"startAt"` EndsAt int64 `json:"endAt"` Instance string `json:"instance"` Duration int64 `json:"duration"` Info *AlertBo `json:"info"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"UpdatedAt"` // 用于回顾告警历史时候的图表查询 Expr string `json:"expr"` Datasource string `json:"datasource"` }
func AlarmHistoryModelToBO ¶
func AlarmHistoryModelToBO(m *do.PromAlarmHistory) *AlarmHistoryBO
AlarmHistoryModelToBO .
func (*AlarmHistoryBO) GetStrategyBO ¶
func (b *AlarmHistoryBO) GetStrategyBO() *StrategyBO
GetStrategyBO .
func (*AlarmHistoryBO) NewAlarmRealtimeBO ¶
func (b *AlarmHistoryBO) NewAlarmRealtimeBO() *AlarmRealtimeBO
NewAlarmRealtimeBO .
type AlarmInterveneBO ¶
type AlarmInterveneBO struct { ID uint32 `json:"id"` RealtimeAlarmID uint32 `json:"realtimeAlarmID"` UserID uint32 `json:"userID"` IntervenedAt int64 `json:"intervenedAt"` Remark string `json:"remark"` IntervenedUser *UserBO `json:"intervenedUser"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` DeletedAt int64 `json:"deletedAt"` }
func AlarmInterveneModelToBO ¶
func AlarmInterveneModelToBO(l *do.PromAlarmIntervene) *AlarmInterveneBO
AlarmInterveneModelToBO ...
func (*AlarmInterveneBO) GetIntervenedUser ¶
func (l *AlarmInterveneBO) GetIntervenedUser() *UserBO
GetIntervenedUser 获取干预这条信息的用户
func (*AlarmInterveneBO) ToModel ¶
func (l *AlarmInterveneBO) ToModel() *do.PromAlarmIntervene
ToModel ...
type AlarmMsgBo ¶
type AlarmMsgBo struct { AlarmStatus vobj.AlarmStatus `json:"alarmStatus"` AlarmInfo *AlertBo `json:"alarmInfo"` StartsAt int64 `json:"startAt"` EndsAt int64 `json:"endAt"` StrategyBO *StrategyBO `json:"strategyBO"` PromNotifies []*NotifyBO `json:"promNotifies"` Templates []*NotifyTemplateBO `json:"template"` }
type AlarmRealtimeBO ¶
type AlarmRealtimeBO struct { ID uint32 `json:"id"` Instance string `json:"instance"` Note string `json:"note"` LevelId uint32 `json:"levelId"` Level *DictBO `json:"level"` EventAt int64 `json:"eventAt"` Status vobj.AlarmStatus `json:"status"` AlarmIntervenes []*AlarmInterveneBO `json:"alarmIntervenes"` BeNotifyMemberDetail []*AlarmBeenNotifyMemberBO `json:"beNotifyMemberDetail"` NotifiedAt int64 `json:"notifiedAt"` HistoryID uint32 `json:"historyId"` AlarmUpgradeInfo *AlarmUpgradeBO `json:"alarmUpgradeInfo"` AlarmSuppressInfo *AlarmSuppressBO `json:"alarmSuppressInfo"` StrategyID uint32 `json:"strategyId"` Strategy *StrategyBO `json:"strategy"` BeNotifiedChatGroups []*PromAlarmBeenNotifyChatGroupBO `json:"beNotifiedChatGroups"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` DeletedAt int64 `json:"deletedAt"` }
func AlarmRealtimeModelToBO ¶
func AlarmRealtimeModelToBO(m *do.PromAlarmRealtime) *AlarmRealtimeBO
AlarmRealtimeModelToBO 将model转为BO对象
func (*AlarmRealtimeBO) Bytes ¶
func (l *AlarmRealtimeBO) Bytes() []byte
func (*AlarmRealtimeBO) GetAlarmIntervenes ¶
func (l *AlarmRealtimeBO) GetAlarmIntervenes() []*AlarmInterveneBO
GetAlarmIntervenes 获取告警干预详情
func (*AlarmRealtimeBO) GetAlarmSuppressInfo ¶
func (l *AlarmRealtimeBO) GetAlarmSuppressInfo() *AlarmSuppressBO
GetAlarmSuppressInfo 获取告警抑制详情
func (*AlarmRealtimeBO) GetAlarmUpgradeInfo ¶
func (l *AlarmRealtimeBO) GetAlarmUpgradeInfo() *AlarmUpgradeBO
GetAlarmUpgradeInfo 获取告警升级详情
func (*AlarmRealtimeBO) GetBeNotifiedChatGroups ¶
func (l *AlarmRealtimeBO) GetBeNotifiedChatGroups() []*PromAlarmBeenNotifyChatGroupBO
GetBeNotifiedChatGroups 获取通知群组详情
func (*AlarmRealtimeBO) GetBeNotifyMemberDetail ¶
func (l *AlarmRealtimeBO) GetBeNotifyMemberDetail() []*AlarmBeenNotifyMemberBO
GetBeNotifyMemberDetail 获取通知成员详情
func (*AlarmRealtimeBO) GetStrategy ¶
func (l *AlarmRealtimeBO) GetStrategy() *StrategyBO
GetStrategy 获取策略详情
func (*AlarmRealtimeBO) MarshalBinary ¶
func (l *AlarmRealtimeBO) MarshalBinary() (data []byte, err error)
func (*AlarmRealtimeBO) ToApi ¶
func (l *AlarmRealtimeBO) ToApi() *api.RealtimeAlarmData
ToApi 将BO转为API对象
func (*AlarmRealtimeBO) ToModel ¶
func (l *AlarmRealtimeBO) ToModel() *do.PromAlarmRealtime
func (*AlarmRealtimeBO) UnmarshalBinary ¶
func (l *AlarmRealtimeBO) UnmarshalBinary(data []byte) error
type AlarmSuppressBO ¶
type AlarmSuppressBO struct { ID uint32 `json:"id"` RealtimeAlarmID uint32 `json:"realtimeAlarmID"` UserID uint32 `json:"userID"` SuppressedAt int64 `json:"suppressedAt"` Remark string `json:"remark"` Duration int64 `json:"duration"` User *UserBO `json:"user"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` DeletedAt int64 `json:"deletedAt"` }
func AlarmSuppressModelToBO ¶
func AlarmSuppressModelToBO(m *do.PromAlarmSuppress) *AlarmSuppressBO
AlarmSuppressModelToBO model转换为bo
func (*AlarmSuppressBO) ToApi ¶
func (l *AlarmSuppressBO) ToApi() *api.AlarmSuppressInfo
ToApi 转换为api
func (*AlarmSuppressBO) ToModel ¶
func (l *AlarmSuppressBO) ToModel() *do.PromAlarmSuppress
ToModel 转换为model
type AlarmUpgradeBO ¶
type AlarmUpgradeBO struct { ID uint32 `json:"id"` RealtimeAlarmID uint32 `json:"realtimeAlarmID"` UserID uint32 `json:"userID"` UpgradedAt int64 `json:"upgradedAt"` Remark string `json:"remark"` User *UserBO `json:"user"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` DeletedAt int64 `json:"deletedAt"` }
func AlarmUpgradeModelToBO ¶
func AlarmUpgradeModelToBO(m *do.PromAlarmUpgrade) *AlarmUpgradeBO
AlarmUpgradeModelToBO .
func (*AlarmUpgradeBO) MarshalBinary ¶
func (l *AlarmUpgradeBO) MarshalBinary() (data []byte, err error)
func (*AlarmUpgradeBO) ToModel ¶
func (l *AlarmUpgradeBO) ToModel() *do.PromAlarmUpgrade
ToModel 转换为model
func (*AlarmUpgradeBO) UnmarshalBinary ¶
func (l *AlarmUpgradeBO) UnmarshalBinary(data []byte) error
type AlertBo ¶
type AlertBo struct { Status string `json:"status"` Labels *strategy.Labels `json:"labels"` Annotations *strategy.Annotations `json:"annotations"` StartsAt string `json:"startsAt"` EndsAt string `json:"endsAt"` GeneratorURL string `json:"generatorURL"` Fingerprint string `json:"fingerprint"` Value float64 `json:"value"` }
func (*AlertBo) GetAnnotations ¶
func (b *AlertBo) GetAnnotations() *strategy.Annotations
GetAnnotations .
func (*AlertBo) ToAnnotationsMap ¶
ToAnnotationsMap .
type ApiBO ¶
type ApiBO struct { Id uint32 `json:"id"` Name string `json:"name"` Path string `json:"path"` Method string `json:"method"` Status vobj.Status `json:"status"` Remark string `json:"remark"` Module vobj.Module `json:"module"` Domain vobj.Domain `json:"domain"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` DeletedAt int64 `json:"deletedAt"` }
type ApiListApiReq ¶
type CaptchaBO ¶
type CaptchaBO struct { Id string `json:"id"` Value string `json:"value"` Image string `json:"image"` ExpireAt int64 `json:"expireAt"` }
func (*CaptchaBO) MarshalBinary ¶
MarshalBinary 用于redis映射
func (*CaptchaBO) UnmarshalBinary ¶
UnmarshalBinary 用于redis映射
type ChangeLogBo ¶
func NewChangeLogBo ¶
func NewChangeLogBo(old, new any) *ChangeLogBo
type ChatGroupBO ¶
type ChatGroupBO struct { Id uint32 `json:"id"` Name string `json:"name"` Status vobj.Status `json:"status"` Remark string `json:"remark"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` DeletedAt int64 `json:"deletedAt"` Hook string `json:"hook"` NotifyApp vobj.NotifyApp `json:"notifyApp"` HookName string `json:"hookName"` // 通信密钥 Secret string `json:"secret"` // 创建者 CreateUser *UserBO `json:"createUser"` }
func ChatGroupModelToBO ¶
func ChatGroupModelToBO(m *do.PromAlarmChatGroup) *ChatGroupBO
ChatGroupModelToBO .
func (*ChatGroupBO) ToModel ¶
func (b *ChatGroupBO) ToModel() *do.PromAlarmChatGroup
func (*ChatGroupBO) ToSelectApi ¶
func (b *ChatGroupBO) ToSelectApi() *api.ChatGroupSelectV1
ToSelectApi ...
type CommonAnnotations ¶
type CommonLabels ¶
type CreateEndpointReq ¶
type CreateMyDashboardBO ¶ added in v0.0.23
type DictBO ¶
type DictBO struct { Id uint32 `json:"id"` Name string `json:"name"` Category vobj.Category `json:"category"` Status vobj.Status `json:"status"` Remark string `json:"remark"` Color string `json:"color"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` DeletedAt int64 `json:"deletedAt"` }
func (*DictBO) ToApiSelectV1 ¶
func (d *DictBO) ToApiSelectV1() *api.DictSelectV1
ToApiSelectV1 转换为api字典查询对象
type EndpointBO ¶
type EndpointBO struct { Id uint32 `json:"id"` Name string `json:"name"` Endpoint string `json:"endpoint"` Status vobj.Status `json:"status"` Remark string `json:"remark"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` DeletedAt int64 `json:"deletedAt"` BasicAuth *strategy.BasicAuth `json:"basicAuth"` DatasourceCategory agent.DatasourceCategory `json:"datasourceCategory"` }
func EndpointModelToBO ¶
func EndpointModelToBO(m *do.Endpoint) *EndpointBO
EndpointModelToBO do.PromEndpoint to EndpointBO
func (*EndpointBO) GetBasicAuth ¶
func (l *EndpointBO) GetBasicAuth() *strategy.BasicAuth
GetBasicAuth get basic auth
func (*EndpointBO) MarshalBinary ¶
func (l *EndpointBO) MarshalBinary() (data []byte, err error)
func (*EndpointBO) ToApiSelectV1 ¶
func (l *EndpointBO) ToApiSelectV1() *api.PrometheusServerSelectItem
func (*EndpointBO) ToApiV1 ¶
func (l *EndpointBO) ToApiV1() *api.PrometheusServerItem
func (*EndpointBO) ToApiV2 ¶ added in v0.0.16
func (l *EndpointBO) ToApiV2() *api.StrategyDatasource
ToApiV2 to api v2
func (*EndpointBO) ToModel ¶
func (l *EndpointBO) ToModel() *do.Endpoint
ToModel EndpointBO to do.PromEndpoint
func (*EndpointBO) UnmarshalBinary ¶
func (l *EndpointBO) UnmarshalBinary(data []byte) error
type ExportStrategyRequest ¶
type ExportStrategyRequest struct {
Ids []uint32
}
type ExternalCustomerBO ¶
type ExternalCustomerBO struct { Id uint32 `json:"id"` Name string `json:"name"` Address string `json:"address"` Contact string `json:"contact"` Phone string `json:"phone"` Email string `json:"email"` Remark string `json:"remark"` Status vobj.Status `json:"status"` Hooks []*ExternalCustomerHookBO `json:"hooks"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` DeletedAt int64 `json:"deletedAt"` }
func ExternalCustomerModelToBO ¶
func ExternalCustomerModelToBO(m *do.ExternalCustomer) *ExternalCustomerBO
ExternalCustomerModelToBO 模型转换为BO
func (*ExternalCustomerBO) GetHooks ¶
func (d *ExternalCustomerBO) GetHooks() []*ExternalCustomerHookBO
GetHooks 获取钩子列表
func (*ExternalCustomerBO) ToApi ¶
func (d *ExternalCustomerBO) ToApi() *api.ExternalCustomer
func (*ExternalCustomerBO) ToModel ¶
func (d *ExternalCustomerBO) ToModel() *do.ExternalCustomer
ToModel 转换为模型
type ExternalCustomerHookBO ¶
type ExternalCustomerHookBO struct { Id uint32 `json:"id"` Hook string `json:"hook"` HookName string `json:"hookName"` NotifyApp vobj.NotifyApp `json:"notifyApp"` Status vobj.Status `json:"status"` Remark string `json:"remark"` CustomerId uint32 `json:"customerId"` Customer *ExternalCustomerBO `json:"externalCustomer"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` DeletedAt int64 `json:"deletedAt"` }
func ExternalCustomerHookModelToBO ¶
func ExternalCustomerHookModelToBO(m *do.ExternalCustomerHook) *ExternalCustomerHookBO
ExternalCustomerHookModelToBO 模型转换为BO
func (*ExternalCustomerHookBO) GetCustomer ¶
func (d *ExternalCustomerHookBO) GetCustomer() *ExternalCustomerBO
GetCustomer 获取外部客户
func (*ExternalCustomerHookBO) String ¶
func (d *ExternalCustomerHookBO) String() string
String json string
func (*ExternalCustomerHookBO) ToApi ¶
func (d *ExternalCustomerHookBO) ToApi() *api.ExternalCustomerHook
ToApi 转换为API
func (*ExternalCustomerHookBO) ToModel ¶
func (d *ExternalCustomerHookBO) ToModel() *do.ExternalCustomerHook
ToModel 转换为模型
type ExternalNotifyObjBO ¶
type ExternalNotifyObjBO struct { Id uint32 `json:"id"` Name string `json:"name"` Remark string `json:"remark"` Status vobj.Status `json:"status"` CustomerList []*ExternalCustomerBO `json:"externalCustomerList"` CustomerHookList []*ExternalCustomerHookBO `json:"externalCustomerHookList"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` DeletedAt int64 `json:"deletedAt"` }
func ExternalNotifyObjModelToBO ¶
func ExternalNotifyObjModelToBO(m *do.ExternalNotifyObj) *ExternalNotifyObjBO
ExternalNotifyObjModelToBO 将模型转换为对象
func (*ExternalNotifyObjBO) GetCustomerHookList ¶
func (d *ExternalNotifyObjBO) GetCustomerHookList() []*ExternalCustomerHookBO
GetCustomerHookList 获取客户钩子列表
func (*ExternalNotifyObjBO) GetCustomerList ¶
func (d *ExternalNotifyObjBO) GetCustomerList() []*ExternalCustomerBO
GetCustomerList 获取客户列表
func (*ExternalNotifyObjBO) String ¶
func (d *ExternalNotifyObjBO) String() string
String json string
func (*ExternalNotifyObjBO) ToApi ¶
func (d *ExternalNotifyObjBO) ToApi() *api.ExternalNotifyObj
ToApi 将对象转换为API
func (*ExternalNotifyObjBO) ToModel ¶
func (d *ExternalNotifyObjBO) ToModel() *do.ExternalNotifyObj
ToModel 将对象转换为模型
type GetUserListReq ¶
type GetUserListReq struct { Page Pagination Keyword string `json:"keyword"` Status vobj.Status `json:"status"` }
type GroupLabels ¶
type ListAllGroupDetailParams ¶ added in v0.0.16
type ListAllGroupDetailParams struct {
GroupIds []uint32 `json:"groupIds"`
}
type ListChatGroupReq ¶
type ListDashboardReq ¶
type ListDashboardReq struct { Page Pagination `json:"page"` Keyword string `json:"keyword"` Status vobj.Status `json:"status"` }
type ListDictRequest ¶
type ListEndpointReq ¶
type ListEndpointReq struct { Page Pagination Keyword string Status vobj.Status DatasourceCategoryList []agent.DatasourceCategory `json:"datasourceCategoryList"` }
type ListGroupReq ¶
type ListHistoryRequest ¶
type ListNotifyRequest ¶
type ListNotifyRequest struct { Page Pagination `json:"page"` Keyword string `json:"keyword"` Status vobj.Status `json:"status"` }
type ListRealtimeReq ¶
type ListRealtimeReq struct { Page Pagination `json:"page"` Keyword string `json:"keyword"` Status vobj.AlarmStatus `json:"status"` AlarmPageId uint32 `json:"alarm_page_id"` StrategyIds []uint32 `json:"strategyIds"` LevelIds []uint32 `json:"levelIds"` StartAt int64 `json:"startAt"` EndAt int64 `json:"endAt"` }
type ListRoleReq ¶
type ListRoleReq struct { Page Pagination `json:"page"` Status vobj.Status `json:"status"` Keyword string `json:"keyword"` UserId uint32 `json:"user_id"` }
type ListStrategyRequest ¶
type ListSyslogReq ¶
type ListSyslogReq struct { Page Pagination Module vobj.Module ModuleId uint32 }
type MyChartBO ¶
type MyChartBO struct { Id uint32 `json:"id"` UserId uint32 `json:"userId"` Title string `json:"title"` Remark string `json:"remark"` Url string `json:"url"` Status vobj.Status `json:"status"` ChartType vobj.ChartType `json:"chartType"` Width string `json:"width"` Height string `json:"height"` }
func MyChartModelToBO ¶
MyChartModelToBO MyChart 转换为 MyChartBO
type NotifyBO ¶
type NotifyBO struct { Id uint32 `json:"id"` Name string `json:"name"` Status vobj.Status `json:"status"` Remark string `json:"remark"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` DeletedAt int64 `json:"deletedAt"` ChatGroups []*ChatGroupBO `json:"chatGroups"` BeNotifyMembers []*NotifyMemberBO `json:"beNotifyMembers"` ExternalNotifyObjs []*ExternalNotifyObjBO `json:"externalNotifyObjs"` }
func (*NotifyBO) GetBeNotifyMembers ¶
func (d *NotifyBO) GetBeNotifyMembers() []*NotifyMemberBO
GetBeNotifyMembers 获取通知的成员
func (*NotifyBO) GetChatGroups ¶
func (d *NotifyBO) GetChatGroups() []*ChatGroupBO
GetChatGroups 获取通知的群组
func (*NotifyBO) GetExternalNotifyObjs ¶
func (d *NotifyBO) GetExternalNotifyObjs() []*ExternalNotifyObjBO
GetExternalNotifyObjs 获取通知的外部体系通知对象
func (*NotifyBO) ToApiSelectV1 ¶
func (d *NotifyBO) ToApiSelectV1() *api.NotifySelectV1
ToApiSelectV1 ...
type NotifyMemberBO ¶
type NotifyMemberBO struct { Id uint32 `json:"id"` Status vobj.Status `json:"status"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` DeletedAt int64 `json:"deletedAt"` MemberId uint32 `json:"memberId"` Member *UserBO `json:"member"` NotifyType vobj.NotifyType `json:"notifyTypes"` }
func NotifyMemberApiToBO ¶
func NotifyMemberApiToBO(a *api.BeNotifyMember) *NotifyMemberBO
NotifyMemberApiToBO ...
func NotifyMemberModelToBO ¶
func NotifyMemberModelToBO(m *do.PromAlarmNotifyMember) *NotifyMemberBO
NotifyMemberModelToBO ...
func (*NotifyMemberBO) ToModel ¶
func (b *NotifyMemberBO) ToModel() *do.PromAlarmNotifyMember
type NotifyTemplateBO ¶
type NotifyTemplateBO struct { Id uint32 `json:"id"` StrategyID uint32 `json:"strategyID"` NotifyType vobj.NotifyTemplateType `json:"notifyType"` Content string `json:"content"` }
func NotifyTemplateModelToBO ¶
func NotifyTemplateModelToBO(m *do.PromStrategyNotifyTemplate) *NotifyTemplateBO
NotifyTemplateModelToBO 转换
func (*NotifyTemplateBO) ToApi ¶
func (b *NotifyTemplateBO) ToApi() *api.NotifyTemplateItem
ToApi NotifyTemplateBO to api
func (*NotifyTemplateBO) ToModel ¶
func (b *NotifyTemplateBO) ToModel() *do.PromStrategyNotifyTemplate
ToModel NotifyTemplateBO to model
type NotifyTemplateCreateBO ¶
type NotifyTemplateCreateBO struct { Content string `json:"content"` StrategyID uint32 `json:"strategyID"` NotifyType vobj.NotifyTemplateType `json:"notifyType"` }
type NotifyTemplateListBo ¶
type NotifyTemplateListBo struct { Page Pagination `json:"page"` StrategyId uint32 `json:"strategyId"` }
type NotifyTemplateUpdateBo ¶
type NotifyTemplateUpdateBo struct { Id uint32 `json:"id"` Content string `json:"content"` StrategyID uint32 `json:"strategyID"` NotifyType vobj.NotifyTemplateType `json:"notifyType"` }
type Pagination ¶
type Pagination interface { GetCurr() int32 GetRespCurr() int32 GetSize() int32 SetTotal(total int64) GetTotal() int64 }
func NewPage ¶
func NewPage(curr, size int32) Pagination
type PromAlarmBeenNotifyChatGroupBO ¶
type PromAlarmBeenNotifyChatGroupBO struct { ID uint32 `json:"id"` Status vobj.Status `json:"status"` Msg string `json:"msg"` PromAlarmNotifyID uint32 `json:"promAlarmNotifyID"` RealtimeAlarmID uint32 `json:"realtimeAlarmID"` ChatGroup *ChatGroupBO `json:"chatGroup"` ChatGroupId uint32 `json:"chatGroupId"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` DeletedAt int64 `json:"deletedAt"` }
func PromAlarmBeenNotifyChatGroupModelToBO ¶
func PromAlarmBeenNotifyChatGroupModelToBO(m *do.PromAlarmBeenNotifyChatGroup) *PromAlarmBeenNotifyChatGroupBO
PromAlarmBeenNotifyChatGroupModelToBO 转换为业务对象
func (*PromAlarmBeenNotifyChatGroupBO) GetChatGroup ¶
func (l *PromAlarmBeenNotifyChatGroupBO) GetChatGroup() *ChatGroupBO
GetChatGroup .
func (*PromAlarmBeenNotifyChatGroupBO) ToApi ¶
func (l *PromAlarmBeenNotifyChatGroupBO) ToApi() *api.ChatGroupSelectV1
ToApi 转换为api对象
func (*PromAlarmBeenNotifyChatGroupBO) ToModel ¶
func (l *PromAlarmBeenNotifyChatGroupBO) ToModel() *do.PromAlarmBeenNotifyChatGroup
ToModel 转换为模型
type RemoveStrategyGroupBO ¶
type RemoveStrategyGroupBO struct {
Id uint32 `json:"id"`
}
type RoleBO ¶
type RoleBO struct { Id uint32 `json:"id"` Name string `json:"name"` Status vobj.Status `json:"status"` Remark string `json:"remark"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` DeletedAt int64 `json:"deletedAt"` Users []*UserBO `json:"users"` Apis []*ApiBO `json:"apis"` }
func (*RoleBO) ApiRoleSelectV1 ¶
func (l *RoleBO) ApiRoleSelectV1() *api.RoleSelectV1
type SelectStrategyRequest ¶
type SelectStrategyRequest struct { Page Pagination Keyword string Status vobj.Status }
type StrategyBO ¶
type StrategyBO struct { Id uint32 `json:"id"` Alert string `json:"alert"` Expr string `json:"expr"` Duration string `json:"duration"` Labels *strategy.Labels `json:"labels"` Annotations *strategy.Annotations `json:"annotations"` Status vobj.Status `json:"status"` Remark string `json:"remark"` GroupId uint32 `json:"groupId"` GroupInfo *StrategyGroupBO `json:"groupInfo"` AlarmLevelId uint32 `json:"alarmLevelId"` AlarmLevelInfo *DictBO `json:"alarmLevelInfo"` AlarmPageIds []uint32 `json:"alarmPageIds"` AlarmPages []*DictBO `json:"alarmPages"` CategoryIds []uint32 `json:"categoryIds"` Categories []*DictBO `json:"categories"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` DeletedAt int64 `json:"deletedAt"` PromNotifies []*NotifyBO `json:"promNotifies"` PromNotifyIds []uint32 `json:"promNotifyIds"` PromNotifyUpgrade []*NotifyBO `json:"promNotifyUpgrade"` EndpointId uint32 `json:"endpointId"` Endpoint *EndpointBO `json:"endpoint"` MaxSuppress string `json:"maxSuppress"` SendInterval string `json:"sendInterval"` SendRecover vobj.IsSendRecover `json:"sendRecover"` Templates []*NotifyTemplateBO `json:"templates"` }
func (*StrategyBO) CategoryInfoToApiSelectV1 ¶
func (b *StrategyBO) CategoryInfoToApiSelectV1() []*api.DictSelectV1
CategoryInfoToApiSelectV1 分类信息转换为api分类列表
func (*StrategyBO) GetAlarmLevelInfo ¶
func (b *StrategyBO) GetAlarmLevelInfo() *DictBO
GetAlarmLevelInfo 获取告警级别信息
func (*StrategyBO) GetAlarmPageIds ¶
func (b *StrategyBO) GetAlarmPageIds() []uint32
GetAlarmPageIds 获取告警页面ID列表
func (*StrategyBO) GetAnnotations ¶
func (b *StrategyBO) GetAnnotations() *strategy.Annotations
GetAnnotations 获取注解
func (*StrategyBO) GetCategories ¶
func (b *StrategyBO) GetCategories() []*DictBO
GetCategories 获取分类信息列表
func (*StrategyBO) GetCategoryIds ¶
func (b *StrategyBO) GetCategoryIds() []uint32
GetCategoryIds 获取分类ID列表
func (*StrategyBO) GetEndpoint ¶
func (b *StrategyBO) GetEndpoint() *EndpointBO
GetEndpoint 获取Endpoint
func (*StrategyBO) GetGroupInfo ¶
func (b *StrategyBO) GetGroupInfo() *StrategyGroupBO
GetGroupInfo 获取分组信息
func (*StrategyBO) GetPromNotifies ¶
func (b *StrategyBO) GetPromNotifies() []*NotifyBO
GetPromNotifies 获取通知信息列表
func (*StrategyBO) GetPromNotifyUpgrade ¶
func (b *StrategyBO) GetPromNotifyUpgrade() []*NotifyBO
GetPromNotifyUpgrade 获取告警升级通知信息列表
func (*StrategyBO) GetTemplates ¶
func (b *StrategyBO) GetTemplates() []*NotifyTemplateBO
GetTemplates 获取通知模板列表
func (*StrategyBO) ToApiPromStrategySelectV1 ¶
func (b *StrategyBO) ToApiPromStrategySelectV1() *api.PromStrategySelectV1
ToApiPromStrategySelectV1 策略转换为api策略
func (*StrategyBO) ToApiSelectV1 ¶
func (b *StrategyBO) ToApiSelectV1() []*api.DictSelectV1
ToApiSelectV1 告警页面列表转换为api告警页面列表
func (*StrategyBO) ToApiV2 ¶ added in v0.0.16
func (b *StrategyBO) ToApiV2() *api.EvaluateStrategyItem
ToApiV2 策略转换为api策略
func (*StrategyBO) ToModel ¶
func (b *StrategyBO) ToModel() *do.PromStrategy
func (*StrategyBO) ToSimpleApi ¶
func (b *StrategyBO) ToSimpleApi() *api.StrategySimple
ToSimpleApi .
type StrategyGroupBO ¶
type StrategyGroupBO struct { Id uint32 `json:"id"` Name string `json:"name"` Remark string `json:"remark"` Status vobj.Status `json:"status"` StrategyCount int64 `json:"strategyCount"` EnableStrategyCount int64 `json:"enableStrategyCount"` CategoryIds []uint32 `json:"categoryIds"` Categories []*DictBO `json:"categories"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` DeletedAt int64 `json:"deletedAt"` PromStrategies []*StrategyBO `json:"promStrategies"` }
func StrategyGroupModelToBO ¶
func StrategyGroupModelToBO(m *do.PromStrategyGroup) *StrategyGroupBO
StrategyGroupModelToBO .
func (*StrategyGroupBO) GetCategories ¶
func (b *StrategyGroupBO) GetCategories() []*DictBO
GetCategories 获取分类列表
func (*StrategyGroupBO) GetCategoryIds ¶
func (b *StrategyGroupBO) GetCategoryIds() []uint32
GetCategoryIds 获取分类ID列表
func (*StrategyGroupBO) GetPromStrategies ¶
func (b *StrategyGroupBO) GetPromStrategies() []*StrategyBO
GetPromStrategies 获取策略列表
func (*StrategyGroupBO) ToApiSelectV1 ¶
func (b *StrategyGroupBO) ToApiSelectV1() *api.PromGroupSelectV1
ToApiSelectV1 .
func (*StrategyGroupBO) ToApiV2 ¶ added in v0.0.16
func (b *StrategyGroupBO) ToApiV2() *api.EvaluateGroup
ToApiV2 .
func (*StrategyGroupBO) ToModel ¶
func (b *StrategyGroupBO) ToModel() *do.PromStrategyGroup
func (*StrategyGroupBO) ToSimpleApi ¶
func (b *StrategyGroupBO) ToSimpleApi() *api.GroupSimple
ToSimpleApi .
type SysLogBo ¶
type SysLogBo struct { ModuleName vobj.Module `json:"moduleName"` ModuleId uint32 `json:"moduleId"` Content string `json:"content"` Title string `json:"title"` Action vobj.Action `json:"action"` CreatedAt int64 `json:"createdAt"` Id uint32 `json:"id"` UserId uint32 `json:"userId"` User *UserBO `json:"user"` }
func (*SysLogBo) ToApiV1 ¶
func (l *SysLogBo) ToApiV1() *api.SysLogV1Item
type TestNotifyTemplateParams ¶
type TestNotifyTemplateParams struct { NotifyType vobj.NotifyTemplateType `json:"notifyType"` Template string `json:"template"` StrategyId uint32 `json:"strategyId"` }
type UpdateEndpointReq ¶
type UpdateEndpointReq struct { Id uint32 `json:"id"` *CreateEndpointReq }
type UpdateMyDashboardBO ¶ added in v0.0.23
type UpdateMyDashboardBO struct { Id uint32 `json:"id"` CreateMyDashboardBO }
type UserBO ¶
type UserBO struct { Id uint32 `json:"id"` Username string `json:"username"` Nickname string `json:"nickname"` Password string `json:"password"` Salt string `json:"salt"` Email string `json:"email"` Phone string `json:"phone"` Status vobj.Status `json:"status"` Remark string `json:"remark"` Avatar string `json:"avatar"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` DeletedAt int64 `json:"deletedAt"` Roles []*RoleBO `json:"roles"` Gender vobj.Gender `json:"gender"` }
func (*UserBO) ToApiSelectV1 ¶
func (l *UserBO) ToApiSelectV1() *api.UserSelectV1
Source Files ¶
- alarm.go
- alarm_been_notify_caht_group.go
- alarm_been_notify_member.go
- alarm_history.go
- alarm_intervene.go
- alarm_msg.go
- alarm_realtime.go
- alarm_suppress.go
- alarm_upgrade.go
- api.go
- base.go
- captcha.go
- chat_group.go
- dict.go
- endpoint.go
- external_customer.go
- external_customer_hook.go
- external_notify_obj.go
- my_chart.go
- my_dashboard_config.go
- notify.go
- notify_member.go
- notify_template.go
- ping.go
- role.go
- strategy.go
- strategy_group.go
- sys_log.go
- user.go