util

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: Apache-2.0 Imports: 24 Imported by: 2

Documentation

Overview

Util around parsing request filters

Shared method implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRequestFilters

func AddRequestFilters(requestFilters string, primaryEntity common.Entity, existingFilters []common.InlineFilter) (
	[]common.InlineFilter, error)

func CreateOrGetLaunchPlan added in v0.3.38

func CreateOrGetLaunchPlan(ctx context.Context,
	db repositories.RepositoryInterface, config runtimeInterfaces.Configuration, taskIdentifier *core.Identifier,
	workflowInterface *core.TypedInterface, workflowID uint, spec *admin.ExecutionSpec) (*admin.LaunchPlan, error)

func CreateOrGetWorkflowModel added in v0.3.38

func CreateOrGetWorkflowModel(
	ctx context.Context, request admin.ExecutionCreateRequest, db repositories.RepositoryInterface,
	workflowManager interfaces.WorkflowInterface, namedEntityManager interfaces.NamedEntityInterface, taskIdentifier *core.Identifier,
	task *admin.Task) (*models.Workflow, error)

func FetchAndGetWorkflowClosure

func FetchAndGetWorkflowClosure(ctx context.Context,
	store *storage.DataStore,
	remoteLocationIdentifier string) (*admin.WorkflowClosure, error)

func GetActiveLaunchPlanVersionFilters

func GetActiveLaunchPlanVersionFilters(project, domain, name string) ([]common.InlineFilter, error)

Returns the set of filters necessary to query launch plan models to find the active version of a launch plan

func GetDbFilters

func GetDbFilters(spec FilterSpec, primaryEntity common.Entity) ([]common.InlineFilter, error)

Consolidates request params and filters to a single list of filters. This consolidation is necessary since the db is agnostic to required request parameters and additional filter arguments.

func GetExecutionName

func GetExecutionName(request admin.ExecutionCreateRequest) string

func GetLaunchPlan

func GetLaunchPlan(
	ctx context.Context, repo repositories.RepositoryInterface, identifier core.Identifier) (*admin.LaunchPlan, error)

func GetLaunchPlanDigest

func GetLaunchPlanDigest(ctx context.Context, launchPlan *admin.LaunchPlan) ([]byte, error)

Returns a unique digest for functionally equivalent launch plans

func GetLaunchPlanModel

func GetLaunchPlanModel(
	ctx context.Context, repo repositories.RepositoryInterface, identifier core.Identifier) (models.LaunchPlan, error)

func GetNamedEntity added in v0.1.5

func GetNamedEntity(
	ctx context.Context, repo repositories.RepositoryInterface, resourceType core.ResourceType, identifier admin.NamedEntityIdentifier) (*admin.NamedEntity, error)

func GetNamedEntityModel added in v0.1.5

func GetNamedEntityModel(
	ctx context.Context, repo repositories.RepositoryInterface, resourceType core.ResourceType, identifier admin.NamedEntityIdentifier) (models.NamedEntity, error)

func GetNodeExecutionIdentifierFilters

func GetNodeExecutionIdentifierFilters(
	ctx context.Context, nodeExecutionIdentifier core.NodeExecutionIdentifier) ([]common.InlineFilter, error)

All inputs to this function must be validated.

func GetNodeExecutionModel

func GetNodeExecutionModel(ctx context.Context, repo repositories.RepositoryInterface, nodeExecutionIdentifier *core.NodeExecutionIdentifier) (
	*models.NodeExecution, error)

func GetSingleValueEqualityFilter

func GetSingleValueEqualityFilter(entity common.Entity, field, value string) (common.InlineFilter, error)

func GetTask

func GetTask(ctx context.Context, repo repositories.RepositoryInterface, identifier core.Identifier) (
	*admin.Task, error)

func GetTaskDigest

func GetTaskDigest(ctx context.Context, task *core.CompiledTask) ([]byte, error)

Returns a unique digest for functionally equivalent compiled tasks

func GetTaskModel

func GetTaskModel(ctx context.Context, repo repositories.RepositoryInterface, taskIdentifier *core.Identifier) (
	*models.Task, error)

func GetWorkflow

func GetWorkflow(
	ctx context.Context,
	repo repositories.RepositoryInterface,
	store *storage.DataStore,
	identifier core.Identifier) (*admin.Workflow, error)

func GetWorkflowDigest

func GetWorkflowDigest(ctx context.Context, workflowClosure *core.CompiledWorkflowClosure) ([]byte, error)

Returns a unique digest for functionally equivalent compiled workflows

func GetWorkflowExecutionIdentifierFilters

func GetWorkflowExecutionIdentifierFilters(
	ctx context.Context, workflowExecutionIdentifier core.WorkflowExecutionIdentifier) ([]common.InlineFilter, error)

func GetWorkflowModel

func GetWorkflowModel(
	ctx context.Context, repo repositories.RepositoryInterface, identifier core.Identifier) (models.Workflow, error)

func ListActiveLaunchPlanVersionsFilters

func ListActiveLaunchPlanVersionsFilters(project, domain string) ([]common.InlineFilter, error)

Returns the set of filters necessary to query launch plan models to find the active version of a launch plan

func ParseFilters

func ParseFilters(filterParams string, primaryEntity common.Entity) ([]common.InlineFilter, error)

Types

type FilterSpec

type FilterSpec struct {
	// All of these fields are optional (although they should not *all* be empty).
	Project        string
	Domain         string
	Name           string
	RequestFilters string
}

Jump to

Keyboard shortcuts

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