Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(newtID, secret string, endpoint string, opts ...ClientOption) (*Client, error)
NewClient creates a new Newt client
func (*Client) RegisterHandler ¶
func (c *Client) RegisterHandler(messageType string, handler MessageHandler)
RegisterHandler registers a handler for a specific message type
func (*Client) SendMessage ¶
SendMessage sends a message through the WebSocket connection
type ClientOption ¶
type ClientOption func(*Client)
func WithBaseURL ¶
func WithBaseURL(url string) ClientOption
WithBaseURL sets the base URL for the client
type MessageHandler ¶
type MessageHandler func(message WSMessage)
type TokenResponse ¶
Click to show internal directories.
Click to hide internal directories.