onion-architecture sample(Go, echo, REST, DDD)
- echo
- viper
- gorm
- goose
- assert
- go-sqlmock.v1
- Dep
$ brew install dep
- go-task
$ go get -u -v github.com/go-task/task/cmd/task
- gometalinter
$ go get -u -v github.com/alecthomas/gometalinter
- goose
$ go get bitbucket.org/liamstask/goose/cmd/goose
$ gometalinter --install --update
$ dep ensure
You have to write Database connection information in db/dbconf.yml and conf/local.yml
$ goose up
task run
curl -X POST \
-H 'Content-Type: application/json' \
-d '{"name":"Joe Smith"}' \
localhost:1323/users
curl localhost:1323/users
curl localhost:1323/users/1
curl -X PUT \
-H 'Content-Type: application/json' \
-d '{"name":"Joe"}' \
localhost:1323/users/1
curl -X DELETE localhost:1323/users/1