Documentation
¶
Overview ¶
Package builderr is the refusal vocabulary goav's root package and its compiler share: typed details, fixes, phases, the unsupported-build cause, and Refusal, the compiler's refusal value. The root package converts every Refusal into the public goav.BuildError before a caller sees it.
Index ¶
Constants ¶
const ( PhaseBuild = "build" PhaseOpen = "open" PhaseRun = "run" PhaseClose = "close" )
The lifecycle phases a refusal names.
const ( CompilerPassFailedCode errcode.Code = "compiler_pass_failed" GraphPlanInvalidCode errcode.Code = "graph_plan_invalid" BranchDecodeDuplicateCode errcode.Code = "branch_decode_duplicate" BranchDecodeDomainMismatchCode errcode.Code = "branch_decode_domain_mismatch" BranchTransformMediaMismatchCode errcode.Code = "branch_transform_media_mismatch" BranchOperationChainUnsupportedCode errcode.Code = "branch_operation_chain_unsupported" BranchBufferInvalidCode errcode.Code = "branch_buffer_invalid" BranchBufferUnsupportedCode errcode.Code = "branch_buffer_unsupported" DecodeConfigConflictCode errcode.Code = "decode_config_conflict" OutputInvalidCode errcode.Code = "output_invalid" OutputDuplicateCode errcode.Code = "output_duplicate" OutputKindMixedCode errcode.Code = "output_kind_mixed" OutputWriterMissingCode errcode.Code = "output_writer_missing" OutputFormatMissingCode errcode.Code = "output_format_missing" OutputFormatUnknownCode errcode.Code = "output_format_unknown" OutputMuxerMissingCode errcode.Code = "output_muxer_missing" OutputDestinationMissingCode errcode.Code = "output_destination_missing" OutputSchemeUnsupportedCode errcode.Code = "output_scheme_unsupported" DestinationInvalidCode errcode.Code = "destination_invalid" DestinationDuplicateCode errcode.Code = "destination_duplicate" DestinationFormatUnknownCode errcode.Code = "destination_format_unknown" DestinationMuxerMissingCode errcode.Code = "destination_muxer_missing" DestinationMuxIncompatibleCode errcode.Code = "destination_mux_incompatible" DestinationShapeMismatchCode errcode.Code = "destination_shape_mismatch" TransformInvalidCode errcode.Code = "transform_invalid" TransformMediaMismatchCode errcode.Code = "transform_media_mismatch" TransformAdapterMissingCode errcode.Code = "transform_adapter_missing" TransformAdapterIncompatibleCode errcode.Code = "transform_adapter_incompatible" TranscodeResizeInvalidCode errcode.Code = "transcode_resize_invalid" OperationShapeMismatchCode errcode.Code = "operation_shape_mismatch" ShapeRequirementUnmetCode errcode.Code = "shape_requirement_unmet" ShapeConversionRefusedCode errcode.Code = "shape_conversion_refused" ShapeAdapterMissingCode errcode.Code = "shape_adapter_missing" ShapeAdapterAmbiguousCode errcode.Code = "shape_adapter_ambiguous" DecodeAdapterMissingCode errcode.Code = "decode_adapter_missing" DecodeAdapterIncompatibleCode errcode.Code = "decode_adapter_incompatible" EncodeAdapterMissingCode errcode.Code = "encode_adapter_missing" EncodeAdapterIncompatibleCode errcode.Code = "encode_adapter_incompatible" EncodeMissingCode errcode.Code = "encode_missing" EncodeDuplicateCode errcode.Code = "encode_duplicate" EncodeParameterInvalidCode errcode.Code = "encode_parameter_invalid" EncodeAutoUnresolvedCode errcode.Code = "encode_auto_unresolved" EncodeStreamMismatchCode errcode.Code = "encode_stream_mismatch" EncodeDestinationMissingCode errcode.Code = "encode_destination_missing" InputInvalidCode errcode.Code = "input_invalid" InputDuplicateCode errcode.Code = "input_duplicate" InputUnknownCode errcode.Code = "input_unknown" InputFormatUnknownCode errcode.Code = "input_format_unknown" InputDemuxerMissingCode errcode.Code = "input_demuxer_missing" InputSchemeUnsupportedCode errcode.Code = "input_scheme_unsupported" SourceCallbackMissingCode errcode.Code = "source_callback_missing" SourceShapeInvalidCode errcode.Code = "source_shape_invalid" SourceShapeUnsupportedCode errcode.Code = "source_shape_unsupported" SourceShapeMismatchCode errcode.Code = "source_shape_mismatch" ExplicitGraphSourceMissingCode errcode.Code = "explicit_graph_source_missing" StreamMissingCode errcode.Code = "stream_missing" StreamAmbiguousCode errcode.Code = "stream_ambiguous" StreamSelectorInvalidCode errcode.Code = "stream_selector_invalid" StreamCodecMissingCode errcode.Code = "stream_codec_missing" StreamStepAfterEncodeCode errcode.Code = "stream_step_after_encode" StreamInvalidCode errcode.Code = "stream_invalid" StageMissingCode errcode.Code = "stage_missing" RuntimeBranchInvalidCode errcode.Code = "runtime_branch_invalid" RuntimeBranchAnchorMissingCode errcode.Code = "runtime_branch_anchor_missing" RuntimeBranchTapMissingCode errcode.Code = "runtime_branch_tap_missing" RuntimeBranchTapDuplicateCode errcode.Code = "runtime_branch_tap_duplicate" RuntimeBranchNodeDuplicateCode errcode.Code = "runtime_branch_node_duplicate" RuntimeBranchEncodeMissingCode errcode.Code = "runtime_branch_encode_missing" RuntimeBranchEncodeDomainMismatchCode errcode.Code = "runtime_branch_encode_domain_mismatch" RuntimeBranchDecodeDomainMismatchCode errcode.Code = "runtime_branch_decode_domain_mismatch" RuntimeBranchDecodeCodecMissingCode errcode.Code = "runtime_branch_decode_codec_missing" RuntimeBranchCopyDomainMismatchCode errcode.Code = "runtime_branch_copy_domain_mismatch" RuntimeBranchMuxCodecMissingCode errcode.Code = "runtime_branch_mux_codec_missing" RuntimeBranchTransformErrorCode errcode.Code = "runtime_branch_transform_error" RuntimeBranchGraphErrorCode errcode.Code = "runtime_branch_graph_error" )
The internal refusal codes: the errcode leaves goav raises that the public errcode catalog does not name.
Variables ¶
var ErrNilStage = errors.New("goav: nil stage")
ErrNilStage reports a nil stage handed to a builder or .Do(...).
var ErrUnsupportedBuild = errors.New("goav: unsupported builder graph")
ErrUnsupportedBuild is the cause behind every build-shape refusal: the declared recipe or graph cannot be lowered as written.
Functions ¶
func EncodeHint ¶
EncodeHint is the encoder phrase refusals suggest: the bundled recipe encoders for the stream's media, so a video refusal never offers an audio codec, and every encoder when the media is unknown.
Types ¶
type Detail ¶
Detail is one typed machine-readable fact attached to a refusal. Callers read details through BuildError.Detail and BuildError.DetailLines.
func DetailLines ¶
DetailLines converts dynamically built "key=value" (or plain) lines into typed details, splitting each at the first '='. Literal detail lists use KV and Note instead.
func KV ¶
KV builds one typed detail from an explicit key and value: the value keeps its real type and is read back through BuildError.Detail(key).
type Fix ¶
type Fix struct {
Message string
}
Fix is one concrete way to repair a refusal.
type Refusal ¶
type Refusal struct {
Phase string
Family errcode.Family
Code errcode.Code
Operation string
Node string
Reason string
Details []Detail
Fixes []Fix
Cause error
}
Refusal is a refusal the compiler raises. It carries exactly what a goav.BuildError carries; the root package converts it at its public boundary, so no caller ever sees a Refusal.