Documentation ¶
Index ¶
- Variables
- func InitJSONSchema()
- func ValidateJSONSchema(schema *jsonschema.Schema, msg interface{}, emitUnpopulated bool) error
- func ValidateJSONSchemaString(schema string, data string) error
- type BaseDynamic
- type BaseStatic
- type ConnectionType
- type Connector
- type ConnectorDefinition
- type ConnectorType
- type ReleaseStage
Constants ¶
This section is empty.
Variables ¶
var DstConnDefJSONSchema *jsonschema.Schema
DstConnDefJSONSchema represents the ConnectorDefinition JSON Schema for validating the payload
var DstConnJSONSchema *jsonschema.Schema
DstConnJSONSchema represents the Connector JSON Schema for validating the payload
var SrcConnDefJSONSchema *jsonschema.Schema
SrcConnDefJSONSchema represents the ConnectorDefinition JSON Schema for validating the payload
var SrcConnJSONSchema *jsonschema.Schema
SrcConnJSONSchema represents the Connector JSON Schema for validating the payload
Functions ¶
func InitJSONSchema ¶
func InitJSONSchema()
InitJSONSchema initialise JSON Schema instances with the given files
func ValidateJSONSchema ¶
ValidateJSONSchema validates the Protobuf message data
func ValidateJSONSchemaString ¶
ValidateJSONSchemaString validates the string data given a string schema
Types ¶
type BaseDynamic ¶
type BaseDynamic struct { UID uuid.UUID `gorm:"type:uuid;primary_key;<-:create"` // allow read and create CreateTime time.Time `gorm:"autoCreateTime:nano"` UpdateTime time.Time `gorm:"autoUpdateTime:nano"` DeleteTime gorm.DeletedAt `sql:"index"` }
BaseDynamic contains common columns for all tables with dynamic UUID as primary key generated when creating
func (*BaseDynamic) BeforeCreate ¶
func (base *BaseDynamic) BeforeCreate(db *gorm.DB) error
BeforeCreate will set a UUID rather than numeric ID.
type BaseStatic ¶
type BaseStatic struct { UID uuid.UUID `gorm:"type:uuid;primary_key;<-:create"` // allow read and create CreateTime time.Time `gorm:"autoCreateTime:nano"` UpdateTime time.Time `gorm:"autoUpdateTime:nano"` DeleteTime gorm.DeletedAt `sql:"index"` }
BaseStatic contains common columns for all tables with static UUID as primary key
type ConnectionType ¶
type ConnectionType connectorPB.ConnectionType
ConnectionType is an alias type for Protobuf enum ConnectionType
func (*ConnectionType) Scan ¶
func (c *ConnectionType) Scan(value interface{}) error
Scan function for custom GORM type ConnectionType
type Connector ¶
type Connector struct { BaseDynamic ID string Owner string ConnectorDefinitionUID uuid.UUID Description sql.NullString Tombstone bool Configuration datatypes.JSON `gorm:"type:jsonb"` ConnectorType ConnectorType `sql:"type:valid_connector_type"` }
Connector is the data model of the connector table
type ConnectorDefinition ¶
type ConnectorDefinition struct { BaseStatic ID string Title string DockerRepository string DockerImageTag string DocumentationURL string Icon string Tombstone bool Public bool Custom bool ReleaseDate *time.Time Spec datatypes.JSON `gorm:"type:jsonb"` ResourceRequirements datatypes.JSON `gorm:"type:jsonb"` ConnectorType ConnectorType `sql:"type:valid_connector_type"` ConnectionType ConnectionType `sql:"type:valid_connection_type"` ReleaseStage ReleaseStage `sql:"type:valid_release_stage"` }
ConnectorDefinition is the data model of the connector_definition table
type ConnectorType ¶
type ConnectorType connectorPB.ConnectorType
ConnectorType is an alias type for Protobuf enum ConnectorType
func (*ConnectorType) Scan ¶
func (c *ConnectorType) Scan(value interface{}) error
Scan function for custom GORM type ConnectorType
type ReleaseStage ¶
type ReleaseStage connectorPB.ReleaseStage
ReleaseStage is an alias type for Protobuf enum ReleaseStage
func (*ReleaseStage) Scan ¶
func (r *ReleaseStage) Scan(value interface{}) error
Scan function for custom GORM type ReleaseStage