doh.go 700 B

12345678910111213141516171819202122232425262728
  1. package model
  2. // DOHResponse Google DOH 响应
  3. type DOHResponse struct {
  4. Status int `json:"Status"`
  5. Comment string `json:"Comment"`
  6. TC bool `json:"TC"`
  7. RD bool `json:"RD"`
  8. RA bool `json:"RA"`
  9. AD bool `json:"AD"`
  10. CD bool `json:"CD"`
  11. Question []DOHQuestion `json:"Question"`
  12. Answer []DOHAnswer `json:"Answer"`
  13. }
  14. // DOHQuestion Google DOH 问题
  15. type DOHQuestion struct {
  16. Name string `json:"name"`
  17. Type int `json:"type"`
  18. }
  19. // DOHAnswer Google DOH 答复
  20. type DOHAnswer struct {
  21. Name string `json:"name"`
  22. Type int `json:"type"`
  23. TTL int `json:"TTL"`
  24. Data string `json:"data"`
  25. }