vault

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

vault.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Vault

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

Vault represents a secure key-value store.

func NewVault

func NewVault(filePath string, key []byte) *Vault

NewVault creates a new Vault instance.

func (*Vault) Initialize

func (v *Vault) Initialize() error

Initialize creates a new vault file if it doesn't exist.

func (*Vault) VaultDelKey

func (v *Vault) VaultDelKey(key string) error

VaultDelKey deletes a key from the vault.

func (*Vault) VaultEnableBackup

func (v *Vault) VaultEnableBackup(value bool)

func (*Vault) VaultGetValue

func (v *Vault) VaultGetValue(key string) (string, error)

VaultGetValue returns the value of a key from the vault.

func (*Vault) VaultHasKey

func (v *Vault) VaultHasKey(key string) bool

VaultHasKey checks if the vault contains the specified key.

func (*Vault) VaultListKeys

func (v *Vault) VaultListKeys() []string

VaultListKeys lists all keys in the vault.

func (*Vault) VaultSetValue

func (v *Vault) VaultSetValue(key, value string) error

VaultSetValue sets the value of a key in the vault.

Jump to

Keyboard shortcuts

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