Versions in this module Expand all Collapse all v1 v1.3.0 Jan 8, 2024 Changes in this version + var GenUUID = uuid.NewUUID + func PackageRequest(req Request, versionNumber string) (msg []byte, err error) + type Auth struct + Password string + Username string + type AuthInfo struct + ChallengeID string + Pass string + User string + type Dialer interface + Address func() string + Auth func() (*Auth, error) + Close func() error + Connect func() error + GetQuit func() chan struct{} + IsConnected func() bool + IsDisposed func() bool + Ping func(errs chan error) + Read func() (msg []byte, err error) + SetAuth func(username string, password string) + SetPingInterval func(interval time.Duration) + SetReadingWait func(interval time.Duration) + SetTimeout func(interval time.Duration) + SetWritingWait func(interval time.Duration) + Write func(msg []byte) error + func NewWebSocketDialer(address string) Dialer + type OptAuth func(*AuthInfo) error + func OptAuthEnv() OptAuth + func OptAuthUserPass(user, pass string) OptAuth + type Request struct + Args map[string]interface{} + Op string + Processor string + RequestID string + func PrepareAuthRequest(requestID string, username string, password string) (req Request, err error) + func PrepareRequest(query string, bindings, rebindings map[string]string) (req Request, id string, err error) + type Response struct + Code int + Data interface{} + RequestID string + func MarshalResponse(msg []byte) (Response, error) + type WebSocket struct + Quit chan struct{} + func (ws *WebSocket) Address() string + func (ws *WebSocket) Auth() (*Auth, error) + func (ws *WebSocket) Close() error + func (ws *WebSocket) Connect() error + func (ws *WebSocket) GetQuit() chan struct{} + func (ws *WebSocket) IsConnected() bool + func (ws *WebSocket) IsDisposed() bool + func (ws *WebSocket) Ping(errs chan error) + func (ws *WebSocket) Read() (msg []byte, err error) + func (ws *WebSocket) SetAuth(user, pass string) + func (ws *WebSocket) SetPingInterval(interval time.Duration) + func (ws *WebSocket) SetReadingWait(interval time.Duration) + func (ws *WebSocket) SetTimeout(interval time.Duration) + func (ws *WebSocket) SetWritingWait(interval time.Duration) + func (ws *WebSocket) Write(msg []byte) error