manager

package
v0.0.0-test.2 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: AGPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpEncrypt = "encrypt"
	OpDecrypt = "decrypt"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SecretsService

type SecretsService struct {
	// contains filtered or unexported fields
}

func ProvideSecretsService

func ProvideSecretsService(
	store secrets.Store,
	kmsProvidersService kmsproviders.Service,
	enc encryption.Internal,
	cfg *setting.Cfg,
	features featuremgmt.FeatureToggles,
	usageStats usagestats.Service,
) (*SecretsService, error)

func SetupDisabledTestService

func SetupDisabledTestService(tb testing.TB, store secrets.Store) *SecretsService

func SetupTestService

func SetupTestService(tb testing.TB, store secrets.Store) *SecretsService

func (*SecretsService) Decrypt

func (s *SecretsService) Decrypt(ctx context.Context, payload []byte) ([]byte, error)

func (*SecretsService) DecryptJsonData

func (s *SecretsService) DecryptJsonData(ctx context.Context, sjd map[string][]byte) (map[string]string, error)

func (*SecretsService) Encrypt

func (s *SecretsService) Encrypt(ctx context.Context, payload []byte, opt secrets.EncryptionOptions) ([]byte, error)

func (*SecretsService) EncryptJsonData

func (s *SecretsService) EncryptJsonData(ctx context.Context, kv map[string]string, opt secrets.EncryptionOptions) (map[string][]byte, error)

func (*SecretsService) GetDecryptedValue

func (s *SecretsService) GetDecryptedValue(ctx context.Context, sjd map[string][]byte, key, fallback string) string

func (*SecretsService) GetProviders

func (s *SecretsService) GetProviders() map[secrets.ProviderID]secrets.Provider

func (*SecretsService) InitProviders

func (s *SecretsService) InitProviders() (err error)

func (*SecretsService) ReEncryptDataKeys

func (s *SecretsService) ReEncryptDataKeys(ctx context.Context) error

func (*SecretsService) RotateDataKeys

func (s *SecretsService) RotateDataKeys(ctx context.Context) error

func (*SecretsService) Run

func (s *SecretsService) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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