Giter VIP home page Giter VIP logo

fake-gateway's Introduction

fake-gateway

How It Works

FoxONE gateway接收来自用户的请求,经过简单处理后,添加相应的token等header,将请求发送至业务方的相应接口。业务方可使用token访问钱包服务。

转发的请求中,网关将为请求加上headers:

Authorization: Bearer xxx
Fox-Merchant-ID: xxx
Fox-Member-ID: xxx
Fox-Wallet-ID: xxx

业务方的请求将分为四种,公共接口,需要访问钱包信息的接口,需要进行转账操作的接口,以及管理员接口。根据不同的接口,分别将请求发送至:

/member/:service/p/*gw   # public
/member/:service/u/*gw   # login required
/member/:service/pin/*gw   # pin required
/admin/:service/u/*gw        # no pin required & must admin login reuired

其中service由FoxONE为业务分配。如otc, exchange等。

Build And Run

cd fake_gateway
go build
./fake_gateway --debug api -p 8081 -s http://locahost:8111

Updates

  • 所有转发接口不再以 /gw 结尾
  • public接口更新为 /p/:service/*

fake-gateway's People

Contributors

cw35 avatar lanvige avatar pando-ci avatar

Watchers

 avatar  avatar  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.