Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gin ¶
type Gin struct { // web server descriptive name (used for display and logging only) Name string // web server port to run gin web server Port uint // web server routes to handle Routes []*Route // contains filtered or unexported fields }
Gin struct provides a wrapper for gin-gonic based web server operations
type Route ¶
type Route struct { // relative path to the endpoint for the route to handle RelativePath string // http method such as GET, POST, PUT, DELETE Method ginhttpmethod.GinHttpMethod // input value binding to be performed Binding ginbindtype.GinBindType // actual handler method to be triggered, // bindingInput if any, is the binding resolved object passed into the handler method Handler func(c *gin.Context, bindingInput interface{}) }
Route struct defines each http route handler endpoint
RelativePath = (required) route path such as /HelloWorld, this is the path to trigger the route handler Method = (required) GET, POST, PUT, DELETE Binding = (optional) various input data binding to target type option Handler = (required) function handler to be executed per method defined (actual logic goes inside handler)
- gin.Context Value Return Helpers: a) c.String(), c.HTML(), c.JSON(), c.JSONP(), c.PureJSON(), c.AsciiJSON(), c.SecureJSON(), c.XML(), c.YAML(), c.ProtoBuf(), c.Redirect()
Click to show internal directories.
Click to hide internal directories.