modelgeneration

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generation

type Generation interface {
	AssignAllUnits(string) error
	AssignUnit(string) error
	MakeCurrent() error
	AutoComplete() (bool, error)
	Refresh() error
}

Generation defines the methods used by a generation.

type GenerationModel

type GenerationModel interface {
	AddGeneration() error
	NextGeneration() (Generation, error)
	HasNextGeneration() (bool, error)
}

type ModelGeneration

type ModelGeneration interface {
	AddGeneration() (params.ErrorResult, error)
	AdvanceGeneration(args params.Entities) (params.ErrorResults, error)
	SwitchGeneration(arg params.GenerationVersionArg) (params.ErrorResult, error)
}

ModelGeneration defines the methods exported by the model generation API facade.

type ModelGenerationAPI

type ModelGenerationAPI struct {
	// contains filtered or unexported fields
}

ModelGenerationAPI implements the ModelGeneration interface and is the concrete implementation of the API endpoint.

func NewModelGenerationAPI

func NewModelGenerationAPI(
	st ModelGenerationState,
	authorizer facade.Authorizer,
	m GenerationModel,
) (*ModelGenerationAPI, error)

NewModelGenerationAPI creates a new API endpoint for dealing with model generations.

func NewModelGenerationFacade

func NewModelGenerationFacade(ctx facade.Context) (*ModelGenerationAPI, error)

NewModelGenerationFacade provides the signature required for facade registration.

func (*ModelGenerationAPI) AddGeneration

func (m *ModelGenerationAPI) AddGeneration(arg params.Entity) (params.ErrorResult, error)

AddGeneration adds a 'next' generation to the given model.

func (*ModelGenerationAPI) AdvanceGeneration

AdvanceGeneration, adds the provided unit(s) and/or application(s) to the "next" generation. If the generation can auto complete, it is made the "current" generation.

func (*ModelGenerationAPI) CancelGeneration

func (m *ModelGenerationAPI) CancelGeneration(arg params.Entity) (params.ErrorResult, error)

CancelGeneration cancels the 'next' generation if cancel criteria are met.

func (*ModelGenerationAPI) HasNextGeneration

func (m *ModelGenerationAPI) HasNextGeneration(arg params.Entity) (params.BoolResult, error)

HasNextGeneration returns a true result if the input model has a "next" generation that has not yet been completed.

type ModelGenerationState

type ModelGenerationState interface {
	ControllerTag() names.ControllerTag
	Model() (GenerationModel, error)
}

ModelGenerationState represents the state of an model required by the ModelGeneration.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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