Skip to content

An application of studies on the implementation of clean architecture with golang with a plus of REST level 3 implementations.

License

Notifications You must be signed in to change notification settings

booscaaa/golang-clean-arch-hateoas-example

Repository files navigation

Clean architecture and Level 3 of REST

An application of studies on the implementation of clean architecture with golang with a plus of REST level 3 implementations.

Release Software License Build status Coverage Swagger docs


Why?

This project is part of my personal portfolio, so, I'll be happy if you could provide me any feedback about the project, code, structure or anything that you can report that could make me a better developer!

Email-me: [email protected]

Connect with me at LinkedIn.


Functionalities

  • Include tasks
  • Delete tasks
  • Change tasks
  • Search tasks
  • Search tasks by acronym

Getting Started

Prerequisites

To run this project in the development mode, you'll need to have a basic environment to run:

  • A Golang SDK, that can be found here.

Installing

Cloning the Repository

git clone https://github.com/booscaaa/golang-clean-arch-hateoas-example

cd github.com/booscaaa/golang-clean-arch-hateoas-example

Rename config.example.json to config.json

config.json - this is my heroku app

{
  "database": {
    "url": "postgres://izrykubjdwzynh:d6d5c87ab5b0d734323acc8dc729c3f389f4368c8dc73cbd9be844bce3173fb2@ec2-50-16-198-4.compute-1.amazonaws.com:5432/d6r28h5h9fqrn3"
  },
  "hateoas": {
    "base": "https://todo-list-hateoas.herokuapp.com"
  }
}

Running with docker-compose !!!!!!!

docker-compose up --build -d


Running local

go mod tidy
go run main.go

Testing

go mod tidy
go test -v ./... 

To get test coverage

go test -v -coverprofile cover.out ./...
go tool cover -html=cover.out -o cover.html

To get new mocks for testing

mockgen -source=core/domain/item.go -destination=core/domain/mocks/fake_item_repository.go -package=mocks



URLs to show the aplications

  • API = http://YOUR_MACHINE_IP:<CONFIG_JSON_PORT>

To access the endpoints documentation



Api application built With




Contributing

You can send how many PR's do you want, I'll be glad to analyze and accept them! And if you have any question about the project...

Email-me: [email protected]

Connect with me at LinkedIn

Thank you!

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

An application of studies on the implementation of clean architecture with golang with a plus of REST level 3 implementations.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published