validation

package
v1.1.2155 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

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