encrypt

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsVaultResponseError

func IsVaultResponseError(err error) bool

IsVaultResponseError asserts vaultResponseError.

Types

type Config

type Config struct {
	VaultClient *vaultclient.Client
	Key         string
}

Config represents the configuration used to create a new vault encrypting value modifier.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig provides a default configuration to create a new vault encrypting value modifier by best effort.

type Service

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

Service implements the vault encrypting value modifier.

func New

func New(config Config) (*Service, error)

New creates a new configured vault encrypting value modifier.

func (*Service) Encrypt added in v0.5.0

func (s *Service) Encrypt(plainText string) (string, error)

func (*Service) Modify

func (s *Service) Modify(value []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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