Documentation ¶
Index ¶
- type DeviceHeader
- type DeviceRegistryClient
- func (c *DeviceRegistryClient) GetDevice(ctx context.Context, body *GetDeviceRequest) *GetDeviceFuture
- func (c *DeviceRegistryClient) GetRoom(ctx context.Context, body *GetRoomRequest) *GetRoomFuture
- func (c *DeviceRegistryClient) ListDevices(ctx context.Context, body *ListDevicesRequest) *ListDevicesFuture
- func (c *DeviceRegistryClient) ListRooms(ctx context.Context, body *ListRoomsRequest) *ListRoomsFuture
- type DeviceRegistryService
- type GetDeviceFuture
- type GetDeviceRequest
- type GetDeviceResponse
- type GetRoomFuture
- type GetRoomRequest
- type GetRoomResponse
- type ListDevicesFuture
- type ListDevicesRequest
- type ListDevicesResponse
- type ListRoomsFuture
- type ListRoomsRequest
- type ListRoomsResponse
- type MockDeviceRegistryClient
- func (c *MockDeviceRegistryClient) GetDevice(ctx context.Context, body *GetDeviceRequest) *GetDeviceFuture
- func (c *MockDeviceRegistryClient) GetRoom(ctx context.Context, body *GetRoomRequest) *GetRoomFuture
- func (c *MockDeviceRegistryClient) ListDevices(ctx context.Context, body *ListDevicesRequest) *ListDevicesFuture
- func (c *MockDeviceRegistryClient) ListRooms(ctx context.Context, body *ListRoomsRequest) *ListRoomsFuture
- type Room
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceHeader ¶
type DeviceHeader struct { Id string `json:"id"` Name string `json:"name"` Type string `json:"type"` Kind string `json:"kind"` ControllerName string `json:"controller_name"` Attributes map[string]interface{} `json:"attributes"` StateProviders []string `json:"state_providers"` RoomId string `json:"room_id"` Room *Room `json:"room"` }
DeviceHeader is defined in the .def file
func (*DeviceHeader) Validate ¶
func (m *DeviceHeader) Validate() error
Validate returns an error if any of the fields have bad values
type DeviceRegistryClient ¶
type DeviceRegistryClient struct {
// contains filtered or unexported fields
}
DeviceRegistryClient makes requests to this service
func NewDeviceRegistryClient ¶
func NewDeviceRegistryClient(d taxi.Dispatcher) *DeviceRegistryClient
NewDeviceRegistryClient returns a new client
func (*DeviceRegistryClient) GetDevice ¶
func (c *DeviceRegistryClient) GetDevice(ctx context.Context, body *GetDeviceRequest) *GetDeviceFuture
GetDevice dispatches an RPC to the service
func (*DeviceRegistryClient) GetRoom ¶
func (c *DeviceRegistryClient) GetRoom(ctx context.Context, body *GetRoomRequest) *GetRoomFuture
GetRoom dispatches an RPC to the service
func (*DeviceRegistryClient) ListDevices ¶
func (c *DeviceRegistryClient) ListDevices(ctx context.Context, body *ListDevicesRequest) *ListDevicesFuture
ListDevices dispatches an RPC to the service
func (*DeviceRegistryClient) ListRooms ¶
func (c *DeviceRegistryClient) ListRooms(ctx context.Context, body *ListRoomsRequest) *ListRoomsFuture
ListRooms dispatches an RPC to the service
type DeviceRegistryService ¶
type DeviceRegistryService interface { GetDevice(ctx context.Context, body *GetDeviceRequest) *GetDeviceFuture ListDevices(ctx context.Context, body *ListDevicesRequest) *ListDevicesFuture GetRoom(ctx context.Context, body *GetRoomRequest) *GetRoomFuture ListRooms(ctx context.Context, body *ListRoomsRequest) *ListRoomsFuture }
DeviceRegistryService is the public interface of this service
type GetDeviceFuture ¶
type GetDeviceFuture struct {
// contains filtered or unexported fields
}
GetDeviceFuture represents an in-flight GetDevice request
func (*GetDeviceFuture) Wait ¶
func (f *GetDeviceFuture) Wait() (*GetDeviceResponse, error)
Wait blocks until the response is ready
type GetDeviceRequest ¶
type GetDeviceRequest struct {
DeviceId string `json:"device_id"`
}
GetDeviceRequest is defined in the .def file
func (*GetDeviceRequest) Validate ¶
func (m *GetDeviceRequest) Validate() error
Validate returns an error if any of the fields have bad values
type GetDeviceResponse ¶
type GetDeviceResponse struct {
DeviceHeader *DeviceHeader `json:"device_header"`
}
GetDeviceResponse is defined in the .def file
func (*GetDeviceResponse) Validate ¶
func (m *GetDeviceResponse) Validate() error
Validate returns an error if any of the fields have bad values
type GetRoomFuture ¶
type GetRoomFuture struct {
// contains filtered or unexported fields
}
GetRoomFuture represents an in-flight GetRoom request
func (*GetRoomFuture) Wait ¶
func (f *GetRoomFuture) Wait() (*GetRoomResponse, error)
Wait blocks until the response is ready
type GetRoomRequest ¶
type GetRoomRequest struct {
RoomId string `json:"room_id"`
}
GetRoomRequest is defined in the .def file
func (*GetRoomRequest) Validate ¶
func (m *GetRoomRequest) Validate() error
Validate returns an error if any of the fields have bad values
type GetRoomResponse ¶
type GetRoomResponse struct {
Room *Room `json:"room"`
}
GetRoomResponse is defined in the .def file
func (*GetRoomResponse) Validate ¶
func (m *GetRoomResponse) Validate() error
Validate returns an error if any of the fields have bad values
type ListDevicesFuture ¶
type ListDevicesFuture struct {
// contains filtered or unexported fields
}
ListDevicesFuture represents an in-flight ListDevices request
func (*ListDevicesFuture) Wait ¶
func (f *ListDevicesFuture) Wait() (*ListDevicesResponse, error)
Wait blocks until the response is ready
type ListDevicesRequest ¶
type ListDevicesRequest struct {
ControllerName string `json:"controller_name"`
}
ListDevicesRequest is defined in the .def file
func (*ListDevicesRequest) Validate ¶
func (m *ListDevicesRequest) Validate() error
Validate returns an error if any of the fields have bad values
type ListDevicesResponse ¶
type ListDevicesResponse struct {
DeviceHeaders []*DeviceHeader `json:"device_headers"`
}
ListDevicesResponse is defined in the .def file
func (*ListDevicesResponse) Validate ¶
func (m *ListDevicesResponse) Validate() error
Validate returns an error if any of the fields have bad values
type ListRoomsFuture ¶
type ListRoomsFuture struct {
// contains filtered or unexported fields
}
ListRoomsFuture represents an in-flight ListRooms request
func (*ListRoomsFuture) Wait ¶
func (f *ListRoomsFuture) Wait() (*ListRoomsResponse, error)
Wait blocks until the response is ready
type ListRoomsRequest ¶
type ListRoomsRequest struct { }
ListRoomsRequest is defined in the .def file
func (*ListRoomsRequest) Validate ¶
func (m *ListRoomsRequest) Validate() error
Validate returns an error if any of the fields have bad values
type ListRoomsResponse ¶
type ListRoomsResponse struct {
Rooms []*Room `json:"rooms"`
}
ListRoomsResponse is defined in the .def file
func (*ListRoomsResponse) Validate ¶
func (m *ListRoomsResponse) Validate() error
Validate returns an error if any of the fields have bad values
type MockDeviceRegistryClient ¶
type MockDeviceRegistryClient struct {
// contains filtered or unexported fields
}
MockDeviceRegistryClient can be used in tests
func NewMockDeviceRegistryClient ¶
func NewMockDeviceRegistryClient(ctx context.Context, t *testing.T) *MockDeviceRegistryClient
NewMockDeviceRegistryClient returns a new mock client
func (*MockDeviceRegistryClient) GetDevice ¶
func (c *MockDeviceRegistryClient) GetDevice(ctx context.Context, body *GetDeviceRequest) *GetDeviceFuture
GetDevice dispatches an RPC to the mock client
func (*MockDeviceRegistryClient) GetRoom ¶
func (c *MockDeviceRegistryClient) GetRoom(ctx context.Context, body *GetRoomRequest) *GetRoomFuture
GetRoom dispatches an RPC to the mock client
func (*MockDeviceRegistryClient) ListDevices ¶
func (c *MockDeviceRegistryClient) ListDevices(ctx context.Context, body *ListDevicesRequest) *ListDevicesFuture
ListDevices dispatches an RPC to the mock client
func (*MockDeviceRegistryClient) ListRooms ¶
func (c *MockDeviceRegistryClient) ListRooms(ctx context.Context, body *ListRoomsRequest) *ListRoomsFuture
ListRooms dispatches an RPC to the mock client