config

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_COMPRESSION_FORMAT = "zip"
	DEFAULT_COMPRESSION_PREFIX = ""
	DEFAULT_ZIP_PASSWORD       = ""
)
View Source
const (
	TYPE_FILE = "file"
	TYPE_DIR  = "dir"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CompressionConfig added in v0.0.2

type CompressionConfig struct {
	Prefix   string `yaml:"prefix"` // prefix of the compression file name.
	Format   string `yaml:"format"` // format of the compression file.
	Password string `yaml:"password"`
}

type Config

type Config struct {
	Type              string             `yaml:"type"` //type of target object
	Path              string             `yaml:"path"` //path to backup target dir
	CompressionConfig *CompressionConfig `yaml:"compression"`
	StorageConfigs    []StorageConfig    `yaml:"storages"`
}

type Configs added in v0.0.3

type Configs []*Config

func GenerateSimpleConfigs added in v0.5.1

func GenerateSimpleConfigs(targetDir string, backupDir string) *Configs

func Load added in v0.3.0

func Load(path string) (*Configs, error)

type S3Config added in v0.0.4

type S3Config struct {
	AccessKeyID     string `yaml:"access_key_id"`
	SecretAccessKey string `yaml:"secret_access_key"`
	Region          string `yaml:"region"`
	BucketName      string `yaml:"bucket_name"`
}

type StorageConfig added in v0.2.0

type StorageConfig struct {
	Type       string    `yaml:"type"`       //type of storage
	Path       string    `yaml:"path"`       //path of storage
	LifeCyrcle int64     `yaml:"life_cycle"` //generation management
	S3Config   *S3Config `yaml:"s3"`
}

Jump to

Keyboard shortcuts

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