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
Click to show internal directories.
Click to hide internal directories.