Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/danteay/ginrest


https://github.com/danteay/ginrest

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# Ginrest

This is a wrapper librari for gin-gonic rest response

## Use

```go
u := c.Request.RequestURI
r := rest.New(u, "").SetGin(c)
v1 := Record{
Title: "Hola",
Object: "object.overrided",
}
v2 := Extra{
Type: "an Extra",
}
components := rest.Payload{
"object": "override this",
"hola": v1,
"mundo": v2,
}
// println(components)
r.Res(429, components, "")
```