2021-03-18 18:52:41 +00:00
|
|
|
package resource
|
|
|
|
|
|
|
|
// The Response struct implements api2go.Responder
|
|
|
|
type Response struct {
|
|
|
|
Res interface{}
|
|
|
|
Code int
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r Response) Metadata() map[string]interface{} {
|
|
|
|
return map[string]interface{}{
|
2021-03-19 17:24:02 +00:00
|
|
|
"author": "GenZmeY",
|
2021-03-18 18:52:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r Response) Result() interface{} {
|
|
|
|
return r.Res
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r Response) StatusCode() int {
|
|
|
|
return r.Code
|
|
|
|
}
|