util

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VaultAddress = "http://127.0.0.1:8200"
	VaultToken   = "abcdefghijklmnopqrstuvwxyz09"
)

global test helpers

Variables

View Source
var (
	VaultClient = basicVaultClient()
)

Functions

func SnapshotFileClose

func SnapshotFileClose(snapshotFile *os.File) error

close snapshot file

func SnapshotFileRemove

func SnapshotFileRemove(snapshotFile *os.File) error

remove snapshot file

Types

type AWSConfig

type AWSConfig struct {
	S3Bucket string `hcl:"s3_bucket"`
	S3Prefix string `hcl:"s3_prefix,optional"`
}

type BackupConfig

type BackupConfig struct {
	AWSConfig       *AWSConfig   `hcl:"aws_config,block"`
	VaultConfig     *VaultConfig `hcl:"vault_config,block"`
	SnapshotCleanup bool         `hcl:"snapshot_cleanup,optional"`
}

while this is public to decode, the individual structs initialized from this are safely private

func NewBackupConfig

func NewBackupConfig(filePath string) (*BackupConfig, error)

config constructor

type VaultConfig

type VaultConfig struct {
	Address      string `hcl:"address,optional"`
	Insecure     bool   `hcl:"insecure,optional"`
	Engine       string `hcl:"auth_engine,optional"`
	Token        string `hcl:"token,optional"`
	AWSMountPath string `hcl:"aws_mount_path,optional"`
	AWSRole      string `hcl:"aws_role,optional"`
	SnapshotPath string `hcl:"snapshot_path,optional"`
}

Jump to

Keyboard shortcuts

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