stores

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientInjector

type ClientInjector interface {
	InjectClient(client.Client)
}

type LogStore

type LogStore struct {
	LogStoreSpec emcv1beta1.LogStoreSpec
	Client       client.Client
}

LogStore is a store that logs the token but does not store it anywhere Retreiving the token is thus not implemented

func NewLogStore

func NewLogStore(sts emcv1beta1.LogStoreSpec) *LogStore

func (*LogStore) StoreToken

func (ss *LogStore) StoreToken(ctx context.Context, ea emcv1beta1.EmergencyAccount, token string) (string, error)

type SecretStore

type SecretStore struct {
	SecretStoreSpec emcv1beta1.SecretStoreSpec
	Client          client.Client
}

func NewSecretStore

func NewSecretStore(sts emcv1beta1.SecretStoreSpec) *SecretStore

func (*SecretStore) InjectClient

func (ss *SecretStore) InjectClient(c client.Client)

InjectClient injects the client into the SecretStore

func (*SecretStore) RetrieveToken

func (ss *SecretStore) RetrieveToken(ctx context.Context, ea emcv1beta1.EmergencyAccount, ref string) (string, error)

func (*SecretStore) StoreToken

func (ss *SecretStore) StoreToken(ctx context.Context, ea emcv1beta1.EmergencyAccount, token string) (string, error)

type TokenRetriever

type TokenRetriever interface {
	RetrieveToken(ctx context.Context, ea emcv1beta1.EmergencyAccount, ref string) (token string, err error)
}

type TokenStorer

type TokenStorer interface {
	StoreToken(ctx context.Context, ea emcv1beta1.EmergencyAccount, token string) (ref string, err error)
}

func FromSpec

func FromSpec(sts emcv1beta1.TokenStoreSpec) (TokenStorer, error)

Jump to

Keyboard shortcuts

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