workflow

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package workflow contains use cases for workflow management operations.

Package workflow contains use cases for workflow management operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbortInput

type AbortInput struct {
	WorkflowID string
}

AbortInput represents the input for workflow abortion.

type AbortOutput

type AbortOutput struct {
	WorkflowID string
	Message    string
}

AbortOutput represents the output of workflow abortion.

type AbortUseCase

type AbortUseCase struct {
	// contains filtered or unexported fields
}

AbortUseCase handles workflow abortion.

func NewAbortUseCase

func NewAbortUseCase(aborter ports.WorkflowAborter) *AbortUseCase

NewAbortUseCase creates a new abort use case.

func (*AbortUseCase) Execute

func (uc *AbortUseCase) Execute(ctx context.Context, input AbortInput) (*AbortOutput, error)

Execute aborts a running workflow.

type GetBatchLogsInput

type GetBatchLogsInput struct {
	// JobName is the full resource name of the job:
	// projects/{project}/locations/{location}/jobs/{jobId}
	JobName string

	// MinSeverity filters logs by minimum severity.
	// Valid: "DEFAULT", "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"
	// Empty string defaults to "INFO".
	MinSeverity string

	// Limit is the maximum number of log entries to return.
	// If 0 or negative, defaults to 300.
	Limit int

	// StartTime optionally filters logs by minimum timestamp.
	// Zero value means no lower bound.
	StartTime time.Time

	// EndTime optionally filters logs by maximum timestamp.
	// Zero value means no upper bound.
	EndTime time.Time
}

GetBatchLogsInput represents the input for batch logs retrieval.

type GetBatchLogsOutput

type GetBatchLogsOutput struct {
	// Entries are the formatted log entries in ascending order (oldest first).
	Entries []ports.BatchLogEntry

	// JobID is the short job ID extracted from the resource name.
	JobID string
}

GetBatchLogsOutput represents the result of batch logs retrieval.

type GetBatchLogsUseCase

type GetBatchLogsUseCase struct {
	// contains filtered or unexported fields
}

GetBatchLogsUseCase handles retrieval of Google Batch job logs.

func NewGetBatchLogsUseCase

func NewGetBatchLogsUseCase(logsRepo ports.BatchLogsRepository) *GetBatchLogsUseCase

NewGetBatchLogsUseCase creates a new batch logs use case.

func (*GetBatchLogsUseCase) Execute

Execute retrieves and formats Google Batch logs for a job. Validates the job name format and returns domain entities directly.

type InputsInput added in v1.0.4

type InputsInput struct {
	WorkflowID string
}

InputsInput represents the input for inputs retrieval.

type InputsOutput added in v1.0.4

type InputsOutput struct {
	WorkflowID   string
	WorkflowName string
	Inputs       map[string]interface{}
}

InputsOutput represents the output for inputs retrieval.

type InputsUseCase added in v1.0.4

type InputsUseCase struct {
	// contains filtered or unexported fields
}

InputsUseCase handles workflow inputs retrieval.

func NewInputsUseCase added in v1.0.4

func NewInputsUseCase(reader ports.WorkflowMetadataReader) *InputsUseCase

NewInputsUseCase creates a new inputs use case.

func (*InputsUseCase) Execute added in v1.0.4

func (uc *InputsUseCase) Execute(ctx context.Context, input InputsInput) (*InputsOutput, error)

Execute retrieves inputs for a workflow.

type MetadataInput

type MetadataInput struct {
	WorkflowID string
}

MetadataInput represents the input for metadata retrieval.

type MetadataUseCase

type MetadataUseCase struct {
	// contains filtered or unexported fields
}

MetadataUseCase handles workflow metadata retrieval.

func NewMetadataUseCase

func NewMetadataUseCase(reader ports.WorkflowMetadataReader) *MetadataUseCase

NewMetadataUseCase creates a new metadata use case.

func (*MetadataUseCase) Execute

func (uc *MetadataUseCase) Execute(ctx context.Context, input MetadataInput) (*workflow2.Workflow, error)

Execute retrieves metadata for a workflow. Returns domain Workflow directly - no DTO transformation needed.

type MonitoringInput

type MonitoringInput struct {
	LogPath string
}

MonitoringInput represents the input for resource analysis.

type MonitoringOutput

type MonitoringOutput struct {
	Report *workflowDomain.EfficiencyReport
}

MonitoringOutput contains the result of resource usage analysis.

type MonitoringUseCase

type MonitoringUseCase struct {
	// contains filtered or unexported fields
}

MonitoringUseCase handles resource usage analysis from monitoring logs.

func NewMonitoringUseCase

func NewMonitoringUseCase(fp ports.FileProvider) *MonitoringUseCase

NewMonitoringUseCase creates a new monitoring use case.

func (*MonitoringUseCase) Execute

Execute analyzes resource usage from a monitoring log file.

type OutputsInput added in v1.0.4

type OutputsInput struct {
	WorkflowID string
}

OutputsInput represents the input for outputs retrieval.

type OutputsOutput added in v1.0.4

type OutputsOutput struct {
	WorkflowID   string
	WorkflowName string
	Outputs      map[string]interface{}
}

OutputsOutput represents the output for outputs retrieval.

type OutputsUseCase added in v1.0.4

type OutputsUseCase struct {
	// contains filtered or unexported fields
}

OutputsUseCase handles workflow outputs retrieval.

func NewOutputsUseCase added in v1.0.4

func NewOutputsUseCase(reader ports.WorkflowMetadataReader) *OutputsUseCase

NewOutputsUseCase creates a new outputs use case.

func (*OutputsUseCase) Execute added in v1.0.4

func (uc *OutputsUseCase) Execute(ctx context.Context, input OutputsInput) (*OutputsOutput, error)

Execute retrieves outputs for a workflow.

type QueryInput

type QueryInput struct {
	Name     string
	Status   []string
	Labels   map[string]string
	Page     int
	PageSize int
}

QueryInput represents the input for workflow queries.

type QueryUseCase

type QueryUseCase struct {
	// contains filtered or unexported fields
}

QueryUseCase handles workflow queries.

func NewQueryUseCase

func NewQueryUseCase(queryer ports.WorkflowQueryer) *QueryUseCase

NewQueryUseCase creates a new query use case.

func (*QueryUseCase) Execute

func (uc *QueryUseCase) Execute(ctx context.Context, input QueryInput) (*workflow2.QueryResult, error)

Execute queries workflows based on filters. Returns domain QueryResult directly - no DTO transformation needed.

type SubmitInput

type SubmitInput struct {
	WorkflowFile     string
	InputsFile       string
	OptionsFile      string
	DependenciesFile string
	Labels           map[string]string
}

SubmitInput represents the input for workflow submission.

type SubmitOutput

type SubmitOutput struct {
	WorkflowID string
	Status     string
}

SubmitOutput represents the output of workflow submission.

type SubmitUseCase

type SubmitUseCase struct {
	// contains filtered or unexported fields
}

SubmitUseCase handles workflow submission.

func NewSubmitUseCase

func NewSubmitUseCase(submitter ports.WorkflowSubmitter, fileProvider ports.FileProvider) *SubmitUseCase

NewSubmitUseCase creates a new submit use case.

func (*SubmitUseCase) Execute

func (uc *SubmitUseCase) Execute(ctx context.Context, input SubmitInput) (*SubmitOutput, error)

Execute submits a workflow to Cromwell.

Jump to

Keyboard shortcuts

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