driver

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidKeyUri = fmt.Errorf("invalid vault key id")
)

Functions

This section is empty.

Types

type Aes

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

func NewAes

func NewAes() (*Aes, error)

func (*Aes) Configure

func (driver *Aes) Configure(config map[string]interface{}) error

func (*Aes) Decrypt

func (driver *Aes) Decrypt(encrypted string, key string) (string, error)

func (*Aes) Encrypt

func (driver *Aes) Encrypt(input string) (string, error)

func (*Aes) GetKey added in v0.2.0

func (driver *Aes) GetKey() string

func (*Aes) Type

func (driver *Aes) Type() string

type Azure

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

func NewAzure

func NewAzure() (*Azure, error)

func (*Azure) Configure

func (driver *Azure) Configure(config map[string]interface{}) error

func (*Azure) Decrypt

func (driver *Azure) Decrypt(input string, key string) (string, error)

Decrypt decrypts an input either using the key configured in the driver or if the key parameter isn't empty it will use that one.

func (*Azure) Encrypt

func (driver *Azure) Encrypt(input string) (string, error)

func (Azure) GetKey added in v0.2.0

func (driver Azure) GetKey() string

func (*Azure) Type

func (driver *Azure) Type() string

type Base64

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

Base64 is the most basic secret driver. It does not expect any encryption and will just return any data which exists in the secret files.

func NewBase64

func NewBase64() (*Base64, error)

NewBase64 returns a newly initialized Plain driver.

func (*Base64) Decrypt

func (p *Base64) Decrypt(encrypted string, key string) (string, error)

func (*Base64) Encrypt

func (p *Base64) Encrypt(input string) (string, error)

func (*Base64) GetKey added in v0.2.0

func (p *Base64) GetKey() string

func (*Base64) Type

func (p *Base64) Type() string

type Plain

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

Plain is the most basic secret driver. It does not expect any encryption and will just return any data which exists in the secret files.

func NewPlain

func NewPlain() (*Plain, error)

NewPlain returns a newly initialized Plain driver.

func (*Plain) Decrypt

func (p *Plain) Decrypt(encrypted string, key string) (string, error)

the plain driver does not do anything

func (*Plain) Encrypt

func (p *Plain) Encrypt(input string) (string, error)

the plain driver does not do anything

func (Plain) GetKey added in v0.2.0

func (p Plain) GetKey() string

func (Plain) Type

func (p Plain) Type() string

Jump to

Keyboard shortcuts

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