My Banana is an example of implementation of an HTTP based API in Golang.
// Run the app (build if started for the first time)
make run
// View logs
make logs
// Stop application docker containers
make stop
// Build Containers without running
make build
- mysql (maria db)
- github.com/...
- github.com/...
.
├── pkg
│ ├── config
│ │ └── config.go
│ ├── db
│ │ ├── banana
│ │ │ ├── mocks
│ │ │ └── banana.go
│ │ └── db.go
│ ├── handler
│ │ ├── banana
│ │ │ ├── banana.go
│ │ │ ├── get_banana_handler.go
│ │ │ └── get_banana_handler_test.go
│ │ ├── mocks
│ │ │ └── url_param_reader.go
│ │ └── handler.go
│ └── log
│ └── log.go
├── resources
│ └── migrations
│ └── 00001_banana_fixtures.sql
├── Dockerfile
├── Dockerfile-MariaDB
├── Makefile
├── README.md
├── db_schema_setup.sql
├── docker-compose.yml
├── glide.lock
├── glide.yaml
└── main.go
- Readme structure (setup, run, migrate, access docs)
- Dependency Injection (Interfaces)
- Middleware Usage
- Package Isolation
- RESTful Endpoints, Status Codes
- Error Handling (format)
- CLI helpers, migrations