Categorygithub.com/taiki1288/Go-CleanArchitecture-APIServer
modulepackage
0.0.0-20230522083628-9456470f8783
Repository: https://github.com/taiki1288/go-cleanarchitecture-apiserver.git
Documentation: pkg.go.dev

# README

Go-CleanArchitecture-APIServer

Go(Echo)×GORM×CleanArchitectureでAPIServerを作成。

language

Architecture

CleanArchitecture

Startup

$ [email protected]:taiki1288/Go-CleanArchitecture-APIServer.git
$ cd Go-CleanArchitecture-APIServer
$ docker-compose up -d
$ go run server.go

Routing

POST

$ curl -i -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"id": 1, "name": "test", "email": "[email protected]", "age": 20}' localhost:1323/users

GET

$ curl -i -H 'Content-Type:application/json' localhost:1323/users

GET

$ curl -i -H 'Content-Type:application/json' localhost:1323/users/1

PUT

$ curl -i -H "Accept: application/json" -H "Content-type: application/json" -X PUT -d '{"id": 1, "name": "testtest", "email": "[email protected]", "age": 21}' localhost:1323/users/1

DELETE

$ curl -i -H "Accept: application/json" -H "Content-type: application/json" -X DELETE localhost:1323/users/1

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author