Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateComponent ¶ added in v0.6.8
Types ¶
type ComponentDefinition ¶ added in v0.6.8
type ComponentDefinition struct { ID uuid.UUID `json:"-"` TypeMeta DisplayName string `json:"display-name" gorm:"display-name"` Format ComponentFormat `json:"format" yaml:"format"` Metadata map[string]interface{} `json:"metadata" yaml:"metadata"` Model Models `json:"model"` Schema string `json:"schema" yaml:"schema"` CreatedAt time.Time `json:"-"` UpdatedAt time.Time `json:"-"` }
use NewComponent function for instantiating
func GetComponents ¶ added in v0.6.8
func GetComponents(db *database.Handler, f ComponentFilter) (c []ComponentDefinition)
TODO: Optimize the below queries with joins
func (*ComponentDefinition) GetComponentDefinitionDB ¶ added in v0.6.11
func (c *ComponentDefinition) GetComponentDefinitionDB() (cmd ComponentDefinitionDB)
func (ComponentDefinition) Type ¶ added in v0.6.8
func (c ComponentDefinition) Type() types.CapabilityType
type ComponentDefinitionDB ¶ added in v0.6.8
type ComponentDefinitionDB struct { ID uuid.UUID `json:"-"` ModelID uuid.UUID `json:"-" gorm:"modelID"` TypeMeta DisplayName string `json:"display-name" gorm:"display-name"` Format ComponentFormat `json:"format" yaml:"format"` Metadata []byte `json:"metadata" yaml:"metadata"` Schema string `json:"schema" yaml:"schema"` CreatedAt time.Time `json:"-"` UpdatedAt time.Time `json:"-"` }
func (*ComponentDefinitionDB) GetComponentDefinition ¶ added in v0.6.11
func (cmd *ComponentDefinitionDB) GetComponentDefinition(model Models) (c ComponentDefinition)
type ComponentFilter ¶ added in v0.6.8
func (*ComponentFilter) Create ¶ added in v0.6.8
func (cf *ComponentFilter) Create(m map[string]interface{})
Create the filter from map[string]interface{}
type ComponentFormat ¶ added in v0.6.8
type ComponentFormat string
const ( JSON ComponentFormat = "JSON" YAML ComponentFormat = "YAML" CUE ComponentFormat = "CUE" )
Click to show internal directories.
Click to hide internal directories.