Documentation
¶
Index ¶
- Constants
- func Builder(_ context.Context, c any) (secrets.Keeper, error)
- func MapSecret(in map[string]string) secrets.Secret
- func SecretMap(in secrets.Secret) map[string]string
- type Config
- type Memory
- func (i *Memory) CopySecret(ctx context.Context, id string, location string) (secrets.Secret, error)
- func (i *Memory) DeleteSecret(_ context.Context, id string) error
- func (i *Memory) GetSecret(_ context.Context, id string) (secrets.Secret, error)
- func (i *Memory) GetSecretsByName(_ context.Context, name string) ([]secrets.Secret, error)
- func (i *Memory) ListLocations(context.Context) ([]string, error)
- func (i *Memory) ListSecrets(_ context.Context, loc string) ([]string, error)
- func (i *Memory) MoveSecret(ctx context.Context, id string, location string) (secrets.Secret, error)
- func (i *Memory) SetSecret(_ context.Context, secret secrets.Secret) (secrets.Secret, error)
Constants ¶
View Source
const ConfigType = "memory"
ConfigType is the name of the config type for the memory secret keeper.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
Memory is a Keeper that stores secrets in memory.
func (*Memory) CopySecret ¶
func (i *Memory) CopySecret(ctx context.Context, id string, location string) (secrets.Secret, error)
CopySecret copies the secret into a new location while leaving the original in the old location.
func (*Memory) DeleteSecret ¶
DeleteSecret removes the identified secret from the store.
func (*Memory) GetSecret ¶
GetSecret retrieves the identified secret from the internal memory store.
func (*Memory) GetSecretsByName ¶
GetSecretsByName retrieves all secrets with the given name.
func (*Memory) ListLocations ¶
ListLocations returns a list of all the secret names in the store.
func (*Memory) ListSecrets ¶
ListSecrets returns a list of all the secret IDs at the given location.
Click to show internal directories.
Click to hide internal directories.