errorx

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeConnectionClosed     = 1000
	CodeOutboundBufferIsFull = 1001

	CodeFailedToUnmarshalMessage = 1500
	CodeFailedToMarshalMessage   = 1501

	CodeAuthFuncIsMissing  = 2000
	CodeAuthTokenIsMissing = 2001
	CodeAuthTokenIsExpired = 2002
)
View Source
const (
	ErrorMsgConnectionClosed             = "websocket connection is closed"
	ErrorMsgOutboundBufferIsFull         = "connection outbound buffer is full"
	ErrorMsgUnmarshalInboundMessage      = "failed to unmarshal inbound message"
	ErrorMsgMarshalOutboundMessage       = "failed to marshal outbound message"
	ErrorMsgUnsupportedMessageType       = "message type is not supported"
	ErrorMsgChannelsIsEmpty              = "channels list is empty, minimum size is 1"
	ErrorMsgUnsupportedChannel           = "channel is not supported"
	ErrorMsgInvalidChannelType           = "channel should be either private or public"
	ErrorMsgAuthTokenIsMissing           = "auth token is missing for the private channel" // nolint
	ErrorMsgFailedToCloseConnection      = "failed to close connection"
	ErrorMsgFailedToSetReadDeadline      = "failed to set read deadline"
	ErrorMsgAuthFuncIsMissing            = "authentication function to validate private auth token"
	ErrorMsgConnectionAuthTokenIsMissing = "connection auth token is nil"
	ErrorMsgAuthTokenIsExpired           = "auth token is expired" // nolint
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelizeError

type ChannelizeError struct {
	Code int
	// contains filtered or unexported fields
}

ChannelizeError represents a custom error object that holds error details.

func NewChannelizeError

func NewChannelizeError(code int) *ChannelizeError

NewChannelizeError creates a new custom error by using an error Code.

func NewChannelizeErrorWithErr

func NewChannelizeErrorWithErr(code int, err error) *ChannelizeError

NewChannelizeErrorWithErr creates a new custom error by wrapping an existing error.

func (ChannelizeError) Error

func (e ChannelizeError) Error() string

Jump to

Keyboard shortcuts

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