vault

package
v2.0.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encrypter

type Encrypter interface {
	Encrypt(plainText string) (string, error)
}

type MockVariableVaulter

type MockVariableVaulter struct {
	mock.Mock
}

MockVariableVaulter is a mock for VariableVaulter

func NewMockVariableVaulter

func NewMockVariableVaulter() *MockVariableVaulter

NewMockVariableVaulter returns a new MockVariableVaulter

func (*MockVariableVaulter) Vault

func (v *MockVariableVaulter) Vault(value string) (*VaultVariableValue, error)

type OptionsFunc

type OptionsFunc func(*VariableVaulter)

OptionsFunc is a function used to configure ReadPasswordFromEnvVar

func WithEncrypt

func WithEncrypt(e Encrypter) OptionsFunc

type VariableVaulter

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

func NewVariableVaulter

func NewVariableVaulter(options ...OptionsFunc) *VariableVaulter

func (*VariableVaulter) Options

func (v *VariableVaulter) Options(opts ...OptionsFunc)

func (*VariableVaulter) Vault

func (v *VariableVaulter) Vault(value string) (*VaultVariableValue, error)

type VaultVariableValue

type VaultVariableValue struct {
	Value interface{} `json:"__ansible_vault"`
}

func NewVaultVariableValue

func NewVaultVariableValue(value interface{}) *VaultVariableValue

func (*VaultVariableValue) ToJSON

func (v *VaultVariableValue) ToJSON() (string, error)

Directories

Path Synopsis
password

Jump to

Keyboard shortcuts

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