validation

package
v1.1.1204 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTaskSpecVersion         = errors.New("invalid task spec version")                                           // ErrTaskSpecVersion is thrown when the task version.
	ErrServiceTaskNoMetadata   = errors.New("no metadata section")                                                 // ErrServiceTaskNoMetadata is thrown when there is no metadata section present in the spec.
	ErrServiceTaskDuration     = errors.New("invalid max estimated duration")                                      // ErrServiceTaskDuration is thrown when the estimated duration is bad.
	ErrNoDefaultRetry          = errors.New("no default retry section")                                            // ErrNoDefaultRetry is thrown when no default retry was provided.
	ErrServiceTaskNoParameters = errors.New("no parameters section")                                               // ErrServiceTaskNoParameters is thrown when there is no parameters section in the spec.
	ErrServiceMockValue        = errors.New("no mock value provided")                                              // ErrServiceMockValue is thrown when the task is a mock, but there is no default value.
	ErrServiceTaskNatsName     = errors.New("names must be compatible with NATS and contain no spaces or periods") // ErrServiceTaskNatsName is thrown when a name is not compatible with NATS.
	ErrInvalidRetry            = errors.New("no mock value provided")                                              // ErrInvalidRetry is thrown
)

Functions

func ValidateTaskSpec

func ValidateTaskSpec(td *model.TaskSpec) error

ValidateTaskSpec validates a task spec.

Types

This section is empty.

Jump to

Keyboard shortcuts

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