server

package
v6.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2025 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrIndexedValidationFail = "One or more messages failed validation"
	ErrIndexedBroadcastFail  = "One or more messages failed broadcast"
)

Functions

This section is empty.

Types

type BroadcastFailedError added in v6.1.3

type BroadcastFailedError struct {
	// contains filtered or unexported fields
}

BroadcastFailedError represents an error scenario where broadcasting a published message failed.

func NewBroadcastFailedError added in v6.1.3

func NewBroadcastFailedError(msg string, err error) *BroadcastFailedError

NewBroadcastFailedError creates a new instance of BroadcastFailedError.

func (*BroadcastFailedError) Error added in v6.1.3

func (e *BroadcastFailedError) Error() string

Error returns the underlying error message.

type DecodeError

type DecodeError struct {
	// contains filtered or unexported fields
}

DecodeError represents an error resulting from trying to decode an HTTP request. It tracks the full field name for which decoding failed.

func NewDecodeError

func NewDecodeError(err error, field string) *DecodeError

NewDecodeError wraps an error (either the initial decoding error or another DecodeError). The current field that failed decoding must be passed in.

func (*DecodeError) Error

func (e *DecodeError) Error() string

Error returns the formatted error message which contains the full field name and the actual decoding error.

type IndexedError added in v6.1.3

type IndexedError struct {
	Index   int    `json:"index"`
	Message string `json:"message"`
}

IndexedError represents an issue when processing a single indexed object e.g. an item in an array.

type IndexedErrorContainer added in v6.1.3

type IndexedErrorContainer struct {
	Message  string          `json:"message"`
	Code     int             `json:"code"`
	Failures []*IndexedError `json:"failures"`
}

IndexedErrorContainer wraps a collection of indexed errors.

func (*IndexedErrorContainer) StatusCode added in v6.1.3

func (e *IndexedErrorContainer) StatusCode() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL