bundle

package
v0.0.0-...-a753888 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: AGPL-3.0 Imports: 31 Imported by: 2

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 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

func NewStateShim(st *state.State) Backend

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

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL