device

package
v0.4.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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) DelDevice added in v0.2.1

func (dc *DeviceRcache) DelDevice(ctx context.Context, id uint64) (*model.Device, error)

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 (dc *DeviceRcache) GetDeviceID(ctx context.Context, mac string) (uint64, error)

func (*DeviceRcache) GetDeviceIDFromCache added in v0.2.1

func (dc *DeviceRcache) GetDeviceIDFromCache(ctx context.Context, mac string) (uint64, error)

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 (dc *DeviceRcache) SetDeviceIDToCache(ctx context.Context, mac string, id uint64) error

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 (dc *DeviceRcache) UndelDevice(ctx context.Context, id uint64) (*model.Device, error)

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 (*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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL