Documentation
¶
Index ¶
Constants ¶
const ComponentDefinitionKindKey = "ComponentDefinition"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capability ¶ added in v0.6.7
type Capability struct {
// Host is the address of the service registering the capability
Host string `json:"host,omitempty" yaml:"host"`
}
type Component ¶
type Component struct {
TypeMeta `gorm:"embedded" yaml:"typemeta"`
ComponentSpec `gorm:"embedded" yaml:"componentspec"`
Metadata map[string]interface{} `json:"metadata,omitempty" yaml:"metadata"`
// for backward compatibility
Spec string `json:"spec,omitempty" yaml:"spec"`
}
use NewComponent function for instantiating
func NewComponent ¶
func NewComponent() Component
type ComponentCapability ¶ added in v0.6.7
type ComponentCapability struct {
Component `yaml:"component"`
Capability `yaml:"capability"`
}
func ComponentCapabilityFromCCDB ¶ added in v0.6.7
func ComponentCapabilityFromCCDB(cdb ComponentCapabilityDB) (c ComponentCapability)
ComponentCapabilityFromCCDB produces a client facing instance of ComponentCapability from a database representation of ComponentCapability. Use this function to interconvert any time the ComponentCapability is fetched from the database and is to be returned to client.
type ComponentCapabilityDB ¶ added in v0.6.7
type ComponentCapabilityDB struct {
ID uuid.UUID `json:"id,omitempty"`
ComponentDB
Capability
}
func ComponentCapabilityDBFromCC ¶ added in v0.6.7
func ComponentCapabilityDBFromCC(c ComponentCapability) (cdb ComponentCapabilityDB)
ComponentCapabilityDBFromCC produces a database compatible instance of ComponentCapability from a client representation of ComponentCapability. Use this function to interconvert any time the ComponentCapability is created by some client and is to be saved to the database.
type ComponentDB ¶ added in v0.6.7
type ComponentDB struct {
TypeMeta
ComponentSpecDB
Metadata []byte `json:"metadata"`
// for backward compatibility
Spec string `json:"spec,omitempty"`
}
This file consists of helper methods and structs that database(gorm) will use to interact with meshmodel components
type ComponentSpec ¶
type ComponentSpec struct {
Schematic map[string]interface{} `json:"schematic,omitempty" yaml:"schematic"`
}
type ComponentSpecDB ¶ added in v0.6.7
type ComponentSpecDB struct {
Schematic []byte `json:"schematic,omitempty"`
}