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
}
Client syncs local events to the SC Bridge API.
func NewClientWithAPIKey ¶
NewClientWithAPIKey creates a sync client using legacy X-API-Key auth.
func (*Client) SetOnAuthExpired ¶
func (c *Client) SetOnAuthExpired(fn func())
SetOnAuthExpired sets a callback for 401 responses.
func (*Client) SetSyncCheck ¶
SetSyncCheck sets a filter function for event types.
type SyncEvent ¶
type SyncEvent struct {
Type string `json:"type"`
Source string `json:"source"`
Timestamp string `json:"timestamp"`
Data map[string]string `json:"data"`
}
SyncEvent is a single event in the sync payload.
type SyncPayload ¶
type SyncPayload struct {
Events []SyncEvent `json:"events"`
}
SyncPayload is sent to the SC Bridge API.
Click to show internal directories.
Click to hide internal directories.