bundle

package
v0.0.0-...-8ff1004 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2019 License: AGPL-3.0 Imports: 20 Imported by: 0

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

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.

func NewFacadeV1

func NewFacadeV1(ctx facade.Context) (*APIv1, error)

NewFacadeV1 provides the signature required for facade registration version 1.

func (*APIv1) ExportBundle

func (u *APIv1) ExportBundle() (_, _ struct{})

Mask the new method from V1 API. ExportBundle is not in V1 API.

func (*APIv1) 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. V1 GetChanges did not support device.

type APIv2

type APIv2 struct {
	*BundleAPI
}

APIv2 provides the Bundle API facade for version 2.

func NewFacadeV2

func NewFacadeV2(ctx facade.Context) (*APIv2, error)

NewFacadeV2 provides the signature required for facade registration for version 2.

type Backend

type Backend interface {
	ExportPartial(cfg state.ExportConfig) (description.Model, error)
	GetExportConfig() state.ExportConfig
}

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

Jump to

Keyboard shortcuts

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