| 1 |
package dynect |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
type LoginBlock struct { |
| 8 |
Username string `json:"user_name"` |
| 9 |
Password string `json:"password"` |
| 10 |
CustomerName string `json:"customer_name"` |
| 11 |
} |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
type ResponseBlock struct { |
| 18 |
Status string `json:"status"` |
| 19 |
JobId int `json:"job_id,omitempty"` |
| 20 |
Messages []MessageBlock `json:"msgs,omitempty"` |
| 21 |
} |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
type MessageBlock struct { |
| 26 |
Info string `json:"INFO"` |
| 27 |
Source string `json:"SOURCE"` |
| 28 |
ErrorCode string `json:"ERR_CD"` |
| 29 |
Level string `json:"LVL"` |
| 30 |
} |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
type LoginResponse struct { |
| 35 |
ResponseBlock |
| 36 |
Data LoginDataBlock `json:"data"` |
| 37 |
} |
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
type LoginDataBlock struct { |
| 44 |
Token string `json:"token"` |
| 45 |
Version string `json:"version"` |
| 46 |
} |
| 47 |
|
| 48 |
|
| 49 |
type RecordRequest struct { |
| 50 |
RData DataBlock `json:"rdata"` |
| 51 |
TTL string `json:"ttl,omitempty"` |
| 52 |
} |
| 53 |
|
| 54 |
|
| 55 |
type CreateZoneBlock struct { |
| 56 |
RName string `json:"rname"` |
| 57 |
SerialStyle string `json:"serial_style,omitempty"` |
| 58 |
TTL string `json:"ttl"` |
| 59 |
} |
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
type PublishZoneBlock struct { |
| 64 |
Publish bool `json:"publish"` |
| 65 |
} |
| 66 |
|
| 67 |
|
| 68 |
type PublishZoneResponseBlock struct { |
| 69 |
Status string `json:"status"` |
| 70 |
Data PublishZoneDataBlock `json:"data"` |
| 71 |
JobID int `json:"job_id"` |
| 72 |
Msgs string `json:"-"` |
| 73 |
} |
| 74 |
|
| 75 |
|
| 76 |
type PublishZoneDataBlock struct { |
| 77 |
TaskID string `json:"task_id"` |
| 78 |
Serial int `json:"serial"` |
| 79 |
SerialStyle string `json:"serial_style"` |
| 80 |
Zone string `json:"zone"` |
| 81 |
ZoneType string `json:"zone_type"` |
| 82 |
} |
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
type TaskStateResponse struct { |
| 87 |
Status string `json:"status"` |
| 88 |
Blocking bool `json:"blocking"` |
| 89 |
Data TaskStateResponseData `json:"data"` |
| 90 |
} |
| 91 |
|
| 92 |
|
| 93 |
type TaskStateResponseData struct { |
| 94 |
TaskID string `json:"task_id"` |
| 95 |
Name string `json:"name"` |
| 96 |
CustomerName string `json:"customer_name"` |
| 97 |
ZoneName string `json:"zone_name"` |
| 98 |
Status string `json:"status"` |
| 99 |
StepCount int `json:"step_count"` |
| 100 |
TotalSteps int `json:"total_steps"` |
| 101 |
Blocking bool `json:"blocking"` |
| 102 |
Debug string `json:"blocking,omitempty"` |
| 103 |
CreateTS int `json:"created_ts"` |
| 104 |
ModifiedTS int `json:"modified_ts"` |
| 105 |
} |