recipes

package
v0.0.0-...-53e5992 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureResourceGroup

type AzureResourceGroup struct {
	// Name represents the resource name.
	Name string `json:"name"`
	// ID represents fully qualified resource group name.
	ID string `json:"id"`
}

AzureResourceGroup contains Azure Resource Group provider information.

type AzureSubscription

type AzureSubscription struct {
	// SubscriptionID represents the id of subscription.
	SubscriptionID string `json:"subscriptionId"`
	// ID represents fully qualified subscription id.
	ID string `json:"id"`
}

AzureSubscription contains Azure Subscription provider information.

type Context

type Context struct {
	// Resource represents the resource information of the deploying recipe resource.
	Resource Resource `json:"resource,omitempty"`
	// Application represents environment resource information.
	Application ResourceInfo `json:"application,omitempty"`
	// Environment represents environment resource information.
	Environment ResourceInfo `json:"environment,omitempty"`
	// Runtime represents Kubernetes Runtime configuration.
	Runtime RuntimeConfiguration `json:"runtime,omitempty"`
	// Azure represents Azure provider scope.
	Azure *ProviderAzure `json:"azure,omitempty"`
	// AWS represents AWS provider scope.
	AWS *ProviderAWS `json:"aws,omitempty"`
}

Context represents the context information which accesses portable resource properties. Recipe template authors can leverage the RecipeContext parameter to access portable resource properties to generate name and properties that are unique for the portable resource calling the recipe.

func (*Context) LogAttrs

func (c *Context) LogAttrs() []slog.Attr

type ErrorAdditionalInfo

type ErrorAdditionalInfo = server.ErrorAdditionalInfo

type ErrorDetails

type ErrorDetails = server.ErrorDetails

type ErrorResponse

type ErrorResponse = server.ErrorResponse

type KubernetesRuntime

type KubernetesRuntime struct {
	// Namespace is set to the application namespace when the portable resource is application-scoped, and set to the environment namespace when it is environment scoped
	Namespace string `json:"namespace,omitempty"`
	// EnvironmentNamespace is set to environment namespace.
	EnvironmentNamespace string `json:"environmentNamespace"`
}

KubernetesRuntime represents application and environment namespaces.

type ProviderAWS

type ProviderAWS struct {
	// Region represents the region of the AWS account.
	Region string `json:"region"`
	// Account represents the account id of the AWS account.
	Account string `json:"account"`
}

ProviderAWS contains AWS Account provider scope for recipe context.

type ProviderAzure

type ProviderAzure struct {
	// ResourceGroup represents the resource group information.
	ResourceGroup AzureResourceGroup `json:"resourceGroup,omitempty"`
	// Subscription represents the subscription information.
	Subscription AzureSubscription `json:"subscription,omitempty"`
}

ProviderAzure contains Azure provider scope for recipe context.

type Resource

type Resource struct {
	// ResourceInfo represents name and id of the resource
	ResourceInfo
	// Type represents the resource type, this will be a namespace/type combo. Ex. Applications.Core/Environment
	Type string `json:"type"`

	// Properties are the properties of the resource.
	Properties map[string]any `json:"properties,omitempty"`
}

Resource contains the information needed to deploy a recipe. In the case the resource is a portable resource, it represents the resource's id, name and type.

func (*Resource) GetStringValue

func (r *Resource) GetStringValue(key string) (string, bool)

type ResourceInfo

type ResourceInfo struct {
	// Name represents the resource name.
	Name string `json:"name"`
	// ID represents fully qualified resource id.
	ID string `json:"id"`
}

ResourceInfo represents name and id of the resource

type Result

type Result struct {
	// Values represents the output values of the recipe.
	Values map[string]any `json:"values,omitempty"`
	// Secrets represents the output secrets of the recipe.
	Secrets map[string]any `json:"secrets,omitempty"`
	// Resources represents the output resources of the recipe.
	Resources []string `json:"resources,omitempty"`
}

Result represents the result of a recipe execution.

type RuntimeConfiguration

type RuntimeConfiguration struct {
	Kubernetes *KubernetesRuntime `json:"kubernetes,omitempty"`
}

RuntimeConfiguration represents Kubernetes Runtime configuration for the environment.

Jump to

Keyboard shortcuts

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