config

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLogging added in v0.4.5

func InitLogging(level string, logFormat string)

Types

type AzureConfig

type AzureConfig struct {
	AccountName   string `mapstructure:"account_name" json:"account_name"`
	AccountKey    string `mapstructure:"account_key" json:"account_key"`
	ContainerName string `mapstructure:"container_name" json:"container_name"`
}

AzureConfig is the configuration for Azure blob snapshots

type Configuration

type Configuration struct {
	Address         string      `mapstructure:"addr" json:"addr"`
	Retain          int64       `mapstructure:"retain" json:"retain"`
	Frequency       string      `mapstructure:"frequency" json:"frequency"`
	AWS             S3Config    `mapstructure:"aws_storage" json:"aws_storage"`
	Local           LocalConfig `mapstructure:"local_storage" json:"local_storage"`
	GCP             GCPConfig   `mapstructure:"google_storage" json:"google_storage"`
	Azure           AzureConfig `mapstructure:"azure_storage" json:"azure_storage"`
	RoleID          string      `mapstructure:"role_id" json:"role_id"`
	SecretID        string      `mapstructure:"secret_id" json:"secret_id"`
	Approle         string      `mapstructure:"approle" json:"approle"`
	K8sAuthRole     string      `mapstructure:"k8s_auth_role,omitempty" json:"k8s_auth_role,omitempty"`
	K8sAuthPath     string      `mapstructure:"k8s_auth_path,omitempty" json:"k8s_auth_path,omitempty"`
	VaultAuthMethod string      `mapstructure:"vault_auth_method,omitempty" json:"vault_auth_method,omitempty"`
	Daemon          bool        `mapstructure:"daemon" json:"daemon"`
}

Configuration is the overall config object

func ReadConfig

func ReadConfig() (*Configuration, error)

ReadConfig reads the configuration file

type GCPConfig

type GCPConfig struct {
	Bucket string `mapstructure:"bucket" json:"bucket"`
}

GCPConfig is the configuration for GCP Storage snapshots

type LocalConfig

type LocalConfig struct {
	Path string `mapstructure:"path" json:"path"`
}

LocalConfig is the configuration for local snapshots

type S3Config

type S3Config struct {
	Uploader           *s3manager.Uploader
	AccessKeyID        string `mapstructure:"access_key_id" json:"access_key_id"`
	SecretAccessKey    string `mapstructure:"secret_access_key" json:"secret_access_key"`
	Endpoint           string `mapstructure:"s3_endpoint" json:"s3_endpoint"`
	Region             string `mapstructure:"s3_region" json:"s3_region"`
	Bucket             string `mapstructure:"s3_bucket" json:"s3_bucket"`
	KeyPrefix          string `mapstructure:"s3_key_prefix" json:"s3_key_prefix"`
	SSE                bool   `mapstructure:"s3_server_side_encryption" json:"s3_server_side_encryption"`
	StaticSnapshotName string `mapstructure:"s3_static_snapshot_name" json:"s3_static_snapshot_name"`
	S3ForcePathStyle   bool   `mapstructure:"s3_force_path_style" json:"s3_force_path_style"`
}

S3Config is the configuration for S3 snapshots

Jump to

Keyboard shortcuts

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