repository

package
v0.0.0-...-5343c35 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package repository implements a deployment repository using a map. It can be easily replaced by a deployment repository that uses some form of persistent storage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	// Deployments.
	ListDeployments() ([]common.Deployment, error)
	GetDeployment(name string) (*common.Deployment, error)
	GetValidDeployment(name string) (*common.Deployment, error)
	CreateDeployment(name string) (*common.Deployment, error)
	DeleteDeployment(name string, forget bool) (*common.Deployment, error)
	SetDeploymentState(name string, state *common.DeploymentState) error

	// Manifests.
	AddManifest(deploymentName string, manifest *common.Manifest) error
	SetManifest(deploymentName string, manifest *common.Manifest) error
	ListManifests(deploymentName string) (map[string]*common.Manifest, error)
	GetManifest(deploymentName string, manifestName string) (*common.Manifest, error)
	GetLatestManifest(deploymentName string) (*common.Manifest, error)

	// Types.
	ListTypes() []string
	GetTypeInstances(typeName string) []*common.TypeInstance
	ClearTypeInstances(deploymentName string)
	SetTypeInstances(deploymentName string, instances map[string][]*common.TypeInstance)
}

Repository manages storage for all Deployment Manager entities, as well as the common operations to store, access and manage them.

func NewMapBasedRepository

func NewMapBasedRepository() Repository

NewMapBasedRepository returns a new map based repository.

Jump to

Keyboard shortcuts

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