22 lines
350 B
Go
Raw Normal View History

2021-03-18 21:52:41 +03: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 20:24:02 +03:00
"author": "GenZmeY",
2021-03-18 21:52:41 +03:00
}
}
func (r Response) Result() interface{} {
return r.Res
}
func (r Response) StatusCode() int {
return r.Code
}