swift

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2017 License: BSD-2-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyEnvironment

func ApplyEnvironment(prefix string, cfg interface{}) error

ApplyEnvironment saves values from the environment to the config.

func Open

func Open(cfg Config) (restic.Backend, error)

Open opens the swift backend at a container in region. The container is created if it does not exist yet.

func ParseConfig

func ParseConfig(s string) (interface{}, error)

ParseConfig parses the string s and extract swift's container name and prefix.

Types

type Config

type Config struct {
	UserName     string
	Domain       string
	APIKey       string
	AuthURL      string
	Region       string
	Tenant       string
	TenantID     string
	TenantDomain string
	TrustID      string

	StorageURL string
	AuthToken  string

	Container              string
	Prefix                 string
	DefaultContainerPolicy string

	Connections uint `option:"connections" help:"set a limit for the number of concurrent connections (default: 5)"`
}

Config contains basic configuration needed to specify swift location for a swift server

func NewConfig

func NewConfig() Config

NewConfig returns a new config with the default values filled in.

Jump to

Keyboard shortcuts

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