Documentation ¶
Index ¶
Constants ¶
View Source
const FullValidConfigForTesting = `` /* 393-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": "http://localhost/url-secret",
"token": "test-secret-token"
}`
FullValidSecretsForTesting is a string representation of JSON object that contains all fields that can be overridden from secrets
Variables ¶
View Source
var APIURL = "https://slack.com/api/chat.postMessage"
APIURL of where the notification payload is sent. It is public to be overridable in integration tests.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { EndpointURL string `json:"endpointUrl,omitempty" yaml:"endpointUrl,omitempty"` URL string `json:"url,omitempty" yaml:"url,omitempty"` Token string `json:"token,omitempty" yaml:"token,omitempty"` Recipient string `json:"recipient,omitempty" yaml:"recipient,omitempty"` Text string `json:"text,omitempty" yaml:"text,omitempty"` Title string `json:"title,omitempty" yaml:"title,omitempty"` Username string `json:"username,omitempty" yaml:"username,omitempty"` IconEmoji string `json:"icon_emoji,omitempty" yaml:"icon_emoji,omitempty"` IconURL string `json:"icon_url,omitempty" yaml:"icon_url,omitempty"` MentionChannel string `json:"mentionChannel,omitempty" yaml:"mentionChannel,omitempty"` MentionUsers receivers.CommaSeparatedStrings `json:"mentionUsers,omitempty" yaml:"mentionUsers,omitempty"` MentionGroups receivers.CommaSeparatedStrings `json:"mentionGroups,omitempty" yaml:"mentionGroups,omitempty"` }
func NewConfig ¶
func NewConfig(jsonData json.RawMessage, decryptFn receivers.DecryptFunc) (Config, error)
Click to show internal directories.
Click to hide internal directories.