Documentation
¶
Index ¶
- Constants
- func IsNonRemoteBackend(service, backend string) bool
- func ValidateOptions(opts Options) error
- type ApplyInput
- type ConfigChange
- type FileSystem
- type OSFileSystem
- func (OSFileSystem) Backup(path string, data []byte) error
- func (OSFileSystem) CheckRecoveryPath(path string) error
- func (OSFileSystem) ReadFile(path string) ([]byte, error)
- func (OSFileSystem) ReadRecovery(recoveryPath string) (recoveryJournal, error)
- func (OSFileSystem) RemoveRecovery(path string) error
- func (OSFileSystem) UpdateRecovery(path string, state recoveryJournal) error
- func (OSFileSystem) WriteAtomic(path string, data []byte) error
- func (OSFileSystem) WriteRecovery(path string, state recoveryJournal) error
- type Options
- type PlanInput
- type PlanOutput
- type RecoveryState
- type RemoteAction
- type Result
Constants ¶
View Source
const ( StatusPlanned = "planned" StatusNoOp = "no-op" StatusBlocked = "blocked" StatusApplied = "applied" StatusDeclined = "declined" StatusPartial = "partial" )
View Source
const ResultSchemaVersion = 1
Variables ¶
This section is empty.
Functions ¶
func IsNonRemoteBackend ¶
IsNonRemoteBackend reports whether the backend needs no OpenStack cloud, container, endpoint, or credential provisioning.
func ValidateOptions ¶
Types ¶
type ApplyInput ¶
type ApplyInput struct {
ConfigPath string
RecoveryPath string
OriginalBytes []byte
Options Options
Adapter cloudopenstack.StorageAdapter
FileSystem FileSystem
Validate func(*v2.Config) error
}
type ConfigChange ¶
type FileSystem ¶
type FileSystem interface {
ReadFile(string) ([]byte, error)
CheckRecoveryPath(string) error
Backup(string, []byte) error
WriteAtomic(string, []byte) error
WriteRecovery(string, recoveryJournal) error
UpdateRecovery(string, recoveryJournal) error
RemoveRecovery(string) error
ReadRecovery(string) (recoveryJournal, error)
}
type OSFileSystem ¶
type OSFileSystem struct{}
func (OSFileSystem) CheckRecoveryPath ¶
func (OSFileSystem) CheckRecoveryPath(path string) error
func (OSFileSystem) ReadRecovery ¶
func (OSFileSystem) ReadRecovery(recoveryPath string) (recoveryJournal, error)
func (OSFileSystem) RemoveRecovery ¶
func (OSFileSystem) RemoveRecovery(path string) error
func (OSFileSystem) UpdateRecovery ¶
func (OSFileSystem) UpdateRecovery(path string, state recoveryJournal) error
func (OSFileSystem) WriteAtomic ¶
func (OSFileSystem) WriteAtomic(path string, data []byte) error
func (OSFileSystem) WriteRecovery ¶
func (OSFileSystem) WriteRecovery(path string, state recoveryJournal) error
type Options ¶
type PlanInput ¶
type PlanInput struct {
Config *v2.Config
Options Options
Adapter cloudopenstack.StorageAdapter
}
type PlanOutput ¶
type PlanOutput struct {
Result Result
Preflight cloudopenstack.StoragePreflight
// contains filtered or unexported fields
}
type RecoveryState ¶
type RecoveryState struct {
Path string `json:"path" yaml:"path"`
CredentialType string `json:"credential_type" yaml:"credential_type"`
S3Endpoint string `json:"s3_endpoint,omitempty" yaml:"s3_endpoint,omitempty"`
Containers []string `json:"containers,omitempty" yaml:"containers,omitempty"`
Service string `json:"service" yaml:"service"`
Backend string `json:"backend" yaml:"backend"`
PersistenceState string `json:"persistence_state" yaml:"persistence_state"`
}
type RemoteAction ¶
type RemoteAction struct {
Order int `json:"order" yaml:"order"`
Action string `json:"action" yaml:"action"`
Resource string `json:"resource" yaml:"resource"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
ID string `json:"id,omitempty" yaml:"id,omitempty"`
Scope string `json:"scope,omitempty" yaml:"scope,omitempty"`
}
type Result ¶
type Result struct {
SchemaVersion int `json:"schema_version" yaml:"schema_version"`
Operation string `json:"operation" yaml:"operation"`
Status string `json:"status" yaml:"status"`
Service string `json:"service" yaml:"service"`
Backend string `json:"backend" yaml:"backend"`
Container string `json:"container" yaml:"container"`
Containers []string `json:"containers,omitempty" yaml:"containers,omitempty"`
S3Endpoint string `json:"s3_endpoint,omitempty" yaml:"s3_endpoint,omitempty"`
Changes []ConfigChange `json:"changes" yaml:"changes"`
RemoteActions []RemoteAction `json:"remote_actions" yaml:"remote_actions"`
SecretPaths []string `json:"secret_paths" yaml:"secret_paths"`
Warnings []string `json:"warnings,omitempty" yaml:"warnings,omitempty"`
Recovery *RecoveryState `json:"recovery,omitempty" yaml:"recovery,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.