Documentation ¶
Overview ¶
Package bundle defines an API endpoint for functions dealing with bundles.
Index ¶
- func Register(registry facade.FacadeRegistry)
- type APIv6
- type Backend
- type BundleAPI
- func (b *BundleAPI) ExportBundle(arg params.ExportBundleParams) (params.StringResult, error)
- func (b *BundleAPI) GetChanges(args params.BundleChangesParams) (params.BundleChangesResults, error)
- func (b *BundleAPI) GetChangesMapArgs(args params.BundleChangesParams) (params.BundleChangesMapArgsResults, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(registry facade.FacadeRegistry)
Register is called to expose a package of facades onto a given registry.
Types ¶
type APIv6 ¶
type APIv6 struct {
*BundleAPI
}
APIv6 provides the Bundle API facade for version 6. It is otherwise identical to V5 with the exception that the V6 adds the support for multi-part yaml handling to GetChanges and GetChangesMapArgs.
type Backend ¶
type Backend interface { ExportPartial(cfg state.ExportConfig) (description.Model, error) GetExportConfig() state.ExportConfig Charm(url string) (charm.Charm, error) state.EndpointBinding }
func NewStateShim ¶
NewStateShim creates new state shim to be used by bundle Facade.
type BundleAPI ¶
type BundleAPI struct {
// contains filtered or unexported fields
}
BundleAPI implements the Bundle interface and is the concrete implementation of the API end point.
func NewBundleAPI ¶
func NewBundleAPI( st Backend, auth facade.Authorizer, tag names.ModelTag, ) (*BundleAPI, error)
NewBundleAPI returns the new Bundle API facade.
func (*BundleAPI) ExportBundle ¶
func (b *BundleAPI) ExportBundle(arg params.ExportBundleParams) (params.StringResult, error)
ExportBundle exports the current model configuration as bundle.
func (*BundleAPI) GetChanges ¶
func (b *BundleAPI) GetChanges(args params.BundleChangesParams) (params.BundleChangesResults, error)
GetChanges returns the list of changes required to deploy the given bundle data. The changes are sorted by requirements, so that they can be applied in order. GetChanges has been superseded in favour of GetChangesMapArgs. It's preferable to use that new method to add new functionality and move clients away from this one.
func (*BundleAPI) GetChangesMapArgs ¶
func (b *BundleAPI) GetChangesMapArgs(args params.BundleChangesParams) (params.BundleChangesMapArgsResults, error)
GetChangesMapArgs returns the list of changes required to deploy the given bundle data. The changes are sorted by requirements, so that they can be applied in order. V4 GetChangesMapArgs is not supported on anything less than v4