Documentation
¶
Overview ¶
Package webhooks owns guided webhook creation and webhook result guidance.
Index ¶
- func CaptureTestRequest(request *http.Request, next func(*http.Request) (*http.Response, error)) (*http.Response, error)
- func Configure(root *cli.Command, options CommandOptions)
- func ShowResult(value gjson.Result, opts ResultOptions) (bool, error)
- func ValidateRequestEvents(command *cli.Command, body []byte) error
- type CommandOptions
- type CreateCanceledError
- type ResultOptions
- type WorkflowError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CaptureTestRequest ¶
func CaptureTestRequest(request *http.Request, next func(*http.Request) (*http.Response, error)) (*http.Response, error)
Capture the submitted request after flag, stdin, file and header resolution. The webhook JSON body uses WithRequestBody([]byte), whose SDK GetBody returns an independent reader. Never read stdin or the outgoing Body for presentation.
func Configure ¶
func Configure(root *cli.Command, options CommandOptions)
Configure the existing API commands before subgroup cloning.
func ShowResult ¶
func ShowResult(value gjson.Result, opts ResultOptions) (bool, error)
Keep complete result output separate from optional, quiet-aware next steps.
Types ¶
type CommandOptions ¶
type CommandOptions struct {
PrepareDiscovery func(*cli.Command) ([]option.RequestOption, error)
DefaultRequestOptions func(*cli.Command) []option.RequestOption
WriteHint func(context.Context, io.Writer, string) error
ReadableTransportFailure func(*cli.Command, error) (string, bool)
}
CommandOptions supplies assembly-owned request and diagnostic policies. PrepareDiscovery and DefaultRequestOptions must be supplied when configuring commands. Options belong to each command invocation; this package keeps no mutable policy globals.
type CreateCanceledError ¶
type CreateCanceledError struct{ Cause error }
Only a confirmed dispatch can produce this marker. The ordinary error presenter owns recovery output, so cancellation adds no synchronous writes.
func (*CreateCanceledError) Error ¶
func (*CreateCanceledError) Error() string
func (*CreateCanceledError) Unwrap ¶
func (e *CreateCanceledError) Unwrap() error
type ResultOptions ¶
type ResultOptions struct {
output.ReadableOptions
WriteHint func(context.Context, io.Writer, string) error
}
ResultOptions describes one selected readable result and its optional diagnostics.
type WorkflowError ¶
Messages contain only local guidance. Causes retain status and identity; their possibly sensitive bodies or URLs never enter this message.
func (*WorkflowError) Error ¶
func (e *WorkflowError) Error() string
func (*WorkflowError) Unwrap ¶
func (e *WorkflowError) Unwrap() error