manager

package
v0.0.0-test Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

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,
	settings setting.Provider,
) (*SecretsService, error)

func SetupTestService

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

func (*SecretsService) CurrentProviderID

func (s *SecretsService) CurrentProviderID() string

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) EncryptJsonDataWithDBSession

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

func (*SecretsService) EncryptWithDBSession

func (s *SecretsService) EncryptWithDBSession(ctx context.Context, payload []byte, opt secrets.EncryptionOptions, sess *xorm.Session) ([]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[string]secrets.Provider

func (*SecretsService) RegisterProvider

func (s *SecretsService) RegisterProvider(providerID string, provider secrets.Provider)

Jump to

Keyboard shortcuts

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