config

package
v0.0.0-...-01ee8fb Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package config defines functions and types related to configuration of comeback backup jobs. It is an implementation detail and should not be used directly.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(c *Config) error

Return an error if the supplied config data is invalid in some way.

Types

type Config

type Config struct {
	// A set of named jobs. The names must be valid UTF-8.
	Jobs map[string]Job

	// Path to the key file to be used for signing requests to GCS.
	KeyFile string

	// The name of the GCS bucket to use for storing blobs and registry
	// information.
	BucketName string

	// A file on the local machine where state can be saved between runs.
	StateFile string
}

func Parse

func Parse(data []byte) (*Config, error)

Parse the supplied JSON configuration data.

type Job

type Job struct {
	// The path on the file system that should be backed up.
	BasePath string

	// A set of regexps to be matched against relative paths within the base
	// path, excluding the base path itself. If a relative path matches any of
	// these, it will be excluded from the backup. If the path represents a
	// directory, its contents will also be excluded.
	Excludes []*regexp.Regexp
}

Jump to

Keyboard shortcuts

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