Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var PipelineJSONSchema *jsonschema.Schema
PipelineJSONSchema represents the Pipeline JSON Schema for validating the payload
Functions ¶
func InitJSONSchema ¶
func InitJSONSchema()
InitJSONSchema initialise JSON Schema instances with the given files
func ValidatePipelineJSONSchema ¶
func ValidatePipelineJSONSchema(pbPipeline *pipelinePB.Pipeline) error
ValidatePipelineJSONSchema validates the Protobuf message data
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 Pipeline ¶
type Pipeline struct { BaseDynamic ID string Owner string Description sql.NullString Mode PipelineMode State PipelineState Recipe *Recipe `gorm:"type:jsonb"` }
Pipeline is the data model of the pipeline table
type PipelineMode ¶
type PipelineMode pipelinePB.Pipeline_Mode
PipelineMode is an alias type for Protobuf enum Pipeline.Mode
func (*PipelineMode) Scan ¶
func (p *PipelineMode) Scan(value interface{}) error
Scan function for custom GORM type PipelineMode
type PipelineState ¶
type PipelineState pipelinePB.Pipeline_State
PipelineState is an alias type for Protobuf enum Pipeline.State
func (*PipelineState) Scan ¶
func (p *PipelineState) Scan(value interface{}) error
Scan function for custom GORM type PipelineState
type Recipe ¶
type Recipe struct { Source string `json:"source,omitempty"` Destination string `json:"destination,omitempty"` Models []string `json:"models,omitempty"` Logics []string `json:"logics,omitempty"` }
Recipe is the data model of the pipeline recipe