Gin is a web framework written in Golang. It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.
dependabot[bot] on github_actions
chore(deps): bump golangci/gola… (compare)
type GetTxListIM struct {
Page uint64 `form:"page" default:"1"`
Rows uint8 `form:"rows" default:"10"`
//ContractCall=1,Transfer=2,ContractCreation=3
Type []uint64 `form:"type"`
}
This is the structure content of the data I want to get
//@Param GetTxListIM query transaction_dto.GetTxListIM true "GetTxListIM"
//@Success 200 {object} transaction_dto.TxListOM
//@Failure 400 ""
//@Failure 500 ""
//@Router /Transaction/GetTransactionList [get]
func (controller *TransactionController) GetTransactionList(c *gin.Context) {
var input transaction_dto.GetTxListIM
if err := c.ShouldBind(&input); err != nil {
log.Errorln(err)
}
}
This is the Get method, here to parse the data
relativePath
as a .Param()
I have r.PUT("template/:path", template.PutTemplate)
and if I call it with template/path/to/my/template.txt
I want .Param("path")
to return path/to/my/template.txt
is this possible?
Hello o/,
Is there any way to use multiple authentication middlewares for the same route ?
We use https://github.com/appleboy/gin-jwt and a custom auth middleware based on generated tokens in the database, but we're unable to set them for the same route. If someone has a solution or a workaround to be able to authenticate users from jwt token or from the generated token please.
r.Use(static.Serve("/", static.LocalFile("../frontend/dist", false)))