secrets

package
v0.0.5-dev.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MIT Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

Functions

func GetSecret

func GetSecret[T any](ctx context.Context, driver SecretProvider, key string) (*T, error)

func SaveSecret

func SaveSecret[T any](ctx context.Context, driver SecretProvider, key string, value *T) error

func SecretsTest

func SecretsTest(t *testing.T, ctx context.Context, provider SecretProvider)

Types

type SecretProvider

type SecretProvider interface {
	SaveSecretBinary(ctx context.Context, key string, secret []byte) error
	GetSecretBinary(ctx context.Context, key string) ([]byte, error)

	GetSecret(ctx context.Context, key string) (string, error)
	SaveSecret(ctx context.Context, key string, data string) error

	DeleteSecret(ctx context.Context, key string) error
}

Jump to

Keyboard shortcuts

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