Documentation ¶
Index ¶
- type Client
- type ClientDbInfo
- type ClusterInfo
- type ConfigMapOptions
- type Content
- type Customization
- type CustomizationClient
- func (cc *CustomizationClient) CreateCustomization(ctx context.Context, customization Customization, ...) (Customization, bool, error)
- func (cc *CustomizationClient) DeleteCustomization(ctx context.Context, ...) error
- func (cc *CustomizationClient) GetAllCustomization(ctx context.Context, ...) ([]Customization, error)
- func (cc *CustomizationClient) GetCustomization(ctx context.Context, ...) (Customization, error)
- func (cc *CustomizationClient) GetCustomizationContent(ctx context.Context, ...) (CustomizationContent, error)
- type CustomizationContent
- type CustomizationKey
- type CustomizationManager
- type CustomizationSpec
- type GenericK8sIntent
- type GenericK8sIntentClient
- func (g *GenericK8sIntentClient) CreateGenericK8sIntent(ctx context.Context, gki GenericK8sIntent, ...) (GenericK8sIntent, bool, error)
- func (g *GenericK8sIntentClient) DeleteGenericK8sIntent(ctx context.Context, ...) error
- func (g *GenericK8sIntentClient) GetAllGenericK8sIntents(ctx context.Context, ...) ([]GenericK8sIntent, error)
- func (g *GenericK8sIntentClient) GetGenericK8sIntent(ctx context.Context, ...) (GenericK8sIntent, error)
- type GenericK8sIntentKey
- type GenericK8sIntentManager
- type KeyOptions
- type Resource
- type ResourceClient
- func (rc *ResourceClient) CreateResource(ctx context.Context, res Resource, resContent ResourceContent, ...) (Resource, bool, error)
- func (rc *ResourceClient) DeleteResource(ctx context.Context, ...) error
- func (rc *ResourceClient) GetAllResources(ctx context.Context, ...) ([]Resource, error)
- func (rc *ResourceClient) GetResource(ctx context.Context, ...) (Resource, error)
- func (rc *ResourceClient) GetResourceContent(ctx context.Context, ...) (ResourceContent, error)
- type ResourceContent
- type ResourceGVK
- type ResourceKey
- type ResourceManager
- type ResourceSpec
- type SecretOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // Add Clients for API's here Customization *CustomizationClient GenericK8sIntent *GenericK8sIntentClient Resource *ResourceClient }
Client for using the services
type ClientDbInfo ¶
type ClientDbInfo struct {
// contains filtered or unexported fields
}
ClientDbInfo holds the MongoDB collection and attributes info
type ClusterInfo ¶
type ClusterInfo struct { Scope string `json:"scope"` ClusterProvider string `json:"clusterProvider"` ClusterName string `json:"cluster"` ClusterLabel string `json:"clusterLabel"` Mode string `json:"mode"` }
ClusterInfo holds the cluster info
type ConfigMapOptions ¶
type ConfigMapOptions struct {
DataKeyOptions []KeyOptions `json:"dataKeyOptions,omitempty"`
}
ConfigMapOptions holds properties for customizing ConfigMap
type Customization ¶
type Customization struct { Metadata types.Metadata `json:"metadata"` Spec CustomizationSpec `json:"spec"` }
Customization holds the customization data
type CustomizationClient ¶
type CustomizationClient struct {
// contains filtered or unexported fields
}
CustomizationClient holds the client properties
func NewCustomizationClient ¶
func NewCustomizationClient() *CustomizationClient
NewCustomizationClient returns an instance of the CustomizationClient which implements the Manager
func (*CustomizationClient) CreateCustomization ¶
func (cc *CustomizationClient) CreateCustomization(ctx context.Context, customization Customization, customizationContent CustomizationContent, project, compositeApp, version, deploymentIntentGroup, intent, resource string, failIfExists bool) (Customization, bool, error)
CreateCustomization creates a Customization
func (*CustomizationClient) DeleteCustomization ¶
func (cc *CustomizationClient) DeleteCustomization(ctx context.Context, customization, project, compositeApp, version, deploymentIntentGroup, intent, resource string) error
DeleteCustomization deletes a given Customization
func (*CustomizationClient) GetAllCustomization ¶
func (cc *CustomizationClient) GetAllCustomization(ctx context.Context, project, compositeApp, version, deploymentIntentGroup, intent, resource string) ([]Customization, error)
GetAllCustomization returns all the Customizations for an Intent and Resource
func (*CustomizationClient) GetCustomization ¶
func (cc *CustomizationClient) GetCustomization(ctx context.Context, customization, project, compositeApp, version, deploymentIntentGroup, intent, resource string) (Customization, error)
GetCustomization returns a Customization
func (*CustomizationClient) GetCustomizationContent ¶
func (cc *CustomizationClient) GetCustomizationContent(ctx context.Context, customization, project, compositeApp, version, deploymentIntentGroup, intent, resource string) (CustomizationContent, error)
GetCustomizationContent returns the content of the Customization files
type CustomizationContent ¶
type CustomizationContent struct {
Content []Content
}
CustomizationContent is a list of configuration data for a ConfigMap/Secret
type CustomizationKey ¶
type CustomizationKey struct { Customization string `json:"customization"` Project string `json:"project"` CompositeApp string `json:"compositeApp"` CompositeAppVersion string `json:"compositeAppVersion"` DeploymentIntentGroup string `json:"deploymentIntentGroup"` GenericK8sIntent string `json:"genericK8sIntent"` Resource string `json:"genericResource"` }
CustomizationKey represents the resources associated with a Customization
func (CustomizationKey) String ¶
func (k CustomizationKey) String() string
Convert the key to string to preserve the underlying structure
type CustomizationManager ¶
type CustomizationManager interface { CreateCustomization(ctx context.Context, customization Customization, content CustomizationContent, project, compositeApp, version, deploymentIntentGroup, intent, resource string, failIfExists bool) (Customization, bool, error) DeleteCustomization(ctx context.Context, customization, project, compositeApp, version, deploymentIntentGroup, intent, resource string) error GetAllCustomization(ctx context.Context, project, compositeApp, version, deploymentIntentGroup, intent, resource string) ([]Customization, error) GetCustomization(ctx context.Context, customization, project, compositeApp, version, deploymentIntentGroup, intent, resource string) (Customization, error) GetCustomizationContent(ctx context.Context, customization, project, compositeApp, version, deploymentIntentGroup, intent, resource string) (CustomizationContent, error) }
CustomizationManager exposes all the functionalities related to Customization
type CustomizationSpec ¶
type CustomizationSpec struct { ClusterSpecific string `json:"clusterSpecific"` ClusterInfo ClusterInfo `json:"clusterInfo"` PatchType string `json:"patchType,omitempty"` PatchJSON []map[string]interface{} `json:"patchJson,omitempty"` ConfigMapOptions ConfigMapOptions `json:"configMapOptions,omitempty"` SecretOptions SecretOptions `json:"secretOptions,omitempty"` }
CustomizationSpec holds the cluster-specific customization data
type GenericK8sIntent ¶
GenericK8sIntent holds the intent data
type GenericK8sIntentClient ¶
type GenericK8sIntentClient struct {
// contains filtered or unexported fields
}
GenericK8sIntentClient holds the client properties
func NewGenericK8sIntentClient ¶
func NewGenericK8sIntentClient() *GenericK8sIntentClient
NewGenericK8sIntentClient returns an instance of the GenericK8sIntentClient which implements the Manager
func (*GenericK8sIntentClient) CreateGenericK8sIntent ¶
func (g *GenericK8sIntentClient) CreateGenericK8sIntent(ctx context.Context, gki GenericK8sIntent, project, compositeApp, compositeAppVersion, deploymentIntentGroup string, failIfExists bool) (GenericK8sIntent, bool, error)
CreateGenericK8sIntent creates a GenericK8sIntent
func (*GenericK8sIntentClient) DeleteGenericK8sIntent ¶
func (g *GenericK8sIntentClient) DeleteGenericK8sIntent(ctx context.Context, intent, project, compositeApp, compositeAppVersion, deploymentIntentGroup string) error
DeleteGenericK8sIntent deletes a given GenericK8sIntent
func (*GenericK8sIntentClient) GetAllGenericK8sIntents ¶
func (g *GenericK8sIntentClient) GetAllGenericK8sIntents(ctx context.Context, project, compositeApp, compositeAppVersion, deploymentIntentGroup string) ([]GenericK8sIntent, error)
GetAllGenericK8sIntents returns all the GenericK8sIntents
func (*GenericK8sIntentClient) GetGenericK8sIntent ¶
func (g *GenericK8sIntentClient) GetGenericK8sIntent(ctx context.Context, intent, project, compositeApp, compositeAppVersion, deploymentIntentGroup string) (GenericK8sIntent, error)
GetGenericK8sIntent returns a GenericK8sIntent
type GenericK8sIntentKey ¶
type GenericK8sIntentKey struct { GenericK8sIntent string `json:"genericK8sIntent"` Project string `json:"project"` CompositeApp string `json:"compositeApp"` CompositeAppVersion string `json:"compositeAppVersion"` DeploymentIntentGroup string `json:"deploymentIntentGroup"` }
GenericK8sIntentKey represents the resources associated with a GenericK8sIntent
func (GenericK8sIntentKey) String ¶
func (k GenericK8sIntentKey) String() string
Convert the key to string to preserve the underlying structure
type GenericK8sIntentManager ¶
type GenericK8sIntentManager interface { CreateGenericK8sIntent(ctx context.Context, gki GenericK8sIntent, project, compositeApp, compositeAppVersion, deploymentIntentGroup string, failIfExists bool) (GenericK8sIntent, bool, error) DeleteGenericK8sIntent(ctx context.Context, intent, project, compositeApp, compositeAppVersion, deploymentIntentGroup string) error GetAllGenericK8sIntents(ctx context.Context, project, compositeApp, compositeAppVersion, deploymentIntentGroup string) ([]GenericK8sIntent, error) GetGenericK8sIntent(ctx context.Context, intent, project, compositeApp, compositeAppVersion, deploymentIntentGroup string) (GenericK8sIntent, error) }
GenericK8sIntentManager exposes all the functionalities related to GenericK8sIntent
type KeyOptions ¶
type KeyOptions struct { FileName string `json:"fileName,omitempty"` KeyName string `json:"keyName,omitempty"` MergePatch string `json:"mergePatch,omitempty"` // indicates whether the customization files contain merge patch data }
KeyOptions holds properties for customizing ConfigMap/Secret configuration data keys
type Resource ¶
type Resource struct { Metadata types.Metadata `json:"metadata"` Spec ResourceSpec `json:"spec"` }
Resource holds the resource data
type ResourceClient ¶
type ResourceClient struct {
// contains filtered or unexported fields
}
ResourceClient holds the client properties
func NewResourceClient ¶
func NewResourceClient() *ResourceClient
NewResourceClient returns an instance of the ResourceClient which implements the Manager
func (*ResourceClient) CreateResource ¶
func (rc *ResourceClient) CreateResource(ctx context.Context, res Resource, resContent ResourceContent, project, compositeApp, compositeAppVersion, deploymentIntentGroup, genericK8sIntent string, failIfExists bool) (Resource, bool, error)
CreateResource creates a Resource
func (*ResourceClient) DeleteResource ¶
func (rc *ResourceClient) DeleteResource(ctx context.Context, resource, project, compositeApp, compositeAppVersion, deploymentIntentGroup, genericK8sIntent string) error
DeleteResource deletes a given Resource
func (*ResourceClient) GetAllResources ¶
func (rc *ResourceClient) GetAllResources(ctx context.Context, project, compositeApp, compositeAppVersion, deploymentIntentGroup, genericK8sIntent string) ([]Resource, error)
GetAllResources returns all the Resources for an Intent
func (*ResourceClient) GetResource ¶
func (rc *ResourceClient) GetResource(ctx context.Context, resource, project, compositeApp, compositeAppVersion, deploymentIntentGroup, genericK8sIntent string) (Resource, error)
GetResource returns a Resource
func (*ResourceClient) GetResourceContent ¶
func (rc *ResourceClient) GetResourceContent(ctx context.Context, resource, project, compositeApp, compositeAppVersion, deploymentIntentGroup, genericK8sIntent string) (ResourceContent, error)
GetResourceContent returns the content of the Resource template
type ResourceContent ¶
type ResourceContent struct {
Content string `json:"filecontent"`
}
ResourceContent holds configuration data for the Kubernetes object
type ResourceGVK ¶
type ResourceGVK struct { APIVersion string `json:"apiVersion"` Kind string `json:"kind"` Name string `json:"name"` }
ResourceGVK holds the Kubernetes object details
type ResourceKey ¶
type ResourceKey struct { Resource string `json:"genericResource"` Project string `json:"project"` CompositeApp string `json:"compositeApp"` CompositeAppVersion string `json:"compositeAppVersion"` DeploymentIntentGroup string `json:"deploymentIntentGroup"` GenericK8sIntent string `json:"genericK8sIntent"` }
ResourceKey represents the resources associated with a Resource
func (ResourceKey) String ¶
func (k ResourceKey) String() string
Convert the key to string to preserve the underlying structure
type ResourceManager ¶
type ResourceManager interface { CreateResource(ctx context.Context, res Resource, resContent ResourceContent, project, compositeApp, compositeAppVersion, deploymentIntentGroup, genericK8sIntent string, failIfExists bool) (Resource, bool, error) DeleteResource(ctx context.Context, resource, project, compositeApp, compositeAppVersion, deploymentIntentGroup, genericK8sIntent string) error GetAllResources(ctx context.Context, project, compositeApp, compositeAppVersion, deploymentIntentGroup, genericK8sIntent string) ([]Resource, error) GetResource(ctx context.Context, resource, project, compositeApp, compositeAppVersion, deploymentIntentGroup, genericK8sIntent string) (Resource, error) GetResourceContent(ctx context.Context, resource, project, compositeApp, compositeAppVersion, deploymentIntentGroup, genericK8sIntent string) (ResourceContent, error) }
ResourceManager exposes all the functionalities related to Resource
type ResourceSpec ¶
type ResourceSpec struct { AppName string `json:"app"` NewObject string `json:"newObject"` ResourceGVK ResourceGVK `json:"resourceGVK,omitempty"` }
ResourceSpec holds the Kubernetes object details and the app using the object
type SecretOptions ¶
type SecretOptions struct {
DataKeyOptions []KeyOptions `json:"dataKeyOptions,omitempty"`
}
SecretOptions holds properties for customizing Secret