environments

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResourceTypeName = "Applications.Core/environments"
	// User defined operation names
	OperationGetRecipeMetadata = "GETRECIPEMETADATA"
)

Variables

This section is empty.

Functions

func NewCreateOrUpdateEnvironment

func NewCreateOrUpdateEnvironment(opts ctrl.Options) (ctrl.Controller, error)

NewCreateOrUpdateEnvironment creates a new controller for creating or updating an environment resource.

func NewGetRecipeMetadata

func NewGetRecipeMetadata(opts ctrl.Options, engine engine.Engine) (ctrl.Controller, error)

NewGetRecipeMetadata creates a new controller for retrieving recipe metadata from an environment.

Types

type CreateOrUpdateEnvironment

type CreateOrUpdateEnvironment struct {
	ctrl.Operation[*datamodel.Environment, datamodel.Environment]
}

CreateOrUpdateEnvironments is the controller implementation to create or update environment resource.

func (*CreateOrUpdateEnvironment) Run

Run checks if a resource with the same namespace already exists, and if not, updates the resource with the new values. If a resource with the same namespace already exists, a conflict response is returned.

type GetRecipeMetadata

type GetRecipeMetadata struct {
	ctrl.Operation[*datamodel.Environment, datamodel.Environment]
	engine.Engine
}

GetRecipeMetadata is the controller implementation to get recipe metadata such as parameters and the details of those parameters(type/minValue/etc.).

func (*GetRecipeMetadata) GetRecipeMetadataFromRegistry

func (r *GetRecipeMetadata) GetRecipeMetadataFromRegistry(ctx context.Context, recipeProperties datamodel.EnvironmentRecipeProperties, recipeDataModel *datamodel.Recipe) (recipeParameters map[string]any, err error)

func (*GetRecipeMetadata) Run

Run retrieves the recipe metadata from the registry for a given recipe name and template path, and returns a response containing the recipe parameters.

Jump to

Keyboard shortcuts

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