Documentation ¶
Overview ¶
Package repository defines a deployment repository.
Index ¶
- func TestRepositoryCreateDeploymentWorks(t *testing.T, r Repository)
- func TestRepositoryDeleteDeploymentWorksForget(t *testing.T, r Repository)
- func TestRepositoryDeleteDeploymentWorksNoForget(t *testing.T, r Repository)
- func TestRepositoryDeleteFailsWithNonExistentDeployment(t *testing.T, r Repository)
- func TestRepositoryDeleteWorksWithNoLatestManifest(t *testing.T, r Repository)
- func TestRepositoryGetFailsWithNonExistentDeployment(t *testing.T, r Repository)
- func TestRepositoryListEmpty(t *testing.T, r Repository)
- func TestRepositoryMultipleManifestsWorks(t *testing.T, r Repository)
- func TestRepositoryTypeInstances(t *testing.T, r Repository)
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestRepositoryCreateDeploymentWorks ¶
func TestRepositoryCreateDeploymentWorks(t *testing.T, r Repository)
TestRepositoryCreateDeploymentWorks checks that creating a deployment works.
func TestRepositoryDeleteDeploymentWorksForget ¶
func TestRepositoryDeleteDeploymentWorksForget(t *testing.T, r Repository)
TestRepositoryDeleteDeploymentWorksForget checks that deleting and forgetting a deployment works.
func TestRepositoryDeleteDeploymentWorksNoForget ¶
func TestRepositoryDeleteDeploymentWorksNoForget(t *testing.T, r Repository)
TestRepositoryDeleteDeploymentWorksNoForget checks that deleting a deployment without forgetting it works.
func TestRepositoryDeleteFailsWithNonExistentDeployment ¶
func TestRepositoryDeleteFailsWithNonExistentDeployment(t *testing.T, r Repository)
TestRepositoryDeleteFailsWithNonExistentDeployment checks that deleting a non-existent deployment fails.
func TestRepositoryDeleteWorksWithNoLatestManifest ¶
func TestRepositoryDeleteWorksWithNoLatestManifest(t *testing.T, r Repository)
TestRepositoryDeleteWorksWithNoLatestManifest checks that deleting a deployment with no latest manifest works.
func TestRepositoryGetFailsWithNonExistentDeployment ¶
func TestRepositoryGetFailsWithNonExistentDeployment(t *testing.T, r Repository)
TestRepositoryGetFailsWithNonExistentDeployment checks that getting a non-existent deployment fails.
func TestRepositoryListEmpty ¶
func TestRepositoryListEmpty(t *testing.T, r Repository)
TestRepositoryListEmpty checks that listing an empty repository works.
func TestRepositoryMultipleManifestsWorks ¶
func TestRepositoryMultipleManifestsWorks(t *testing.T, r Repository)
TestRepositoryMultipleManifestsWorks checks that creating a deploymente with multiple manifests works.
func TestRepositoryTypeInstances ¶
func TestRepositoryTypeInstances(t *testing.T, r Repository)
TestRepositoryTypeInstances checks that type instances can be listed and retrieved successfully.
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(manifest *common.Manifest) error SetManifest(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, error) GetTypeInstances(typeName string) ([]*common.TypeInstance, error) ClearTypeInstancesForDeployment(deploymentName string) error AddTypeInstances(instances map[string][]*common.TypeInstance) error Close() }
Repository manages storage for all Deployment Manager entities, as well as the common operations to store, access and manage them.
Directories ¶
Path | Synopsis |
---|---|
Package persistent implements a persistent deployment repository.
|
Package persistent implements a persistent deployment repository. |
Package transient implements a transient deployment repository.
|
Package transient implements a transient deployment repository. |