Documentation ¶
Overview ¶
Package extension_kit provides utilities to handle extension errors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExtensionError ¶
type ExtensionError struct { // A human-readable explanation specific to this occurrence of the problem. Detail *string `json:"detail,omitempty"` // A URI reference that identifies the specific occurrence of the problem. Instance *string `json:"instance,omitempty"` // A short, human-readable summary of the problem type. Title string `json:"title"` // A URI reference that identifies the problem type. Type *string `json:"type,omitempty"` }
ExtensionError is a generalization over ActionKit and DiscoveryKit error types. They are structurally identical and can be used interchangeably.
func ToError ¶
func ToError(title string, err error) ExtensionError
ToError converts an error to an ExtensionError.
func WrapError ¶ added in v1.8.18
func WrapError(err error) *ExtensionError
WrapError if the error is an ExtensionError, it is returned as is. Otherwise, a new ExtensionError is with the error as title.
func (ExtensionError) Error ¶ added in v1.7.4
func (e ExtensionError) Error() string
Directories ¶
Path | Synopsis |
---|---|
Package extcmd supports use cases in which a command is supposed be started non-blocking as a result of an incoming HTTP requests, e.g., ActionKit's start call.
|
Package extcmd supports use cases in which a command is supposed be started non-blocking as a result of an incoming HTTP requests, e.g., ActionKit's start call. |
Package exthttp supports setup of HTTP servers to implement the *Kit contracts.
|
Package exthttp supports setup of HTTP servers to implement the *Kit contracts. |
Package extlogging contains general utilities for extension logging.
|
Package extlogging contains general utilities for extension logging. |
Package extutil contains a variety of util functions that were identified as common code duplication.
|
Package extutil contains a variety of util functions that were identified as common code duplication. |
Click to show internal directories.
Click to hide internal directories.