Documentation ¶
Index ¶
- type DeviceState
- type DeviceStatus
- type Repo
- type Server
- func (s *Server) DeleteDeviceState(context context.Context, request *repopb.DeleteDeviceStateRequest) (response *repopb.DeleteDeviceStateResponse, err error)
- func (s *Server) Get(context context.Context, request *repopb.GetRequest) (response *repopb.GetResponse, err error)
- func (s *Server) SetDeviceState(context context.Context, request *repopb.SetDeviceStateRequest) (response *repopb.SetDeviceStateResponse, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceState ¶
type DeviceState struct { ID string Status DeviceStatus }
type DeviceStatus ¶
type Repo ¶
type Repo interface { SetDeviceStatus(DeviceState) (err error) GetDeviceStatus(id string) (DeviceState, error) DeleteDeviceStatus(id string) (err error) }
func NewRedisRepo ¶
type Server ¶
func (*Server) DeleteDeviceState ¶
func (s *Server) DeleteDeviceState(context context.Context, request *repopb.DeleteDeviceStateRequest) (response *repopb.DeleteDeviceStateResponse, err error)
func (*Server) Get ¶
func (s *Server) Get(context context.Context, request *repopb.GetRequest) (response *repopb.GetResponse, err error)
func (*Server) SetDeviceState ¶
func (s *Server) SetDeviceState(context context.Context, request *repopb.SetDeviceStateRequest) (response *repopb.SetDeviceStateResponse, err error)
Click to show internal directories.
Click to hide internal directories.