Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultDateFormat day DefaultDateFormat = "2006-01-02" // DefaultDatetimeFormat minute DefaultDatetimeFormat = "2006-01-02 15:0" // DefaultDatetimeFormatSecond second DefaultDatetimeFormatSecond = "2006-01-02 15:04:05" )
Variables ¶
Functions ¶
func Bind ¶
Bind bind params from Path, Query, Body, Form. Donot support binary stream(files, images etc.) Support Tag `pos`, specified that where we can get this value, only support one - path: from url path, don't support nested struct - query: from url query, don't support nested struct - body: from request's body, default use json, support nested struct - form: from request form - required: this value is not null pathQueryier get variables from path, GET /api/v1/users/:id , get id
type Example struct { ID string `json:"id" pos:"path:id"` // path value default is required Name string `json:"name" pos:"query:name,required"` // query specified that get }
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.