common

package
v0.0.0-...-5fb7127 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2016 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadSignature = errors.New("Signature validation failed.  " +
	"Please check your backup file and associated signature.")

ErrBadSignature indicates failed signature validation

View Source
var ErrBadTransform = errors.New("Path transformation list not even. " +
	"Transformations must be specified as pairs.")

ErrBadTransform indicates an uneven transformation list

Functions

func ReadFile

func ReadFile(fname, key string) ([]byte, error)

ReadFile reads an encrypted/compressed file and validates checksums

func WriteFile

func WriteFile(fname, key string, data []byte) error

WriteFile writes an encrypted/compressed file and signature

Types

type ConsulClient

type ConsulClient struct {
	*api.Client
}

ConsulClient contains a consul client implementation

type ConsulConfig

type ConsulConfig struct {
	api.Config
}

ConsulConfig contains consul client configuration

func (*ConsulConfig) NewClient

func (cc *ConsulConfig) NewClient() (*ConsulClient, error)

NewClient returns an initialized consul client

type PathTransformer

type PathTransformer struct {
	// contains filtered or unexported fields
}

PathTransformer is an instance of the path transformer

func NewTransformer

func NewTransformer(str string) (*PathTransformer, error)

NewTransformer returns a new path transformer

func (*PathTransformer) Transform

func (t *PathTransformer) Transform(kvps api.KVPairs)

Transform performs path transformation as requested

Jump to

Keyboard shortcuts

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