v2v3action

package
v6.49.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2020 License: Apache-2.0 Imports: 8 Imported by: 126

Documentation

Overview

Package v2v3action contains business logic that involves both v2action and v3action

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actor

type Actor struct {
	V2Actor V2Actor
	V3Actor V3Actor
}

Actor handles all business logic for Cloud Controller v2 and v3 operations.

func NewActor

func NewActor(v2Actor V2Actor, v3Actor V3Actor) *Actor

NewActor returns a new actor.

func (Actor) CloudControllerV3APIVersion

func (actor Actor) CloudControllerV3APIVersion() string

CloudControllerV3APIVersion returns back the V3 Cloud Controller API version.

func (*Actor) CreateApplicationManifestByNameAndSpace

func (actor *Actor) CreateApplicationManifestByNameAndSpace(appName string, appSpace string) (manifest.Application, Warnings, error)

func (Actor) GetApplicationSummaryByNameAndSpace

func (actor Actor) GetApplicationSummaryByNameAndSpace(appName string, spaceGUID string, withObfuscatedValues bool) (ApplicationSummary, Warnings, error)

func (Actor) ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganization

func (actor Actor) ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganization(shareToSpaceName string, serviceInstanceName string, sourceSpaceGUID string, shareToOrgGUID string) (Warnings, error)

func (Actor) ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationName

func (actor Actor) ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationName(shareToSpaceName string, serviceInstanceName string, sourceSpaceGUID string, shareToOrgName string) (Warnings, error)

func (Actor) UnshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpace

func (actor Actor) UnshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpace(sharedToOrgName string, sharedToSpaceName string, serviceInstanceName string, currentlyTargetedSpaceGUID string) (Warnings, error)

func (Actor) WriteApplicationManifest

func (Actor) WriteApplicationManifest(manifestApp manifest.Application, manifestPath string) error

type ApplicationSummary

type ApplicationSummary struct {
	v3action.ApplicationSummary
	Routes                       v2action.Routes
	ApplicationInstanceWithStats []v2action.ApplicationInstanceWithStats
}

func (ApplicationSummary) GetIsolationSegmentName

func (summary ApplicationSummary) GetIsolationSegmentName() (string, bool)

type ManifestV2Actor

type ManifestV2Actor interface {
	CreateApplicationManifestByNameAndSpace(string, string) (manifest.Application, v2action.Warnings, error)
}

type ManifestV3Actor

type ManifestV3Actor interface {
	GetApplicationByNameAndSpace(string, string) (v3action.Application, v3action.Warnings, error)
}

type V2Actor

type V2Actor interface {
	ManifestV2Actor
	GetApplicationInstancesWithStatsByApplication(guid string) ([]v2action.ApplicationInstanceWithStats, v2action.Warnings, error)
	GetApplicationRoutes(appGUID string) (v2action.Routes, v2action.Warnings, error)
	GetFeatureFlags() ([]v2action.FeatureFlag, v2action.Warnings, error)
	GetService(serviceGUID string) (v2action.Service, v2action.Warnings, error)
	GetServiceInstanceByNameAndSpace(serviceInstanceName string, spaceGUID string) (v2action.ServiceInstance, v2action.Warnings, error)
	GetServiceInstanceSharedTosByServiceInstance(serviceInstanceGUID string) ([]v2action.ServiceInstanceSharedTo, v2action.Warnings, error)
	GetSpaceByOrganizationAndName(orgGUID string, spaceName string) (v2action.Space, v2action.Warnings, error)
}

type V3Actor

type V3Actor interface {
	ManifestV3Actor
	GetApplicationSummaryByNameAndSpace(appName string, spaceGUID string, withObfuscatedValues bool) (v3action.ApplicationSummary, v3action.Warnings, error)
	GetOrganizationByName(orgName string) (v3action.Organization, v3action.Warnings, error)
	ShareServiceInstanceToSpaces(serviceInstanceGUID string, spaceGUIDs []string) (v3action.RelationshipList, v3action.Warnings, error)
	UnshareServiceInstanceByServiceInstanceAndSpace(serviceInstanceGUID string, spaceGUID string) (v3action.Warnings, error)

	CloudControllerAPIVersion() string
}

type Warnings

type Warnings []string

Warnings is a list of warnings returned back from the cloud controller

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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