function

ValidateTaskPayload

Validate a bounded non-empty JSON task payload.

Arguments

ArgumentTypeDescription
payloadjson.RawMessageEncoded input or output; it must be valid JSON and no larger than MaxTaskPayloadBytes.

Returns

Nil when valid or a bounded, actionable contract error.

error

How it works

Custom TaskStore implementations should call this at their direct public boundary and still enforce the corresponding database invariants atomically.

Full signature

func ValidateTaskPayload(payload json.RawMessage) error

Source store/task_validation.go:73