Initial cloud-services repo - gateway service + pkg modules
This commit is contained in:
42
pkg/common/xml_resp.go
Normal file
42
pkg/common/xml_resp.go
Normal file
@@ -0,0 +1,42 @@
|
||||
package common
|
||||
|
||||
import "encoding/xml"
|
||||
|
||||
// XMLLink xml response struct
|
||||
type XMLLink struct {
|
||||
XMLName xml.Name `xml:"link"`
|
||||
Link string `xml:"link"`
|
||||
Timestamp int64 `xml:"timestamp"`
|
||||
}
|
||||
|
||||
// XMLError xml error struct
|
||||
type XMLError struct {
|
||||
XMLName xml.Name `xml:"error"`
|
||||
Message string `xml:"message"`
|
||||
Error string `xml:"error"`
|
||||
}
|
||||
|
||||
// XMLMessage xml message struct
|
||||
type XMLMessage struct {
|
||||
XMLName xml.Name `xml:"success"`
|
||||
Message string `xml:"message"`
|
||||
}
|
||||
|
||||
// Models for swagger generation. Use them ONLY in annotations.
|
||||
|
||||
// XMLLinkSwag is used ONLY to represent XMLLink in swagger.
|
||||
type XMLLinkSwag struct {
|
||||
Link string `xml:"link"`
|
||||
Timestamp int64 `xml:"timestamp"`
|
||||
} //@name link
|
||||
|
||||
// XMLErrorSwag is used ONLY to represent XMLError in swagger.
|
||||
type XMLErrorSwag struct {
|
||||
Message interface{} `xml:"message"`
|
||||
Error interface{} `xml:"error"`
|
||||
} //@name error
|
||||
|
||||
// XMLMessageSwag is used ONLY to represent XMLMessage in swagger.
|
||||
type XMLMessageSwag struct {
|
||||
Message string `xml:"message"`
|
||||
} //@name success
|
||||
Reference in New Issue
Block a user