Documentation
¶
Index ¶
- type Client
- func (c *Client) GetDevice() DeviceDTO
- func (c *Client) GetDeviceURL() (string, error)
- func (c *Client) GetWebSocketURL() (string, error)
- func (c *Client) IsRegistered() bool
- func (c *Client) OnRegistered(callback func())
- func (c *Client) Refresh() error
- func (c *Client) Register() error
- func (c *Client) Unregister() error
- func (c *Client) WaitForRegistration(timeout time.Duration) error
- type Config
- type DeviceDTO
- type DeviceResponse
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 is the Device API client
func (*Client) GetDeviceURL ¶
GetDeviceURL returns the device URL
func (*Client) GetWebSocketURL ¶
GetWebSocketURL returns the WebSocket URL for Mercury connections
func (*Client) IsRegistered ¶
IsRegistered returns true if the device is registered
func (*Client) OnRegistered ¶
func (c *Client) OnRegistered(callback func())
OnRegistered registers a callback function to be called when the device is registered
func (*Client) Unregister ¶
Unregister unregisters a device with Webex
type Config ¶
type Config struct {
// Ephemeral determines if the device is temporary and should be refreshed
Ephemeral bool
// EphemeralDeviceTTL is the time to live for ephemeral devices in seconds
EphemeralDeviceTTL int
// DeviceType specifies the type of device
DeviceType string
// DefaultHeaders to include in requests
DefaultHeaders map[string]string
// DefaultBody to include in requests
DefaultBody map[string]interface{}
}
Config holds the configuration for the Device plugin
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns the default configuration for the Device plugin
type DeviceDTO ¶
type DeviceDTO struct {
URL string `json:"url,omitempty"`
WebSocketURL string `json:"webSocketUrl,omitempty"`
UserID string `json:"userId,omitempty"`
DeviceType string `json:"deviceType,omitempty"`
IntranetInactivityDuration int `json:"intranetInactivityDuration,omitempty"`
InNetworkInactivityDuration int `json:"inNetworkInactivityDuration,omitempty"`
ModificationTime string `json:"modificationTime,omitempty"`
Services interface{} `json:"services,omitempty"`
ServiceHostMap interface{} `json:"serviceHostMap,omitempty"`
ClientMessagingGiphy string `json:"clientMessagingGiphy,omitempty"`
ETag string `json:"-"`
}
DeviceDTO represents the response from the WDM service for a device
type DeviceResponse ¶
DeviceResponse represents the response from the device registration
Click to show internal directories.
Click to hide internal directories.