https://github.com/bahattincinic/messenger-challenge
Build Simple Messenger API with Golang
https://github.com/bahattincinic/messenger-challenge
api clean-architecture github-actions-golang golang
Last synced: about 1 year ago
JSON representation
Build Simple Messenger API with Golang
- Host: GitHub
- URL: https://github.com/bahattincinic/messenger-challenge
- Owner: bahattincinic
- License: mit
- Created: 2020-04-28T12:23:22.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-19T23:37:03.000Z (about 6 years ago)
- Last Synced: 2024-06-19T15:03:46.179Z (about 2 years ago)
- Topics: api, clean-architecture, github-actions-golang, golang
- Language: Go
- Homepage:
- Size: 9.74 MB
- Stars: 12
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Messenger Challenge
I developed a simple Messenger API with golang to make a practice.
## Requirements
- Golang
- The Clean Architecture (https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html)
## Folder Structure
```
.
├── README.md
├── api # HTTP API is under this folder
│ ├── handlers # API controller/handlers
│ ├── middlewares # API middlewares
│ └── routes.go # All Api Routes
├── config # Project Configurations
│ ├── config.go
│ ├── development.yaml
│ └── production.yaml
├── domain # All business logic related things are under this folder.
│ ├── models # Database and data models
│ ├── repositories # Database query layer
│ └── usecases # business usecases
├── go.mod
├── go.sum
├── main.go
└── messenger.db
```
## Installation
```
$ git clone git@github.com:bahattincinic/messenger-challenge.git
$ cd messenger-challenge
$ go mod download
```
## Running Unit Tests
```
$ go test ./... -coverprofile cp.out
? github.com/bahattincinic/messenger-challenge [no test files]
? github.com/bahattincinic/messenger-challenge/api [no test files]
? github.com/bahattincinic/messenger-challenge/api/handlers [no test files]
ok github.com/bahattincinic/messenger-challenge/api/middlewares 0.284s coverage: 17.6% of statements
ok github.com/bahattincinic/messenger-challenge/config 0.299s coverage: 90.0% of statements
? github.com/bahattincinic/messenger-challenge/domain/models [no test files]
ok github.com/bahattincinic/messenger-challenge/domain/repositories 0.373s coverage: 63.0% of statements
ok github.com/bahattincinic/messenger-challenge/domain/usecases 0.564s coverage: 73.1% of statements
```
## API Documentation
Postman Documentation: https://documenter.getpostman.com/view/191558/SzmcZe7s?version=latest
## Github Actions
I added 2 different Github Actions Job for automating unit-test and linter process.