transformers

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: Apache-2.0 Imports: 12 Imported by: 6

Documentation

Overview

Handles translating gRPC request & response objects to and from repository model objects

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateExecutionEventModel

func CreateExecutionEventModel(request admin.WorkflowExecutionEventRequest) (*models.ExecutionEvent, error)

Transforms a ExecutionEventCreateRequest to a ExecutionEvent model

func CreateExecutionModel

func CreateExecutionModel(input CreateExecutionModelInput) (*models.Execution, error)

Transforms a ExecutionCreateRequest to a Execution model

func CreateLaunchPlan

func CreateLaunchPlan(
	request admin.LaunchPlanCreateRequest,
	expectedOutputs *core.VariableMap) admin.LaunchPlan

func CreateLaunchPlanModel

func CreateLaunchPlanModel(
	launchPlan admin.LaunchPlan,
	workflowRepoID uint,
	digest []byte,
	initState admin.LaunchPlanState) (models.LaunchPlan, error)

Transforms a admin.LaunchPlan object to a LaunchPlan model

func CreateNodeExecutionEventModel

func CreateNodeExecutionEventModel(request admin.NodeExecutionEventRequest) (*models.NodeExecutionEvent, error)

Transforms a NodeExecutionEventRequest to a NodeExecutionEvent model

func CreateNodeExecutionModel

func CreateNodeExecutionModel(input ToNodeExecutionModelInput) (*models.NodeExecution, error)

func CreateProjectModel

func CreateProjectModel(project *admin.Project) models.Project

func CreateTaskExecutionModel

func CreateTaskExecutionModel(input CreateTaskExecutionModelInput) (*models.TaskExecution, error)

func CreateTaskModel

func CreateTaskModel(
	request admin.TaskCreateRequest,
	taskClosure admin.TaskClosure,
	digest []byte) (models.Task, error)

Transforms a TaskCreateRequest to a task model

func CreateWorkflowModel

func CreateWorkflowModel(request admin.WorkflowCreateRequest, remoteClosureIdentifier string,
	digest []byte) (models.Workflow, error)

Transforms a WorkflowCreateRequest to a workflow model

func FromExecutionModel

func FromExecutionModel(executionModel models.Execution) (*admin.Execution, error)

func FromExecutionModelWithReferenceExecution

func FromExecutionModelWithReferenceExecution(executionModel models.Execution, referenceExecutionID *core.WorkflowExecutionIdentifier) (
	*admin.Execution, error)

func FromExecutionModels

func FromExecutionModels(executionModels []models.Execution) ([]*admin.Execution, error)

func FromLaunchPlanModel

func FromLaunchPlanModel(model models.LaunchPlan) (*admin.LaunchPlan, error)

Transforms a LaunchPlanModel to a LaunchPlan

func FromLaunchPlanModels

func FromLaunchPlanModels(launchPlanModels []models.LaunchPlan) ([]*admin.LaunchPlan, error)

func FromLaunchPlanModelsToIdentifiers

func FromLaunchPlanModelsToIdentifiers(launchPlanModels []models.LaunchPlan) []*admin.NamedEntityIdentifier

func FromNodeExecutionModel

func FromNodeExecutionModel(nodeExecutionModel models.NodeExecution) (*admin.NodeExecution, error)

func FromNodeExecutionModels

func FromNodeExecutionModels(
	nodeExecutionModels []models.NodeExecution) ([]*admin.NodeExecution, error)

func FromProjectModel

func FromProjectModel(projectModel models.Project, domains []*admin.Domain) admin.Project

func FromProjectModels

func FromProjectModels(projectModels []models.Project, domains []*admin.Domain) []*admin.Project

func FromTaskExecutionModel

func FromTaskExecutionModel(taskExecutionModel models.TaskExecution) (*admin.TaskExecution, error)

func FromTaskExecutionModels

func FromTaskExecutionModels(taskExecutionModels []models.TaskExecution) ([]*admin.TaskExecution, error)

func FromTaskModel

func FromTaskModel(taskModel models.Task) (admin.Task, error)

func FromTaskModels

func FromTaskModels(taskModels []models.Task) ([]*admin.Task, error)

func FromTaskModelsToIdentifiers

func FromTaskModelsToIdentifiers(taskModels []models.Task) []*admin.NamedEntityIdentifier

func FromWorkflowModel

func FromWorkflowModel(workflowModel models.Workflow) (admin.Workflow, error)

func FromWorkflowModels

func FromWorkflowModels(workflowModels []models.Workflow) ([]*admin.Workflow, error)

func FromWorkflowModelsToIdentifiers

func FromWorkflowModelsToIdentifiers(workflowModels []models.Workflow) []*admin.NamedEntityIdentifier

func GetExecutionIdentifier

func GetExecutionIdentifier(executionModel *models.Execution) core.WorkflowExecutionIdentifier

func UpdateExecutionModelState

func UpdateExecutionModelState(
	execution *models.Execution, request admin.WorkflowExecutionEventRequest, abortCause *string) error

Updates an existing model given a WorkflowExecution event.

func UpdateNodeExecutionModel

func UpdateNodeExecutionModel(
	request *admin.NodeExecutionEventRequest, nodeExecutionModel *models.NodeExecution,
	targetExecution *core.WorkflowExecutionIdentifier) error

func UpdateTaskExecutionModel

func UpdateTaskExecutionModel(request *admin.TaskExecutionEventRequest, taskExecutionModel *models.TaskExecution) error

Types

type CreateExecutionModelInput

type CreateExecutionModelInput struct {
	WorkflowExecutionID   core.WorkflowExecutionIdentifier
	RequestSpec           *admin.ExecutionSpec
	LaunchPlanID          uint
	WorkflowID            uint
	Phase                 core.WorkflowExecution_Phase
	CreatedAt             time.Time
	Notifications         []*admin.Notification
	WorkflowIdentifier    *core.Identifier
	ParentNodeExecutionID uint
	Cluster               string
	InputsURI             storage.DataReference
	UserInputsURI         storage.DataReference
}

Request parameters for calls to CreateExecutionModel.

type CreateProjectModelInput

type CreateProjectModelInput struct {
	Identifier  string
	Name        string
	Description string
}

type CreateTaskExecutionModelInput

type CreateTaskExecutionModelInput struct {
	Request *admin.TaskExecutionEventRequest
}

type ToNodeExecutionModelInput

type ToNodeExecutionModelInput struct {
	Request               *admin.NodeExecutionEventRequest
	ParentTaskExecutionID uint
}

Jump to

Keyboard shortcuts

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