messaging

package
v2.0.0-dev.49 Latest Latest
Warning

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

Go to latest
Published: May 10, 2021 License: Apache-2.0 Imports: 13 Imported by: 6

Documentation

Index

Constants

View Source
const (
	AuthModeKey   = "authmode"
	SecretNameKey = "secretname"

	AuthModeNone             = "none"
	AuthModeUsernamePassword = "usernamepassword"
	AuthModeCert             = "clientcert"
	AuthModeCA               = "cacert"

	SecretUsernameKey = "username"
	SecretPasswordKey = "password"
	SecretClientKey   = "clientkey"
	SecretClientCert  = AuthModeCert
	SecretCACert      = AuthModeCA

	OptionsUsernameKey     = "Username"
	OptionsPasswordKey     = "Password"
	OptionsCertPEMBlockKey = "CertPEMBlock"
	OptionsKeyPEMBlockKey  = "KeyPEMBlock"
	OptionsCaPEMBlockKey   = "CaPEMBlock"
)

Variables

This section is empty.

Functions

func BootstrapHandler

func BootstrapHandler(ctx context.Context, wg *sync.WaitGroup, startupTimer startup.Timer, dic *di.Container) bool

BootstrapHandler fulfills the BootstrapHandler contract. if enabled, tt creates and initializes the Messaging client and adds it to the DIC

func ValidateSecretData

func ValidateSecretData(authMode string, secretName string, secretData *SecretData) error

Types

type SecretData

type SecretData struct {
	Username     string
	Password     string
	KeyPemBlock  []byte
	CertPemBlock []byte
	CaPemBlock   []byte
}

func GetSecretData

func GetSecretData(authMode string, secretName string, provider SecretDataProvider) (*SecretData, error)

type SecretDataProvider

type SecretDataProvider interface {
	// GetSecret retrieves secrets from the service's SecretStore at the specified path.
	GetSecret(path string, keys ...string) (map[string]string, error)
}

Jump to

Keyboard shortcuts

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