model

package
v0.0.0-...-da789b0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeExecution

type NodeExecution struct {
	UUID
	Times

	WorkflowRunID string

	*NodeExecutionJSON
}

type NodeExecutionJSON

type NodeExecutionJSON struct {
	// TODO breadchris couldn't figure out how to make this generic, there is a problem with protojson.Unmarshal/Marshal
	Data *gen.NodeExecution
}

func (*NodeExecutionJSON) GormDBDataType

func (*NodeExecutionJSON) GormDBDataType(db *gorm.DB, field *schema.Field) string

GormDBDataType gorm db data type

func (*NodeExecutionJSON) GormDataType

func (*NodeExecutionJSON) GormDataType() string

GormDataType gorm common data type

func (*NodeExecutionJSON) GormValue

func (j *NodeExecutionJSON) GormValue(ctx context.Context, db *gorm.DB) clause.Expr

func (*NodeExecutionJSON) MarshalJSON

func (j *NodeExecutionJSON) MarshalJSON() ([]byte, error)

func (*NodeExecutionJSON) Scan

func (j *NodeExecutionJSON) Scan(value interface{}) error

Scan scan value into NodeExecutionJSON[T], implements sql.Scanner interface

func (*NodeExecutionJSON) UnmarshalJSON

func (j *NodeExecutionJSON) UnmarshalJSON(data []byte) error

func (*NodeExecutionJSON) Value

func (j *NodeExecutionJSON) Value() (driver.Value, error)

Value return json value, implement driver.Valuer interface

type Project

type Project struct {
	UUID
	Times

	*ProjectJSON
}

type ProjectJSON

type ProjectJSON struct {
	// TODO breadchris couldn't figure out how to make this generic, there is a problem with protojson.Unmarshal/Marshal
	Data *gen.Project
}

ProjectJSON give a generic data type for json encoded data.

func (*ProjectJSON) GormDBDataType

func (*ProjectJSON) GormDBDataType(db *gorm.DB, field *schema.Field) string

GormDBDataType gorm db data type

func (*ProjectJSON) GormDataType

func (*ProjectJSON) GormDataType() string

GormDataType gorm common data type

func (*ProjectJSON) GormValue

func (j *ProjectJSON) GormValue(ctx context.Context, db *gorm.DB) clause.Expr

func (*ProjectJSON) MarshalJSON

func (j *ProjectJSON) MarshalJSON() ([]byte, error)

func (*ProjectJSON) Scan

func (j *ProjectJSON) Scan(value interface{}) error

Scan scan value into ProjectJSON[T], implements sql.Scanner interface

func (*ProjectJSON) UnmarshalJSON

func (j *ProjectJSON) UnmarshalJSON(data []byte) error

func (*ProjectJSON) Value

func (j *ProjectJSON) Value() (driver.Value, error)

Value return json value, implement driver.Valuer interface

type Times

type Times struct {
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt *time.Time `sql:"index"`
}

type UUID

type UUID struct {
	ID uuid.UUID `gorm:"type:uuid;primary_key;"`
}

func (*UUID) BeforeCreate

func (b *UUID) BeforeCreate(tx *gorm.DB) error

BeforeCreate will set a UUID.

type WorkflowRun

type WorkflowRun struct {
	UUID
	Times

	ProjectID string
	*WorkflowRunJSON

	NodeExecutions []NodeExecution
}

type WorkflowRunJSON

type WorkflowRunJSON struct {
	// TODO breadchris couldn't figure out how to make this generic, there is a problem with protojson.Unmarshal/Marshal
	Data *gen.WorkflowTrace
}

func (*WorkflowRunJSON) GormDBDataType

func (*WorkflowRunJSON) GormDBDataType(db *gorm.DB, field *schema.Field) string

GormDBDataType gorm db data type

func (*WorkflowRunJSON) GormDataType

func (*WorkflowRunJSON) GormDataType() string

GormDataType gorm common data type

func (*WorkflowRunJSON) GormValue

func (j *WorkflowRunJSON) GormValue(ctx context.Context, db *gorm.DB) clause.Expr

func (*WorkflowRunJSON) MarshalJSON

func (j *WorkflowRunJSON) MarshalJSON() ([]byte, error)

func (*WorkflowRunJSON) Scan

func (j *WorkflowRunJSON) Scan(value interface{}) error

Scan scan value into WorkflowRunJSON[T], implements sql.Scanner interface

func (*WorkflowRunJSON) UnmarshalJSON

func (j *WorkflowRunJSON) UnmarshalJSON(data []byte) error

func (*WorkflowRunJSON) Value

func (j *WorkflowRunJSON) Value() (driver.Value, error)

Value return json value, implement driver.Valuer interface

Jump to

Keyboard shortcuts

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