gin-gonic/gin — pull request #97 by yuyabee (2014-08-19 07:18:16+00:00)
Title: CRUD API

I added CRUD API which can be used like:
```go
type Books struct {
gin.Resource
}

func (books Books) CreateHandler(ctx *gin.Context) {
// create logic here ...
}

func (books Books) ReadHandler(ctx *gin.Context) {
// read logic here ...
}

func (books Books) UpdateHandler(ctx *gin.Context) {
// update logic here ...
}

func (books Books) DeleteHandler(ctx *gin.Context) {
// delete logic here ...
}

// The API is:
// POST: /api/books
// GET: /api/books
// PUT: /api/books/:id
// DELETE: /api/books/:id
booksAPI := r.Group("/api/books", auth.TokenAuth)
booksAPI.CRUD("", books)
```

What do you think about this?