channels_config

package
v11.1.4-modfix Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ElementTypeInput will render an input
	ElementTypeInput = "input"
	// ElementTypeSelect will render a select
	ElementTypeSelect = "select"
	// ElementTypeCheckbox will render a checkbox
	ElementTypeCheckbox = "checkbox"
	// ElementTypeTextArea will render a textarea
	ElementTypeTextArea = "textarea"
	// ElementTypeKeyValueMap will render inputs to add arbitrary key-value pairs
	ElementTypeKeyValueMap = "key_value_map"
	// ElementSubformArray will render a sub-form with schema defined in SubformOptions
	ElementTypeSubform = "subform"
	// ElementSubformArray will render a multiple sub-forms with schema defined in SubformOptions
	ElementSubformArray = "subform_array"
)
View Source
const (
	// InputTypeText will render a text field in the frontend
	InputTypeText = "text"
	// InputTypePassword will render a password field in the frontend
	InputTypePassword = "password"
)

Variables

This section is empty.

Functions

func GetSecretKeysForContactPointType

func GetSecretKeysForContactPointType(contactPointType string) ([]string, error)

GetSecretKeysForContactPointType returns settings keys of contact point of the given type that are expected to be secrets. Returns error is contact point type is not known.

Types

type ElementType

type ElementType string

ElementType is the type of element that can be rendered in the frontend.

type InputType

type InputType string

InputType is the type of input that can be rendered in the frontend.

type NotifierOption

type NotifierOption struct {
	Element        ElementType      `json:"element"`
	InputType      InputType        `json:"inputType"`
	Label          string           `json:"label"`
	Description    string           `json:"description"`
	Placeholder    string           `json:"placeholder"`
	PropertyName   string           `json:"propertyName"`
	SelectOptions  []SelectOption   `json:"selectOptions"`
	ShowWhen       ShowWhen         `json:"showWhen"`
	Required       bool             `json:"required"`
	ValidationRule string           `json:"validationRule"`
	Secure         bool             `json:"secure"`
	DependsOn      string           `json:"dependsOn"`
	SubformOptions []NotifierOption `json:"subformOptions"`
}

NotifierOption holds information about options specific for the NotifierPlugin.

type NotifierPlugin

type NotifierPlugin struct {
	Type        string           `json:"type"`
	Name        string           `json:"name"`
	Heading     string           `json:"heading"`
	Description string           `json:"description"`
	Info        string           `json:"info"`
	Options     []NotifierOption `json:"options"`
}

NotifierPlugin holds meta information about a notifier.

func GetAvailableNotifiers

func GetAvailableNotifiers() []*NotifierPlugin

GetAvailableNotifiers returns the metadata of all the notification channels that can be configured.

type SelectOption

type SelectOption struct {
	Value string `json:"value"`
	Label string `json:"label"`
}

SelectOption is a simple type for Options that have dropdown options. Should be used when Element is ElementTypeSelect.

type ShowWhen

type ShowWhen struct {
	Field string `json:"field"`
	Is    string `json:"is"`
}

ShowWhen holds information about when options are dependant on other options. Should be used when Element is ElementTypeSelect. Does not work for ElementTypeCheckbox.

Jump to

Keyboard shortcuts

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