interfaces

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: Apache-2.0 Imports: 4 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecutionCollectionOutput

type ExecutionCollectionOutput struct {
	Executions []models.Execution
}

Response format for a query on workflows.

type ExecutionEventRepoInterface added in v0.4.12

type ExecutionEventRepoInterface interface {
	// Inserts a workflow execution event into the database store.
	Create(ctx context.Context, input models.ExecutionEvent) error
}

type ExecutionRepoInterface

type ExecutionRepoInterface interface {
	// Inserts a workflow execution model into the database store.
	Create(ctx context.Context, input models.Execution) error
	// This updates only an existing execution model with all non-empty fields in the input.
	Update(ctx context.Context, execution models.Execution) error
	// Returns a matching execution if it exists.
	Get(ctx context.Context, input Identifier) (models.Execution, error)
	// Returns executions matching query parameters. A limit must be provided for the results page size.
	List(ctx context.Context, input ListResourceInput) (ExecutionCollectionOutput, error)
	// Returns a matching execution if it exists.
	Exists(ctx context.Context, input Identifier) (bool, error)
}

Defines the interface for interacting with workflow execution models.

type GetNamedEntityInput added in v0.1.5

type GetNamedEntityInput struct {
	ResourceType core.ResourceType
	Project      string
	Domain       string
	Name         string
}

type GetTaskExecutionInput

type GetTaskExecutionInput struct {
	TaskExecutionID core.TaskExecutionIdentifier
}

type Identifier added in v0.4.6

type Identifier struct {
	Project string
	Domain  string
	Name    string
	Version string
}

Parameters for getting an individual resource.

type LaunchPlanCollectionOutput

type LaunchPlanCollectionOutput struct {
	LaunchPlans []models.LaunchPlan
}

Response format for a query on workflows.

type LaunchPlanRepoInterface

type LaunchPlanRepoInterface interface {
	// Inserts a launch plan model into the database store.
	Create(ctx context.Context, input models.LaunchPlan) error
	// Updates an existing launch plan in the database store.
	Update(ctx context.Context, input models.LaunchPlan) error
	// Sets the state to active for an existing launch plan in the database store
	// (and deactivates the formerly active version if the toDisable model exists).
	SetActive(ctx context.Context, toEnable models.LaunchPlan, toDisable *models.LaunchPlan) error
	// Returns a matching launch plan if it exists.
	Get(ctx context.Context, input Identifier) (models.LaunchPlan, error)
	// Returns launch plan revisions matching query parameters. A limit must be provided for the results page size.
	List(ctx context.Context, input ListResourceInput) (LaunchPlanCollectionOutput, error)
	// Returns a list of identifiers for launch plans.  A limit must be provided for the results page size.
	ListLaunchPlanIdentifiers(ctx context.Context, input ListResourceInput) (LaunchPlanCollectionOutput, error)
}

Defines the interface for interacting with launch plan models.

type ListNamedEntityInput added in v0.3.38

type ListNamedEntityInput struct {
	ListResourceInput
	Project      string
	Domain       string
	ResourceType core.ResourceType
}

Parameters for querying multiple resources.

type ListResourceInput

type ListResourceInput struct {
	Limit         int
	Offset        int
	InlineFilters []common.InlineFilter
	// MapFilters refers to primary entity filters defined as map values rather than inline sql queries.
	// These exist to permit filtering on "IS NULL" which isn't permitted with inline filter queries and
	// pq driver value substitution.
	MapFilters    []common.MapFilter
	SortParameter common.SortParameter
	// A set of the entities (besides the primary table being queries) that should be joined with when performing
	// the list query. This enables filtering on non-primary entity attributes.
	JoinTableEntities map[common.Entity]bool
}

Parameters for querying multiple resources.

type NamedEntityCollectionOutput added in v0.1.5

type NamedEntityCollectionOutput struct {
	Entities []models.NamedEntity
}

type NamedEntityRepoInterface added in v0.1.5

type NamedEntityRepoInterface interface {
	// Returns NamedEntity objects matching the provided query. A limit is
	// required
	List(ctx context.Context, input ListNamedEntityInput) (NamedEntityCollectionOutput, error)
	// Updates NamedEntity record, will create metadata if it does not exist
	Update(ctx context.Context, input models.NamedEntity) error
	// Gets metadata (if available) associated with a NamedEntity
	Get(ctx context.Context, input GetNamedEntityInput) (models.NamedEntity, error)
}

Defines the interface for interacting with NamedEntity models

type NodeExecutionCollectionOutput

type NodeExecutionCollectionOutput struct {
	NodeExecutions []models.NodeExecution
}

Response format for a query on node executions.

type NodeExecutionEventCollectionOutput

type NodeExecutionEventCollectionOutput struct {
	NodeExecutionEvents []models.NodeExecutionEvent
}

Response format for a query on node execution events.

type NodeExecutionEventRepoInterface added in v0.4.12

type NodeExecutionEventRepoInterface interface {
	// Inserts a node execution event into the database store.
	Create(ctx context.Context, input models.NodeExecutionEvent) error
}

type NodeExecutionRepoInterface

type NodeExecutionRepoInterface interface {
	// Inserts a new node execution model and the first event that triggers it into the database store.
	Create(ctx context.Context, execution *models.NodeExecution) error
	// Updates an existing node execution in the database store with all non-empty fields in the input.
	Update(ctx context.Context, execution *models.NodeExecution) error
	// Returns a matching execution if it exists.
	Get(ctx context.Context, input NodeExecutionResource) (models.NodeExecution, error)
	// Returns node executions matching query parameters. A limit must be provided for the results page size.
	List(ctx context.Context, input ListResourceInput) (NodeExecutionCollectionOutput, error)
	// Return node execution events matching query parameters. A limit must be provided for the results page size.
	ListEvents(ctx context.Context, input ListResourceInput) (NodeExecutionEventCollectionOutput, error)
	// Returns whether a matching execution  exists.
	Exists(ctx context.Context, input NodeExecutionResource) (bool, error)
}

Defines the interface for interacting with node execution models.

type NodeExecutionResource added in v0.4.6

type NodeExecutionResource struct {
	NodeExecutionIdentifier core.NodeExecutionIdentifier
}

type ProjectRepoInterface

type ProjectRepoInterface interface {
	// Inserts a namespace model into the database store.
	Create(ctx context.Context, project models.Project) error
	// Returns a matching project when it exists.
	Get(ctx context.Context, projectID string) (models.Project, error)
	// Returns projects matching query parameters.
	List(ctx context.Context, input ListResourceInput) ([]models.Project, error)
	// Given a project that exists in the DB and a partial set of fields to update
	// as a second project (projectUpdate), updates the original project which already
	// exists in the DB.
	UpdateProject(ctx context.Context, projectUpdate models.Project) error
}

type ResourceID added in v0.3.38

type ResourceID struct {
	Project      string
	Domain       string
	Workflow     string
	LaunchPlan   string
	ResourceType string
}

type ResourceRepoInterface added in v0.3.38

type ResourceRepoInterface interface {
	// Inserts or updates an existing Type model into the database store.
	CreateOrUpdate(ctx context.Context, input models.Resource) error
	// Returns a matching Type model based on hierarchical resolution.
	Get(ctx context.Context, ID ResourceID) (models.Resource, error)
	// Returns a matching Type model.
	GetRaw(ctx context.Context, ID ResourceID) (models.Resource, error)
	// Lists all resources
	ListAll(ctx context.Context, resourceType string) ([]models.Resource, error)
	// Deletes a matching Type model when it exists.
	Delete(ctx context.Context, ID ResourceID) error
}

type SetStateInput

type SetStateInput struct {
	Identifier core.Identifier
	Version    string
	Closure    []byte
}

type TaskCollectionOutput

type TaskCollectionOutput struct {
	Tasks []models.Task
}

Response format for a query on tasks.

type TaskExecutionCollectionOutput

type TaskExecutionCollectionOutput struct {
	TaskExecutions []models.TaskExecution
}

Response format for a query on task executions.

type TaskExecutionRepoInterface

type TaskExecutionRepoInterface interface {
	// Inserts a task execution model into the database store.
	Create(ctx context.Context, input models.TaskExecution) error
	// Updates an existing task execution in the database store with all non-empty fields in the input.
	Update(ctx context.Context, execution models.TaskExecution) error
	// Returns a matching execution if it exists.
	Get(ctx context.Context, input GetTaskExecutionInput) (models.TaskExecution, error)
	// Returns task executions matching query parameters. A limit must be provided for the results page size.
	List(ctx context.Context, input ListResourceInput) (TaskExecutionCollectionOutput, error)
}

Defines the interface for interacting with task execution models.

type TaskRepoInterface

type TaskRepoInterface interface {
	// Inserts a task model into the database store.
	Create(ctx context.Context, input models.Task) error
	// Returns a matching task if it exists.
	Get(ctx context.Context, input Identifier) (models.Task, error)
	// Returns task revisions matching query parameters. A limit must be provided for the results page size.
	List(ctx context.Context, input ListResourceInput) (TaskCollectionOutput, error)
	// Returns tasks with only the project, name, and domain filled in.
	// A limit must be provided.
	ListTaskIdentifiers(ctx context.Context, input ListResourceInput) (TaskCollectionOutput, error)
}

Defines the interface for interacting with Task models.

type UpdateResourceInput

type UpdateResourceInput struct {
	Filters    []common.InlineFilter
	Attributes map[string]interface{}
}

Describes a set of resources for which to apply attribute updates.

type WorkflowCollectionOutput

type WorkflowCollectionOutput struct {
	Workflows []models.Workflow
}

Response format for a query on workflows.

type WorkflowRepoInterface

type WorkflowRepoInterface interface {
	// Inserts a workflow model into the database store.
	Create(ctx context.Context, input models.Workflow) error
	// Returns a matching workflow if it exists.
	Get(ctx context.Context, input Identifier) (models.Workflow, error)
	// Returns workflow revisions matching query parameters. A limit must be provided for the results page size.
	List(ctx context.Context, input ListResourceInput) (WorkflowCollectionOutput, error)
	ListIdentifiers(ctx context.Context, input ListResourceInput) (WorkflowCollectionOutput, error)
}

Defines the interface for interacting with Workflow models.

Jump to

Keyboard shortcuts

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