Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gopher1980/gormcrud
This is the module for create CRUD in GORM (goland)
https://github.com/gopher1980/gormcrud
crud crud-api crud-generator go gorm gorm-sample module
Last synced: 15 days ago
JSON representation
This is the module for create CRUD in GORM (goland)
- Host: GitHub
- URL: https://github.com/gopher1980/gormcrud
- Owner: gopher1980
- License: mit
- Created: 2019-09-06T01:00:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-09T20:34:45.000Z (almost 2 years ago)
- Last Synced: 2024-01-28T04:47:37.163Z (12 months ago)
- Topics: crud, crud-api, crud-generator, go, gorm, gorm-sample, module
- Language: Go
- Homepage:
- Size: 33.2 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gormcrud
Motivation for this project is to provide the a Golang module for it can drive all CRUD api of your GORM entities.
Example (gorilla/mux):
```golang
r := mux.NewRouter()
gormcrud.MapMux(r, db).
NewMap("/api/v1/author", Author{}, []Author{}).Full().
NewMap("/api/v1/category", Category{}, []Category{}).Full().
NewMap("/api/v1/tag", Tag{}, []Tag{}).Full().
NewMap("/api/v1/note", Note{}, []Note{}).Full()
http.Handle("/", r)
log.Fatal(http.ListenAndServe(addr, nil))
```
full example mux https://github.com/gopher1980/gormcrud/blob/master/mux_example/main.goExample (Gin Web Framework):
```golang
r := gin.Default()
gormcrud.MapGin(r, db).
NewMap("/api/v1/author", Author{}, []Author{}).Full().
NewMap("/api/v1/category", Category{}, []Category{}).Full().
NewMap("/api/v1/tag", Tag{}, []Tag{}).Full().
NewMap("/api/v1/note", Note{}, []Note{}).Full()r.Run(addr)
```full example gin https://github.com/gopher1980/gormcrud/blob/master/gin_example/main.go