devicemanager.go 749 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. package rpcs
  2. import (
  3. "sparrow/pkg/online"
  4. )
  5. type ArgsGenerateDeviceAccessToken ArgsDeviceId
  6. type ReplyGenerateDeviceAccessToken struct {
  7. AccessToken []byte
  8. }
  9. type ArgsValidateDeviceAccessToken struct {
  10. Id string
  11. AccessToken []byte
  12. }
  13. type ReplyValidateDeviceAccessToken ReplyEmptyResult
  14. type ArgsGetOnline struct {
  15. Id string
  16. ClientIP string
  17. AccessRPCHost string
  18. HeartbeatInterval uint32
  19. }
  20. type ReplyGetOnline ReplyEmptyResult
  21. type ArgsGetOffline struct {
  22. Id string
  23. VendorId string
  24. }
  25. type ReplyGetOffline ReplyEmptyResult
  26. type ArgsHeartBeat struct {
  27. Id string
  28. }
  29. type ReplyHeartBeat ReplyEmptyResult
  30. type ArgsGetDeviceOnlineStatus ArgsDeviceId
  31. type ReplyGetDeviceOnlineStatus online.Status