Documentation ¶
Overview ¶
Package bundle defines an API endpoint for functions dealing with bundles.
Index ¶
- type APIv1
- type APIv2
- type APIv3
- type APIv4
- type APIv5
- 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 ¶
This section is empty.
Types ¶
type APIv1 ¶
type APIv1 struct {
*APIv2
}
APIv1 provides the Bundle API facade for version 1.
func NewBundleAPIv1 ¶
func NewBundleAPIv1( st Backend, auth facade.Authorizer, tag names.ModelTag, ) (*APIv1, error)
NewBundleAPIv1 returns the new Bundle APIv1 facade. Deprecated:this only exists to support the deprecated client.GetBundleChanges() API.
func NewFacadeV1 ¶
NewFacadeV1 provides the signature required for facade registration version 1.
func (*APIv1) ExportBundle ¶
func (u *APIv1) ExportBundle() (_, _ struct{})
ExportBundle is not in V1 API. Mask the new method from V1 API.
func (*APIv1) GetChanges ¶
func (b *APIv1) 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. V1 GetChanges did not support device.
type APIv3 ¶
type APIv3 struct {
*APIv4
}
APIv3 provides the Bundle API facade for version 3. It is otherwise identical to V2 with the exception that the V3 ExportBundle implementation also exposes the the current trust status for each application.
func NewFacadeV3 ¶
NewFacadeV3 provides the signature required for facade registration for version 3.
func (*APIv3) GetChangesMapArgs ¶
func (u *APIv3) GetChangesMapArgs() (_, _ struct{})
GetChangesMapArgs is not in V3 API or less. Mask the new method from V3 API or less.
type APIv4 ¶
type APIv4 struct {
*APIv5
}
APIv4 provides the Bundle API facade for version 4. It is otherwise identical to V3 with the exception that the V4 now has GetChangesAsMap, which returns the same data as GetChanges, but with better args data.
func NewFacadeV4 ¶
NewFacadeV4 provides the signature required for facade registration for version 4.
func (*APIv4) ExportBundle ¶
func (b *APIv4) ExportBundle() (params.StringResult, error)
ExportBundle v4 did not have any parameters.
type APIv5 ¶
type APIv5 struct {
*APIv6
}
APIv5 provides the Bundle API facade for version 5. It is otherwise identical to V4 with the exception that the V5 adds an arg to export bundle to control what is exported..
func NewFacadeV5 ¶
NewFacadeV5 provides the signature required for facade registration for version 5.
func (*APIv5) GetChanges ¶
func (b *APIv5) 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 (*APIv5) GetChangesMapArgs ¶
func (b *APIv5) 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
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 *charm.URL) (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