secrets

package
v9.4.18+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: Apache-2.0 Imports: 1 Imported by: 32

Documentation

Index

Constants

View Source
const (
	DefaultSecretKey = "defaultsecretkey"
	OverrideSecrets  = "override"
	SecretKey        = "id"
	SecretValue      = "secretvalue"
	SecretType       = "type"
	APIVersion       = "v1"
)
View Source
const (
	TypeNone   = "none"
	TypeKvdb   = "kvdb"
	TypeVault  = "vault"
	TypeAWS    = "aws-kms"
	TypeDocker = "docker"
	TypeK8s    = "k8s"
	TypeDCOS   = "dcos"
)

Variables

View Source
var (
	// ErrNotImplemented default secrets in OSD
	ErrNotImplemented = errors.New("Not Implemented")
	// ErrKeyEmpty returned when the secrety key provided is empty
	ErrKeyEmpty = errors.New("Secret key cannot be empty")
	// ErrNotAuthenticated returned when not authenticated with secrets endpoint
	ErrNotAuthenticated = errors.New("Not authenticated with the secrets endpoint")
	// ErrInvalidSecretId returned when no secret data is found associated with the id
	ErrInvalidSecretId = errors.New("No Secret Data found for Secret Id")
	// ErrEmptySecretData returned when no secret data is provided to store the secret
	ErrEmptySecretData = errors.New("Secret data cannot be empty")
	// ErrSecretExists returned when a secret for the given secret id already exists
	ErrSecretExists = errors.New("Secret ID already exists")
)

Functions

This section is empty.

Types

type DefaultSecretKeyRequest

type DefaultSecretKeyRequest struct {
	DefaultSecretKey string
	Override         bool
}

DefaultSecretKeyRequest specify request to set cluster secret key swagger:model

type GetSecretResponse

type GetSecretResponse struct {
	SecretValue interface{}
}

GetSecretResponse gets secret value for given key swagger:model

type NullSecrets

type NullSecrets struct {
}

func (*NullSecrets) SecretCheckLogin

func (f *NullSecrets) SecretCheckLogin() error

func (*NullSecrets) SecretGet

func (f *NullSecrets) SecretGet(secretKey string) (interface{}, error)

func (*NullSecrets) SecretGetDefaultSecretKey

func (f *NullSecrets) SecretGetDefaultSecretKey() (interface{}, error)

func (*NullSecrets) SecretLogin

func (f *NullSecrets) SecretLogin(secretType string, secretConfig map[string]string) error

func (*NullSecrets) SecretSet

func (f *NullSecrets) SecretSet(secretKey string, secretValue interface{}) error

func (*NullSecrets) SecretSetDefaultSecretKey

func (f *NullSecrets) SecretSetDefaultSecretKey(secretKey string, override bool) error

type SecretLoginRequest

type SecretLoginRequest struct {
	SecretType   string
	SecretConfig map[string]string
}

SecretLoginRequest specify secret store and config to initiate secret store session swagger:model

type Secrets

type Secrets interface {
	// SecretLogin create session with secret store
	SecretLogin(secretType string, secretConfig map[string]string) error
	// SecretSetDefaultSecretKey  sets the cluster wide secret key
	SecretSetDefaultSecretKey(secretKey string, override bool) error
	// SecretGetDefaultSecretKey returns cluster wide secret key
	SecretGetDefaultSecretKey() (interface{}, error)
	// SecretCheckLogin validates session with secret store
	SecretCheckLogin() error
	// SecretSet the given value/data against the key
	SecretSet(key string, value interface{}) error
	// SecretGet retrieves the value/data for given key
	SecretGet(key string) (interface{}, error)
}

func NewDefaultSecrets

func NewDefaultSecrets() Secrets

New returns null secrets implementation

type SetSecretRequest

type SetSecretRequest struct {
	SecretValue interface{}
}

SetSecretRequest stores the given value/data against the key swagger:model

Jump to

Keyboard shortcuts

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