8000 GitHub - hamakn/go_ddd_webapp: my Golang DDD webapp example
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

hamakn/go_ddd_webapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CircleCI

my Golang DDD webapp example

Features

  • GAE/datastore
  • Multiple unique constaints on datastore
  • Layered Architecture
  • No framework library
  • Use negroni to handle HTTP
  • Use goon for autocaching

Boot

% dev_appserver.py config/app.yaml

Request examples

% curl -X POST -d '{"email": "foo@foo.test", "screen_name": "foo", "age": 17}' http://localhost:8080/users/
{"id":5629499534213120,"email":"foo@foo.test","screen_name":"foo","age":17,"created_at":"2018-04-08T10:21:07.617449Z","updated_at":"2018-04-08T10:21:07.617449Z"}

% curl http://localhost:8080/users/
[{"id":5629499534213120,"email":"foo@foo.test","screen_name":"foo","age":17,"created_at":"2018-04-08T10:21:07.617449Z","updated_at":"2018-04-08T10:21:07.617449Z"}]

% curl http://localhost:8080/users/5629499534213120
{"id":5629499534213120,"email":"foo@foo.test","screen_name":"foo","age":17,"created_at":"2018-04-08T10:21:07.617449Z","updated_at":"2018-04-08T10:21:07.617449Z"}

% curl -X POST -d '{"email": "foo@foo.test", "screen_name": "new", "age": 17}' http://localhost:8080/users/
{"error":"Unprocessable Entity"}

% curl -X POST -d '{"email": "new@foo.test", "screen_name": "foo", "age": 17}' http://localhost:8080/users/
{"error":"Unprocessable Entity"}

% curl -X PUT -d '{"screen_name": "new"}' http://localhost:8080/users/5629499534213120
{"id":5629499534213120,"email":"foo@foo.test","screen_name":"new","age":17,"created_at":"2018-04-08T10:21:07.617449Z","updated_at":"2018-04-08T10:22:59.279485Z"}

% curl -X DELETE http://localhost:8080/users/5629499534213120

% curl http://localhost:8080/users/
[]

About

my Golang DDD webapp example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0