backend

package
v0.0.0-...-318a3d5 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultNamespace = "keptn"
View Source
const SecretBackendTypeK8s = "kubernetes"
View Source
const SecretServiceName = "keptn-secret-service"

Variables

View Source
var ErrScopeNotFound = errors.New("scope not found")
View Source
var ErrSecretAlreadyExists = errors.New("secret already exists")
View Source
var ErrSecretNotFound = errors.New("secret not found")
View Source
var ErrTooBigKeySize = errors.New("name and key values must be no more than 253 characters")

Functions

func GetRegisteredBackends

func GetRegisteredBackends() []string

func Register

func Register(name string, factory func() SecretBackend)

Types

type K8sSecretBackend

type K8sSecretBackend struct {
	KubeAPI                kubernetes.Interface
	KeptnNamespaceProvider common.StringSupplier
	ScopesRepository       repository.ScopesRepository
}

func NewK8sSecretBackend

func NewK8sSecretBackend(kubeAPI kubernetes.Interface, scopesRepository repository.ScopesRepository) *K8sSecretBackend

func (K8sSecretBackend) CreateSecret

func (k K8sSecretBackend) CreateSecret(secret model.Secret) error

func (K8sSecretBackend) DeleteSecret

func (k K8sSecretBackend) DeleteSecret(secret model.Secret) error

func (K8sSecretBackend) GetScopes

func (k K8sSecretBackend) GetScopes() ([]string, error)

func (K8sSecretBackend) GetSecrets

func (k K8sSecretBackend) GetSecrets(secret model.Secret) ([]model.GetSecretResponseItem, error)

func (K8sSecretBackend) UpdateSecret

func (k K8sSecretBackend) UpdateSecret(secret model.Secret) error

type ScopeManager

type ScopeManager interface {
	GetScopes() ([]string, error)
}

type SecretBackend

type SecretBackend interface {
	SecretManager
	ScopeManager
}

func CreateBackend

func CreateBackend(backendType string) SecretBackend

type SecretManager

type SecretManager interface {
	CreateSecret(model.Secret) error
	UpdateSecret(model.Secret) error
	DeleteSecret(model.Secret) error
	GetSecrets(model.Secret) ([]model.GetSecretResponseItem, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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