vaults

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VaultKey crypto.KeyType = 'V'
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Vault

type Vault struct {
	Secrets map[string]string `json:"slvSecrets,omitempty" yaml:"slvSecrets,omitempty"`
	Data    map[string]string `json:"slvData,omitempty" yaml:"slvData,omitempty"`
	Config  vaultConfig       `json:"slvConfig" yaml:"slvConfig"`
	// contains filtered or unexported fields
}

func Get

func Get(filePath string) (vlt *Vault, err error)

Returns the vault instance from a given yaml. The vault file name must end with .slv.yml or .slv.yaml.

func New

func New(filePath, k8sName, k8sNamespace string, k8SecretContent []byte, hash, quantumSafe bool, publicKeys ...*crypto.PublicKey) (vlt *Vault, err error)

Returns new vault instance and the vault contents set into the specified field. The vault file name must end with .slv.yml or .slv.yaml.

func (*Vault) DeRef added in v0.8.0

func (vlt *Vault) DeRef(path string) error

func (*Vault) DeepCopy

func (v *Vault) DeepCopy() *Vault

func (*Vault) DeepCopyInto

func (v *Vault) DeepCopyInto(out *Vault)

func (*Vault) Delete

func (vlt *Vault) Delete() error

func (*Vault) DeleteItem added in v0.5.5

func (vlt *Vault) DeleteItem(name string) error

func (*Vault) DeleteItems added in v0.5.5

func (vlt *Vault) DeleteItems(names []string) error

func (*Vault) Exists added in v0.5.4

func (vlt *Vault) Exists(name string) (exists bool)

func (*Vault) Get added in v0.5.4

func (vlt *Vault) Get(name string) (data *VaultData, err error)

func (*Vault) GetAllValues added in v0.5.5

func (vlt *Vault) GetAllValues() (map[string][]byte, error)

func (*Vault) Id

func (vlt *Vault) Id() string

func (*Vault) Import added in v0.5.4

func (vlt *Vault) Import(importData []byte, force, encrypt bool) (err error)

func (*Vault) IsLocked

func (vlt *Vault) IsLocked() bool

func (*Vault) IsSecret added in v0.8.0

func (vlt *Vault) IsSecret(name string) (isSecret bool, err error)

func (*Vault) List added in v0.5.4

func (vlt *Vault) List(decrypt bool) (map[string]*VaultData, error)

func (*Vault) ListAccessors

func (vlt *Vault) ListAccessors() ([]crypto.PublicKey, error)

func (*Vault) Lock

func (vlt *Vault) Lock()

func (*Vault) Put added in v0.5.4

func (vlt *Vault) Put(name string, value []byte, encrypt bool) (err error)

func (*Vault) Ref added in v0.8.0

func (vlt *Vault) Ref(refType, file, name string, forceUpdate, encrypt, dryRun bool) (result string, conflicting bool, err error)

func (*Vault) Revoke

func (vlt *Vault) Revoke(publicKeys []*crypto.PublicKey, quantumSafe bool) error

func (*Vault) Share

func (vlt *Vault) Share(publicKey *crypto.PublicKey) (bool, error)

func (*Vault) ToK8s

func (vlt *Vault) ToK8s(name, namespace string, k8SecretContent []byte) (err error)

func (*Vault) Unlock

func (vlt *Vault) Unlock(secretKey *crypto.SecretKey) error

type VaultData added in v0.5.5

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

func (*VaultData) Hash added in v0.5.6

func (vd *VaultData) Hash() string

func (*VaultData) IsSecret added in v0.5.5

func (vd *VaultData) IsSecret() bool

func (*VaultData) UpdatedAt added in v0.5.6

func (vd *VaultData) UpdatedAt() *time.Time

func (*VaultData) Value added in v0.5.5

func (vd *VaultData) Value() []byte

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳