validation

package
v1.1.131 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: Apache-2.0 Imports: 24 Imported by: 4

Documentation

Overview

Miscellaneous functions to validate that required proto and spec fields are non empty when required for execution.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAndFetchInputsForExecution

func CheckAndFetchInputsForExecution(
	userInputs *core.LiteralMap, fixedInputs *core.LiteralMap, expectedInputs *core.ParameterMap) (*core.LiteralMap, error)

func CheckValidExecutionID

func CheckValidExecutionID(executionID, fieldName string) error

func ValidateActiveLaunchPlanListRequest

func ValidateActiveLaunchPlanListRequest(request admin.ActiveLaunchPlanListRequest) error

func ValidateActiveLaunchPlanRequest

func ValidateActiveLaunchPlanRequest(request admin.ActiveLaunchPlanRequest) error

func ValidateCluster added in v0.6.73

func ValidateCluster(ctx context.Context, clusterInDB, clusterInEvent string) error

ValidateCluster validates that the execution is recorded as executing on `cluster`. clusterInEvent represents the cluster name, or historically, producerID sent in an execution event. clusterInDB represents the cluster recorded as running the execution in the database.

func ValidateClusterForExecutionID added in v0.6.73

func ValidateClusterForExecutionID(ctx context.Context, db repoInterfaces.Repository, executionID *core.WorkflowExecutionIdentifier, clusterInEvent string) error

ValidateClusterForExecutionID validates that the execution denoted by executionId is recorded as executing on `cluster`.

func ValidateCompiledWorkflow

func ValidateCompiledWorkflow(identifier core.Identifier, workflow admin.WorkflowClosure, config runtime.RegistrationValidationConfiguration) error

func ValidateCreateWorkflowEventRequest

func ValidateCreateWorkflowEventRequest(request admin.WorkflowExecutionEventRequest, maxOutputSizeInBytes int64) error

func ValidateDatetime added in v0.6.76

func ValidateDatetime(literal *core.Literal) error

func ValidateDescriptionEntityGetRequest added in v1.1.67

func ValidateDescriptionEntityGetRequest(request admin.ObjectGetRequest) error

func ValidateDescriptionEntityListRequest added in v1.1.67

func ValidateDescriptionEntityListRequest(request admin.DescriptionEntityListRequest) error

func ValidateEmptyStringField

func ValidateEmptyStringField(field, fieldName string) error

func ValidateIdentifier

func ValidateIdentifier(id *core.Identifier, expectedType common.Entity) error

ValidateIdentifier Validates that all required fields for an identifier are present.

func ValidateIdentifierFieldsSet added in v0.3.38

func ValidateIdentifierFieldsSet(id *core.Identifier) error

func ValidateLimit

func ValidateLimit(limit uint32) error

func ValidateListAllMatchableAttributesRequest added in v0.3.38

func ValidateListAllMatchableAttributesRequest(request admin.ListMatchableAttributesRequest) error

func ValidateMaxLengthStringField added in v0.1.1

func ValidateMaxLengthStringField(field string, fieldName string, limit int) error

ValidateMaxLengthStringField Validates that a string field does not exceed a certain character count

func ValidateMaxMapLengthField added in v0.3.38

func ValidateMaxMapLengthField(m map[string]string, fieldName string, limit int) error

ValidateMaxMapLengthField Validates that a map field does not exceed a certain amount of entries

func ValidateNamedEntityGetRequest added in v0.1.5

func ValidateNamedEntityGetRequest(request admin.NamedEntityGetRequest) error

func ValidateNamedEntityIdentifier added in v0.1.5

func ValidateNamedEntityIdentifier(id *admin.NamedEntityIdentifier) error

ValidateNamedEntityIdentifier Validates that all required fields for an identifier are present.

func ValidateNamedEntityIdentifierListRequest

func ValidateNamedEntityIdentifierListRequest(request admin.NamedEntityIdentifierListRequest) error

func ValidateNamedEntityListRequest added in v0.1.5

func ValidateNamedEntityListRequest(request admin.NamedEntityListRequest) error

func ValidateNamedEntityUpdateRequest added in v0.1.5

func ValidateNamedEntityUpdateRequest(request admin.NamedEntityUpdateRequest) error

func ValidateNodeExecutionEventRequest added in v0.4.14

func ValidateNodeExecutionEventRequest(request *admin.NodeExecutionEventRequest, maxOutputSizeInBytes int64) error

Validates that NodeExecutionEventRequests handled by admin include a valid node execution identifier. In the case the event specifies a DynamicWorkflow in the TaskNodeMetadata, this method also validates the contents of the dynamic workflow.

func ValidateNodeExecutionForTaskListRequest

func ValidateNodeExecutionForTaskListRequest(request admin.NodeExecutionForTaskListRequest) error

func ValidateNodeExecutionIdentifier

func ValidateNodeExecutionIdentifier(identifier *core.NodeExecutionIdentifier) error

func ValidateNodeExecutionListRequest

func ValidateNodeExecutionListRequest(request admin.NodeExecutionListRequest) error

func ValidateOutputData added in v0.6.43

func ValidateOutputData(outputData *core.LiteralMap, maxSizeInBytes int64) error

func ValidateProject added in v0.3.38

func ValidateProject(project admin.Project) error

func ValidateProjectAndDomain

func ValidateProjectAndDomain(
	ctx context.Context, db repositoryInterfaces.Repository, config runtimeInterfaces.ApplicationConfiguration, projectID, domainID string) error

Validates that a specified project and domain combination has been registered and exists in the db.

func ValidateProjectAttributesUpdateRequest added in v1.1.46

func ValidateProjectAttributesUpdateRequest(ctx context.Context,
	db repositoryInterfaces.Repository,
	request admin.ProjectAttributesUpdateRequest) (
	admin.MatchableResource, error)

func ValidateProjectExists added in v1.1.46

func ValidateProjectExists(
	ctx context.Context, db repositoryInterfaces.Repository, projectID string) error

ValidateProjectExists doesn't check that the project is active. This is used to get Project level attributes, which you should be able to do even for inactive projects.

func ValidateProjectForUpdate added in v1.1.46

func ValidateProjectForUpdate(
	ctx context.Context, db repositoryInterfaces.Repository, projectID string) error

func ValidateProjectRegisterRequest

func ValidateProjectRegisterRequest(request admin.ProjectRegisterRequest) error

func ValidateResourceListRequest

func ValidateResourceListRequest(request admin.ResourceListRequest) error

func ValidateResourceType added in v0.1.5

func ValidateResourceType(resourceType core.ResourceType) error

func ValidateSignalGetOrCreateRequest added in v1.1.61

func ValidateSignalGetOrCreateRequest(ctx context.Context, request admin.SignalGetOrCreateRequest) error

func ValidateSignalIdentifier added in v1.1.61

func ValidateSignalIdentifier(identifier core.SignalIdentifier) error

func ValidateSignalListRequest added in v1.1.61

func ValidateSignalListRequest(ctx context.Context, request admin.SignalListRequest) error

func ValidateSignalSetRequest added in v1.1.61

func ValidateSignalSetRequest(ctx context.Context, db repositoryInterfaces.Repository, request admin.SignalSetRequest) error

func ValidateTaskExecutionIdentifier

func ValidateTaskExecutionIdentifier(identifier *core.TaskExecutionIdentifier) error

func ValidateTaskExecutionListRequest

func ValidateTaskExecutionListRequest(request admin.TaskExecutionListRequest) error

func ValidateTaskExecutionRequest

func ValidateTaskExecutionRequest(request admin.TaskExecutionEventRequest, maxOutputSizeInBytes int64) error

func ValidateToken

func ValidateToken(token string) (int, error)

ValidateToken Offsets are encoded as string tokens to enable future api pagination changes. In addition to validating that an offset is a valid integer, we assert that it is non-negative.

func ValidateVersion

func ValidateVersion(version string) error

func ValidateWorkflowExecutionIdentifier

func ValidateWorkflowExecutionIdentifier(identifier *core.WorkflowExecutionIdentifier) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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