backend

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BackendNameList = []string{"local", "s3", "git"}

BackendNameList is an ordered list of backend names for listing in help message

View Source
var Backends = map[string]Factory{}

Backends associates backend type names to constructor functions

Functions

This section is empty.

Types

type Backend

type Backend interface {
	Exists() (bool, error)
	Save(data []byte) error
	Load() ([]byte, error)
}

Backend implements the common backend operations

type Factory

type Factory interface {
	New(conf map[string]interface{}) (Backend, error)
	Name() string
	Description() string
	Flags() *pflag.FlagSet
}

Factory can instantiate a new Backend with New, and other static backend-related functions.

Jump to

Keyboard shortcuts

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