Categorygithub.com/danteay/ginrest
modulepackage
0.0.1
Repository: https://github.com/danteay/ginrest.git
Documentation: pkg.go.dev

# README

Ginrest

This is a wrapper librari for gin-gonic rest response

Use

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, "")

# Functions

New initializer.

# Structs

Error general errors response.
IO struct is the base app/json output formatter according to our defined schema.

# Type aliases

Payload map for multiple inputs.