Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIRequest ¶
Types ¶
type EncryptedRequest ¶
type EncryptedRequest struct { Type string `json:"type"` EncryptedData json.RawMessage `json:"encrypted_data,omitempty"` Encrypted bool `json:"encrypted"` }
type MockRequest ¶
MockRequest is an autogenerated mock type for the Request type
func NewMockRequest ¶
func NewMockRequest(t interface { mock.TestingT Cleanup(func()) }) *MockRequest
NewMockRequest creates a new instance of MockRequest. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockRequest) RequestData ¶
func (_m *MockRequest) RequestData() json.RawMessage
RequestData provides a mock function with given fields:
func (*MockRequest) RequestType ¶
func (_m *MockRequest) RequestType() RequestType
RequestType provides a mock function with given fields:
func (*MockRequest) ResponseHandler ¶
func (_m *MockRequest) ResponseHandler(_a0 bytes.Buffer)
ResponseHandler provides a mock function with given fields: _a0
type Request ¶
type Request interface { RequestType() RequestType RequestData() json.RawMessage ResponseHandler(bytes.Buffer) }
type RequestType ¶
type RequestType int
const ( RequestTypeEncrypted RequestType = iota + 1 // encrypted RequestTypeGetConfig // get_config RequestTypeUpdateLocation // update_location RequestTypeRegisterSensor // register_sensor RequestTypeUpdateSensorStates // update_sensor_states )
func (RequestType) String ¶
func (i RequestType) String() string
type UnencryptedRequest ¶
type UnencryptedRequest struct { Type string `json:"type"` Data json.RawMessage `json:"data,omitempty"` }
Click to show internal directories.
Click to hide internal directories.