core

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EPassPhrase string = os.Getenv("VAULT_DUMP_PASSPHRASE")
	EVaultAddr  string = os.Getenv("VAULT_ADDR")
	EVaultToken string = os.Getenv("VAULT_TOKEN")

	Debug         bool
	IgnoreAddress bool
	InFile        string
	IsRestore     bool = false
	KeyFile       []string
	KeyRing       crypto.KeyRing
	KeyPass       string
	LogFmt        bool
	Logger        hclog.Logger
	OutFile       string
	RecreateMount bool
	VaultAddr     string
	VaultToken    string
)

Functions

func Authenticate

func Authenticate() (*vault.Client, error)

func CreateLogger added in v0.2.1

func CreateLogger(name string, debug bool, json bool) hclog.Logger

func LoadKey

func LoadKey() crypto.KeyRing

func MarshalUnmarshal

func MarshalUnmarshal(data interface{}, structure interface{}) error

Types

type MountDump

type MountDump struct {
	Mount       string                  `json:"mount"`
	Type        string                  `json:"type"`
	Version     int                     `json:"version"`
	Description string                  `json:"description"`
	Options     map[string]string       `json:"options"`
	Config      vault.MountConfigOutput `json:"config"`
	Paths       []PathDump              `json:"paths"`
}

type PathDump

type PathDump struct {
	Path    string        `json:"path"`
	Secrets []interface{} `json:"secrets"`
}

type VaultDump

type VaultDump struct {
	Timestamp int64       `json:"timestamp"`
	Address   string      `json:"address"`
	Mounts    []MountDump `json:"mounts"`
}

Jump to

Keyboard shortcuts

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