Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultAddress is the default Seashell server address. DefaultAddress = "http://127.0.0.1:8123" // DefaultTimeout is the default request timeout. DefaultTimeout = 2 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides a client to the Seashell API
func (*Client) WithHeaders ¶
WithHeaders returns a new Client that will use the specified headers in addition to those present in the original client in any future request. In case of a collision, the header in the original client will be overwritten.
type Config ¶
type Config struct {
// URL of the Seashell server (e.g. http://127.0.0.1:8080).
Address string
// Token to be used for authentication.
Token string
// Request timeout.
Timeout time.Duration
}
Config contains configurations for Seashell's API client.
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns a default configuration for Seashell's API client.
type Devices ¶
type Devices struct {
// contains filtered or unexported fields
}
Devices is a handle to the devices API
func (*Devices) GetDeviceToken ¶
func (d *Devices) GetDeviceToken(ctx context.Context, req *structs.DeviceGetTokenRequest) (*structs.DeviceTokenResponse, error)
GetDeviceToken :
func (*Devices) SyncDevice ¶
func (d *Devices) SyncDevice(ctx context.Context, req *structs.DeviceSyncRequest) (*structs.DeviceSyncResponse, error)
SyncDevice :
Click to show internal directories.
Click to hide internal directories.