module
Version:
v0.0.0-...-78a7415
Opens a new window with list of versions in this module.
Published: Aug 24, 2020
License: MIT
Opens a new window with license information.
README
¶
GO API boilerplate
Exemplo de arquitetura de API utilizando a linguagem Go
Arquitetura
http
├── api
│ ├── admin
│ │ ├── api.go
│ │ └── user.go
│ ├── auth
│ │ ├── api.go
│ │ └── login.go
│ └── client
│ ├── api.go
│ └── user.go
├── main.go
├── middleware
│ ├── cors.go
│ ├── logger.go
│ ├── max_client.go
└── utils
└── handler.go
Endpoints
Admin
Description |
http |
path |
list |
GET |
/api/admin/user |
get |
GET |
/api/admin/user/:id |
store |
POST |
/api/admin/user |
update |
PUT |
/api/admin/user/:id |
delete |
DELETE |
/api/admin/user/:id |
Public
Description |
http |
path |
list |
GET |
/api/user |
get |
GET |
/api/user/:id |
Auth
Description |
http |
path |
admin |
POST |
/api/auth/admin/signin |
public |
POST |
/api/auth/client/signin |
Insomnia
Lista de todas requisições para usar com Insomnia, basta importar :) => link
Dependências
Build & Deploy
Standalone
make prod
./bin/go-api-boilerplate
Docker
make docker
make docker-push
docker run -it --name go-api-boilerplate \
-p 3000:3000 \
douglaszuqueto/go-api-boilerplate:latest
Referências
Directories
¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pkg
|
|
|
|
|
|
|
|
|
|
Click to show internal directories.
Click to hide internal directories.