Documentation ¶
Index ¶
- Constants
- func NewCreateOrUpdateEnvironment(opts ctrl.Options) (ctrl.Controller, error)
- func NewGetRecipeMetadata(opts ctrl.Options, engine engine.Engine) (ctrl.Controller, error)
- type CreateOrUpdateEnvironment
- type GetRecipeMetadata
- func (r *GetRecipeMetadata) GetRecipeMetadataFromRegistry(ctx context.Context, recipeProperties datamodel.EnvironmentRecipeProperties, ...) (recipeParameters map[string]any, err error)
- func (r *GetRecipeMetadata) Run(ctx context.Context, w http.ResponseWriter, req *http.Request) (rest.Response, error)
Constants ¶
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 ¶
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 ¶
func (e *CreateOrUpdateEnvironment) Run(ctx context.Context, w http.ResponseWriter, req *http.Request) (rest.Response, error)
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 ¶
func (r *GetRecipeMetadata) Run(ctx context.Context, w http.ResponseWriter, req *http.Request) (rest.Response, error)
Run retrieves the recipe metadata from the registry for a given recipe name and template path, and returns a response containing the recipe parameters.