Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultChannelType = "groupRobot"
View Source
const DefaultToUser = "@all"
View Source
const DefaultsgType = "markdown"
View Source
const FullValidConfigForTesting = `` /* 253-byte string literal not displayed */
FullValidConfigForTesting is a string representation of a JSON object that contains all fields supported by the notifier Config. It can be used without secrets.
View Source
const FullValidSecretsForTesting = `{
"url": "test-url-secret"
}`
FullValidSecretsForTesting is a string representation of JSON object that contains all fields that can be overridden from secrets
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Channel string `json:"-" yaml:"-"` EndpointURL string `json:"endpointUrl,omitempty" yaml:"endpointUrl,omitempty"` URL string `json:"url" yaml:"url"` AgentID string `json:"agent_id,omitempty" yaml:"agent_id,omitempty"` CorpID string `json:"corp_id,omitempty" yaml:"corp_id,omitempty"` Secret string `json:"secret,omitempty" yaml:"secret,omitempty"` MsgType MsgType `json:"msgtype,omitempty" yaml:"msgtype,omitempty"` Message string `json:"message,omitempty" yaml:"message,omitempty"` Title string `json:"title,omitempty" yaml:"title,omitempty"` ToUser string `json:"touser,omitempty" yaml:"touser,omitempty"` }
func NewConfig ¶
func NewConfig(jsonData json.RawMessage, decryptFn receivers.DecryptFunc) (Config, error)
type MsgType ¶
type MsgType string
const MsgTypeMarkdown MsgType = "markdown" // use these in available_receivers.go too
const MsgTypeText MsgType = "text"
type Notifier ¶
Notifier is responsible for sending alert notifications to WeCom.
func (*Notifier) GetAccessToken ¶
GetAccessToken returns the access token for apiapp
func (*Notifier) SendResolved ¶
Click to show internal directories.
Click to hide internal directories.