v1

package
v0.0.0-...-80f207f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2023 License: MIT Imports: 17 Imported by: 0

README

Notification

Notification is a feature that allows you to receive alerts when an event occurs.

Guance Cloud supports setting the notification object for the alert event. When the alert event occurs, the alert information will be sent to the notification object.

Guance Cloud supports multiple different notification methods. You can refer to the documentation to learn more.

Relationships:

graph LR

A[Monitor] --> B[Alert Policy] --> C[Notification]

Documentation

Overview

Package v1

Notification

Notification is a feature that allows you to receive alerts when an event occurs.

Guance Cloud supports setting the notification object for the alert event. When the alert event occurs, the alert information will be sent to the notification object.

Guance Cloud supports multiple different notification methods. You can refer to the documentation to learn more.

Relationships:

```mermaid graph LR

A[Monitor] --> B[Alert Policy] --> C[Notification] ```

Code generated by Iacker. DO NOT EDIT IT.

Index

Constants

View Source
const (
	// NotificationTypeDingTalkRobot is the value of DingTalk Robot
	NotificationTypeDingTalkRobot = "ding_talk_robot"
	// NotificationTypeHttpRequest is the value of HTTP Request
	NotificationTypeHttpRequest = "http_request"
	// NotificationTypeWechatRobot is the value of WeChat Robot
	NotificationTypeWechatRobot = "wechat_robot"
	// NotificationTypeMailGroup is the value of Mail Group
	NotificationTypeMailGroup = "mail_group"
	// NotificationTypeFeishuRobot is the value of Feishu Robot
	NotificationTypeFeishuRobot = "feishu_robot"
	// NotificationTypeSms is the value of SMS
	NotificationTypeSms = "sms"
)
View Source
const ResourceType = "Notification"

ResourceType is the unique type name of Notification

Variables

View Source
var File_pkg_resources_notification_v1_notification_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type DingTalkRobot

type DingTalkRobot struct {

	// DingTalk Robot Call Address
	Webhook string `protobuf:"bytes,1,opt,name=webhook,proto3" json:"webhook,omitempty"`
	// DingTalk Robot Call Secret
	Secret string `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"`
	// contains filtered or unexported fields
}

func (*DingTalkRobot) Descriptor deprecated

func (*DingTalkRobot) Descriptor() ([]byte, []int)

Deprecated: Use DingTalkRobot.ProtoReflect.Descriptor instead.

func (*DingTalkRobot) GetSecret

func (x *DingTalkRobot) GetSecret() string

func (*DingTalkRobot) GetWebhook

func (x *DingTalkRobot) GetWebhook() string

func (*DingTalkRobot) ProtoMessage

func (*DingTalkRobot) ProtoMessage()

func (*DingTalkRobot) ProtoReflect

func (x *DingTalkRobot) ProtoReflect() protoreflect.Message

func (*DingTalkRobot) Reset

func (x *DingTalkRobot) Reset()

func (*DingTalkRobot) String

func (x *DingTalkRobot) String() string

func (*DingTalkRobot) Validate

func (m *DingTalkRobot) Validate() error

Validate checks the field values on DingTalkRobot with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*DingTalkRobot) ValidateAll

func (m *DingTalkRobot) ValidateAll() error

ValidateAll checks the field values on DingTalkRobot with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DingTalkRobotMultiError, or nil if none found.

type DingTalkRobotMultiError

type DingTalkRobotMultiError []error

DingTalkRobotMultiError is an error wrapping multiple validation errors returned by DingTalkRobot.ValidateAll() if the designated constraints aren't met.

func (DingTalkRobotMultiError) AllErrors

func (m DingTalkRobotMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DingTalkRobotMultiError) Error

func (m DingTalkRobotMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type DingTalkRobotValidationError

type DingTalkRobotValidationError struct {
	// contains filtered or unexported fields
}

DingTalkRobotValidationError is the validation error returned by DingTalkRobot.Validate if the designated constraints aren't met.

func (DingTalkRobotValidationError) Cause

Cause function returns cause value.

func (DingTalkRobotValidationError) Error

Error satisfies the builtin error interface

func (DingTalkRobotValidationError) ErrorName

func (e DingTalkRobotValidationError) ErrorName() string

ErrorName returns error name.

func (DingTalkRobotValidationError) Field

Field function returns field value.

func (DingTalkRobotValidationError) Key

Key function returns key value.

func (DingTalkRobotValidationError) Reason

Reason function returns reason value.

type FeishuRobot

type FeishuRobot struct {

	// Feishu Robot Call Address
	Webhook string `protobuf:"bytes,1,opt,name=webhook,proto3" json:"webhook,omitempty"`
	// Feishu Robot Call Secret
	Secret string `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"`
	// contains filtered or unexported fields
}

func (*FeishuRobot) Descriptor deprecated

func (*FeishuRobot) Descriptor() ([]byte, []int)

Deprecated: Use FeishuRobot.ProtoReflect.Descriptor instead.

func (*FeishuRobot) GetSecret

func (x *FeishuRobot) GetSecret() string

func (*FeishuRobot) GetWebhook

func (x *FeishuRobot) GetWebhook() string

func (*FeishuRobot) ProtoMessage

func (*FeishuRobot) ProtoMessage()

func (*FeishuRobot) ProtoReflect

func (x *FeishuRobot) ProtoReflect() protoreflect.Message

func (*FeishuRobot) Reset

func (x *FeishuRobot) Reset()

func (*FeishuRobot) String

func (x *FeishuRobot) String() string

func (*FeishuRobot) Validate

func (m *FeishuRobot) Validate() error

Validate checks the field values on FeishuRobot with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*FeishuRobot) ValidateAll

func (m *FeishuRobot) ValidateAll() error

ValidateAll checks the field values on FeishuRobot with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in FeishuRobotMultiError, or nil if none found.

type FeishuRobotMultiError

type FeishuRobotMultiError []error

FeishuRobotMultiError is an error wrapping multiple validation errors returned by FeishuRobot.ValidateAll() if the designated constraints aren't met.

func (FeishuRobotMultiError) AllErrors

func (m FeishuRobotMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (FeishuRobotMultiError) Error

func (m FeishuRobotMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type FeishuRobotValidationError

type FeishuRobotValidationError struct {
	// contains filtered or unexported fields
}

FeishuRobotValidationError is the validation error returned by FeishuRobot.Validate if the designated constraints aren't met.

func (FeishuRobotValidationError) Cause

Cause function returns cause value.

func (FeishuRobotValidationError) Error

Error satisfies the builtin error interface

func (FeishuRobotValidationError) ErrorName

func (e FeishuRobotValidationError) ErrorName() string

ErrorName returns error name.

func (FeishuRobotValidationError) Field

Field function returns field value.

func (FeishuRobotValidationError) Key

Key function returns key value.

func (FeishuRobotValidationError) Reason

Reason function returns reason value.

type HTTPRequest

type HTTPRequest struct {

	// HTTP Call Address
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// contains filtered or unexported fields
}

func (*HTTPRequest) Descriptor deprecated

func (*HTTPRequest) Descriptor() ([]byte, []int)

Deprecated: Use HTTPRequest.ProtoReflect.Descriptor instead.

func (*HTTPRequest) GetUrl

func (x *HTTPRequest) GetUrl() string

func (*HTTPRequest) ProtoMessage

func (*HTTPRequest) ProtoMessage()

func (*HTTPRequest) ProtoReflect

func (x *HTTPRequest) ProtoReflect() protoreflect.Message

func (*HTTPRequest) Reset

func (x *HTTPRequest) Reset()

func (*HTTPRequest) String

func (x *HTTPRequest) String() string

func (*HTTPRequest) Validate

func (m *HTTPRequest) Validate() error

Validate checks the field values on HTTPRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*HTTPRequest) ValidateAll

func (m *HTTPRequest) ValidateAll() error

ValidateAll checks the field values on HTTPRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in HTTPRequestMultiError, or nil if none found.

type HTTPRequestMultiError

type HTTPRequestMultiError []error

HTTPRequestMultiError is an error wrapping multiple validation errors returned by HTTPRequest.ValidateAll() if the designated constraints aren't met.

func (HTTPRequestMultiError) AllErrors

func (m HTTPRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (HTTPRequestMultiError) Error

func (m HTTPRequestMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type HTTPRequestValidationError

type HTTPRequestValidationError struct {
	// contains filtered or unexported fields
}

HTTPRequestValidationError is the validation error returned by HTTPRequest.Validate if the designated constraints aren't met.

func (HTTPRequestValidationError) Cause

Cause function returns cause value.

func (HTTPRequestValidationError) Error

Error satisfies the builtin error interface

func (HTTPRequestValidationError) ErrorName

func (e HTTPRequestValidationError) ErrorName() string

ErrorName returns error name.

func (HTTPRequestValidationError) Field

Field function returns field value.

func (HTTPRequestValidationError) Key

Key function returns key value.

func (HTTPRequestValidationError) Reason

Reason function returns reason value.

type MailGroup

type MailGroup struct {

	// Member Account List
	To []string `protobuf:"bytes,1,rep,name=to,proto3" json:"to,omitempty"`
	// contains filtered or unexported fields
}

func (*MailGroup) Descriptor deprecated

func (*MailGroup) Descriptor() ([]byte, []int)

Deprecated: Use MailGroup.ProtoReflect.Descriptor instead.

func (*MailGroup) GetTo

func (x *MailGroup) GetTo() []string

func (*MailGroup) ProtoMessage

func (*MailGroup) ProtoMessage()

func (*MailGroup) ProtoReflect

func (x *MailGroup) ProtoReflect() protoreflect.Message

func (*MailGroup) Reset

func (x *MailGroup) Reset()

func (*MailGroup) String

func (x *MailGroup) String() string

func (*MailGroup) Validate

func (m *MailGroup) Validate() error

Validate checks the field values on MailGroup with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*MailGroup) ValidateAll

func (m *MailGroup) ValidateAll() error

ValidateAll checks the field values on MailGroup with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in MailGroupMultiError, or nil if none found.

type MailGroupMultiError

type MailGroupMultiError []error

MailGroupMultiError is an error wrapping multiple validation errors returned by MailGroup.ValidateAll() if the designated constraints aren't met.

func (MailGroupMultiError) AllErrors

func (m MailGroupMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (MailGroupMultiError) Error

func (m MailGroupMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type MailGroupValidationError

type MailGroupValidationError struct {
	// contains filtered or unexported fields
}

MailGroupValidationError is the validation error returned by MailGroup.Validate if the designated constraints aren't met.

func (MailGroupValidationError) Cause

func (e MailGroupValidationError) Cause() error

Cause function returns cause value.

func (MailGroupValidationError) Error

func (e MailGroupValidationError) Error() string

Error satisfies the builtin error interface

func (MailGroupValidationError) ErrorName

func (e MailGroupValidationError) ErrorName() string

ErrorName returns error name.

func (MailGroupValidationError) Field

func (e MailGroupValidationError) Field() string

Field function returns field value.

func (MailGroupValidationError) Key

Key function returns key value.

func (MailGroupValidationError) Reason

func (e MailGroupValidationError) Reason() string

Reason function returns reason value.

type Notification

type Notification struct {

	// Notification object name
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Trigger rule type
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// DingTalk Robot
	DingTalkRobot *DingTalkRobot `protobuf:"bytes,3,opt,name=ding_talk_robot,json=dingTalkRobot,proto3" json:"ding_talk_robot,omitempty"`
	// HTTP Request
	HttpRequest *HTTPRequest `protobuf:"bytes,4,opt,name=http_request,json=httpRequest,proto3" json:"http_request,omitempty"`
	// WeChat Robot
	WechatRobot *WeChatRobot `protobuf:"bytes,5,opt,name=wechat_robot,json=wechatRobot,proto3" json:"wechat_robot,omitempty"`
	// Mail Group
	MailGroup *MailGroup `protobuf:"bytes,6,opt,name=mail_group,json=mailGroup,proto3" json:"mail_group,omitempty"`
	// Feishu Robot
	FeishuRobot *FeishuRobot `protobuf:"bytes,7,opt,name=feishu_robot,json=feishuRobot,proto3" json:"feishu_robot,omitempty"`
	// SMS
	Sms *SMS `protobuf:"bytes,8,opt,name=sms,proto3" json:"sms,omitempty"`
	// contains filtered or unexported fields
}

func (*Notification) Descriptor deprecated

func (*Notification) Descriptor() ([]byte, []int)

Deprecated: Use Notification.ProtoReflect.Descriptor instead.

func (*Notification) GetDingTalkRobot

func (x *Notification) GetDingTalkRobot() *DingTalkRobot

func (*Notification) GetFeishuRobot

func (x *Notification) GetFeishuRobot() *FeishuRobot

func (*Notification) GetHttpRequest

func (x *Notification) GetHttpRequest() *HTTPRequest

func (*Notification) GetMailGroup

func (x *Notification) GetMailGroup() *MailGroup

func (*Notification) GetName

func (x *Notification) GetName() string

func (*Notification) GetSms

func (x *Notification) GetSms() *SMS

func (*Notification) GetType

func (x *Notification) GetType() string

func (*Notification) GetWechatRobot

func (x *Notification) GetWechatRobot() *WeChatRobot

func (*Notification) ProtoMessage

func (*Notification) ProtoMessage()

func (*Notification) ProtoReflect

func (x *Notification) ProtoReflect() protoreflect.Message

func (*Notification) Reset

func (x *Notification) Reset()

func (*Notification) String

func (x *Notification) String() string

func (*Notification) Validate

func (m *Notification) Validate() error

Validate checks the field values on Notification with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Notification) ValidateAll

func (m *Notification) ValidateAll() error

ValidateAll checks the field values on Notification with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in NotificationMultiError, or nil if none found.

type NotificationMultiError

type NotificationMultiError []error

NotificationMultiError is an error wrapping multiple validation errors returned by Notification.ValidateAll() if the designated constraints aren't met.

func (NotificationMultiError) AllErrors

func (m NotificationMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (NotificationMultiError) Error

func (m NotificationMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type NotificationValidationError

type NotificationValidationError struct {
	// contains filtered or unexported fields
}

NotificationValidationError is the validation error returned by Notification.Validate if the designated constraints aren't met.

func (NotificationValidationError) Cause

Cause function returns cause value.

func (NotificationValidationError) Error

Error satisfies the builtin error interface

func (NotificationValidationError) ErrorName

func (e NotificationValidationError) ErrorName() string

ErrorName returns error name.

func (NotificationValidationError) Field

Field function returns field value.

func (NotificationValidationError) Key

Key function returns key value.

func (NotificationValidationError) Reason

Reason function returns reason value.

type SMS

type SMS struct {

	// Phone Number List
	To []string `protobuf:"bytes,1,rep,name=to,proto3" json:"to,omitempty"`
	// contains filtered or unexported fields
}

func (*SMS) Descriptor deprecated

func (*SMS) Descriptor() ([]byte, []int)

Deprecated: Use SMS.ProtoReflect.Descriptor instead.

func (*SMS) GetTo

func (x *SMS) GetTo() []string

func (*SMS) ProtoMessage

func (*SMS) ProtoMessage()

func (*SMS) ProtoReflect

func (x *SMS) ProtoReflect() protoreflect.Message

func (*SMS) Reset

func (x *SMS) Reset()

func (*SMS) String

func (x *SMS) String() string

func (*SMS) Validate

func (m *SMS) Validate() error

Validate checks the field values on SMS with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*SMS) ValidateAll

func (m *SMS) ValidateAll() error

ValidateAll checks the field values on SMS with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SMSMultiError, or nil if none found.

type SMSMultiError

type SMSMultiError []error

SMSMultiError is an error wrapping multiple validation errors returned by SMS.ValidateAll() if the designated constraints aren't met.

func (SMSMultiError) AllErrors

func (m SMSMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SMSMultiError) Error

func (m SMSMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type SMSValidationError

type SMSValidationError struct {
	// contains filtered or unexported fields
}

SMSValidationError is the validation error returned by SMS.Validate if the designated constraints aren't met.

func (SMSValidationError) Cause

func (e SMSValidationError) Cause() error

Cause function returns cause value.

func (SMSValidationError) Error

func (e SMSValidationError) Error() string

Error satisfies the builtin error interface

func (SMSValidationError) ErrorName

func (e SMSValidationError) ErrorName() string

ErrorName returns error name.

func (SMSValidationError) Field

func (e SMSValidationError) Field() string

Field function returns field value.

func (SMSValidationError) Key

func (e SMSValidationError) Key() bool

Key function returns key value.

func (SMSValidationError) Reason

func (e SMSValidationError) Reason() string

Reason function returns reason value.

type WeChatRobot

type WeChatRobot struct {

	// Robot Call Address
	Webhook string `protobuf:"bytes,1,opt,name=webhook,proto3" json:"webhook,omitempty"`
	// contains filtered or unexported fields
}

func (*WeChatRobot) Descriptor deprecated

func (*WeChatRobot) Descriptor() ([]byte, []int)

Deprecated: Use WeChatRobot.ProtoReflect.Descriptor instead.

func (*WeChatRobot) GetWebhook

func (x *WeChatRobot) GetWebhook() string

func (*WeChatRobot) ProtoMessage

func (*WeChatRobot) ProtoMessage()

func (*WeChatRobot) ProtoReflect

func (x *WeChatRobot) ProtoReflect() protoreflect.Message

func (*WeChatRobot) Reset

func (x *WeChatRobot) Reset()

func (*WeChatRobot) String

func (x *WeChatRobot) String() string

func (*WeChatRobot) Validate

func (m *WeChatRobot) Validate() error

Validate checks the field values on WeChatRobot with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*WeChatRobot) ValidateAll

func (m *WeChatRobot) ValidateAll() error

ValidateAll checks the field values on WeChatRobot with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in WeChatRobotMultiError, or nil if none found.

type WeChatRobotMultiError

type WeChatRobotMultiError []error

WeChatRobotMultiError is an error wrapping multiple validation errors returned by WeChatRobot.ValidateAll() if the designated constraints aren't met.

func (WeChatRobotMultiError) AllErrors

func (m WeChatRobotMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (WeChatRobotMultiError) Error

func (m WeChatRobotMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type WeChatRobotValidationError

type WeChatRobotValidationError struct {
	// contains filtered or unexported fields
}

WeChatRobotValidationError is the validation error returned by WeChatRobot.Validate if the designated constraints aren't met.

func (WeChatRobotValidationError) Cause

Cause function returns cause value.

func (WeChatRobotValidationError) Error

Error satisfies the builtin error interface

func (WeChatRobotValidationError) ErrorName

func (e WeChatRobotValidationError) ErrorName() string

ErrorName returns error name.

func (WeChatRobotValidationError) Field

Field function returns field value.

func (WeChatRobotValidationError) Key

Key function returns key value.

func (WeChatRobotValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL