Documentation ¶
Index ¶
- Constants
- Variables
- func DEBUG(format string, args ...interface{})
- func Exec(cmdString string, flags int) error
- func ExecWithPipes(cmdString string, stdout *os.File, stderr *os.File, stdin *os.File) error
- func GenUUID() string
- func Run(p Plugin)
- type EndpointDataTypeMismatchError
- type EndpointMissingRequiredDataError
- type ExecFailure
- type JSONError
- type MissingRestoreKeyError
- type Plugin
- type PluginFeatures
- type PluginInfo
- type PluginOpts
- type ShieldEndpoint
- func (endpoint ShieldEndpoint) ArrayValue(key string) ([]interface{}, error)
- func (endpoint ShieldEndpoint) BooleanValue(key string) (bool, error)
- func (endpoint ShieldEndpoint) FloatValue(key string) (float64, error)
- func (endpoint ShieldEndpoint) MapValue(key string) (map[string]interface{}, error)
- func (endpoint ShieldEndpoint) StringValue(key string) (string, error)
- type UnsupportedActionError
Constants ¶
View Source
const ENDPOINT_BAD_DATA = 13
View Source
const ENDPOINT_MISSING_KEY = 12
View Source
const EXEC_FAILURE = 3
View Source
const JSON_FAILURE = 10
View Source
const NOPIPE = 0
View Source
const PLUGIN_FAILURE = 4
View Source
const RESTORE_KEY_REQUIRED = 11
View Source
const STDIN = 1
View Source
const STDOUT = 2
View Source
const SUCCESS = 0
View Source
const UNSUPPORTED_ACTION = 2
View Source
const USAGE = 1
Variables ¶
View Source
var UNIMPLEMENTED = UnsupportedActionError{}
Functions ¶
func ExecWithPipes ¶
Types ¶
type EndpointDataTypeMismatchError ¶
func (EndpointDataTypeMismatchError) Error ¶
func (e EndpointDataTypeMismatchError) Error() string
type EndpointMissingRequiredDataError ¶
type EndpointMissingRequiredDataError struct {
Key string
}
func (EndpointMissingRequiredDataError) Error ¶
func (e EndpointMissingRequiredDataError) Error() string
type ExecFailure ¶
type ExecFailure struct {
Err string
}
func (ExecFailure) Error ¶
func (e ExecFailure) Error() string
type MissingRestoreKeyError ¶
type MissingRestoreKeyError struct{}
func (MissingRestoreKeyError) Error ¶
func (e MissingRestoreKeyError) Error() string
type Plugin ¶
type Plugin interface { Backup(ShieldEndpoint) error Restore(ShieldEndpoint) error Store(ShieldEndpoint) (string, error) Retrieve(ShieldEndpoint, string) error Purge(ShieldEndpoint, string) error Meta() PluginInfo }
type PluginFeatures ¶
type PluginInfo ¶
type PluginInfo struct { Name string `json:"name"` Author string `json:"author"` Version string `json:"version"` Features PluginFeatures `json:"features"` }
type PluginOpts ¶
type PluginOpts struct { Debug bool `goptions:"-D, --debug, description='Enable debugging'"` Version bool `goptions:"-v, --version, description='Display version information'"` Action goptions.Verbs Info struct { } `goptions:"info"` Backup struct { Endpoint string `goptions:"-e, --endpoint, obligatory, description='JSON string representing backup target'"` } `goptions:"backup"` Restore struct { Endpoint string `goptions:"-e, --endpoint, obligatory, description='JSON string representing backup target'"` } `goptions:"restore"` Store struct { Endpoint string `goptions:"-e, --endpoint, obligatory, description='JSON string representing store endpoint'"` } `goptions:"store"` Retrieve struct { Endpoint string `goptions:"-e, --endpoint, obligatory, description='JSON string representing retrieve endpoint'"` Key string `goptions:"-k, --key, obligatory, description='Key of blob to retrieve from storage'"` } `goptions:"retrieve"` Purge struct { Endpoint string `goptions:"-e, --endpoint, obligatory, description='JSON string representing purge endpoint'"` Key string `goptions:"-k, --key, obligatory, description='Key of blob to purge from storage'"` } `goptions:"purge"` }
type ShieldEndpoint ¶
type ShieldEndpoint map[string]interface{}
func (ShieldEndpoint) ArrayValue ¶
func (endpoint ShieldEndpoint) ArrayValue(key string) ([]interface{}, error)
func (ShieldEndpoint) BooleanValue ¶
func (endpoint ShieldEndpoint) BooleanValue(key string) (bool, error)
func (ShieldEndpoint) FloatValue ¶
func (endpoint ShieldEndpoint) FloatValue(key string) (float64, error)
func (ShieldEndpoint) MapValue ¶
func (endpoint ShieldEndpoint) MapValue(key string) (map[string]interface{}, error)
func (ShieldEndpoint) StringValue ¶
func (endpoint ShieldEndpoint) StringValue(key string) (string, error)
type UnsupportedActionError ¶
type UnsupportedActionError struct {
Action string
}
func (UnsupportedActionError) Error ¶
func (e UnsupportedActionError) Error() string
Click to show internal directories.
Click to hide internal directories.