metadata

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleGetComponents

func HandleGetComponents(w http.ResponseWriter, r *http.Request)

HandleGetComponents serves the processed component metadata bundle as JSON.

func Init

func Init() error

Init loads, processes, and caches the component metadata bundle. It must be called once at startup before HandleGetComponents is used.

Types

type AuthenticationProfile

type AuthenticationProfile struct {
	Title       string  `json:"title"`
	Description string  `json:"description"`
	Metadata    []Field `json:"metadata,omitempty"`
}

AuthenticationProfile describes an authentication option.

type BindingOperation

type BindingOperation struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

BindingOperation describes a binding operation.

type Bundle

type Bundle struct {
	SchemaVersion string               `json:"schemaVersion"`
	Date          string               `json:"date"`
	Components    []*ComponentMetadata `json:"components"`
}

Bundle is the top-level structure of the component metadata bundle.

type CMPBinding

type CMPBinding struct {
	Input      bool               `json:"input,omitempty"`
	Output     bool               `json:"output,omitempty"`
	Operations []BindingOperation `json:"operations"`
}

CMPBinding holds binding-specific properties.

type ComponentMetadata

type ComponentMetadata struct {
	SchemaVersion          string                  `json:"schemaVersion"`
	Type                   string                  `json:"type"`
	Name                   string                  `json:"name"`
	Version                string                  `json:"version"`
	Status                 string                  `json:"status"`
	Title                  string                  `json:"title"`
	Description            string                  `json:"description,omitempty"`
	URLs                   []URL                   `json:"urls"`
	Binding                *CMPBinding             `json:"binding,omitempty"`
	Capabilities           []string                `json:"capabilities,omitempty"`
	AuthenticationProfiles []AuthenticationProfile `json:"authenticationProfiles,omitempty"`
	Metadata               []Field                 `json:"metadata,omitempty"`
	IconURI                string                  `json:"iconURI,omitempty"`
}

ComponentMetadata describes a single Dapr component's metadata.

type Field

type Field struct {
	Name          string        `json:"name"`
	Description   string        `json:"description"`
	Required      bool          `json:"required,omitempty"`
	Sensitive     bool          `json:"sensitive,omitempty"`
	Type          string        `json:"type,omitempty"`
	Default       string        `json:"default,omitempty"`
	Example       string        `json:"example"`
	AllowedValues []string      `json:"allowedValues,omitempty"`
	Binding       *FieldBinding `json:"binding,omitempty"`
	URL           *URL          `json:"url,omitempty"`
	Deprecated    bool          `json:"deprecated,omitempty"`
}

Field describes a single metadata property.

type FieldBinding

type FieldBinding struct {
	Input  bool `json:"input,omitempty"`
	Output bool `json:"output,omitempty"`
}

FieldBinding constrains a metadata field to input/output bindings.

type URL

type URL struct {
	Title string `json:"title"`
	URL   string `json:"url"`
}

URL represents a documentation link.

Jump to

Keyboard shortcuts

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