datamodel

package
v0.26.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ApplicationResourceType = "Applications.Core/applications"
View Source
const (
	// AzureKeyVaultVolume represents the resource of azure keyvault volume.
	AzureKeyVaultVolume string = "azure.com.keyvault"
)
View Source
const ContainerResourceType = "Applications.Core/containers"
View Source
const EnvironmentResourceType = "Applications.Core/environments"
View Source
const ExtenderResourceType = "Applications.Core/extenders"

ExtenderResourceType is the resource type for Extender portable resources.

View Source
const GatewayResourceType = "Applications.Core/gateways"
View Source
const HTTPRouteResourceType = "Applications.Core/httpRoutes"
View Source
const SecretStoreResourceType = "Applications.Core/secretStores"
View Source
const VolumeResourceType = "Applications.Core/volumes"

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	v1.BaseResource

	// Properties is the properties of the resource.
	Properties ApplicationProperties `json:"properties"`
}

Application represents Application resource.

func (*Application) ApplyDeploymentOutput

func (c *Application) ApplyDeploymentOutput(do rpv1.DeploymentOutput) error

ApplyDeploymentOutput updates the status of the application with the output resources from the deployment and returns no error.

func (*Application) OutputResources

func (c *Application) OutputResources() []rpv1.OutputResource

OutputResources returns the OutputResources from the Application instance.

func (*Application) ResourceMetadata

func (h *Application) ResourceMetadata() *rpv1.BasicResourceProperties

ResourceMetadata returns the BasicResourceProperties of the Application instance.

func (*Application) ResourceTypeName

func (e *Application) ResourceTypeName() string

ResourceTypeName returns the resource type name of the Application instance.

type ApplicationProperties

type ApplicationProperties struct {
	rpv1.BasicResourceProperties

	Extensions []Extension `json:"extensions,omitempty"`
}

ApplicationProperties represents the properties of Application.

type AzureKeyVaultVolumeProperties

type AzureKeyVaultVolumeProperties struct {
	// The KeyVault certificates that this volume exposes
	Certificates map[string]CertificateObjectProperties `json:"certificates,omitempty"`
	// The KeyVault keys that this volume exposes
	Keys map[string]KeyObjectProperties `json:"keys,omitempty"`
	// The ID of the keyvault to use for this volume resource
	Resource string `json:"resource,omitempty"`
	// The KeyVault secrets that this volume exposes
	Secrets map[string]SecretObjectProperties `json:"secrets,omitempty"`
}

AzureKeyVaultVolumeProperties represents the volume for Azure Keyvault.

type CertificateFormat

type CertificateFormat string
const (
	CertificateFormatPEM CertificateFormat = "pem"
	CertificateFormatPFX CertificateFormat = "pfx"
)

type CertificateObjectProperties

type CertificateObjectProperties struct {
	// The name of the certificate
	Name string `json:"name"`
	// File name when written to disk.
	Alias string `json:"alias,omitempty"`
	// Encoding format. Default utf-8
	Encoding *SecretEncoding `json:"encoding,omitempty"`
	// Certificate format. Default pem
	Format *CertificateFormat `json:"format,omitempty"`
	// Certificate version
	Version string `json:"version,omitempty"`
	// Certificate object type to be downloaded - the certificate itself, private key or public key of the certificate
	CertType *CertificateType `json:"certType,omitempty"`
}

CertificateObjectProperties represents the certificate for Volume.

type CertificateType

type CertificateType string
const (
	CertificateTypePrivateKey  CertificateType = "privatekey"
	CertificateTypePublicKey   CertificateType = "publickey"
	CertificateTypeCertificate CertificateType = "certificate"
)

type ConnectionProperties

type ConnectionProperties struct {
	Source                string        `json:"source,omitempty"`
	DisableDefaultEnvVars *bool         `json:"disableDefaultEnvVars,omitempty"`
	IAM                   IAMProperties `json:"iam,omitempty"`
}

ConnectionProperties represents the properties of Connection.

func (ConnectionProperties) GetDisableDefaultEnvVars

func (conn ConnectionProperties) GetDisableDefaultEnvVars() bool

GetDisableDefaultEnvVars returns the value of the DisableDefaultEnvVars field of the ConnectionProperties struct, or false if the field is nil.

type Container

type Container struct {
	Image           string                      `json:"image,omitempty"`
	ImagePullPolicy string                      `json:"imagePullPolicy,omitempty"`
	Env             map[string]string           `json:"env,omitempty"`
	LivenessProbe   HealthProbeProperties       `json:"livenessProbe,omitempty"`
	Ports           map[string]ContainerPort    `json:"ports,omitempty"`
	ReadinessProbe  HealthProbeProperties       `json:"readinessProbe,omitempty"`
	Volumes         map[string]VolumeProperties `json:"volumes,omitempty"`
	Command         []string                    `json:"command,omitempty"`
	Args            []string                    `json:"args,omitempty"`
	WorkingDir      string                      `json:"workingDir,omitempty"`
}

Container - Definition of a container.

type ContainerPort

type ContainerPort struct {
	ContainerPort int32    `json:"containerPort,omitempty"`
	Port          int32    `json:"port,omitempty"`
	Scheme        string   `json:"scheme,omitempty"`
	Protocol      Protocol `json:"protocol,omitempty"`
	Provides      string   `json:"provides,omitempty"`
}

ContainerPort - Specifies a listening port for the container

type ContainerProperties

type ContainerProperties struct {
	rpv1.BasicResourceProperties
	Connections          map[string]ConnectionProperties `json:"connections,omitempty"`
	Container            Container                       `json:"container,omitempty"`
	Extensions           []Extension                     `json:"extensions,omitempty"`
	Identity             *rpv1.IdentitySettings          `json:"identity,omitempty"`
	Runtimes             *RuntimeProperties              `json:"runtimes,omitempty"`
	Resources            []ResourceReference             `json:"resources,omitempty"`
	ResourceProvisioning ContainerResourceProvisioning   `json:"resourceProvisioning,omitempty"`
}

ContainerProperties represents the properties of Container.

type ContainerResource

type ContainerResource struct {
	v1.BaseResource

	// TODO: remove this from CoreRP
	PortableResourceMetadata

	// Properties is the properties of the resource.
	Properties ContainerProperties `json:"properties"`
}

ContainerResource represents Container resource.

func (*ContainerResource) ApplyDeploymentOutput

func (c *ContainerResource) ApplyDeploymentOutput(do rpv1.DeploymentOutput) error

ApplyDeploymentOutput updates the ContainerResource's Properties, ComputedValues and SecretValues with the DeploymentOutput's DeployedOutputResources, ComputedValues and SecretValues respectively and returns no error.

func (*ContainerResource) OutputResources

func (c *ContainerResource) OutputResources() []rpv1.OutputResource

OutputResources returns the OutputResources from the ContainerResource's Properties Status.

func (*ContainerResource) ResourceMetadata

func (h *ContainerResource) ResourceMetadata() *rpv1.BasicResourceProperties

ResourceMetadata returns the BasicResourceProperties of the ContainerResource instance.

func (ContainerResource) ResourceTypeName

func (c ContainerResource) ResourceTypeName() string

ResourceTypeName returns the qualified name of the resource.

type ContainerResourceProvisioning added in v0.26.0

type ContainerResourceProvisioning string

ContainerResourceProvisioning specifies how resources should be created for the container.

const (
	// ContainerResourceProvisioningInternal specifies that Radius will create resources for the container according to its internal logic.
	ContainerResourceProvisioningInternal ContainerResourceProvisioning = "internal"

	// ContainerResourceProvisioningManual specifies that Radius will not create resources for the container, and the user will have to create them manually.
	ContainerResourceProvisioningManual ContainerResourceProvisioning = "manual"
)

type DaprSidecarExtension

type DaprSidecarExtension struct {
	AppID    string   `json:"appId,omitempty"`
	AppPort  int32    `json:"appPort,omitempty"`
	Config   string   `json:"config,omitempty"`
	Protocol Protocol `json:"protocol,omitempty"`
}

DaprSidecarExtension - Specifies the resource should have a Dapr sidecar injected

type Environment

type Environment struct {
	v1.BaseResource

	// Properties is the properties of the resource.
	Properties EnvironmentProperties `json:"properties"`
}

Environment represents Application environment resource.

func (*Environment) ResourceTypeName

func (e *Environment) ResourceTypeName() string

ResourceTypeName returns the resource type of the Environment instance.

type EnvironmentProperties

type EnvironmentProperties struct {
	Compute    rpv1.EnvironmentCompute                           `json:"compute,omitempty"`
	Recipes    map[string]map[string]EnvironmentRecipeProperties `json:"recipes,omitempty"`
	Providers  Providers                                         `json:"providers,omitempty"`
	Extensions []Extension                                       `json:"extensions,omitempty"`
}

EnvironmentProperties represents the properties of Environment.

type EnvironmentRecipeProperties

type EnvironmentRecipeProperties struct {
	TemplateKind    string         `json:"templateKind"`
	TemplatePath    string         `json:"templatePath"`
	TemplateVersion string         `json:"templateVersion,omitempty"`
	Parameters      map[string]any `json:"parameters,omitempty"`
}

EnvironmentRecipeProperties represents the properties of environment's recipe.

func (*EnvironmentRecipeProperties) ResourceTypeName

func (e *EnvironmentRecipeProperties) ResourceTypeName() string

ResourceTypeName returns the resource type of the EnvironmentRecipeProperties instance.

type EphemeralVolume

type EphemeralVolume struct {
	VolumeBase
	ManagedStore ManagedStore `json:"managedStore,omitempty"`
}

EphemeralVolume - Specifies an ephemeral volume for a container

type ExecHealthProbeProperties

type ExecHealthProbeProperties struct {
	HealthProbeBase
	Command string `json:"command,omitempty"`
}

ExecHealthProbeProperties - Specifies the properties for readiness/liveness probe using an executable

type Extender

type Extender struct {
	v1.BaseResource

	// Properties is the properties of the resource.
	Properties ExtenderProperties `json:"properties"`

	// PortableResourceMetadata represents internal DataModel properties common to all portable resource types.
	PortableResourceMetadata
}

Extender represents Extender portable resource.

func (*Extender) ApplyDeploymentOutput

func (r *Extender) ApplyDeploymentOutput(do rpv1.DeploymentOutput) error

ApplyDeploymentOutput updates the Status of Properties of the Extender resource with the DeployedOutputResources and returns no error.

func (*Extender) OutputResources

func (r *Extender) OutputResources() []rpv1.OutputResource

OutputResources returns the OutputResources of the Extender resource.

func (*Extender) Recipe

Recipe returns the ResourceRecipe associated with the Extender if the ResourceProvisioning is not set to Manual, otherwise it returns nil.

func (*Extender) ResourceMetadata

func (r *Extender) ResourceMetadata() *rpv1.BasicResourceProperties

ResourceMetadata returns the BasicResourceProperties of the Extender resource.

func (*Extender) ResourceTypeName

func (r *Extender) ResourceTypeName() string

ResourceTypeName returns the resource type of the extender resource.

type ExtenderProperties

type ExtenderProperties struct {
	rpv1.BasicResourceProperties
	// Additional properties for the resource
	AdditionalProperties map[string]any `json:"additionalProperties,omitempty"`
	// Secrets values provided for the resource
	Secrets map[string]any `json:"secrets,omitempty"`
	// The recipe used to automatically deploy underlying infrastructure for the Extender
	ResourceRecipe portableresources.ResourceRecipe `json:"recipe,omitempty"`
	// Specifies how the underlying service/resource is provisioned and managed
	ResourceProvisioning portableresources.ResourceProvisioning `json:"resourceProvisioning,omitempty"`
}

ExtenderProperties represents the properties of Extender resource.

type Extension

type Extension struct {
	Kind                ExtensionKind           `json:"kind,omitempty"`
	ManualScaling       *ManualScalingExtension `json:"manualScaling,omitempty"`
	DaprSidecar         *DaprSidecarExtension   `json:"daprSidecar,omitempty"`
	KubernetesMetadata  *KubeMetadataExtension  `json:"kubernetesMetadata,omitempty"`
	KubernetesNamespace *KubeNamespaceExtension `json:"kubernetesNamespace,omitempty"`
}

Extension of a resource.

func FindExtension

func FindExtension(exts []Extension, kind ExtensionKind) *Extension

FindExtension searches a slice of Extensions for one with a matching ExtensionKind.

type ExtensionKind

type ExtensionKind string

ExtensionKind

const (
	ManualScaling                ExtensionKind = "manualScaling"
	DaprSidecar                  ExtensionKind = "daprSidecar"
	KubernetesMetadata           ExtensionKind = "kubernetesMetadata"
	KubernetesNamespaceExtension ExtensionKind = "kubernetesNamespace"
)

type Gateway

type Gateway struct {
	v1.BaseResource

	// TODO: remove this from CoreRP
	PortableResourceMetadata
	// Properties is the properties of the resource.
	Properties GatewayProperties `json:"properties"`
}

Gateway represents Gateway resource.

func (*Gateway) ApplyDeploymentOutput

func (g *Gateway) ApplyDeploymentOutput(do rpv1.DeploymentOutput) error

ApplyDeploymentOutput sets the Status, ComputedValues, SecretValues and URL properties of the Gateway struct based on the DeploymentOutput object.

func (*Gateway) OutputResources

func (g *Gateway) OutputResources() []rpv1.OutputResource

OutputResources returns the OutputResources from the Status of the Gateway Properties.

func (*Gateway) ResourceMetadata

func (h *Gateway) ResourceMetadata() *rpv1.BasicResourceProperties

ResourceMetadata returns the BasicResourceProperties of the Gateway instance.

func (*Gateway) ResourceTypeName

func (g *Gateway) ResourceTypeName() string

ResourceTypeName returns the resource type of the Gateway instance.

type GatewayProperties

type GatewayProperties struct {
	rpv1.BasicResourceProperties
	Internal bool                       `json:"internal,omitempty"`
	Hostname *GatewayPropertiesHostname `json:"hostname,omitempty"`
	TLS      *GatewayPropertiesTLS      `json:"tls,omitempty"`
	Routes   []GatewayRoute             `json:"routes,omitempty"`
	URL      string                     `json:"url,omitempty"`
}

GatewayProperties represents the properties of Gateway.

type GatewayPropertiesHostname

type GatewayPropertiesHostname struct {
	FullyQualifiedHostname string `json:"fullyQualifiedHostname,omitempty"`
	Prefix                 string `json:"prefix,omitempty"`
}

GatewayPropertiesHostname - Declare hostname information for the Gateway.

type GatewayPropertiesTLS

type GatewayPropertiesTLS struct {
	SSLPassthrough         bool                      `json:"sslPassthrough,omitempty"`
	MinimumProtocolVersion MinimumTLSProtocolVersion `json:"minimumProtocolVersion,omitempty"`
	CertificateFrom        string                    `json:"certificateFrom,omitempty"`
}

GatewayPropertiesTLS - Declare TLS information for the Gateway.

type GatewayRoute

type GatewayRoute struct {
	Destination   string `json:"destination,omitempty"`
	Path          string `json:"path,omitempty"`
	ReplacePrefix string `json:"replacePrefix,omitempty"`
}

GatewayRoute represents the route attached to Gateway.

type HTTPGetHealthProbeProperties

type HTTPGetHealthProbeProperties struct {
	HealthProbeBase
	ContainerPort int32             `json:"containerPort,omitempty"`
	Path          string            `json:"path,omitempty"`
	Headers       map[string]string `json:"headers,omitempty"`
}

HTTPGetHealthProbeProperties - Specifies the properties for readiness/liveness probe using HTTP Get

type HTTPRoute

type HTTPRoute struct {
	v1.BaseResource

	// TODO: remove this from CoreRP
	PortableResourceMetadata
	// Properties is the properties of the resource.
	Properties *HTTPRouteProperties `json:"properties"`
}

HTTPRoute represents HTTPRoute resource.

func (*HTTPRoute) ApplyDeploymentOutput

func (h *HTTPRoute) ApplyDeploymentOutput(do rpv1.DeploymentOutput) error

ApplyDeploymentOutput sets the Properties, ComputedValues, and SecretValues fields of the HTTPRoute struct based on the DeploymentOutput parameter and returns nil.

func (*HTTPRoute) OutputResources

func (h *HTTPRoute) OutputResources() []rpv1.OutputResource

OutputResources returns the OutputResources from the Properties.

func (*HTTPRoute) ResourceMetadata

func (h *HTTPRoute) ResourceMetadata() *rpv1.BasicResourceProperties

ResourceMetadata returns the BasicResourceProperties of the HTTPRoute instance.

func (*HTTPRoute) ResourceTypeName

func (h *HTTPRoute) ResourceTypeName() string

ResourceTypeName returns the type of the resource.

type HTTPRouteProperties

type HTTPRouteProperties struct {
	rpv1.BasicResourceProperties
	Hostname string `json:"hostname,omitempty"`
	Port     int32  `json:"port,omitempty"`
	Scheme   string `json:"scheme,omitempty"`
	URL      string `json:"url,omitempty"`
}

HTTPRouteProperties represents the properties of HTTPRoute.

type HealthProbeBase

type HealthProbeBase struct {
	FailureThreshold    *float32 `json:"failureThreshold,omitempty"`
	InitialDelaySeconds *float32 `json:"initialDelaySeconds,omitempty"`
	PeriodSeconds       *float32 `json:"periodSeconds,omitempty"`
	TimeoutSeconds      *float32 `json:"timeoutSeconds,omitempty"`
}

HealthProbeBase - Properties for readiness/liveness probe

type HealthProbeKind

type HealthProbeKind string
const (
	ExecHealthProbe    HealthProbeKind = "exec"
	HTTPGetHealthProbe HealthProbeKind = "httpGet"
	TCPHealthProbe     HealthProbeKind = "tcp"
)

type HealthProbeProperties

type HealthProbeProperties struct {
	Kind    HealthProbeKind               `json:"kind"`
	Exec    *ExecHealthProbeProperties    `json:"exec,omitempty"`
	HTTPGet *HTTPGetHealthProbeProperties `json:"httpGet,omitempty"`
	TCP     *TCPHealthProbeProperties     `json:"tcp,omitempty"`
}

HealthProbeProperties - Properties for readiness/liveness probe

func (HealthProbeProperties) IsEmpty

func (h HealthProbeProperties) IsEmpty() bool

IsEmpty checks if the HealthProbeProperties is empty or not.

type IAMKind

type IAMKind string

Kind - The kind of IAM provider to configure

const (
	KindAzure                   IAMKind = "azure"
	KindAzureComKeyVault        IAMKind = "azure.com/KeyVault"
	KindAzureComServiceBusQueue IAMKind = "azure.com/ServiceBusQueue"
	KindDaprIoPubSubTopic       IAMKind = "dapr.io/PubSubTopic"
	KindDaprIoSecretStore       IAMKind = "dapr.io/SecretStore"
	KindDaprIoStateStore        IAMKind = "dapr.io/StateStore"
	KindGrpc                    IAMKind = "Grpc"
	KindHTTP                    IAMKind = "Http"
	KindMicrosoftComSQL         IAMKind = "microsoft.com/SQL"
	KindMongoComMongoDB         IAMKind = "mongo.com/MongoDB"
	KindRabbitmqComMessageQueue IAMKind = "rabbitmq.com/MessageQueue"
	KindRedislabsComRedis       IAMKind = "redislabs.com/Redis"
)

func Kinds

func Kinds() []IAMKind

Kinds returns a list of supported IAMKinds.

func (IAMKind) IsKind

func (k IAMKind) IsKind(kind IAMKind) bool

IsKind compares two IAMKinds and returns true if they are equal.

func (IAMKind) IsValid

func (k IAMKind) IsValid() bool

IsValid checks if the IAMKind is valid by comparing it to the list of valid IAMKinds.

type IAMProperties

type IAMProperties struct {
	Kind  IAMKind  `json:"kind,omitempty"`
	Roles []string `json:"roles,omitempty"`
}

IAMProperties represents the properties of IAM provider.

type KeyObjectProperties

type KeyObjectProperties struct {
	// The name of the key
	Name string `json:"name"`
	// File name when written to disk.
	Alias string `json:"alias,omitempty"`
	// Key version
	Version string `json:"version,omitempty"`
}

KeyObjectProperties represents Key object volume.

type KubeMetadataExtension

type KubeMetadataExtension struct {
	Annotations map[string]string `json:"annotations,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
}

KubeMetadataExtension represents the extension of kubernetes resource.

type KubeNamespaceExtension

type KubeNamespaceExtension struct {
	Namespace string `json:"namespace,omitempty"`
}

KubeNamespaceOverrideExtension represents the extension to override kubernetes namespace.

type KubernetesRuntime

type KubernetesRuntime struct {
	// Base represents the Kubernetes resource definition in the serialized YAML format
	Base string `json:"base,omitempty"`

	// Pod represents the Kuberetes PodSpec strategic merge patch to be applied to the rendered PodSpec. This is stored as a JSON-encoded string.
	Pod string `json:"pod,omitempty"`
}

KubernetesRuntime represents the Kubernetes runtime configuration.

type ManagedStore

type ManagedStore string

ManagedStore - Backing store for the ephemeral volume

const (
	ManagedStoreDisk   ManagedStore = "disk"
	ManagedStoreMemory ManagedStore = "memory"
)

type ManualScalingExtension

type ManualScalingExtension struct {
	Replicas *int32 `json:"replicas,omitempty"`
}

ManualScalingExtension - ManualScaling Extension

type MinimumTLSProtocolVersion

type MinimumTLSProtocolVersion string

MinimumTLSProtocolVersion represents the minimum TLS protocol version supported by the Gateway.

const (
	// TLS 1.2
	TLSMinVersion12 MinimumTLSProtocolVersion = "1.2"
	// TLS 1.3
	TLSMinVersion13 MinimumTLSProtocolVersion = "1.3"
	// Default is TLS 1.2
	DefaultTLSMinVersion MinimumTLSProtocolVersion = TLSMinVersion12
)

func ValidMinimumTLSProtocolVersions

func ValidMinimumTLSProtocolVersions() []MinimumTLSProtocolVersion

// ValidMinimumTLSProtocolVersions returns a slice of valid MinimumTLSProtocolVersions.

func (MinimumTLSProtocolVersion) IsEqualTo

func (m MinimumTLSProtocolVersion) IsEqualTo(minumumTLSProtocolVersion MinimumTLSProtocolVersion) bool

IsEqualTo compares two MinimumTLSProtocolVersion objects and returns true if they are equal.

func (MinimumTLSProtocolVersion) IsValid

func (m MinimumTLSProtocolVersion) IsValid() bool

IsValid checks if the given MinimumTLSProtocolVersion is valid.

type PersistentVolume

type PersistentVolume struct {
	VolumeBase
	Source     string           `json:"source,omitempty"`
	Permission VolumePermission `json:"permission,omitempty"`
}

PersistentVolume - Specifies a persistent volume for a container

type PortableResourceMetadata

type PortableResourceMetadata struct {

	// ComputedValues map is any resource values that will be needed for more operations.
	// For example; database name to generate secrets for cosmos DB.
	ComputedValues map[string]any `json:"computedValues,omitempty"`

	// Stores action to retrieve secret values. For Azure, connectionstring is accessed through cosmos listConnectionString operation, if secrets are not provided as input
	SecretValues map[string]rpv1.SecretValueReference `json:"secretValues,omitempty"`
}

PortableResourceMetadata represents internal DataModel properties common to all portable resource types.

type Protocol

type Protocol string

Protocol - Protocol in use by the port

const (
	ProtocolGrpc Protocol = "grpc"
	ProtocolHTTP Protocol = "http"
	ProtocolTCP  Protocol = "TCP"
	ProtocolUDP  Protocol = "UDP"
)

type Providers

type Providers struct {
	// Azure provider information
	Azure ProvidersAzure `json:"azure,omitempty"`
	// AWS provider information
	AWS ProvidersAWS `json:"aws,omitempty"`
}

Providers represents configs for providers for the environment, eg azure,aws

type ProvidersAWS

type ProvidersAWS struct {
	// Scope is the target level for deploying the aws resources
	Scope string `json:"scope,omitempty"`
}

ProvidersAWS represents the aws provider configs

type ProvidersAzure

type ProvidersAzure struct {
	// Scope is the target level for deploying the azure resources
	Scope string `json:"scope,omitempty"`
}

ProvidersAzure represents the azure provider configs

type Recipe

type Recipe struct {
	// Type of the portable resource this recipe can be consumed by. For example: 'Applications.Datastores/mongoDatabases'
	ResourceType string `json:"resourceType,omitempty"`

	// Name of the recipe registered to the environment.
	Name string `json:"recipeName,omitempty"`
}

Recipe represents input properties for recipe getMetadata api.

func (*Recipe) ResourceTypeName

func (e *Recipe) ResourceTypeName() string

ResourceTypeName returns the resource type of the Recipe instance.

type ResourceReference added in v0.26.0

type ResourceReference struct {
	ID string `json:"id,omitempty"`
}

type RuntimeProperties

type RuntimeProperties struct {
	// Kubernetes represents the Kubernetes runtime configuration.
	Kubernetes *KubernetesRuntime `json:"kubernetes,omitempty"`
}

RuntimeProperties represents the runtime configuration for the platform-specific functionalities.

type SecretEncoding

type SecretEncoding string

SecretEncoding is the encoding for the secret object.

const (
	SecretObjectPropertiesEncodingBase64 SecretEncoding = "base64"
	SecretObjectPropertiesEncodingHex    SecretEncoding = "hex"
	SecretObjectPropertiesEncodingUTF8   SecretEncoding = "utf-8"
)

type SecretObjectProperties

type SecretObjectProperties struct {
	// The name of the secret
	Name string `json:"name"`
	// File name when written to disk.
	Alias string `json:"alias,omitempty"`
	// Encoding format. Default utf-8
	Encoding *SecretEncoding `json:"encoding,omitempty"`
	// Secret version
	Version string `json:"version,omitempty"`
}

SecretObjectProperties represents the secret object for Volume.

type SecretStore

type SecretStore struct {
	v1.BaseResource

	// TODO: remove this from CoreRP
	PortableResourceMetadata
	// Properties is the properties of the resource.
	Properties *SecretStoreProperties `json:"properties"`
}

SecretStore represents secret store resource.

func (*SecretStore) ApplyDeploymentOutput

func (s *SecretStore) ApplyDeploymentOutput(do rpv1.DeploymentOutput) error

ApplyDeploymentOutput updates the status of the SecretStore instance with the output resources from the DeploymentOutput object and returns no error.

func (*SecretStore) OutputResources

func (s *SecretStore) OutputResources() []rpv1.OutputResource

OutputResources returns the OutputResources from the SecretStore's Properties.

func (*SecretStore) ResourceMetadata

func (s *SecretStore) ResourceMetadata() *rpv1.BasicResourceProperties

ResourceMetadata returns the BasicResourceProperties of the SecretStore instance.

func (*SecretStore) ResourceTypeName

func (s *SecretStore) ResourceTypeName() string

ResourceTypeName returns the resource type name of the SecretStore instance.

type SecretStoreDataValue

type SecretStoreDataValue struct {
	// Encoding is the encoding type of Value.
	Encoding SecretValueEncoding `json:"encoding,omitempty"`
	// Value is the value of the secret store data.
	Value *string `json:"value,omitempty"`
	// ValueFrom is the value from of the secret store data.
	ValueFrom *SecretStoreDataValueFrom `json:"valueFrom,omitempty"`
}

SecretStoreDataValue represents the value of the secret store data.

type SecretStoreDataValueFrom

type SecretStoreDataValueFrom struct {
	// Name is the name of the secret.
	Name string `json:"name,omitempty"`
	// Version is the version of the secret.
	Version string `json:"version,omitempty"`
}

SecretStoreDataValueFrom represents the secret reference in the secret store.

type SecretStoreListSecrets

type SecretStoreListSecrets struct {
	// Type is the type of the data.
	Type SecretType `json:"type,omitempty"`

	// Data is the data of the secret store.
	Data map[string]*SecretStoreDataValue `json:"data,omitempty"`
}

SecretStoreListSecrets represents listSecret response.

func (*SecretStoreListSecrets) ApplyDeploymentOutput

func (s *SecretStoreListSecrets) ApplyDeploymentOutput(do rpv1.DeploymentOutput) error

ApplyDeploymentOutput applies the deployment output to the SecretStoreListSecrets instance and returns no error.

func (*SecretStoreListSecrets) OutputResources

func (s *SecretStoreListSecrets) OutputResources() []rpv1.OutputResource

OutputResources returns nil for SecretStoreListSecrets.

func (*SecretStoreListSecrets) ResourceMetadata

func (s *SecretStoreListSecrets) ResourceMetadata() *rpv1.BasicResourceProperties

ResourceMetadata returns nil for SecretStoreListSecrets.

func (*SecretStoreListSecrets) ResourceTypeName

func (s *SecretStoreListSecrets) ResourceTypeName() string

ResourceTypeName returns the resource type name of the SecretStoreListSecrets struct.

type SecretStoreProperties

type SecretStoreProperties struct {
	rpv1.BasicResourceProperties

	// Type is the type of the data.
	Type SecretType `json:"type,omitempty"`

	// Data is the data of the secret store.
	Data map[string]*SecretStoreDataValue `json:"data,omitempty"`

	// Resource is the resource id of an external secret store.
	Resource string `json:"resource,omitempty"`
}

SecretStoreProperties represents the properties of SecretStore.

type SecretType

type SecretType string

SecretType represents the type of a secret.

const (
	// SecretTypeNone is the undefined type.
	SecretTypeNone SecretType = ""
	// SecretTypeGeneric is the generic secret type.
	SecretTypeGeneric SecretType = "generic"
	// SecretTypeCert is the certificate secret type.
	SecretTypeCert SecretType = "certificate"
)

type SecretValueEncoding

type SecretValueEncoding string

SecretValueEncoding is the encoding type.

const (
	// SecretValueEncodingRaw is the raw encoding type of value.
	SecretValueEncodingNone SecretValueEncoding = ""
	// SecretValueEncodingRaw is the raw encoding type of value.
	SecretValueEncodingRaw SecretValueEncoding = "raw"
	// SecretValueEncodingBase64 is the base64 encoding type of value.
	SecretValueEncodingBase64 SecretValueEncoding = "base64"
)

type TCPHealthProbeProperties

type TCPHealthProbeProperties struct {
	HealthProbeBase
	ContainerPort int32 `json:"containerPort,omitempty"`
}

TCPHealthProbeProperties - Specifies the properties for readiness/liveness probe using TCP

type VolumeBase

type VolumeBase struct {
	MountPath string `json:"mountPath,omitempty"`
}

Volume - Specifies a volume for a container

type VolumeKind

type VolumeKind string
const (
	Ephemeral  VolumeKind = "ephemeral"
	Persistent VolumeKind = "persistent"
)

type VolumePermission

type VolumePermission string

VolumePermission - Container read/write access to the volume

const (
	VolumePermissionRead  VolumePermission = "read"
	VolumePermissionWrite VolumePermission = "write"
)

type VolumeProperties

type VolumeProperties struct {
	Kind       VolumeKind        `json:"kind,omitempty"`
	Ephemeral  *EphemeralVolume  `json:"ephemeralVolume,omitempty"`
	Persistent *PersistentVolume `json:"persistentVolume,omitempty"`
}

VolumeProperties - Specifies a volume for a container

type VolumeResource

type VolumeResource struct {
	v1.BaseResource

	// TODO: remove this from CoreRP
	PortableResourceMetadata

	// Properties is the properties of the resource.
	Properties VolumeResourceProperties `json:"properties"`
}

VolumeResource represents VolumeResource resource.

func (*VolumeResource) ApplyDeploymentOutput

func (h *VolumeResource) ApplyDeploymentOutput(do rpv1.DeploymentOutput) error

ApplyDeploymentOutput updates the VolumeResource's Properties, ComputedValues and SecretValues with the DeploymentOutput's DeployedOutputResources, ComputedValues and SecretValues respectively.

func (*VolumeResource) OutputResources

func (h *VolumeResource) OutputResources() []rpv1.OutputResource

OutputResources returns the OutputResources from the VolumeResource's Properties.

func (*VolumeResource) ResourceMetadata

func (h *VolumeResource) ResourceMetadata() *rpv1.BasicResourceProperties

ResourceMetadata returns the BasicResourceProperties of the VolumeResource instance.

func (*VolumeResource) ResourceTypeName

func (h *VolumeResource) ResourceTypeName() string

ResourceTypeName returns the type of VolumeResource.

type VolumeResourceProperties

type VolumeResourceProperties struct {
	rpv1.BasicResourceProperties
	// Kind represents the type of Volume resource.
	Kind string `json:"kind,omitempty"`
	// AzureKeyVault represents Azure Keyvault volume properties
	AzureKeyVault *AzureKeyVaultVolumeProperties `json:"azureKeyVault,omitempty"`
}

VolumeResourceProperties represents the properties of VolumeResource.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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