service

package
v11.1.4-modfix Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service must not be used for encryption. Use secrets.Service implementing envelope encryption instead.

func ProvideEncryptionService

func ProvideEncryptionService(
	tracer tracing.Tracer,
	provider encryption.Provider,
	usageMetrics usagestats.Service,
	cfg *setting.Cfg,
) (*Service, error)

func SetupTestService

func SetupTestService(tb testing.TB) *Service

func (*Service) Decrypt

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

func (*Service) DecryptJsonData

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

func (*Service) Encrypt

func (s *Service) Encrypt(ctx context.Context, payload []byte, secret string) ([]byte, error)

func (*Service) EncryptJsonData

func (s *Service) EncryptJsonData(ctx context.Context, kv map[string]string, secret string) (map[string][]byte, error)

func (*Service) GetDecryptedValue

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

Jump to

Keyboard shortcuts

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