Library for working with Hetzner DNS API
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
1.6 KiB

  1. package hclouddns
  2. // Records answers
  3. type HCloudAnswerGetRecord struct {
  4. Record HCloudRecord `json:"record,omitempty"`
  5. Error HCloudError
  6. }
  7. type HCloudAnswerGetRecords struct {
  8. Records []HCloudRecord `json:"records,omitempty"`
  9. Meta HCloudMeta `json:"meta,omitempty"`
  10. Error HCloudError
  11. }
  12. type HCloudAnswerDeleteRecord struct {
  13. Error HCloudError
  14. }
  15. type HCloudAnswerCreateRecords struct {
  16. Records []HCloudRecord `json:"records,omitempty"`
  17. ValidRecords []HCloudRecord `json:"valid_records,omitempty"`
  18. InvalidRecords []HCloudRecord `json:"invalid_records,omitempty"`
  19. Error HCloudError
  20. }
  21. type HCloudAnswerUpdateRecords struct {
  22. Records []HCloudRecord `json:"records,omitempty"`
  23. InvalidRecords []HCloudRecord `json:"failed_records,omitempty"`
  24. Error HCloudError
  25. }
  26. // Zones answers
  27. type HCloudAnswerGetZone struct {
  28. Zone HCloudZone `json:"zone,omitempty"`
  29. Error HCloudError
  30. }
  31. type HCloudAnswerGetZonePlainText struct {
  32. ZonePlainText string `json:"zone,omitempty"`
  33. Error HCloudError
  34. }
  35. type HCloudAnswerZoneValidate struct {
  36. ParsedRecords int `json:"parsed_records,omitempty"`
  37. ValidRecords []HCloudZone `json:"valid_records,omitempty"`
  38. Error HCloudError
  39. }
  40. type HCloudAnswerGetZones struct {
  41. Zones []HCloudZone `json:"zones,omitempty"`
  42. Meta HCloudMeta `json:"meta,omitempty"`
  43. Error HCloudError
  44. }
  45. type HCloudAnswerDeleteZone struct {
  46. Error HCloudError
  47. }
  48. // Params
  49. type HCloudGetZonesParams struct {
  50. Name string
  51. SearchName string
  52. Page string
  53. PerPage string
  54. }
  55. type HCloudGetRecordsParams struct {
  56. ZoneID string
  57. Page string
  58. PerPage string
  59. }