messenger-challenge

command module
v0.0.0-...-159e443 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2020 License: MIT Imports: 9 Imported by: 0

README

Messenger Challenge

I developed a simple Messenger API with golang to make a practice.

Requirements

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.

https://github.com/bahattincinic/messenger-challenge/actions

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
domain

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL