diff options
Diffstat (limited to 'nexgb/xgbgen/xml.go')
-rw-r--r-- | nexgb/xgbgen/xml.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/nexgb/xgbgen/xml.go b/nexgb/xgbgen/xml.go index 440d0a8..fc3cf5a 100644 --- a/nexgb/xgbgen/xml.go +++ b/nexgb/xgbgen/xml.go @@ -92,6 +92,24 @@ type XMLErrorCopy struct { Ref string `xml:"ref,attr"` } +type XMLDocField struct { + Name string `xml:"name,attr"` + Description string `xml:",chardata"` +} + +type XMLDocError struct { + Type string `xml:"type,attr"` + Description string `xml:",chardata"` +} + +type XMLDoc struct { + Brief string `xml:"brief"` + Description string `xml:"description"` + Example string `xml:"example"` + Fields []*XMLDocField `xml:"field"` + Errors []*XMLDocError `xml:"error"` +} + type XMLStruct struct { Name string `xml:"name,attr"` Fields []*XMLField `xml:",any"` @@ -108,10 +126,12 @@ type XMLRequest struct { Combine bool `xml:"combine-adjacent,attr"` Fields []*XMLField `xml:",any"` Reply *XMLReply `xml:"reply"` + Doc *XMLDoc `xml:"doc"` } type XMLReply struct { Fields []*XMLField `xml:",any"` + Doc *XMLDoc `xml:"doc"` } type XMLEvent struct { @@ -119,6 +139,7 @@ type XMLEvent struct { Number int `xml:"number,attr"` NoSequence bool `xml:"no-sequence-number,attr"` Fields []*XMLField `xml:",any"` + Doc *XMLDoc `xml:"doc"` } type XMLError struct { |