-
Notifications
You must be signed in to change notification settings - Fork 2
/
polling.go
46 lines (42 loc) · 1013 Bytes
/
polling.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package epp
import (
"encoding/xml"
"time"
)
type APIPoll struct {
XMLName xml.Name `xml:"epp"`
Xmlns string `xml:"xmlns,attr"`
Command struct {
Poll struct {
Op string `xml:"op,attr"`
MsgID string `xml:"msgID,attr,omitempty"`
} `xml:"poll"`
ClTRID string `xml:"clTRID"`
} `xml:"command"`
}
type APIPollResponse struct {
XMLName xml.Name `xml:"epp"`
Obj string `xml:"obj,attr"`
Xmlns string `xml:"xmlns,attr"`
Response struct {
Result Result `xml:"result"`
MsgQ PollMessage `xml:"msgQ"`
ResData struct {
TrnData struct {
Name string `xml:"name"`
} `xml:"trnData"`
} `xml:"resData"`
TrID struct {
ClTRID string `xml:"clTRID"`
SvTRID string `xml:"svTRID"`
} `xml:"trID"`
} `xml:"response"`
}
type PollMessage struct {
Count int `xml:"count,attr" json:"count"`
ID string `xml:"id,attr" json:"id"`
RawQDate string `xml:"qDate" json:"-"`
QDate time.Time `json:"date"`
Msg string `xml:"msg" json:"msg"`
Name string `json:"name"`
}