Documentation ¶
Index ¶
- type APIError
- type APIErrorOption
- func WithError(err error) APIErrorOption
- func WithMessage(message string) APIErrorOption
- func WithStatusAndError(httpStatus int, err error) APIErrorOption
- func WithStatusAndMessage(httpStatus int, message string) APIErrorOption
- func WithStatusAndMessageAndError(httpStatus int, message string, err error) APIErrorOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
func NewAPIError ¶
func NewAPIError(options ...APIErrorOption) *APIError
type APIErrorOption ¶
type APIErrorOption func(apiError *APIError)
APIErrorOption definition.
func WithError ¶
func WithError(err error) APIErrorOption
func WithMessage ¶
func WithMessage(message string) APIErrorOption
func WithStatusAndError ¶
func WithStatusAndError(httpStatus int, err error) APIErrorOption
func WithStatusAndMessage ¶
func WithStatusAndMessage(httpStatus int, message string) APIErrorOption
func WithStatusAndMessageAndError ¶
func WithStatusAndMessageAndError(httpStatus int, message string, err error) APIErrorOption
Click to show internal directories.
Click to hide internal directories.