Versions in this module Expand all Collapse all v0 v0.2.0 Jun 23, 2023 v0.1.3 Apr 11, 2023 Changes in this version + func NewAuthTokenTransport(t http.RoundTripper, token string) http.RoundTripper + type AuthTokenTransport struct + func (t *AuthTokenTransport) RoundTrip(req *http.Request) (*http.Response, error) + type Client struct + Commands CommandsAPI + func NewClient(httpClient *http.Client) *Client + func NewClientWithURL(httpClient *http.Client, baseURL string) (*Client, error) + func (c *Client) Do(req *http.Request) (*http.Response, error) + func (c *Client) NewRequest(method, path string, body io.Reader) (*http.Request, error) + func (c *Client) NewRequestWithContext(ctx context.Context, method, path string, body io.Reader) (*http.Request, error) + type CommandProgress struct + Error error + type CommandQuery struct + Arguments map[string]interface{} + CommandName string + HardwareID string + type CommandResponse struct + Payload map[string]interface{} + State CommandState + type CommandState string + const CommandError + const CommandInProgress + const CommandPlatformError + const CommandStarted + const CommandSucceeded + type CommandsAPI struct + func (c *CommandsAPI) Execute(ctx context.Context, query CommandQuery) (CommandResponse, error) + func (c *CommandsAPI) ExecuteWithProgress(ctx context.Context, query CommandQuery) (<-chan CommandProgress, error) + type Error struct + Code string + Details map[string]interface{} + Message string + type ResponseError struct + Errors []Error + RetryAfter time.Duration + StatusCode int + func (r ResponseError) Error() string