Versions in this module Expand all Collapse all v0 v0.1.0 Apr 1, 2026 Changes in this version + const Closed + const Connected + const Connecting + const Disconnected + const Reconnecting + func ConvertMapToString(v any) (string, error) + func ConvertSliceToString(elem []string) string + func ConvertValueIntoType[T any](v interface{}, checkPointer bool) (T, bool) + func ExtractAnyMap(m map[string]interface{}, key string, coerce bool) (map[string]interface{}, bool, error) + func ExtractAnySlice(m map[string]interface{}, key string, coerce bool) ([]interface{}, bool, error) + func ExtractInt64Map(m map[string]interface{}, key string, coerce bool) (map[string]int64, bool, error) + func ExtractInt64Slice(m map[string]interface{}, key string, coerce bool) ([]int64, bool, error) + func ExtractMap[T any](m map[string]interface{}, key string, coerce bool, ...) (map[string]T, bool, error) + func ExtractSlice[T any](m map[string]interface{}, key string, coerce bool, ...) ([]T, bool, error) + func ExtractStringMap(m map[string]interface{}, key string, coerce bool) (map[string]string, bool, error) + func ExtractStringSlice(m map[string]interface{}, key string, coerce bool) ([]string, bool, error) + func ExtractUint64Map(m map[string]interface{}, key string, coerce bool) (map[string]uint64, bool, error) + func ExtractUint64Slice(m map[string]interface{}, key string, coerce bool) ([]uint64, bool, error) + func ExtractValue[T any](m map[string]interface{}, key string) (T, bool, error) + func SplitMessageIntoMap(s string) (map[string]interface{}, error) + type ConnectionManager interface + Close func() error + Get func() *WSConnection + Save func(wsConnection *WSConnection) + type DefaultConnectionManagerImpl struct + func (m *DefaultConnectionManagerImpl) Close() error + func (m *DefaultConnectionManagerImpl) Get() *WSConnection + func (m *DefaultConnectionManagerImpl) Save(conn *WSConnection) + type LegacyCommand struct + Alias string + Name string + Short string + type Message interface + SafeString func() (string, error) + String func() string + Type func() string + type MissingFieldError struct + GoField string + GoType string + JSONField string + StructName string + func NewMissingFieldError(goField, goType, jsonField, structName string) MissingFieldError + func (e MissingFieldError) Error() string + type NewMessageFromMap map[string]NewMessageFromMapFunc + func (r NewMessageFromMap) New(typeName string, m map[string]interface{}) (Message, error) + type NewMessageFromMapFunc func(m map[string]interface{}) (Message, error) + func WrapNewMessageFromMapFunc[T any](fn func(map[string]interface{}) (*T, error)) NewMessageFromMapFunc + type WSConnection struct + Conn *websocket.Conn + Data map[string]interface{} + EnableAutoReconnect bool + Header http.Header + MaxReconnectAttempts int + MessageHandler WSConnectionMessageHandler + Meta map[string]interface{} + Mu sync.RWMutex + MuStatus sync.RWMutex + StatusHandler WSConnectionStatusHandler + func NewWSConnection(configRepo repository.ConfigRepository, tokenRepo repository.TokenRepository, ...) (*WSConnection, error) + func (c *WSConnection) Close(code int, reason string) error + func (c *WSConnection) DefaultCloseHandler(code int, reason string) error + func (c *WSConnection) DefaultPongHandler(text string) error + func (c *WSConnection) Dial(url string, headers http.Header) (*websocket.Conn, error) + func (c *WSConnection) GetData(key string) interface{} + func (c *WSConnection) GetStatus() string + func (c *WSConnection) Lock(location string) + func (c *WSConnection) SetStatus(status string) + func (c *WSConnection) Unlock(location string) + type WSConnectionMessageHandler func(msg []byte) + type WSConnectionOption func(wsConn *WSConnection) error + func WithEnableAutoReconnect() WSConnectionOption + func WithMaxReconnectAttempts(maxReconnectAttempts int) WSConnectionOption + func WithMessageHandler(handler WSConnectionMessageHandler) WSConnectionOption + func WithScheme(scheme string) WSConnectionOption + func WithStatusHandler(handler WSConnectionStatusHandler) WSConnectionOption + func WithToken(token string) WSConnectionOption + type WSConnectionStatusHandler func(status string) v0.1.0-alpha.6 Aug 22, 2025