alert_webhook

package
v0.0.0-...-e99c6c0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaskedSecret               = "******"
	DefaultGenericJSONTemplate = `` /* 139-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func ContentTypeForBodyType

func ContentTypeForBodyType(bodyType string) (string, error)

func ExportSecretPlain

func ExportSecretPlain(config model.AlertConfig) (string, error)

func ImportSecretPlain

func ImportSecretPlain(plainText string) (string, error)

func PlainView

func PlainView(config model.AlertConfig) (string, error)

PlainView decrypts a custom webhook only for the authenticated alert-config read contract. The encrypted SecretConfig remains the sole persisted copy.

func ReencryptSecret

func ReencryptSecret(cipherText string) (string, error)

func ValidateStored

func ValidateStored(config model.AlertConfig) error

Types

type PreparedConfig

type PreparedConfig struct {
	Config       string
	SecretConfig string
	DisplayName  string
}

func NormalizeLegacy

func NormalizeLegacy(rawConfig, status, fallbackName string) (PreparedConfig, string, bool, error)

func Prepare

func Prepare(rawConfig, status string, existing *model.AlertConfig) (PreparedConfig, error)

Jump to

Keyboard shortcuts

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