Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseMessageRequest ¶
type BaseMessageRequest struct {
Action string `json:"action"` // Action type of the request
}
BaseMessageRequest represents a base structure for incoming messages.
type BaseMessageResponse ¶
type BaseMessageResponse struct { Action string `json:"action,omitempty"` // Action type of the response Success bool `json:"success"` // Indicates success or failure ErrorMessage string `json:"error_message,omitempty"` // Error message, if any }
BaseMessageResponse represents a base structure for outgoing messages.
type ListSubscriptionsMessageRequest ¶
type ListSubscriptionsMessageRequest struct {
BaseMessageRequest
}
ListSubscriptionsMessageRequest represents a request to list active subscriptions.
type ListSubscriptionsMessageResponse ¶
type ListSubscriptionsMessageResponse struct { BaseMessageResponse Subscriptions []*SubscriptionEntry `json:"subscriptions,omitempty"` }
ListSubscriptionsMessageResponse is the structure used to respond to list_subscriptions requests. It contains a list of active subscriptions for the current WebSocket connection.
type SubscribeMessageRequest ¶
type SubscribeMessageRequest struct { BaseMessageRequest Topic string `json:"topic"` // Topic to subscribe to Arguments map[string]interface{} `json:"arguments"` // Additional arguments for subscription }
SubscribeMessageRequest represents a request to subscribe to a topic.
type SubscribeMessageResponse ¶
type SubscribeMessageResponse struct { BaseMessageResponse Topic string `json:"topic"` // Topic of the subscription ID string `json:"id"` // Unique subscription ID }
SubscribeMessageResponse represents the response to a subscription request.
type SubscriptionEntry ¶
type SubscriptionEntry struct { Topic string `json:"topic,omitempty"` // Topic of the subscription ID string `json:"id,omitempty"` // Unique subscription ID }
SubscriptionEntry represents an active subscription entry.
type UnsubscribeMessageRequest ¶
type UnsubscribeMessageRequest struct { BaseMessageRequest ID string `json:"id"` // Unique subscription ID }
UnsubscribeMessageRequest represents a request to unsubscribe from a topic.
type UnsubscribeMessageResponse ¶
type UnsubscribeMessageResponse struct { BaseMessageResponse ID string `json:"id"` // Unique subscription ID }
UnsubscribeMessageResponse represents the response to an unsubscription request.