Documentation ¶
Index ¶
- func MetadataFromResult(result params.BackupsMetadataResult) *backups.Metadata
- func ResultFromMetadata(meta *backups.Metadata) params.BackupsMetadataResult
- type API
- func (a *API) Create(args params.BackupsCreateArgs) (p params.BackupsMetadataResult, err error)
- func (a *API) FinishRestore() error
- func (a *API) Info(args params.BackupsInfoArgs) (params.BackupsMetadataResult, error)
- func (a *API) List(args params.BackupsListArgs) (params.BackupsListResult, error)
- func (a *API) PrepareRestore() error
- func (a *API) Remove(args params.BackupsRemoveArgs) error
- func (a *API) Restore(p params.RestoreArgs) error
- type Backend
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MetadataFromResult ¶
func MetadataFromResult(result params.BackupsMetadataResult) *backups.Metadata
MetadataFromResult returns a new Metadata based on the result. The ID of the metadata is not set. Call meta.SetID() if that is desired. Likewise with Stored and meta.SetStored().
func ResultFromMetadata ¶
func ResultFromMetadata(meta *backups.Metadata) params.BackupsMetadataResult
ResultFromMetadata updates the result with the information in the metadata value.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API serves backup-specific API methods.
func NewAPI ¶
func NewAPI(backend Backend, resources facade.Resources, authorizer facade.Authorizer) (*API, error)
NewAPI creates a new instance of the Backups API facade.
func (*API) Create ¶
func (a *API) Create(args params.BackupsCreateArgs) (p params.BackupsMetadataResult, err error)
Create is the API method that requests juju to create a new backup of its state. It returns the metadata for that backup.
func (*API) FinishRestore ¶
FinishRestore implements the server side of Backups.FinishRestore.
func (*API) Info ¶
func (a *API) Info(args params.BackupsInfoArgs) (params.BackupsMetadataResult, error)
Info provides the implementation of the API method.
func (*API) List ¶
func (a *API) List(args params.BackupsListArgs) (params.BackupsListResult, error)
List provides the implementation of the API method.
func (*API) PrepareRestore ¶
PrepareRestore implements the server side of Backups.PrepareRestore.
type Backend ¶
type Backend interface { IsController() bool Machine(id string) (*state.Machine, error) MachineSeries(id string) (string, error) MongoConnectionInfo() *mongo.MongoInfo MongoSession() *mgo.Session MongoVersion() (string, error) ModelTag() names.ModelTag ControllerTag() names.ControllerTag ModelConfig() (*config.Config, error) ControllerConfig() (controller.Config, error) StateServingInfo() (state.StateServingInfo, error) RestoreInfo() *state.RestoreInfo }
Backend exposes state.State functionality needed by the backups Facade.