sql

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRunReadModel

func NewRunReadModel(ctx context.Context, db *gorm.DB) (query.ReadModel, error)

NewRunReadModel ...

func NewRunRepository

func NewRunRepository(ctx context.Context, db *gorm.DB) (run.Repository, error)

NewRunRepository ...

func RunPOToRunDO

func RunPOToRunDO(runPO *Run) *run.Run

func RunPOToRunDTO

func RunPOToRunDTO(ctx context.Context, run *Run) (*query.RunItem, error)

func StatusCountPOToStatusCountDTO

func StatusCountPOToStatusCountDTO(count *StatusCount) *query.StatusCount

func TaskPOToTaskDTO

func TaskPOToTaskDTO(ctx context.Context, task *Task) *query.TaskItem

Types

type Run

type Run struct {
	ID           string
	Name         string                  `gorm:"type:varchar(200);not null;uniqueIndex:sub_run"`
	SubmissionID string                  `gorm:"type:varchar(32);not null;uniqueIndex:sub_run"`
	Inputs       map[string]interface{}  `gorm:"serializer:json"`
	Outputs      *map[string]interface{} `gorm:"serializer:json"`
	EngineRunID  string                  `gorm:"type:varchar(128);not null"`
	Status       string                  `gorm:"type:varchar(32);not null"`
	Log          *string                 `gorm:"type:longtext"`
	Message      *string                 `gorm:"type:longtext"`
	StartTime    time.Time
	FinishTime   *time.Time
}

Run ...

func RunDOToRunPO

func RunDOToRunPO(runDO *run.Run) *Run

func (*Run) TableName

func (r *Run) TableName() string

type StatusCount

type StatusCount struct {
	Count  int64
	Status string
}

StatusCount ...

type Task

type Task struct {
	Name       string `gorm:"type:varchar(267);primary_key"`
	RunID      string `gorm:"type:varchar(32);primary_key"`
	Status     string `gorm:"type:varchar(32);not null"`
	Stdout     string `gorm:"type:longtext;not null"`
	Stderr     string `gorm:"type:longtext;not null"`
	StartTime  time.Time
	FinishTime *time.Time
}

Task ...

func RunDOToTaskPOList

func RunDOToTaskPOList(runDO *run.Run) []*Task

func (*Task) TableName

func (t *Task) TableName() string

Jump to

Keyboard shortcuts

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