Documentation ¶
Index ¶
- Constants
- func Concat(a string, b string) string
- type BuildClient
- func (m *BuildClient) ContinueDeviceLogs(poll_url string) ([]DeviceLogEntry, error)
- func (m *BuildClient) CreateModel(new_model *Model) (*Model, error)
- func (m *BuildClient) DeleteDevice(device_id string) error
- func (m *BuildClient) DeleteModel(model_id string) error
- func (m *BuildClient) GetCodeRevision(model_id string, build_num string) (CodeRevisionLong, error)
- func (m *BuildClient) GetCodeRevisionList(model_id string) ([]CodeRevisionShort, error)
- func (m *BuildClient) GetDevice(device_id string) (Device, error)
- func (m *BuildClient) GetDeviceList() ([]Device, error)
- func (m *BuildClient) GetDeviceLogs(device_id string) ([]DeviceLogEntry, string, error)
- func (m *BuildClient) GetModel(model_id string) (*Model, error)
- func (m *BuildClient) ListModels() (*ModelList, error)
- func (m *BuildClient) RestartDevice(device_id string) error
- func (m *BuildClient) RestartModelDevices(model_id string) error
- func (m BuildClient) SetAuthHeader(request *http.Request)
- func (m *BuildClient) UpdateCodeRevision(model_id string, request *CodeRevisionLong) (*CodeRevisionResponse, error)
- func (m *BuildClient) UpdateDevice(new_device *Device, device_id string) (Device, error)
- func (m *BuildClient) UpdateModel(model_id string, new_model *Model) (*Model, error)
- type BuildError
- type BuildErrorDetails
- type CodeRevisionLong
- type CodeRevisionResponse
- type CodeRevisionShort
- type CodeRevisionsResponse
- type Device
- type DeviceListResponse
- type DeviceLogEntry
- type DeviceLogResponse
- type DeviceResponse
- type ErrorDetails
- type Model
- type ModelError
- type ModelList
- type ModelResponse
- type Timeout
Constants ¶
View Source
const BASE_EI_URL = "https://build.electricimp.com/"
View Source
const DEVICES_ENDPOINT = "devices"
View Source
const DEVICES_LOG_ENDPOINT = "logs"
View Source
const DEVICES_RESTART_ENDPOINT = "restart"
View Source
const EI_URL = "https://build.electricimp.com/v4/"
View Source
const MODELS_DEVICE_RESTART_ENDPOINT = "restart"
View Source
const MODELS_ENDPOINT = "models"
View Source
const MODELS_REVISIONS_ENDPOINT = "revisions"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BuildClient ¶
type BuildClient struct {
// contains filtered or unexported fields
}
func NewBuildClient ¶
func NewBuildClient(api_key string) *BuildClient
func (*BuildClient) ContinueDeviceLogs ¶
func (m *BuildClient) ContinueDeviceLogs(poll_url string) ([]DeviceLogEntry, error)
func (*BuildClient) CreateModel ¶
func (m *BuildClient) CreateModel(new_model *Model) (*Model, error)
func (*BuildClient) DeleteDevice ¶
func (m *BuildClient) DeleteDevice(device_id string) error
func (*BuildClient) DeleteModel ¶
func (m *BuildClient) DeleteModel(model_id string) error
func (*BuildClient) GetCodeRevision ¶
func (m *BuildClient) GetCodeRevision(model_id string, build_num string) (CodeRevisionLong, error)
func (*BuildClient) GetCodeRevisionList ¶
func (m *BuildClient) GetCodeRevisionList(model_id string) ( []CodeRevisionShort, error)
func (*BuildClient) GetDeviceList ¶
func (m *BuildClient) GetDeviceList() ([]Device, error)
func (*BuildClient) GetDeviceLogs ¶
func (m *BuildClient) GetDeviceLogs(device_id string) ([]DeviceLogEntry, string, error)
func (*BuildClient) ListModels ¶
func (m *BuildClient) ListModels() (*ModelList, error)
func (*BuildClient) RestartDevice ¶
func (m *BuildClient) RestartDevice(device_id string) error
func (*BuildClient) RestartModelDevices ¶
func (m *BuildClient) RestartModelDevices(model_id string) error
func (BuildClient) SetAuthHeader ¶
func (m BuildClient) SetAuthHeader(request *http.Request)
func (*BuildClient) UpdateCodeRevision ¶
func (m *BuildClient) UpdateCodeRevision(model_id string, request *CodeRevisionLong) (*CodeRevisionResponse, error)
func (*BuildClient) UpdateDevice ¶
func (m *BuildClient) UpdateDevice(new_device *Device, device_id string) (Device, error)
func (*BuildClient) UpdateModel ¶
func (m *BuildClient) UpdateModel(model_id string, new_model *Model) (*Model, error)
type BuildError ¶
type BuildError struct { Code string `json:"code"` ShortMessage string `json:"message_short"` FullMessage string `json:"message_full"` Details BuildErrorDetails `json:"details"` }
type BuildErrorDetails ¶
type BuildErrorDetails struct { DeviceErrors ErrorDetails `json:device_errors,omitempty` AgentErrors ErrorDetails `json:agent_errors,omitempty` }
type CodeRevisionLong ¶
type CodeRevisionResponse ¶
type CodeRevisionResponse struct { Success bool `json:"success"` Revisions CodeRevisionLong `json:"revision,omitempty"` Error BuildError `json:"error,omitempty"` }
type CodeRevisionShort ¶
type CodeRevisionsResponse ¶
type CodeRevisionsResponse struct { Success bool `json:"success"` Revisions []CodeRevisionShort `json:"revisions"` }
type Device ¶
type Device struct { Id string `json:"id,omitempty"` Name string `json:"name,omitempty"` ModelId string `json:"model_id,omitempty"` PowerState string `json:"powerstate,omitempty"` Rssi int `json:"rssi,omitempty"` AgentId string `json:"agent_id,omitempty"` AgentStatus string `json:"agent_status,omitempty"` }
type DeviceListResponse ¶
type DeviceLogEntry ¶
type DeviceLogResponse ¶
type DeviceLogResponse struct { Logs []DeviceLogEntry `json:"logs"` PollUrl string `json:"poll_url"` Success bool `json:"success"` }
type DeviceResponse ¶
type ErrorDetails ¶
type ModelError ¶
type ModelResponse ¶
type ModelResponse struct { Model Model `json:"model"` Success bool `json:"success"` Error ModelError `json:"error,omitempty"` }
Click to show internal directories.
Click to hide internal directories.