package context import v1 "git.supernets.org/perp/gopay/internal/models/v1" // Return a JSON error func (ctx *Context) Error(code int, err string) { error := v1.Error{ Type: err, } ctx.JSON(code, error) } // Return a JSON token func (ctx *Context) Token(toke string) { token := v1.Token{ Token: toke, } ctx.JSON(200, token) }