Documentation
¶
Index ¶
Constants ¶
View Source
const FullValidConfigForTesting = `{
"token": "test",
"title": "test-title",
"description": "test-description"
}`
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 = `{
"token": "test-secret-token"
}`
FullValidSecretsForTesting is a string representation of JSON object that contains all fields that can be overridden from secrets
View Source
const Version = schema.V1
Variables ¶
View Source
var ( // APIURL of where the notification payload is sent. It is public to be overridable in integration tests. // API document link: https://notify-bot.line.me/doc/en/ APIURL = "https://notify-api.line.me/api/notify" )
View Source
var Schema = schema.IntegrationSchemaVersion{ TypeAlias: "line", Version: Version, CanCreate: false, Options: []schema.Field{ { Label: "Token", Element: schema.ElementTypeInput, InputType: schema.InputTypeText, Placeholder: "LINE notify token key", PropertyName: "token", Required: true, Secure: true, }, { Label: "Title", Element: schema.ElementTypeTextArea, InputType: schema.InputTypeText, Description: "Templated title of the message", PropertyName: "title", Placeholder: templates.DefaultMessageTitleEmbed, }, { Label: "Description", Element: schema.ElementTypeTextArea, InputType: schema.InputTypeText, Description: "Templated description of the message", PropertyName: "description", Placeholder: templates.DefaultMessageEmbed, }, }, }
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Token string `json:"token,omitempty" yaml:"token,omitempty"`
Title string `json:"title,omitempty" yaml:"title,omitempty"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
}
func NewConfig ¶
func NewConfig(jsonData json.RawMessage, decryptFn receivers.DecryptFunc) (Config, error)
Click to show internal directories.
Click to hide internal directories.