config

package
v1.0.0-alpha0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2018 License: Apache-2.0 Imports: 5 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Version             bool     `short:"V" long:"version" description:"Display version."`
	Loglevel            string   `` /* 143-byte string literal not displayed */
	VolumesBlacklist    []string `short:"b" long:"blacklist" description:"Volumes to blacklist in backups." env:"BIVAC_VOLUMES_BLACKLIST" env-delim:","`
	Manpage             bool     `short:"m" long:"manpage" description:"Output manpage."`
	NoVerify            bool     `long:"no-verify" description:"Do not verify backup." env:"BIVAC_NO_VERIFY"`
	JSON                bool     `short:"j" long:"json" description:"Log as JSON (to stderr)." env:"BIVAC_JSON_OUTPUT"`
	Engine              string   `short:"E" long:"engine" description:"Backup engine to use." env:"BIVAC_ENGINE" default:"restic"`
	Orchestrator        string   `short:"o" long:"orchestrator" description:"Container orchestrator to use." env:"BIVAC_ORCHESTRATOR" default:"docker"`
	TargetURL           string   `short:"u" long:"target-url" description:"The target URL to push to." env:"BIVAC_TARGET_URL"`
	HostnameFromRancher bool     `` /* 127-byte string literal not displayed */
	CheckEvery          string   `long:"check-every" description:"Time between backup checks." env:"BIVAC_CHECK_EVERY" default:"24h"`
	RemoveOlderThan     string   `` /* 132-byte string literal not displayed */
	LabelPrefix         string   `long:"label-prefix" description:"The volume prefix label." env:"BIVAC_LABEL_PREFIX"`

	Restic struct {
		Image    string `long:"restic-image" description:"The restic docker image." env:"RESTIC_DOCKER_IMAGE" default:"restic/restic:latest"`
		Password string `long:"restic-password" description:"The restic backup password." env:"RESTIC_PASSWORD"`
	} `group:"Restic Options"`

	RClone struct {
		Image string `long:"rclone-image" description:"The rclone docker image." env:"RCLONE_DOCKER_IMAGE" default:"camptocamp/rclone:1.33-1"`
	} `group:"RClone Options"`

	Duplicity struct {
		Image           string `` /* 131-byte string literal not displayed */
		FullIfOlderThan string `` /* 148-byte string literal not displayed */
	} `group:"Duplicity Options"`

	Metrics struct {
		PushgatewayURL string `short:"g" long:"gateway-url" description:"The prometheus push gateway URL to use." env:"PUSHGATEWAY_URL"`
	} `group:"Metrics Options"`

	AWS struct {
		AccessKeyID     string `long:"aws-access-key-id" description:"The AWS access key ID." env:"AWS_ACCESS_KEY_ID"`
		SecretAccessKey string `long:"aws-secret-key-id" description:"The AWS secret access key." env:"AWS_SECRET_ACCESS_KEY"`
	} `group:"AWS Options"`

	Swift struct {
		Username   string `long:"swift-username" description:"The Swift user name." env:"SWIFT_USERNAME"`
		Password   string `long:"swift-password" description:"The Swift password." env:"SWIFT_PASSWORD"`
		AuthURL    string `long:"swift-auth_url" description:"The Swift auth URL." env:"SWIFT_AUTHURL"`
		TenantName string `long:"swift-tenant-name" description:"The Swift tenant name." env:"SWIFT_TENANTNAME"`
		RegionName string `long:"swift-region-name" description:"The Swift region name." env:"SWIFT_REGIONNAME"`
	} `group:"Swift Options"`

	Docker struct {
		Endpoint string `` /* 127-byte string literal not displayed */
	} `group:"Docker Options"`

	Kubernetes struct {
		Namespace  string `long:"k8s-namespace" description:"Namespace where you want to run Bivac." env:"K8S_NAMESPACE"`
		KubeConfig string `long:"k8s-kubeconfig" description:"Path to your kubeconfig file." env:"K8S_KUBECONFIG"`
	} `group:"Kubernetes Options"`
}

Config stores the handler's configuration and UI interface parameters

func LoadConfig

func LoadConfig(version string) *Config

LoadConfig loads the config from flags & environment

Jump to

Keyboard shortcuts

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