Giter Club home page Giter Club logo

salamantex_back's Introduction

Salamantex test back-end

Stack:

  • Go Base programming language
  • Postgresql Database to store data
  • Redis Basic queue management (POP/PUSH)
  • Docker Make the back-end work in containers
  • Docker Compose Connect all services together

Running the app

Simply start the app with the docker-compose:

docker-compose up -d

Database structure

users tx

Endpoints

Register

It will give you your JWT token.

URL: /api/v1/user/register

Method: POST

Needs auth? No

Header: none

Request Body:

{
  "name": "NAME",
  "email": "[email protected]",
  "password": "password"
}

Login

It will give you your JWT token.

URL: /api/v1/user/login

Method: POST

Needs auth? No

Header: none

Request Body:

{
  "email": "[email protected]",
  "password": "password"
}

Add Currency

By adding an address, It will give you 10 units of that currency for testing.

URL: /api/v1/currency/add

Method: POST

Needs auth? Yes

Header:

{
  "Authorization": "Bearer TOKEN"
}

Request Body:

{
  "type": 1,
  "address": "1F1tAaz5x1HUXrCNLbtMDqcw6o5GNn4xqX"
}

Note:

Type 1 -> Bitcoin

Type 2 -> Ethereum

Send Transaction

URL: /api/v1/tx/send

Method: POST

Needs auth? Yes

Header:

{
  "Authorization": "Bearer TOKEN"
}

Request Body:

{
  "type": 1,
  "amount": 5,
  "to": "[email protected]"
}

Note:

Type 1 -> Bitcoin

Type 2 -> Ethereum

Transactions History

URL: /api/v1/tx/history

Method: GET

Needs auth? Yes

Header:

{
  "Authorization": "Bearer TOKEN"
}

Request Body: none

Transaction state

URL: /api/v1/tx/state/<ID>

Method: GET

Needs auth? Yes

Header:

{
  "Authorization": "Bearer TOKEN"
}

Request Body: none

salamantex_back's People

Contributors

moeen avatar

Watchers

 avatar

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.