datamodel

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: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// DaprMissingError is an error message that can be used when Dapr is not installed on the cluster.
	DaprMissingError = "" /* 173-byte string literal not displayed */
)

Variables

This section is empty.

Functions

func IsDaprInstalled

func IsDaprInstalled(ctx context.Context, kubeClient client.Client) (bool, error)

IsDaprInstalled will check for Dapr to be installed in the deployment environment and return and true if it is installed. Callers of this function can use DaprMissingError for a friendly error message to send back to users.

This check is based on the Dapr Component CRD, and only supports Kubernetes.

Types

type DaprPubSubBroker

type DaprPubSubBroker struct {
	v1.BaseResource

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

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

DaprPubSubBroker represents Dapr PubSubBroker portable resource.

func (*DaprPubSubBroker) ApplyDeploymentOutput

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

ApplyDeploymentOutput updates the DaprPubSubBroker resource with the DeploymentOutput values.

func (*DaprPubSubBroker) OutputResources

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

OutputResources returns the OutputResources from the Properties of the DaprPubSubBroker instance.

func (*DaprPubSubBroker) Recipe

Recipe returns the recipe information of the resource. Returns nil if recipe execution is disabled.

func (*DaprPubSubBroker) ResourceMetadata

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

ResourceMetadata returns the BasicResourceProperties of the Dapr PubSubBroker resource i.e. application resources metadata.

func (*DaprPubSubBroker) ResourceTypeName

func (r *DaprPubSubBroker) ResourceTypeName() string

ResourceTypeName returns a string representing the resource type.

type DaprPubSubBrokerProperties

type DaprPubSubBrokerProperties struct {
	rpv1.BasicResourceProperties
	rpv1.BasicDaprResourceProperties

	// Specifies how the underlying service/resource is provisioned and managed
	ResourceProvisioning portableresources.ResourceProvisioning `json:"resourceProvisioning,omitempty"`

	// Metadata of the Dapr Pub/Sub Broker resource.
	Metadata map[string]any `json:"metadata,omitempty"`

	// The recipe used to automatically deploy underlying infrastructure for the Dapr Pub/Sub Broker resource.
	Recipe portableresources.ResourceRecipe `json:"recipe,omitempty"`

	// List of the resource IDs that support the Dapr Pub/Sub Broker resource.
	Resources []*portableresources.ResourceReference `json:"resources,omitempty"`

	// Type of the Dapr Pub/Sub Broker resource.
	Type string `json:"type,omitempty"`

	// Version of the Dapr Pub/Sub Broker resource.
	Version string `json:"version,omitempty"`
}

DaprPubSubBrokerProperties represents the properties of Dapr PubSubBroker resource.

type DaprSecretStore

type DaprSecretStore struct {
	v1.BaseResource

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

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

DaprSecretStore represents Dapr SecretStore portable resource.

func (*DaprSecretStore) ApplyDeploymentOutput

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

ApplyDeploymentOutput updates the DaprSecretStore resource with the DeploymentOutput values.

func (*DaprSecretStore) OutputResources

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

OutputResources returns the OutputResources array from Properties of the Dapr SecretStore resource.

func (*DaprSecretStore) Recipe

Recipe returns the Recipe from the DaprSecretStore Properties if ResourceProvisioning is not set to Manual, otherwise it returns nil.

func (*DaprSecretStore) ResourceMetadata

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

ResourceMetadata returns the BasicResourceProperties of the DaprSecretStore resource i.e. application resources metadata.

func (*DaprSecretStore) ResourceTypeName

func (r *DaprSecretStore) ResourceTypeName() string

ResourceTypeName returns the resource type of the DaprSecretStore resource.

type DaprSecretStoreProperties

type DaprSecretStoreProperties struct {
	rpv1.BasicResourceProperties
	rpv1.BasicDaprResourceProperties
	Type                 string                                 `json:"type,omitempty"`
	Version              string                                 `json:"version,omitempty"`
	Metadata             map[string]any                         `json:"metadata,omitempty"`
	Recipe               portableresources.ResourceRecipe       `json:"recipe,omitempty"`
	ResourceProvisioning portableresources.ResourceProvisioning `json:"resourceProvisioning,omitempty"`
}

DaprSecretStoreProperties represents the properties of DaprSecretStore resource.

type DaprStateStore

type DaprStateStore struct {
	v1.BaseResource

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

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

DaprStateStore represents DaprStateStore portable resource.

func (*DaprStateStore) ApplyDeploymentOutput

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

ApplyDeploymentOutput updates the DaprStateStore resource with the DeploymentOutput values.

func (*DaprStateStore) OutputResources

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

OutputResources returns the OutputResources from the Properties of the DaprStateStore resource.

func (*DaprStateStore) Recipe

Recipe returns the recipe information of the resource. It returns nil if the ResourceProvisioning is set to manual.

func (*DaprStateStore) ResourceMetadata

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

ResourceMetadata returns the BasicResourceProperties of the DaprStateStore resource i.e. application resources metadata.

func (*DaprStateStore) ResourceTypeName

func (r *DaprStateStore) ResourceTypeName() string

ResourceTypeName returns the resource type of the DaprStateStore resource.

type DaprStateStoreProperties

type DaprStateStoreProperties struct {
	rpv1.BasicResourceProperties
	rpv1.BasicDaprResourceProperties
	// Specifies how the underlying service/resource is provisioned and managed
	ResourceProvisioning portableresources.ResourceProvisioning `json:"resourceProvisioning,omitempty"`
	Metadata             map[string]any                         `json:"metadata,omitempty"`
	Recipe               portableresources.ResourceRecipe       `json:"recipe,omitempty"`
	Resources            []*portableresources.ResourceReference `json:"resources,omitempty"`
	Type                 string                                 `json:"type,omitempty"`
	Version              string                                 `json:"version,omitempty"`
}

DaprStateStoreProperties represents the properties of DaprStateStore resource.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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