sasl

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SASLConfig

type SASLConfig struct {
	// contains filtered or unexported fields
}

func NewSASLConfig

func NewSASLConfig(username, password string, useSASL bool, saslType SASLType, algorithm scram.Algorithm, smConfig *SecretManagerConfig, logger logging.LoggerInterface) *SASLConfig

func (*SASLConfig) GetSASLMechanism

func (c *SASLConfig) GetSASLMechanism() sasl.Mechanism

type SASLType

type SASLType = int
const (
	PlainSASL SASLType = iota
	ScramSASL
)

type SecretCredentials

type SecretCredentials struct {
	Keys    string `json:"api-keys"`
	Secrets string `json:"api-secrets"`
}

TODO @shipperizer allow to shape structure of secrets and default to this

type SecretManagerConfig

type SecretManagerConfig struct {
	CredentialsKey string

	Vault VaultInterface
}

SecretManagerConfig holds the key values to fetch from SM for the credentials key

func NewSecretManagerConfig

func NewSecretManagerConfig(credentialsKey string, vault VaultInterface) *SecretManagerConfig

type VaultInterface

type VaultInterface interface {
	GetValue(ctx context.Context, key string) ([]byte, error)
}

VaultInterface provides method(s) to fetch secrets

Jump to

Keyboard shortcuts

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