module

package
v0.0.0-...-7c77b90 Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: Apache-2.0 Imports: 28 Imported by: 4

Documentation

Index

Constants

View Source
const ControllerTypeAction string = "action"

ControllerTypeAction denotes "action" Controller Type

View Source
const ControllerTypePlacement string = "placement"

ControllerTypePlacement denotes "placement" Controller Type

View Source
const GenericPlacementIntentName = "genericPlacementIntent"

GenericPlacementIntentName denotes the generic placement intent name

View Source
const ManifestFileName = "manifest.yaml"

ManifestFileName is the name given to the manifest file in the profile package

View Source
const SEPARATOR = "+"

SEPARATOR used while creating clusternames to store in etcd

Variables

This section is empty.

Functions

func GetSortedTemplateForApp

func GetSortedTemplateForApp(appName, p, ca, v, rName, cp, namespace string, overrideValues []OverrideValues) ([]helm.KubernetesResourceTemplate, error)

GetSortedTemplateForApp returns the sorted templates. It takes in arguments - appName, project, compositeAppName, releaseName, compositeProfileName, array of override values

Types

type App

type App struct {
	Metadata AppMetaData `json:"metadata"`
}

App contains metadata for Apps

type AppClient

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

AppClient implements the AppManager It will also be used to maintain some localized state

func NewAppClient

func NewAppClient() *AppClient

NewAppClient returns an instance of the AppClient which implements the AppManager

func (*AppClient) CreateApp

func (v *AppClient) CreateApp(a App, ac AppContent, p string, cN string, cV string, exists bool) (App, error)

CreateApp creates a new collection based on the App

func (*AppClient) DeleteApp

func (v *AppClient) DeleteApp(name string, p string, cN string, cV string) error

DeleteApp deletes the App from database

func (*AppClient) GetApp

func (v *AppClient) GetApp(name string, p string, cN string, cV string) (App, error)

GetApp returns the App for corresponding name

func (*AppClient) GetAppContent

func (v *AppClient) GetAppContent(name string, p string, cN string, cV string) (AppContent, error)

GetAppContent returns content for corresponding app

func (*AppClient) GetApps

func (v *AppClient) GetApps(project, compositeApp, compositeAppVersion string) ([]App, error)

GetApps returns all Apps for given composite App

type AppClusterInfo

type AppClusterInfo struct {
	Name       string       `json:"name"`
	AllOfArray []gpic.AllOf `json:"allOf,omitempty"`
	AnyOfArray []gpic.AnyOf `json:"anyOf,omitempty"`
}

AppClusterInfo is a type linking the app and the clusters on which they need to be installed.

type AppContent

type AppContent struct {
	FileContent string
}

AppContent contains fileContent

type AppContextKey

type AppContextKey struct {
	LCContext string `json:"lccontext"`
}

AppContextKey is an alternative key to access logical clouds

type AppIntent

type AppIntent struct {
	MetaData MetaData `json:"metadata,omitempty"`
	Spec     SpecData `json:"spec,omitempty"`
}

AppIntent has two components - metadata, spec

type AppIntentClient

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

AppIntentClient implements the AppIntentManager interface

func NewAppIntentClient

func NewAppIntentClient() *AppIntentClient

NewAppIntentClient returns an instance of AppIntentClient

func (*AppIntentClient) CreateAppIntent

func (c *AppIntentClient) CreateAppIntent(a AppIntent, p string, ca string, v string, i string, digName string) (AppIntent, error)

CreateAppIntent creates an entry for AppIntent in the db. Other input parameters for it - projectName, compositeAppName, version, intentName and deploymentIntentGroupName.

func (*AppIntentClient) DeleteAppIntent

func (c *AppIntentClient) DeleteAppIntent(ai string, p string, ca string, v string, i string, digName string) error

DeleteAppIntent delete an AppIntent

func (*AppIntentClient) GetAllAppIntents

func (c *AppIntentClient) GetAllAppIntents(p, ca, v, i, digName string) ([]AppIntent, error)

GetAllAppIntents takes in paramaters ProjectName, CompositeAppName, CompositeNameVersion and GenericPlacementIntentName,DeploymentIntentGroupName. Returns an array of AppIntents

func (*AppIntentClient) GetAllIntentsByApp

func (c *AppIntentClient) GetAllIntentsByApp(aN, p, ca, v, i, digName string) (SpecData, error)

GetAllIntentsByApp queries intent by AppName, it takes in parameters AppName, CompositeAppName, CompositeNameVersion, GenericPlacementIntentName & DeploymentIntentGroupName. Returns SpecData which contains all the intents for the app.

func (*AppIntentClient) GetAppIntent

func (c *AppIntentClient) GetAppIntent(ai string, p string, ca string, v string, i string, digName string) (AppIntent, error)

GetAppIntent shall take arguments - name of the app intent, name of the project, name of the composite app, version of the composite app,intent name and deploymentIntentGroupName. It shall return the AppIntent

type AppIntentFindByAppKey

type AppIntentFindByAppKey struct {
	Project                   string `json:"project"`
	CompositeApp              string `json:"compositeapp"`
	CompositeAppVersion       string `json:"compositeappversion"`
	Intent                    string `json:"genericplacement"`
	DeploymentIntentGroupName string `json:"deploymentintentgroup"`
	AppName                   string `json:"app-name"`
}

AppIntentFindByAppKey required for query

type AppIntentKey

type AppIntentKey struct {
	Name                      string `json:"appintent"`
	Project                   string `json:"project"`
	CompositeApp              string `json:"compositeapp"`
	Version                   string `json:"compositeappversion"`
	Intent                    string `json:"genericplacement"`
	DeploymentIntentGroupName string `json:"deploymentintentgroup"`
}

AppIntentKey is used as primary key

func (AppIntentKey) String

func (ak AppIntentKey) String() string

We will use json marshalling to convert to string to preserve the underlying structure.

type AppIntentManager

type AppIntentManager interface {
	CreateAppIntent(a AppIntent, p string, ca string, v string, i string, digName string) (AppIntent, error)
	GetAppIntent(ai string, p string, ca string, v string, i string, digName string) (AppIntent, error)
	GetAllIntentsByApp(aN, p, ca, v, i, digName string) (SpecData, error)
	GetAllAppIntents(p, ca, v, i, digName string) ([]AppIntent, error)
	DeleteAppIntent(ai string, p string, ca string, v string, i string, digName string) error
}

AppIntentManager is an interface which exposes the AppIntentManager functionalities

type AppIntentQueryKey

type AppIntentQueryKey struct {
	AppName string `json:"app-name"`
}

AppIntentQueryKey required for query

type AppKey

type AppKey struct {
	App                 string `json:"app"`
	Project             string `json:"project"`
	CompositeApp        string `json:"compositeapp"`
	CompositeAppVersion string `json:"compositeappversion"`
}

AppKey is the key structure that is used in the database

func (AppKey) String

func (aK AppKey) String() string

We will use json marshalling to convert to string to preserve the underlying structure.

type AppManager

type AppManager interface {
	CreateApp(a App, ac AppContent, p string, cN string, cV string, exists bool) (App, error)
	GetApp(name string, p string, cN string, cV string) (App, error)
	GetAppContent(name string, p string, cN string, cV string) (AppContent, error)
	GetApps(p string, cN string, cV string) ([]App, error)
	DeleteApp(name string, p string, cN string, cV string) error
}

AppManager is an interface exposes the App functionality

type AppMetaData

type AppMetaData struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	UserData1   string `json:"userData1"`
	UserData2   string `json:"userData2"`
}

AppMetaData contains the parameters needed for Apps

type AppProfile

type AppProfile struct {
	Metadata AppProfileMetadata `json:"metadata"`
	Spec     AppProfileSpec     `json:"spec"`
}

AppProfile contains the parameters needed for AppProfiles It implements the interface for managing the AppProfiles

type AppProfileClient

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

AppProfileClient implements the Manager It will also be used to maintain some localized state

func NewAppProfileClient

func NewAppProfileClient() *AppProfileClient

NewAppProfileClient returns an instance of the AppProfileClient which implements the Manager

func (*AppProfileClient) CreateAppProfile

func (c *AppProfileClient) CreateAppProfile(project, compositeApp, compositeAppVersion, compositeProfile string, ap AppProfile, ac AppProfileContent, exists bool) (AppProfile, error)

CreateAppProfile creates an entry for AppProfile in the database.

func (*AppProfileClient) DeleteAppProfile

func (c *AppProfileClient) DeleteAppProfile(project, compositeApp, compositeAppVersion, compositeProfile, profile string) error

Delete AppProfile from the database

func (*AppProfileClient) GetAppProfile

func (c *AppProfileClient) GetAppProfile(project, compositeApp, compositeAppVersion, compositeProfile, profile string) (AppProfile, error)

GetAppProfile - return specified App Profile

func (*AppProfileClient) GetAppProfileByApp

func (c *AppProfileClient) GetAppProfileByApp(project, compositeApp, compositeAppVersion, compositeProfile, appName string) (AppProfile, error)

GetAppProfileByApp - return all App Profiles for given composite profile

func (*AppProfileClient) GetAppProfileContent

func (c *AppProfileClient) GetAppProfileContent(project, compositeApp, compositeAppVersion, compositeProfile, profile string) (AppProfileContent, error)

func (*AppProfileClient) GetAppProfileContentByApp

func (c *AppProfileClient) GetAppProfileContentByApp(project, compositeApp, compositeAppVersion, compositeProfile, appName string) (AppProfileContent, error)

func (*AppProfileClient) GetAppProfiles

func (c *AppProfileClient) GetAppProfiles(project, compositeApp, compositeAppVersion, compositeProfile string) ([]AppProfile, error)

GetAppProfile - return all App Profiles for given composite profile

type AppProfileContent

type AppProfileContent struct {
	Profile string `json:"profile"`
}

type AppProfileFindByAppKey

type AppProfileFindByAppKey struct {
	Project             string `json:"project"`
	CompositeApp        string `json:"compositeapp"`
	CompositeAppVersion string `json:"compositeappversion"`
	CompositeProfile    string `json:"compositeprofile"`
	AppName             string `json:"app-name"`
}

type AppProfileKey

type AppProfileKey struct {
	Project             string `json:"project"`
	CompositeApp        string `json:"compositeapp"`
	CompositeAppVersion string `json:"compositeappversion"`
	CompositeProfile    string `json:"compositeprofile"`
	Profile             string `json:"profile"`
}

AppProfileKey is the key structure that is used in the database

type AppProfileManager

type AppProfileManager interface {
	CreateAppProfile(provider, compositeApp, compositeAppVersion, compositeProfile string, ap AppProfile, ac AppProfileContent, exists bool) (AppProfile, error)
	GetAppProfile(project, compositeApp, compositeAppVersion, compositeProfile, profile string) (AppProfile, error)
	GetAppProfiles(project, compositeApp, compositeAppVersion, compositeProfile string) ([]AppProfile, error)
	GetAppProfileByApp(project, compositeApp, compositeAppVersion, compositeProfile, appName string) (AppProfile, error)
	GetAppProfileContent(project, compositeApp, compositeAppVersion, compositeProfile, profile string) (AppProfileContent, error)
	GetAppProfileContentByApp(project, compositeApp, compositeAppVersion, compositeProfile, appName string) (AppProfileContent, error)
	DeleteAppProfile(project, compositeApp, compositeAppVersion, compositeProfile, profile string) error
}

AppProfileManager exposes the AppProfile functionality

type AppProfileMetadata

type AppProfileMetadata struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	UserData1   string `json:"userData1"`
	UserData2   string `json:"userData2"`
}

AppProfileMetadata contains the metadata for AppProfiles

type AppProfileQueryKey

type AppProfileQueryKey struct {
	AppName string `json:"app-name"`
}

type AppProfileSpec

type AppProfileSpec struct {
	AppName string `json:"app-name"`
}

AppProfileSpec contains the Spec for AppProfiles

type ApplicationsAndClusterInfo

type ApplicationsAndClusterInfo struct {
	ArrayOfAppClusterInfo []AppClusterInfo `json:"applications"`
}

ApplicationsAndClusterInfo type represents the list of

type Client

type Client struct {
	Project                *ProjectClient
	CompositeApp           *CompositeAppClient
	App                    *AppClient
	Controller             *controller.ControllerClient
	GenericPlacementIntent *GenericPlacementIntentClient
	AppIntent              *AppIntentClient
	DeploymentIntentGroup  *DeploymentIntentGroupClient
	Intent                 *IntentClient
	CompositeProfile       *CompositeProfileClient
	AppProfile             *AppProfileClient
	// Add Clients for API's here
	Instantiation *InstantiationClient
}

Client for using the services in the orchestrator

func NewClient

func NewClient() *Client

NewClient creates a new client for using the services

type Cluster

type Cluster struct {
	MetaData      ClusterMeta `json:"metadata"`
	Specification ClusterSpec `json:"spec"`
}

Cluster contains the parameters needed for a Cluster

type ClusterClient

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

ClusterClient implements the ClusterManager It will also be used to maintain some localized state

func NewClusterClient

func NewClusterClient() *ClusterClient

ClusterClient returns an instance of the ClusterClient which implements the ClusterManager

func (*ClusterClient) CreateCluster

func (v *ClusterClient) CreateCluster(project, logicalCloud string, c Cluster) (Cluster, error)

Create entry for the cluster reference resource in the database

func (*ClusterClient) DeleteCluster

func (v *ClusterClient) DeleteCluster(project, logicalCloud, clusterReference string) error

Delete the Cluster reference entry from database

func (*ClusterClient) GetAllClusters

func (v *ClusterClient) GetAllClusters(project, logicalCloud string) ([]Cluster, error)

GetAll returns all cluster references in the logical cloud

func (*ClusterClient) GetCluster

func (v *ClusterClient) GetCluster(project, logicalCloud, clusterReference string) (Cluster, error)

Get returns Cluster for corresponding cluster reference

func (*ClusterClient) GetClusterConfig

func (v *ClusterClient) GetClusterConfig(project, logicalCloud, clusterReference string) (string, error)

Get returns Cluster's kubeconfig for corresponding cluster reference

func (*ClusterClient) UpdateCluster

func (v *ClusterClient) UpdateCluster(project, logicalCloud, clusterReference string, c Cluster) (Cluster, error)

Update an entry for the Cluster reference in the database

type ClusterKey

type ClusterKey struct {
	Project          string `json:"project"`
	LogicalCloudName string `json:"logical-cloud-name"`
	ClusterReference string `json:"clname"`
}

type ClusterManager

type ClusterManager interface {
	CreateCluster(project, logicalCloud string, c Cluster) (Cluster, error)
	GetCluster(project, logicalCloud, name string) (Cluster, error)
	GetAllClusters(project, logicalCloud string) ([]Cluster, error)
	DeleteCluster(project, logicalCloud, name string) error
	UpdateCluster(project, logicalCloud, name string, c Cluster) (Cluster, error)
	GetClusterConfig(project, logicalcloud, name string) (string, error)
}

ClusterManager is an interface that exposes the connection functionality

type ClusterMeta

type ClusterMeta struct {
	ClusterReference string `json:"name"`
	Description      string `json:"description"`
	UserData1        string `json:"userData1"`
	UserData2        string `json:"userData2"`
}

type ClusterSpec

type ClusterSpec struct {
	ClusterProvider string `json:"cluster-provider"`
	ClusterName     string `json:"cluster-name"`
	LoadBalancerIP  string `json:"loadbalancer-ip"`
	Certificate     string `json:"certificate"`
}

type CompositeApp

type CompositeApp struct {
	Metadata CompositeAppMetaData `json:"metadata"`
	Spec     CompositeAppSpec     `json:"spec"`
}

CompositeApp contains metadata and spec for CompositeApps

type CompositeAppClient

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

CompositeAppClient implements the CompositeAppManager It will also be used to maintain some localized state

func NewCompositeAppClient

func NewCompositeAppClient() *CompositeAppClient

NewCompositeAppClient returns an instance of the CompositeAppClient which implements the CompositeAppManager

func (*CompositeAppClient) CreateCompositeApp

func (v *CompositeAppClient) CreateCompositeApp(c CompositeApp, p string, exists bool) (CompositeApp, error)

CreateCompositeApp creates a new collection based on the CompositeApp

func (*CompositeAppClient) DeleteCompositeApp

func (v *CompositeAppClient) DeleteCompositeApp(name string, version string, p string) error

DeleteCompositeApp deletes the CompositeApp from database

func (*CompositeAppClient) GetAllCompositeApps

func (v *CompositeAppClient) GetAllCompositeApps(p string) ([]CompositeApp, error)

GetAllCompositeApps returns all the compositeApp for a given project

func (*CompositeAppClient) GetCompositeApp

func (v *CompositeAppClient) GetCompositeApp(name string, version string, p string) (CompositeApp, error)

GetCompositeApp returns the CompositeApp for corresponding name

type CompositeAppKey

type CompositeAppKey struct {
	CompositeAppName string `json:"compositeapp"`
	Version          string `json:"compositeappversion"`
	Project          string `json:"project"`
}

CompositeAppKey is the key structure that is used in the database

func (CompositeAppKey) String

func (cK CompositeAppKey) String() string

We will use json marshalling to convert to string to preserve the underlying structure.

type CompositeAppManager

type CompositeAppManager interface {
	CreateCompositeApp(c CompositeApp, p string, exists bool) (CompositeApp, error)
	GetCompositeApp(name string, version string, p string) (CompositeApp, error)
	GetAllCompositeApps(p string) ([]CompositeApp, error)
	DeleteCompositeApp(name string, version string, p string) error
}

CompositeAppManager is an interface exposes the CompositeApp functionality

type CompositeAppMetaData

type CompositeAppMetaData struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	UserData1   string `json:"userData1"`
	UserData2   string `json:"userData2"`
}

CompositeAppMetaData contains the parameters needed for CompositeApps

type CompositeAppSpec

type CompositeAppSpec struct {
	Version string `json:"version"`
}

CompositeAppSpec contains the Version of the CompositeApp

type CompositeProfile

type CompositeProfile struct {
	Metadata CompositeProfileMetadata `json:"metadata"`
}

CompositeProfile contains the parameters needed for CompositeProfiles It implements the interface for managing the CompositeProfiles

type CompositeProfileClient

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

CompositeProfileClient implements the Manager It will also be used to maintain some localized state

func NewCompositeProfileClient

func NewCompositeProfileClient() *CompositeProfileClient

NewCompositeProfileClient returns an instance of the CompositeProfileClient which implements the Manager

func (*CompositeProfileClient) CreateCompositeProfile

func (c *CompositeProfileClient) CreateCompositeProfile(cpf CompositeProfile, p string, ca string,
	v string, exists bool) (CompositeProfile, error)

CreateCompositeProfile creates an entry for CompositeProfile in the database. Other Input parameters for it - projectName, compositeAppName, version

func (*CompositeProfileClient) DeleteCompositeProfile

func (c *CompositeProfileClient) DeleteCompositeProfile(cpf string, p string, ca string, v string) error

DeleteCompositeProfile deletes the compsiteApp profile from the database

func (*CompositeProfileClient) GetCompositeProfile

func (c *CompositeProfileClient) GetCompositeProfile(cpf string, p string, ca string, v string) (CompositeProfile, error)

GetCompositeProfile shall take arguments - name of the composite profile, name of the project, name of the composite app and version of the composite app. It shall return the CompositeProfile if its present.

func (*CompositeProfileClient) GetCompositeProfiles

func (c *CompositeProfileClient) GetCompositeProfiles(p string, ca string, v string) ([]CompositeProfile, error)

GetCompositeProfiles shall take arguments - name of the project, name of the composite profile and version of the composite app. It shall return an array of CompositeProfile.

type CompositeProfileKey

type CompositeProfileKey struct {
	Name         string `json:"compositeprofile"`
	Project      string `json:"project"`
	CompositeApp string `json:"compositeapp"`
	Version      string `json:"compositeappversion"`
}

CompositeProfileKey is the key structure that is used in the database

func (CompositeProfileKey) String

func (cpk CompositeProfileKey) String() string

We will use json marshalling to convert to string to preserve the underlying structure.

type CompositeProfileManager

type CompositeProfileManager interface {
	CreateCompositeProfile(cpf CompositeProfile, p string, ca string,
		v string, exists bool) (CompositeProfile, error)
	GetCompositeProfile(compositeProfileName string, projectName string,
		compositeAppName string, version string) (CompositeProfile, error)
	GetCompositeProfiles(projectName string, compositeAppName string,
		version string) ([]CompositeProfile, error)
	DeleteCompositeProfile(compositeProfileName string, projectName string,
		compositeAppName string, version string) error
}

CompositeProfileManager exposes the CompositeProfile functionality

type CompositeProfileMetadata

type CompositeProfileMetadata struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	UserData1   string `json:"userData1"`
	UserData2   string `json:"userData2"`
}

CompositeProfileMetadata contains the metadata for CompositeProfiles

type ControllerElement

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

ControllerElement consists of controller and an internal field - index

type DBService

type DBService struct{}

Added for unit testing; implements Utility interface

func (DBService) CheckLogicalCloud

func (d DBService) CheckLogicalCloud(project, logicalCloud string) error

func (DBService) CheckProject

func (d DBService) CheckProject(project string) error

func (DBService) DBFind

func (d DBService) DBFind(storeName string, key db.Key, meta string) ([][]byte, error)

func (DBService) DBInsert

func (d DBService) DBInsert(storeName string, key db.Key, query interface{}, meta string, c interface{}) error

func (DBService) DBRemove

func (d DBService) DBRemove(storeName string, key db.Key) error

func (DBService) DBUnmarshal

func (d DBService) DBUnmarshal(value []byte, out interface{}) error

func (DBService) GetAppContextStatus

func (d DBService) GetAppContextStatus(ac appcontext.AppContext) (*appcontext.AppContextStatus, error)

func (DBService) GetLogicalCloudContext

func (d DBService) GetLogicalCloudContext(storeName string, key db.Key, meta string, project string, name string) (appcontext.AppContext, string, error)

GetLogicalCloudContext returns the AppContext for corresponding provider and name

func (DBService) GetLogicalCloudFromContext

func (d DBService) GetLogicalCloudFromContext(storeName string, appContextId string) (string, string, error)

GetLogicalCloudFromContext returns the pair (project, logical cloud name) for a given AppContext ID

type DepMetaData

type DepMetaData struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	UserData1   string `json:"userData1"`
	UserData2   string `json:"userData2"`
}

DepMetaData has Name, description, userdata1, userdata2

type DepSpecData

type DepSpecData struct {
	Profile           string           `json:"profile"`
	Version           string           `json:"version"`
	OverrideValuesObj []OverrideValues `json:"override-values"`
	LogicalCloud      string           `json:"logical-cloud"`
}

DepSpecData has profile, version, OverrideValuesObj

type DeploymentAppsListStatus

type DeploymentAppsListStatus struct {
	Project               string `json:"project,omitempty"`
	CompositeAppName      string `json:"composite-app-name,omitempty"`
	CompositeAppVersion   string `json:"composite-app-version,omitempty"`
	CompositeProfileName  string `json:"composite-profile-name,omitempty"`
	status.AppsListResult `json:",inline"`
}

DeploymentAppsListStatus is the structure used to return the list of Apps that have been/were deployed for the DeploymentIntentGroup

type DeploymentClustersByAppStatus

type DeploymentClustersByAppStatus struct {
	Project                    string `json:"project,omitempty"`
	CompositeAppName           string `json:"composite-app-name,omitempty"`
	CompositeAppVersion        string `json:"composite-app-version,omitempty"`
	CompositeProfileName       string `json:"composite-profile-name,omitempty"`
	status.ClustersByAppResult `json:",inline"`
}

DeploymentClustersByAppStatus is the structure used to return the list of Apps that have been/were deployed for the DeploymentIntentGroup

type DeploymentIntentGroup

type DeploymentIntentGroup struct {
	MetaData DepMetaData `json:"metadata"`
	Spec     DepSpecData `json:"spec"`
}

DeploymentIntentGroup shall have 2 fields - MetaData and Spec

type DeploymentIntentGroupClient

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

DeploymentIntentGroupClient implements the DeploymentIntentGroupManager interface

func NewDeploymentIntentGroupClient

func NewDeploymentIntentGroupClient() *DeploymentIntentGroupClient

NewDeploymentIntentGroupClient return an instance of DeploymentIntentGroupClient which implements DeploymentIntentGroupManager

func (*DeploymentIntentGroupClient) CreateDeploymentIntentGroup

func (c *DeploymentIntentGroupClient) CreateDeploymentIntentGroup(d DeploymentIntentGroup, p string, ca string,
	v string) (DeploymentIntentGroup, error)

CreateDeploymentIntentGroup creates an entry for a given DeploymentIntentGroup in the database. Other Input parameters for it - projectName, compositeAppName, version

func (*DeploymentIntentGroupClient) DeleteDeploymentIntentGroup

func (c *DeploymentIntentGroupClient) DeleteDeploymentIntentGroup(di string, p string, ca string, v string) error

DeleteDeploymentIntentGroup deletes a DeploymentIntentGroup

func (*DeploymentIntentGroupClient) GetAllDeploymentIntentGroups

func (c *DeploymentIntentGroupClient) GetAllDeploymentIntentGroups(p string, ca string, v string) ([]DeploymentIntentGroup, error)

GetAllDeploymentIntentGroups returns all the deploymentIntentGroups under a specific project, compositeApp and version

func (*DeploymentIntentGroupClient) GetDeploymentIntentGroup

func (c *DeploymentIntentGroupClient) GetDeploymentIntentGroup(di string, p string, ca string, v string) (DeploymentIntentGroup, error)

GetDeploymentIntentGroup returns the DeploymentIntentGroup with a given name, project, compositeApp and version of compositeApp

func (*DeploymentIntentGroupClient) GetDeploymentIntentGroupState

func (c *DeploymentIntentGroupClient) GetDeploymentIntentGroupState(di string, p string, ca string, v string) (state.StateInfo, error)

GetDeploymentIntentGroupState returns the DIG-StateInfo with a given DeploymentIntentname, project, compositeAppName and version of compositeApp

type DeploymentIntentGroupKey

type DeploymentIntentGroupKey struct {
	Name         string `json:"deploymentintentgroup"`
	Project      string `json:"project"`
	CompositeApp string `json:"compositeapp"`
	Version      string `json:"compositeappversion"`
}

DeploymentIntentGroupKey consists of Name of the deployment group, project name, CompositeApp name, CompositeApp version

func (DeploymentIntentGroupKey) String

func (dk DeploymentIntentGroupKey) String() string

We will use json marshalling to convert to string to preserve the underlying structure.

type DeploymentIntentGroupManager

type DeploymentIntentGroupManager interface {
	CreateDeploymentIntentGroup(d DeploymentIntentGroup, p string, ca string, v string) (DeploymentIntentGroup, error)
	GetDeploymentIntentGroup(di string, p string, ca string, v string) (DeploymentIntentGroup, error)
	GetDeploymentIntentGroupState(di string, p string, ca string, v string) (state.StateInfo, error)
	DeleteDeploymentIntentGroup(di string, p string, ca string, v string) error
	GetAllDeploymentIntentGroups(p string, ca string, v string) ([]DeploymentIntentGroup, error)
}

DeploymentIntentGroupManager is an interface which exposes the DeploymentIntentGroupManager functionality

type DeploymentResourcesByAppStatus

type DeploymentResourcesByAppStatus struct {
	Project                     string `json:"project,omitempty"`
	CompositeAppName            string `json:"composite-app-name,omitempty"`
	CompositeAppVersion         string `json:"composite-app-version,omitempty"`
	CompositeProfileName        string `json:"composite-profile-name,omitempty"`
	status.ResourcesByAppResult `json:",inline"`
}

DeploymentResourcesByAppStatus is the structure used to return the list of Apps that have been/were deployed for the DeploymentIntentGroup

type DeploymentStatus

type DeploymentStatus struct {
	Project              string `json:"project,omitempty"`
	CompositeAppName     string `json:"composite-app-name,omitempty"`
	CompositeAppVersion  string `json:"composite-app-version,omitempty"`
	CompositeProfileName string `json:"composite-profile-name,omitempty"`
	status.StatusResult  `json:",inline"`
}

DeploymentStatus is the structure used to return general status results for the Deployment Intent Group

type GenIntentMetaData

type GenIntentMetaData struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	UserData1   string `json:"userData1"`
	UserData2   string `json:"userData2"`
}

GenIntentMetaData has name, description, userdata1, userdata2

type GenericPlacementIntent

type GenericPlacementIntent struct {
	MetaData GenIntentMetaData `json:"metadata"`
}

GenericPlacementIntent shall have 2 fields - metadata and spec

type GenericPlacementIntentClient

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

GenericPlacementIntentClient implements the GenericPlacementIntentManager interface

func NewGenericPlacementIntentClient

func NewGenericPlacementIntentClient() *GenericPlacementIntentClient

NewGenericPlacementIntentClient return an instance of GenericPlacementIntentClient which implements GenericPlacementIntentManager

func (*GenericPlacementIntentClient) CreateGenericPlacementIntent

func (c *GenericPlacementIntentClient) CreateGenericPlacementIntent(g GenericPlacementIntent, p string, ca string,
	v string, digName string) (GenericPlacementIntent, error)

CreateGenericPlacementIntent creates an entry for GenericPlacementIntent in the database. Other Input parameters for it - projectName, compositeAppName, version and deploymentIntentGroupName

func (*GenericPlacementIntentClient) DeleteGenericPlacementIntent

func (c *GenericPlacementIntentClient) DeleteGenericPlacementIntent(i string, p string, ca string, v string, digName string) error

DeleteGenericPlacementIntent the intent from the database

func (*GenericPlacementIntentClient) GetAllGenericPlacementIntents

func (c *GenericPlacementIntentClient) GetAllGenericPlacementIntents(p string, ca string, v string, digName string) ([]GenericPlacementIntent, error)

GetAllGenericPlacementIntents returns all the generic placement intents for a given compsoite app name, composite app version, project and deploymentIntentGroupName

func (*GenericPlacementIntentClient) GetGenericPlacementIntent

func (c *GenericPlacementIntentClient) GetGenericPlacementIntent(i string, p string, ca string, v string, digName string) (GenericPlacementIntent, error)

GetGenericPlacementIntent shall take arguments - name of the intent, name of the project, name of the composite app, version of the composite app and deploymentIntentGroupName. It shall return the genericPlacementIntent if its present.

type GenericPlacementIntentKey

type GenericPlacementIntentKey struct {
	Name         string `json:"genericplacement"`
	Project      string `json:"project"`
	CompositeApp string `json:"compositeapp"`
	Version      string `json:"compositeappversion"`
	DigName      string `json:"deploymentintentgroup"`
}

GenericPlacementIntentKey is used as the primary key

func (GenericPlacementIntentKey) String

func (gk GenericPlacementIntentKey) String() string

We will use json marshalling to convert to string to preserve the underlying structure.

type GenericPlacementIntentManager

type GenericPlacementIntentManager interface {
	CreateGenericPlacementIntent(g GenericPlacementIntent, p string, ca string,
		v string, digName string) (GenericPlacementIntent, error)
	GetGenericPlacementIntent(intentName string, projectName string,
		compositeAppName string, version string, digName string) (GenericPlacementIntent, error)
	DeleteGenericPlacementIntent(intentName string, projectName string,
		compositeAppName string, version string, digName string) error

	GetAllGenericPlacementIntents(p string, ca string, v string, digName string) ([]GenericPlacementIntent, error)
}

GenericPlacementIntentManager is an interface which exposes the GenericPlacementIntentManager functionality

type InstantiationClient

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

InstantiationClient implements the InstantiationManager

func NewInstantiationClient

func NewInstantiationClient() *InstantiationClient

NewInstantiationClient returns an instance of InstantiationClient

func (InstantiationClient) Approve

func (c InstantiationClient) Approve(p string, ca string, v string, di string) error

Approve approves an instantiation

func (InstantiationClient) Instantiate

func (c InstantiationClient) Instantiate(p string, ca string, v string, di string) error

Instantiate methods takes in projectName, compositeAppName, compositeAppVersion, DeploymentIntentName. This method is responsible for template resolution, intent resolution, creation and saving of context for saving into etcd.

func (InstantiationClient) Migrate

func (c InstantiationClient) Migrate(p string, ca string, v string, tCav string, di string, tDi string) error

Migrate methods takes in projectName, compositeAppName, compositeAppVersion, DeploymentIntentName, targetCompositeAppVersion and targetDeploymentIntentName. This method is responsible for creation and saving of context for saving into etcd and ensuring sourceDeploymentIntent gets migrated to targetDeploymentIntent.

func (InstantiationClient) Rollback

func (c InstantiationClient) Rollback(p string, ca string, v string, di string, rbRev string) error

Rollback methods takes in projectName, compositeAppName, compositeAppVersion, DeploymentIntentName and revision. This method is responsible for creation and saving of context for saving into etcd and ensuring DeploymentIntentGroup is rollback to given revision.

func (InstantiationClient) Status

func (c InstantiationClient) Status(p, ca, v, di, qInstance, qType, qOutput string, fApps, fClusters, fResources []string) (DeploymentStatus, error)

Status takes in projectName, compositeAppName, compositeAppVersion, DeploymentIntentName. This method is responsible obtaining the status of the deployment, which is made available in the appcontext.

func (InstantiationClient) StatusAppsList

func (c InstantiationClient) StatusAppsList(p, ca, v, di, qInstance string) (DeploymentAppsListStatus, error)

StatusAppsList takes in projectName, compositeAppName, compositeAppVersion, DeploymentIntentName. This method returns the list of apps in use for the given instance of appcontext of this deployment intent group.

func (InstantiationClient) StatusClustersByApp

func (c InstantiationClient) StatusClustersByApp(p, ca, v, di, qInstance string, fApps []string) (DeploymentClustersByAppStatus, error)

StatusClustersByApp takes in projectName, compositeAppName, compositeAppVersion, DeploymentIntentName. This method returns the list of apps in use for the given instance of appcontext of this deployment intent group.

func (InstantiationClient) StatusResourcesByApp

func (c InstantiationClient) StatusResourcesByApp(p, ca, v, di, qInstance, qType string, fApps, fClusters []string) (DeploymentResourcesByAppStatus, error)

StatusResourcesByApp takes in projectName, compositeAppName, compositeAppVersion, DeploymentIntentName. This method returns the list of apps in use for the given instance of appcontext of this deployment intent group.

func (InstantiationClient) Stop

func (c InstantiationClient) Stop(p string, ca string, v string, di string) error

Stop takes in projectName, compositeAppName, compositeAppVersion, DeploymentIntentName and sets the stopFlag in the associated appContext.

func (InstantiationClient) Terminate

func (c InstantiationClient) Terminate(p string, ca string, v string, di string) error

Terminate takes in projectName, compositeAppName, compositeAppVersion, DeploymentIntentName and calls rsync to terminate.

func (InstantiationClient) Update

func (c InstantiationClient) Update(p string, ca string, v string, di string) (int64, error)

Update methods takes in projectName, compositeAppName, compositeAppVersion, DeploymentIntentName. This method is responsible for creation and saving of context into etcd and ensuring new intents are applied on DeploymentIntentGroup.

type InstantiationClientDbInfo

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

InstantiationClientDbInfo consists of storeName and tagState

type InstantiationKey

type InstantiationKey struct {
	Project               string
	CompositeApp          string
	Version               string
	DeploymentIntentGroup string
}

InstantiationKey used in storing the contextid in the momgodb It consists of ProjectName, CompositeAppName, CompositeAppVersion, DeploymentIntentGroup

type InstantiationManager

type InstantiationManager interface {
	Approve(p string, ca string, v string, di string) error
	Instantiate(p string, ca string, v string, di string) error
	Status(p, ca, v, di, qInstance, qType, qOutput string, fApps, fClusters, fResources []string) (DeploymentStatus, error)
	StatusAppsList(p, ca, v, di, qInstance string) (DeploymentAppsListStatus, error)
	StatusClustersByApp(p, ca, v, di, qInstance string, fApps []string) (DeploymentClustersByAppStatus, error)
	StatusResourcesByApp(p, ca, v, di, qInstance, qType string, fApps, fClusters []string) (DeploymentResourcesByAppStatus, error)
	Terminate(p string, ca string, v string, di string) error
	Stop(p string, ca string, v string, di string) error
	Migrate(p string, ca string, v string, tCav string, di string, tDi string) error
	Update(p string, ca string, v string, di string) (int64, error)
	Rollback(p string, ca string, v string, di string, rbRev string) error
}

InstantiationManager is an interface which exposes the InstantiationManager functionalities

type Instantiator

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

func (*Instantiator) MakeAppContext

func (i *Instantiator) MakeAppContext() (contextForCompositeApp, error)

MakeAppContext shall make an app context and store the app context into etcd. This shall return contextForCompositeApp

type Intent

type Intent struct {
	MetaData IntentMetaData `json:"metadata"`
	Spec     IntentSpecData `json:"spec"`
}

Intent shall have 2 fields - MetaData and Spec

type IntentClient

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

IntentClient implements the AddIntentManager interface

func NewIntentClient

func NewIntentClient() *IntentClient

NewIntentClient returns an instance of AddIntentClient

func (*IntentClient) AddIntent

func (c *IntentClient) AddIntent(a Intent, p string, ca string, v string, di string) (Intent, error)

AddIntent adds a given intent to the deployment-intent-group and stores in the db. Other input parameters for it - projectName, compositeAppName, version, DeploymentIntentgroupName

func (IntentClient) DeleteIntent

func (c IntentClient) DeleteIntent(i string, p string, ca string, v string, di string) error

DeleteIntent deletes a given intent tied to project, composite app and deployment intent group

func (IntentClient) GetAllIntents

func (c IntentClient) GetAllIntents(p string, ca string, v string, di string) (ListOfIntents, error)

GetAllIntents takes in projectName, CompositeAppName, CompositeAppVersion, DeploymentIntentName . It returns ListOfIntents.

func (*IntentClient) GetIntent

func (c *IntentClient) GetIntent(i string, p string, ca string, v string, di string) (Intent, error)

GetIntent takes in an IntentName, ProjectName, CompositeAppName, Version and DeploymentIntentGroup. It returns the Intent.

func (IntentClient) GetIntentByName

func (c IntentClient) GetIntentByName(i string, p string, ca string, v string, di string) (IntentSpecData, error)

GetIntentByName takes in IntentName, projectName, CompositeAppName, CompositeAppVersion and deploymentIntentGroupName returns the list of intents under the IntentName.

type IntentKey

type IntentKey struct {
	Name                  string `json:"intentname"`
	Project               string `json:"project"`
	CompositeApp          string `json:"compositeapp"`
	Version               string `json:"compositeappversion"`
	DeploymentIntentGroup string `json:"deploymentintentgroup"`
}

IntentKey consists of Name if the intent, Project name, CompositeApp name, CompositeApp version

func (IntentKey) String

func (ik IntentKey) String() string

We will use json marshalling to convert to string to preserve the underlying structure.

type IntentManager

type IntentManager interface {
	AddIntent(a Intent, p string, ca string, v string, di string) (Intent, error)
	GetIntent(i string, p string, ca string, v string, di string) (Intent, error)
	GetAllIntents(p, ca, v, di string) (ListOfIntents, error)
	GetIntentByName(i, p, ca, v, di string) (IntentSpecData, error)
	DeleteIntent(i string, p string, ca string, v string, di string) error
}

IntentManager is an interface which exposes the IntentManager functionality

type IntentMetaData

type IntentMetaData struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	UserData1   string `json:"userData1"`
	UserData2   string `json:"userData2"`
}

IntentMetaData has Name, Description, userdata1, userdata2

type IntentSpecData

type IntentSpecData struct {
	Intent map[string]string `json:"intent"`
}

IntentSpecData has Intent

type K8sResource

type K8sResource struct {
	Metadata MetadataList `yaml:"metadata"`
}

TODO move into a better place or reuse existing struct

type KubeCluster

type KubeCluster struct {
	ClusterDef  KubeClusterDef `yaml:"cluster"`
	ClusterName string         `yaml:"name"`
}

type KubeClusterDef

type KubeClusterDef struct {
	CertificateAuthorityData string `yaml:"certificate-authority-data"`
	Server                   string `yaml:"server"`
}

type KubeConfig

type KubeConfig struct {
	ApiVersion     string            `yaml:"apiVersion"`
	Kind           string            `yaml:"kind"`
	Clusters       []KubeCluster     `yaml:"clusters"`
	Contexts       []KubeContext     `yaml:"contexts"`
	CurrentContext string            `yaml:"current-context"`
	Preferences    map[string]string `yaml:"preferences"`
	Users          []KubeUser        `yaml:"users"`
}

type KubeContext

type KubeContext struct {
	ContextDef  KubeContextDef `yaml:"context"`
	ContextName string         `yaml:"name"`
}

type KubeContextDef

type KubeContextDef struct {
	Cluster   string `yaml:"cluster"`
	Namespace string `yaml:"namespace,omitempty"`
	User      string `yaml:"user"`
}

type KubeUser

type KubeUser struct {
	UserName string      `yaml:"name"`
	UserDef  KubeUserDef `yaml:"user"`
}

type KubeUserDef

type KubeUserDef struct {
	ClientCertificateData string `yaml:"client-certificate-data"`
	ClientKeyData         string `yaml:"client-key-data"`
}

type ListOfIntents

type ListOfIntents struct {
	ListOfIntents []map[string]string `json:"intent"`
}

ListOfIntents is a list of intents

type LogicalCloud

type LogicalCloud struct {
	MetaData      MetaDataList `json:"metadata"`
	Specification Spec         `json:"spec"`
}

LogicalCloud contains the parameters needed for a Logical Cloud

type LogicalCloudClient

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

LogicalCloudClient implements the LogicalCloudManager It will also be used to maintain some localized state

func NewLogicalCloudClient

func NewLogicalCloudClient() *LogicalCloudClient

LogicalCloudClient returns an instance of the LogicalCloudClient which implements the LogicalCloudManager

func (*LogicalCloudClient) Create

func (v *LogicalCloudClient) Create(project string, c LogicalCloud) (LogicalCloud, error)

Create entry for the logical cloud resource in the database

func (*LogicalCloudClient) Delete

func (v *LogicalCloudClient) Delete(project, logicalCloudName string) error

Delete the Logical Cloud entry from database

func (*LogicalCloudClient) Get

func (v *LogicalCloudClient) Get(project, logicalCloudName string) (LogicalCloud, error)

Get returns Logical Cloud corresponding to logical cloud name

func (*LogicalCloudClient) GetAll

func (v *LogicalCloudClient) GetAll(project string) ([]LogicalCloud, error)

GetAll returns Logical Clouds in the project

func (*LogicalCloudClient) Update

func (v *LogicalCloudClient) Update(project, logicalCloudName string, c LogicalCloud) (LogicalCloud, error)

Update an entry for the Logical Cloud in the database

type LogicalCloudKey

type LogicalCloudKey struct {
	Project          string `json:"project"`
	LogicalCloudName string `json:"logical-cloud-name"`
}

LogicalCloudKey is the key structure that is used in the database

type LogicalCloudManager

type LogicalCloudManager interface {
	Create(project string, c LogicalCloud) (LogicalCloud, error)
	Get(project, name string) (LogicalCloud, error)
	GetAll(project string) ([]LogicalCloud, error)
	Delete(project, name string) error
	Update(project, name string, c LogicalCloud) (LogicalCloud, error)
}

LogicalCloudManager is an interface that exposes the connection functionality

type MetaData

type MetaData struct {
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	UserData1   string `json:"userData1,omitempty"`
	UserData2   string `json:"userData2,omitempty"`
}

MetaData has - name, description, userdata1, userdata2

type MetaDataList

type MetaDataList struct {
	LogicalCloudName string `json:"name"`
	Description      string `json:"description"`
	UserData1        string `json:"userData1"`
	UserData2        string `json:"userData2"`
}

MetaData contains the parameters needed for metadata

type MetadataList

type MetadataList struct {
	Namespace string `yaml:"namespace"`
}

TODO move into a better place or reuse existing struct

type MigrateJson

type MigrateJson struct {
	MetaData UpdateMetadata `json:"metadata,omitempty"`
	Spec     MigrateSpec    `json:"spec"`
}

MigrateJson contains metadata and spec for migrate API

type MigrateSpec

type MigrateSpec struct {
	TargetCompositeAppVersion string `json:"target-composite-app-version"`
	TargetDigName             string `json:"target-dig-name"`
}

type OverrideValues

type OverrideValues struct {
	AppName   string            `json:"app-name"`
	ValuesObj map[string]string `json:"values"`
}

OverrideValues has appName and ValuesObj

type PrioritizedControlList

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

PrioritizedControlList contains PrioritizedList of PlacementControllers and ActionControllers

type PriorityQueue

type PriorityQueue []*ControllerElement

PriorityQueue is the heapArray to store the Controllers

func (PriorityQueue) Len

func (pq PriorityQueue) Len() int

func (PriorityQueue) Less

func (pq PriorityQueue) Less(i, j int) bool

func (*PriorityQueue) Pop

func (pq *PriorityQueue) Pop() interface{}

Pop method returns the controller with the highest priority

func (*PriorityQueue) Push

func (pq *PriorityQueue) Push(c interface{})

Push method add a controller into the heapArray

func (PriorityQueue) Swap

func (pq PriorityQueue) Swap(i, j int)

type Project

type Project struct {
	MetaData ProjectMetaData `json:"metadata"`
}

Project contains the metaData for Projects

type ProjectClient

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

ProjectClient implements the ProjectManager It will also be used to maintain some localized state

func NewProjectClient

func NewProjectClient() *ProjectClient

NewProjectClient returns an instance of the ProjectClient which implements the ProjectManager

func (*ProjectClient) CreateProject

func (v *ProjectClient) CreateProject(p Project, exists bool) (Project, error)

CreateProject a new collection based on the project

func (*ProjectClient) DeleteProject

func (v *ProjectClient) DeleteProject(name string) error

DeleteProject the Project from database

func (*ProjectClient) GetAllProjects

func (v *ProjectClient) GetAllProjects() ([]Project, error)

GetAllProjects returns all the projects

func (*ProjectClient) GetProject

func (v *ProjectClient) GetProject(name string) (Project, error)

GetProject returns the Project for corresponding name

type ProjectKey

type ProjectKey struct {
	ProjectName string `json:"project"`
}

ProjectKey is the key structure that is used in the database

func (ProjectKey) String

func (pk ProjectKey) String() string

We will use json marshalling to convert to string to preserve the underlying structure.

type ProjectManager

type ProjectManager interface {
	CreateProject(pr Project, exists bool) (Project, error)
	GetProject(name string) (Project, error)
	DeleteProject(name string) error
	GetAllProjects() ([]Project, error)
}

ProjectManager is an interface exposes the Project functionality

type ProjectMetaData

type ProjectMetaData struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	UserData1   string `json:"userData1"`
	UserData2   string `json:"userData2"`
}

ProjectMetaData contains the parameters for creating a project

type RollbackJson

type RollbackJson struct {
	MetaData UpdateMetadata `json:"metadata,omitempty"`
	Spec     RollbackSpec   `json:"spec"`
}

RollbackJson contains metadata and spec for rollback API

type RollbackSpec

type RollbackSpec struct {
	Revison string `json:"revision"`
}

type Spec

type Spec struct {
	NameSpace string   `json:"namespace"`
	Level     string   `json:"level"`
	User      UserData `json:"user"`
}

Spec contains the parameters needed for spec

type SpecData

type SpecData struct {
	AppName string           `json:"app-name,omitempty"`
	Intent  gpic.IntentStruc `json:"intent,omitempty"`
}

SpecData consists of appName and intent

type UpdateMetadata

type UpdateMetadata struct {
	Description string `json:"description"`
}

type UserData

type UserData struct {
	UserName        string     `json:"user-name"`
	Type            string     `json:"type"`
	UserPermissions []UserPerm `json:"user-permissions"`
}

UserData contains the parameters needed for user

type UserPerm

type UserPerm struct {
	PermName  string   `json:"permission-name"`
	APIGroups []string `json:"apiGroups"`
	Resources []string `json:"resources"`
	Verbs     []string `json:"verbs"`
}

UserPerm contains the parameters needed for user permissions

type Utility

type Utility interface {
	DBInsert(storeName string, key db.Key, query interface{}, meta string, c interface{}) error
	DBFind(storeName string, key db.Key, meta string) ([][]byte, error)
	DBUnmarshal(value []byte, out interface{}) error
	DBRemove(storeName string, key db.Key) error
	CheckProject(project string) error
	CheckLogicalCloud(project, logicalCloud string) error
	GetLogicalCloudContext(storeName string, key db.Key, meta string, project string, name string) (appcontext.AppContext, string, error)
	GetLogicalCloudFromContext(storeName string, appContextId string) (string, string, error)
	GetAppContextStatus(ac appcontext.AppContext) (*appcontext.AppContextStatus, error)
}

Interface facilitates unit testing by mocking functions

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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