submission

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: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OrderByName      = "Name"
	OrderByStartTime = "StartTime"
)

Field for order.

Variables

This section is empty.

Functions

func CheckSubmissionExist

func CheckSubmissionExist(ctx context.Context, readModel ReadModel, workspaceID, id string) *errors.AppError

Types

type CheckHandler

type CheckHandler interface {
	Handle(context.Context, *CheckQuery) (bool, error)
}

func NewCheckHandler

func NewCheckHandler(grpcFactory grpc.Factory, readModel ReadModel) CheckHandler

type CheckQuery

type CheckQuery struct {
	WorkspaceID string
	Name        string
}

type Entity

type Entity struct {
	DataModelID     string
	DataModelRowIDs []string
	InputsTemplate  string
	OutputsTemplate string
}

type ExposedOptions

type ExposedOptions struct {
	ReadFromCache bool
}

type InOutMaterial

type InOutMaterial struct {
	InputsMaterial  string
	OutputsMaterial string
}

type ListHandler

type ListHandler interface {
	Handle(context.Context, *ListQuery) ([]*SubmissionItem, int, error)
}

func NewListHandler

func NewListHandler(grpcFactory grpc.Factory, submissionReadModel ReadModel) ListHandler

type ListQuery

type ListQuery struct {
	WorkspaceID string
	Pg          *utils.Pagination
	Filter      *ListSubmissionsFilter
}

type ListSubmissionsFilter

type ListSubmissionsFilter struct {
	SearchWord string
	Exact      bool
	WorkflowID string
	Name       string
	Status     []string
	IDs        []string
}

type Queries

type Queries struct {
	List  ListHandler
	Check CheckHandler
}

func NewQueries

func NewQueries(grpcFactory grpc.Factory, submissionReadModel ReadModel) *Queries

type ReadModel

type ReadModel interface {
	ListSubmissions(ctx context.Context, workspaceID string, pg *utils.Pagination, filter *ListSubmissionsFilter) ([]*SubmissionItem, error)

	CountSubmissions(ctx context.Context, workspaceID string, filter *ListSubmissionsFilter) (int, error)
}

type Status

type Status struct {
	Count      int64
	Pending    int64
	Succeeded  int64
	Failed     int64
	Running    int64
	Cancelling int64
	Cancelled  int64
}

type SubmissionItem

type SubmissionItem struct {
	ID                string
	Name              string
	Description       *string
	Type              string
	Status            string
	StartTime         int64
	FinishTime        *int64
	Duration          int64
	WorkflowID        string
	WorkflowVersionID string
	RunStatus         Status
	Entity            *Entity
	ExposedOptions    ExposedOptions
	InOutMaterial     *InOutMaterial
	WorkspaceID       string
}

type WorkflowVersion

type WorkflowVersion struct {
	ID        string
	VersionID string
}

Jump to

Keyboard shortcuts

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