https://github.com/dcu/gin-scaffold
Gin scaffold is CLI to generate scaffolds for the gin gonic framework.
https://github.com/dcu/gin-scaffold
Last synced: 29 days ago
JSON representation
Gin scaffold is CLI to generate scaffolds for the gin gonic framework.
- Host: GitHub
- URL: https://github.com/dcu/gin-scaffold
- Owner: dcu
- Created: 2015-05-03T20:18:37.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-09-24T07:21:19.000Z (over 7 years ago)
- Last Synced: 2024-04-16T00:03:56.555Z (about 1 year ago)
- Language: Go
- Size: 75.2 KB
- Stars: 63
- Watchers: 4
- Forks: 11
- Open Issues: 8
-
Metadata Files:
- Readme: README.ja.md
Awesome Lists containing this project
- awesome-gin - dcu/gin-scaffold
README
# Gin Scaffold
[](http://godoc.org/github.com/dcu/gin-scaffold)
[](https://travis-ci.org/dcu/gin-scaffold)
[](https://coveralls.io/github/dcu/gin-scaffold?branch=master)
[](https://goreportcard.com/report/dcu/gin-scaffold)`Gin Scaffold` は CLI `gin` フレームワークのためのスキャフォルディング生成のためのCLI(コマンド・ライン・インターフェース)です。
現在このプロジェクトではそれではデータベースとして `mongodb` と `mgo` のみサポートしています。## インストール
go get github.com/dcu/gin-scaffold
## プロジェクトの初期化
gin-scaffold init
## モデルの生成
gin-scaffold model <モデル名> <フィールド名>:<タイプ名>
## コントローラの生成
gin-scaffold controller <コントローラ名>
## スキャフォルドの生成
gin-scaffold scaffold <コントローラ名> <フィールド名>:<タイプ名>
## プロジェクトの起動
gin run .go
## アクセス
ブラウザを起動して、http://localhost:4000へアクセス。(デフォルトポート:4000)
## RESTful
* GET
## 全件
curl 'http://localhost:4000/<コントローラ名>
## id指定で1件
curl 'http://localhost:4000/<コントローラ名>/'
* PUT
curl -XPUT 'http://localhost:4000/<コントローラ名>/' -d '<フィールド名>=<値>'
* DELETE
curl -XDELETE 'http://localhost:4000/<コントローラ名>/'
# License
MIT
# Author
David Cuadrado (dcu)