devicemanager.go 717 B

1234567891011121314151617181920212223242526272829303132333435
  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 uint64
  11. AccessToken []byte
  12. }
  13. type ReplyValidateDeviceAccessToken ReplyEmptyResult
  14. type ArgsGetOnline struct {
  15. Id uint64
  16. ClientIP string
  17. AccessRPCHost string
  18. HeartbeatInterval uint32
  19. }
  20. type ReplyGetOnline ReplyEmptyResult
  21. type ArgsGetOffline ArgsDeviceId
  22. type ReplyGetOffline ReplyEmptyResult
  23. type ArgsHeartBeat struct {
  24. Id uint64
  25. }
  26. type ReplyHeartBeat ReplyEmptyResult
  27. type ArgsGetDeviceOnlineStatus ArgsDeviceId
  28. type ReplyGetDeviceOnlineStatus online.Status