Documentation ¶
Overview ¶
Package bundle defines an API endpoint for functions dealing with bundles.
Index ¶
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 APIv8 ¶
type APIv8 struct {
*BundleAPI
}
APIv8 provides the Bundle API facade for version 8. It drops IncludeSeries from ExportBundle params, and drops series entirely from ExportBundle output
type Backend ¶
type Backend interface { ExportPartial(cfg state.ExportConfig, store objectstore.ObjectStore) (description.Model, error) GetExportConfig() state.ExportConfig Charm(url string) (charm.Charm, error) }
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, store objectstore.ObjectStore, auth facade.Authorizer, tag names.ModelTag, networkService NetworkService, logger corelogger.Logger, ) (*BundleAPI, error)
NewBundleAPI returns the new Bundle API facade.
func (*BundleAPI) ExportBundle ¶
func (b *BundleAPI) ExportBundle(ctx context.Context, arg params.ExportBundleParams) (params.StringResult, error)
ExportBundle exports the current model configuration as bundle.
func (*BundleAPI) GetChangesMapArgs ¶
func (b *BundleAPI) GetChangesMapArgs(ctx context.Context, 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 NetworkService ¶
type NetworkService interface { // GetAllSpaces returns all spaces for the model. GetAllSpaces(ctx context.Context) (network.SpaceInfos, error) }
NetworkService is the interface that is used to interact with the network spaces/subnets.