Documentation ¶
Index ¶
- func CreateResult(meta *backups.Metadata, filename string) params.BackupsMetadataResult
- func MetadataFromResult(result params.BackupsMetadataResult) *backups.Metadata
- type API
- func (a *API) Create(args params.BackupsCreateArgs) (params.BackupsMetadataResult, error)
- func (a *API) Info(args params.BackupsInfoArgs) (params.BackupsMetadataResult, error)
- func (a *API) List(args params.BackupsListArgs) (params.BackupsListResult, error)
- func (a *API) Remove(args params.BackupsRemoveArgs) (params.ErrorResults, error)
- type Backend
- type Machine
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateResult ¶
func CreateResult(meta *backups.Metadata, filename string) params.BackupsMetadataResult
CreateResult updates the result with the information in the metadata value.
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().
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API provides 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 NewFacadeV3 ¶
func NewFacadeV3(st *state.State, resources facade.Resources, authorizer facade.Authorizer) (*API, error)
NewFacadeV3 provides the required signature for facade registration.
func (*API) Create ¶
func (a *API) Create(args params.BackupsCreateArgs) (params.BackupsMetadataResult, error)
Create is the API method that requests juju to create a new backup of its state.
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) Remove ¶
func (a *API) Remove(args params.BackupsRemoveArgs) (params.ErrorResults, error)
Remove deletes the backups defined by ID from the database.
type Backend ¶
type Backend interface { IsController() bool Machine(id string) (Machine, error) MachineSeries(id string) (string, error) MongoSession() *mgo.Session ModelTag() names.ModelTag ModelType() state.ModelType ControllerTag() names.ControllerTag ModelConfig() (*config.Config, error) ControllerConfig() (controller.Config, error) StateServingInfo() (controller.StateServingInfo, error) ControllerNodes() ([]state.ControllerNode, error) }
Backend exposes state.State functionality needed by the backups Facade.
type Machine ¶
type Machine interface { // InstanceId has machine's cloud instance id. InstanceId() (instance.Id, error) // PrivateAddress has machine's private address. PrivateAddress() (corenetwork.SpaceAddress, error) // PublicAddress has machine's public address. PublicAddress() (corenetwork.SpaceAddress, error) // Tag has machine's tag. Tag() names.Tag // Series has machine's series. Series() string }
Machine represent machine used in backups.