Documentation
¶
Index ¶
- Variables
- type DeviceRcache
- func (dc *DeviceRcache) DelDevice(ctx context.Context, id uint64) (*model.Device, error)
- func (dc *DeviceRcache) DelDeviceExtraCache(ctx context.Context, id uint64) error
- func (dc *DeviceRcache) DelDeviceIDCache(ctx context.Context, mac string) error
- func (dc *DeviceRcache) DelDeviceInfoCache(ctx context.Context, id uint64) error
- func (dc *DeviceRcache) GetDeviceID(ctx context.Context, mac string) (uint64, error)
- func (dc *DeviceRcache) GetDeviceIDFromCache(ctx context.Context, mac string) (uint64, error)
- func (dc *DeviceRcache) GetDeviceInfo(ctx context.Context, id uint64, fields ...string) (*device.DeviceInfo, error)
- func (dc *DeviceRcache) GetDeviceInfoByMac(ctx context.Context, mac string, fields ...string) (*device.DeviceInfo, error)
- func (dc *DeviceRcache) GetDeviceInfoFromCache(ctx context.Context, id uint64, fields ...string) (*device.DeviceInfo, error)
- func (dc *DeviceRcache) GetDeviceLastSeen(ctx context.Context, id uint64) (*device.DeviceLastSeen, error)
- func (dc *DeviceRcache) SetDeviceIDToCache(ctx context.Context, mac string, id uint64) error
- func (dc *DeviceRcache) SetDeviceInfoToCache(ctx context.Context, id uint64, info *device.DeviceInfo) error
- func (dc *DeviceRcache) Transaction(fn func(dc *DeviceRcache) error) error
- func (dc *DeviceRcache) UndelDevice(ctx context.Context, id uint64) (*model.Device, error)
- func (dc *DeviceRcache) UpdateDeviceLastSeen(ctx context.Context, id uint64, lastSeen *device.DeviceLastSeen) error
- type DeviceService
- func (s *DeviceService) DeleteDevice(ctx context.Context, req *device.DeleteDeviceReq) (*device.Empty, error)
- func (s *DeviceService) GetDeviceID(ctx context.Context, req *device.GetDeviceIDReq) (*device.DeviceInfo, error)
- func (s *DeviceService) GetDeviceInfo(ctx context.Context, req *device.GetDeviceInfoReq) (*device.DeviceInfo, error)
- func (s *DeviceService) GetDeviceInfoByMac(ctx context.Context, req *device.GetDeviceInfoByMacReq) (*device.DeviceInfo, error)
- func (s *DeviceService) GetDeviceLastSeen(ctx context.Context, req *device.GetDeviceLastSeenReq) (*device.DeviceLastSeen, error)
- func (s *DeviceService) ListDeletedDeviceInfo(ctx context.Context, req *device.ListDeviceReq) (*device.ListDeviceResp, error)
- func (s *DeviceService) ListDevice(ctx context.Context, req *device.ListDeviceReq) (*device.ListDeviceResp, error)
- func (s *DeviceService) RegisterDevice(ctx context.Context, req *device.RegisterDeviceReq) (*device.DeviceInfo, error)
- func (s *DeviceService) SetDevicePassword(ctx context.Context, req *device.SetDevicePasswordReq) (*device.Empty, error)
- func (s *DeviceService) UpdateDeviceLastSeen(ctx context.Context, req *device.UpdateDeviceLastSeenReq) (*device.Empty, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewDeviceService)
ProviderSet is service providers.
Functions ¶
This section is empty.
Types ¶
type DeviceRcache ¶ added in v0.2.1
type DeviceRcache struct {
// contains filtered or unexported fields
}
func NewDeviceRcache ¶ added in v0.2.1
func NewDeviceRcache(rcache *rcache.Rcache, client *dbUtils) *DeviceRcache
func (*DeviceRcache) DelDeviceExtraCache ¶ added in v0.2.3
func (dc *DeviceRcache) DelDeviceExtraCache(ctx context.Context, id uint64) error
func (*DeviceRcache) DelDeviceIDCache ¶ added in v0.2.1
func (dc *DeviceRcache) DelDeviceIDCache(ctx context.Context, mac string) error
func (*DeviceRcache) DelDeviceInfoCache ¶ added in v0.2.1
func (dc *DeviceRcache) DelDeviceInfoCache(ctx context.Context, id uint64) error
func (*DeviceRcache) GetDeviceID ¶ added in v0.2.1
func (*DeviceRcache) GetDeviceIDFromCache ¶ added in v0.2.1
func (*DeviceRcache) GetDeviceInfo ¶ added in v0.2.1
func (dc *DeviceRcache) GetDeviceInfo(ctx context.Context, id uint64, fields ...string) (*device.DeviceInfo, error)
func (*DeviceRcache) GetDeviceInfoByMac ¶ added in v0.2.1
func (dc *DeviceRcache) GetDeviceInfoByMac(ctx context.Context, mac string, fields ...string) (*device.DeviceInfo, error)
func (*DeviceRcache) GetDeviceInfoFromCache ¶ added in v0.2.1
func (dc *DeviceRcache) GetDeviceInfoFromCache(ctx context.Context, id uint64, fields ...string) (*device.DeviceInfo, error)
func (*DeviceRcache) GetDeviceLastSeen ¶ added in v0.2.1
func (dc *DeviceRcache) GetDeviceLastSeen(ctx context.Context, id uint64) (*device.DeviceLastSeen, error)
func (*DeviceRcache) SetDeviceIDToCache ¶ added in v0.2.1
func (*DeviceRcache) SetDeviceInfoToCache ¶ added in v0.2.1
func (dc *DeviceRcache) SetDeviceInfoToCache(ctx context.Context, id uint64, info *device.DeviceInfo) error
func (*DeviceRcache) Transaction ¶ added in v0.2.3
func (dc *DeviceRcache) Transaction(fn func(dc *DeviceRcache) error) error
func (*DeviceRcache) UndelDevice ¶ added in v0.2.1
func (*DeviceRcache) UpdateDeviceLastSeen ¶ added in v0.2.1
func (dc *DeviceRcache) UpdateDeviceLastSeen(ctx context.Context, id uint64, lastSeen *device.DeviceLastSeen) error
type DeviceService ¶
type DeviceService struct { device.UnimplementedDeviceServer // contains filtered or unexported fields }
func NewDeviceService ¶
func NewDeviceService(dc *conf.DatabaseServerConfig, deviceConfig *conf.DeviceConfig, rc *conf.RedisConfig) *DeviceService
func (*DeviceService) DeleteDevice ¶ added in v0.2.1
func (s *DeviceService) DeleteDevice(ctx context.Context, req *device.DeleteDeviceReq) (*device.Empty, error)
func (*DeviceService) GetDeviceID ¶ added in v0.2.1
func (s *DeviceService) GetDeviceID(ctx context.Context, req *device.GetDeviceIDReq) (*device.DeviceInfo, error)
func (*DeviceService) GetDeviceInfo ¶ added in v0.2.1
func (s *DeviceService) GetDeviceInfo(ctx context.Context, req *device.GetDeviceInfoReq) (*device.DeviceInfo, error)
func (*DeviceService) GetDeviceInfoByMac ¶ added in v0.2.1
func (s *DeviceService) GetDeviceInfoByMac(ctx context.Context, req *device.GetDeviceInfoByMacReq) (*device.DeviceInfo, error)
func (*DeviceService) GetDeviceLastSeen ¶ added in v0.2.1
func (s *DeviceService) GetDeviceLastSeen(ctx context.Context, req *device.GetDeviceLastSeenReq) (*device.DeviceLastSeen, error)
func (*DeviceService) ListDeletedDeviceInfo ¶ added in v0.2.1
func (s *DeviceService) ListDeletedDeviceInfo(ctx context.Context, req *device.ListDeviceReq) (*device.ListDeviceResp, error)
func (*DeviceService) ListDevice ¶ added in v0.2.1
func (s *DeviceService) ListDevice(ctx context.Context, req *device.ListDeviceReq) (*device.ListDeviceResp, error)
func (*DeviceService) RegisterDevice ¶ added in v0.2.1
func (s *DeviceService) RegisterDevice(ctx context.Context, req *device.RegisterDeviceReq) (*device.DeviceInfo, error)
func (*DeviceService) SetDevicePassword ¶ added in v0.2.3
func (s *DeviceService) SetDevicePassword(ctx context.Context, req *device.SetDevicePasswordReq) (*device.Empty, error)
func (*DeviceService) UpdateDeviceLastSeen ¶ added in v0.2.1
func (s *DeviceService) UpdateDeviceLastSeen(ctx context.Context, req *device.UpdateDeviceLastSeenReq) (*device.Empty, error)
Click to show internal directories.
Click to hide internal directories.