Automagicaly create CRUD APIs for your data models.
To get support for your favourite Web or Model Framework open an issue.
- Fiber
- Gin
- GORM
(Full working examples in demo folder)
type BaseModel struct {
ID uint `gorm:"primarykey"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
type User struct {
BaseModel
Username string `json:"username" gorm:"size:100"`
Password string `json:"-" gorm:"size:128"`
}
crudist.Handle(c, "user/", &User{})
Result routes:
GET /user/
GET /user/:id/
POST /user/
DELETE /user/
DELETE /user/:id/
PATCH /user/