component

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: Apache-2.0 Imports: 12 Imported by: 12

Documentation

Overview

Package component provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.

The file implements the Entity interface on the ComponentDefinition struct. This is not autogenerated.

Code generated by build/generate-golang.js; DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	// Version Version of the component produced by the registrant. Example: APIVersion of a Kubernetes Pod.
	Version string `json:"version" yaml:"version"`

	// Kind The unique identifier (name) assigned by the registrant to this component. Example: A Kubernetes Pod is of kind 'Pod'.
	Kind string `json:"kind" yaml:"kind"`

	// Schema JSON schema of the object as defined by the registrant.
	Schema string `json:"schema" yaml:"schema"`
}

Component data related to the third party capability that Component Defintion wraps , this is herematicaly sealed an

func (*Component) EventCategory added in v0.8.129

func (*Component) EventCategory() string

type ComponentDefinition

type ComponentDefinition struct {
	// Id A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
	ID core.Uuid `json:"id" yaml:"id"`

	// SchemaVersion API version of the object, optionally prefixed with an API group (e.g. "group.example.io/v1beta1" or bare "v1beta1").
	SchemaVersion core.VersionString `json:"schemaVersion" yaml:"schemaVersion"`

	// Version A valid semantic version string between 5 and 100 characters. The pattern allows for a major.minor.patch version followed by an optional pre-release tag like '-alpha' or '-beta.2' and an optional build metadata tag like '+build.1'.
	Version core.SemverString `json:"version" yaml:"version"`

	// DisplayName A string starting with an alphanumeric character. Spaces and hyphens allowed.
	DisplayName core.InputString `json:"displayName" yaml:"displayName"`

	// Description A written representation of the purpose and characteristics of the component.
	Description string `json:"description" yaml:"description"`

	// Format Format specifies the format used in the `component.schema` field. JSON is the default.
	Format ComponentDefinitionFormat `json:"format" yaml:"format"`

	// Model Meshery Models serve as a portable unit of packaging to define managed entities, their relationships, and capabilities.
	Model *modelv1beta1.ModelDefinition `gorm:"foreignKey:ModelId;references:ID" json:"model" yaml:"model"`

	// ModelReference Reference to the specific registered model to which the component belongs and from which model version, category, and other properties may be referenced. Learn more at https://docs.meshery.io/concepts/models
	ModelReference modelv1beta1.ModelReference `gorm:"-" json:"modelReference" yaml:"modelReference"`

	// Styles Visualization styles for a component
	Styles *core.ComponentStyles `gorm:"type:bytes;serializer:json" json:"styles" yaml:"styles"`

	// Capabilities Meshery manages components in accordance with their specific capabilities. This field explicitly identifies those capabilities largely by what actions a given component supports; e.g. metric-scrape, sub-interface, and so on. This field is extensible. ComponentDefinitions may define a broad array of capabilities, which are in-turn dynamically interpretted by Meshery for full lifecycle management.
	Capabilities *[]capabilityv1beta1.Capability `gorm:"type:bytes;serializer:json" json:"capabilities" yaml:"capabilities"`

	// Status Status of component, including:
	// - duplicate: this component is a duplicate of another. The component that is to be the canonical reference and that is duplicated by other components should not be assigned the 'duplicate' status.
	// - maintenance: model is unavailable for a period of time.
	// - enabled: model is available for use for all users of this Meshery Server.
	// - ignored: model is unavailable for use for all users of this Meshery Server.
	Status *ComponentDefinitionStatus `json:"status" yaml:"status"`

	// Metadata Metadata contains additional information associated with the component.
	Metadata ComponentDefinition_Metadata `gorm:"type:bytes;serializer:json" json:"metadata" yaml:"metadata"`

	// Configuration The configuration of the component. The configuration is based on the schema defined within the component definition(component.schema).
	Configuration map[string]interface{} `gorm:"type:bytes;serializer:json" json:"configuration" yaml:"configuration"`

	// Component data related to the third party capability that Component Defintion wraps , this is herematicaly sealed an
	Component Component `gorm:"type:bytes;serializer:json" json:"component" yaml:"component"`

	// CreatedAt Timestamp when the resource was created.
	CreatedAt core.CreatedAt `db:"created_at" json:"created_at,omitempty" yaml:"created_at,omitempty"`

	// UpdatedAt Timestamp when the resource was updated.
	UpdatedAt core.UpdatedAt `db:"updated_at" json:"updated_at,omitempty" yaml:"updated_at,omitempty"`

	// ModelId A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
	ModelId *core.Uuid `gorm:"index:idx_component_definition_dbs_model_id,column:model_id" json:"-" yaml:"-"`
}

ComponentDefinition Components are reusable building blocks for depicting capabilities defined within models. Learn more at https://docs.meshery.io/concepts/components

func (*ComponentDefinition) Create

func (c *ComponentDefinition) Create(db *database.Handler, hostID uuid.UUID) (uuid.UUID, error)

func (*ComponentDefinition) GenerateID

func (c *ComponentDefinition) GenerateID() (uuid.UUID, error)

func (*ComponentDefinition) GetEntityDetail

func (c *ComponentDefinition) GetEntityDetail() string

func (ComponentDefinition) GetID

func (c ComponentDefinition) GetID() uuid.UUID

func (*ComponentDefinition) ReplaceSVGData added in v0.7.33

func (c *ComponentDefinition) ReplaceSVGData(baseDir string) error

func (ComponentDefinition) TableName

func (c ComponentDefinition) TableName() string

func (ComponentDefinition) Type

func (*ComponentDefinition) UpdateStatus

func (m *ComponentDefinition) UpdateStatus(db *database.Handler, status entity.EntityStatus) error

func (ComponentDefinition) WriteComponentDefinition

func (c ComponentDefinition) WriteComponentDefinition(componentDirPath string, fileType string) (bool, error)

type ComponentDefinitionFormat

type ComponentDefinitionFormat string

ComponentDefinitionFormat Format specifies the format used in the `component.schema` field. JSON is the default.

const (
	CUE  ComponentDefinitionFormat = "CUE"
	JSON ComponentDefinitionFormat = "JSON"
)

Defines values for ComponentDefinitionFormat.

type ComponentDefinitionStatus

type ComponentDefinitionStatus string

ComponentDefinitionStatus Status of component, including: - duplicate: this component is a duplicate of another. The component that is to be the canonical reference and that is duplicated by other components should not be assigned the 'duplicate' status. - maintenance: model is unavailable for a period of time. - enabled: model is available for use for all users of this Meshery Server. - ignored: model is unavailable for use for all users of this Meshery Server.

const (
	Duplicate ComponentDefinitionStatus = "duplicate"
	Enabled   ComponentDefinitionStatus = "enabled"
	Ignored   ComponentDefinitionStatus = "ignored"
	Open      ComponentDefinitionStatus = "open"
	Resolved  ComponentDefinitionStatus = "resolved"
)

Defines values for ComponentDefinitionStatus.

type ComponentDefinition_Metadata

type ComponentDefinition_Metadata struct {
	// Genealogy Genealogy represents the various representational states of the component.
	Genealogy string `json:"genealogy" yaml:"genealogy"`

	// IsAnnotation Identifies whether the component is semantically meaningful or not; identifies whether the component should be treated as deployable entity or is for purposes of logical representation.
	IsAnnotation bool `json:"isAnnotation" yaml:"isAnnotation"`

	// IsNamespaced Identifies whether the component is scoped to namespace or clsuter wide.
	IsNamespaced bool `json:"isNamespaced" yaml:"isNamespaced"`

	// Published 'published' controls whether the component should be registered in Meshery Registry. When the same 'published' property in Models, is set to 'false', the Model property takes precedence with all Entities in the Model not being registered.
	Published bool `json:"published" yaml:"published"`

	// InstanceDetails InstanceDetails contains information about the instance of the component.
	InstanceDetails map[string]interface{} `json:"instanceDetails" yaml:"instanceDetails"`

	// ConfigurationUISchema Defines the UI schema for rendering the component's configuration. For more details, visit: https://rjsf-team.github.io/react-jsonschema-form/docs/api-reference/uiSchema/ .
	ConfigurationUISchema string                 `json:"configurationUISchema" yaml:"configurationUISchema"`
	AdditionalProperties  map[string]interface{} `json:"-" yaml:"-"`
}

ComponentDefinition_Metadata Metadata contains additional information associated with the component.

func (ComponentDefinition_Metadata) Get

func (a ComponentDefinition_Metadata) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for ComponentDefinition_Metadata. Returns the specified element and whether it was found

func (ComponentDefinition_Metadata) MarshalJSON

func (a ComponentDefinition_Metadata) MarshalJSON() ([]byte, error)

Override default JSON handling for ComponentDefinition_Metadata to handle AdditionalProperties

func (*ComponentDefinition_Metadata) Set

func (a *ComponentDefinition_Metadata) Set(fieldName string, value interface{})

Setter for additional properties for ComponentDefinition_Metadata

func (*ComponentDefinition_Metadata) UnmarshalJSON

func (a *ComponentDefinition_Metadata) UnmarshalJSON(b []byte) error

Override default JSON handling for ComponentDefinition_Metadata to handle AdditionalProperties

type Styles

type Styles = core.ComponentStyles

Jump to

Keyboard shortcuts

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