Git Product home page Git Product logo

payment-api's Introduction

payment-api

payment-api provides CRUD operation on a payment resource.

go-swagger documentation can be found here

installation

git clone https://github.com/cedric-parisi/payment-api.git

Once downloaded, go to the root directory and run

make install

It will install all the dependencies.

local development

To help on the development, a docker-compose with a postgres database and a jaeger client are launched using:

make dev

To stop and remove the docker images, launch:

make stop

database migration

Running:

make migration

will:

  • Create or update schema according to models definition.
  • Insert mock data from mock.json (must be in the root directory)

run the API

Use:

make run

test

To get an HTML representation of the code coverage, use:

make cover

To launch all unit test, use:

make test

mockery is used to generate mocks over the interfaces, to update/create them, launch:

make update-mocks

integration test

Currently, integration tests are a bit tricky to use, please follow the steps below:

1/ make stop to stop the docker-compose and clean the images (in case you performed actions on the DB already)

2/ make dev to launch development dependencies only (The postgres DB uses the port 5432, the DB is ready when you can see database system is ready to accept connections)

3/ in a 2nd bash window:

  • make migration to insert mocked data in the DB
  • make run to launch the API

4/ in a 3rd bash window, launch make integration

payment-api's People

Forkers

yns01

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.