juju: github.com/juju/juju/apiserver/facades/client/backups Index | Files

package backups

import "github.com/juju/juju/apiserver/facades/client/backups"

Index

Package Files

backups.go create.go info.go list.go mongoinfo.go remove.go restore.go shim.go

func CreateResult Uses

func CreateResult(meta *backups.Metadata, filename string) params.BackupsMetadataResult

CreateResult updates the result with the information in the metadata value.

func MetadataFromResult Uses

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().

type API Uses

type API struct {
    // contains filtered or unexported fields
}

API provides backup-specific API methods.

func NewAPI Uses

func NewAPI(backend Backend, resources facade.Resources, authorizer facade.Authorizer) (*API, error)

NewAPI creates a new instance of the Backups API facade.

func NewFacade Uses

func NewFacade(st *state.State, resources facade.Resources, authorizer facade.Authorizer) (*API, error)

NewFacade provides the required signature for facade registration.

func (*API) Create Uses

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. It returns the metadata for that backup.

NOTE(hml) this provides backwards compatibility for facade version 1.

func (*API) FinishRestore Uses

func (a *API) FinishRestore() error

FinishRestore implements the server side of Backups.FinishRestore.

func (*API) Info Uses

func (a *API) Info(args params.BackupsInfoArgs) (params.BackupsMetadataResult, error)

Info provides the implementation of the API method.

func (*API) List Uses

func (a *API) List(args params.BackupsListArgs) (params.BackupsListResult, error)

List provides the implementation of the API method.

func (*API) PrepareRestore Uses

func (a *API) PrepareRestore() error

PrepareRestore implements the server side of Backups.PrepareRestore.

func (*API) Restore Uses

func (a *API) Restore(p params.RestoreArgs) error

Restore implements the server side of Backups.Restore.

type APIv2 Uses

type APIv2 struct {
    *API
}

APIv2 serves backup-specific API methods for version 2.

func NewAPIv2 Uses

func NewAPIv2(backend Backend, resources facade.Resources, authorizer facade.Authorizer) (*APIv2, error)

func NewFacadeV2 Uses

func NewFacadeV2(st *state.State, resources facade.Resources, authorizer facade.Authorizer) (*APIv2, error)

NewFacadeV2 provides the required signature for version 2 facade registration.

func (*APIv2) Create Uses

func (a *APIv2) Create(args params.BackupsCreateArgs) (params.BackupsMetadataResult, error)

func (*APIv2) Remove Uses

func (a *APIv2) Remove(args params.BackupsRemoveArgs) (params.ErrorResults, error)

Remove deletes the backups defined by ID from the database.

type Backend Uses

type Backend interface {
    IsController() bool
    Machine(id string) (*state.Machine, error)
    MachineSeries(id string) (string, error)
    MongoSession() *mgo.Session
    MongoVersion() (string, error)
    ModelTag() names.ModelTag
    ModelType() state.ModelType
    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.

Package backups imports 20 packages (graph) and is imported by 6 packages. Updated 2019-08-23. Refresh now. Tools for package owners.