v1alpha2

package
v0.7.54 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const RelationshipSchemaVersion = "relationships.meshery.io/v1alpha2"

Variables

This section is empty.

Functions

This section is empty.

Types

type RelationshipDefinition

type RelationshipDefinition struct {
	ID                  uuid.UUID `json:"id"`
	v1beta1.VersionMeta `json:",inline" yaml:",inline"`
	Kind                string `json:"kind,omitempty" yaml:"kind"`
	// The property has been named RelationshipType instead of Type to avoid collision from Type() function, which enables support for dynamic type.
	// Though, the column name and the json representation is "type".
	RelationshipType string                   `json:"type" yaml:"type" gorm:"type"`
	SubType          string                   `json:"subType" yaml:"subType"`
	EvaluationQuery  string                   `json:"evaluationQuery" yaml:"evaluationQuery" gorm:"evaluationQuery"`
	Metadata         map[string]interface{}   `json:"metadata"  yaml:"metadata" gorm:"type:bytes;serializer:json"`
	ModelID          uuid.UUID                `json:"-" gorm:"index:idx_relationship_definition_dbs_model_id,column:model_id"`
	Model            v1beta1.Model            `json:"model" gorm:"foreignKey:ModelID;references:ID"`
	Selectors        []map[string]interface{} `json:"selectors"  yaml:"selectors" gorm:"type:bytes;serializer:json"`
}

func (*RelationshipDefinition) Create

func (r *RelationshipDefinition) Create(db *database.Handler, hostID uuid.UUID) (uuid.UUID, error)

func (*RelationshipDefinition) GenerateID added in v0.7.34

func (r *RelationshipDefinition) GenerateID() (uuid.UUID, error)

func (*RelationshipDefinition) GetDefaultEvaluationQuery added in v0.7.28

func (r *RelationshipDefinition) GetDefaultEvaluationQuery() string

func (*RelationshipDefinition) GetEntityDetail

func (r *RelationshipDefinition) GetEntityDetail() string

func (RelationshipDefinition) GetID

func (r RelationshipDefinition) GetID() uuid.UUID

func (RelationshipDefinition) TableName

func (r RelationshipDefinition) TableName() string

func (RelationshipDefinition) Type

func (*RelationshipDefinition) UpdateStatus

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

func (RelationshipDefinition) WriteComponentDefinition

func (c RelationshipDefinition) WriteComponentDefinition(relDirPath string) error

Jump to

Keyboard shortcuts

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