Skip to content

agifsofyan/go-multi-servie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

141 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multi Aggregator for Flight Service

Multi Aggregator for flight & hotel services. This project consists of 2 services. API and Dashboard (Web). Before using the API, it is mandatory to register the provider via the dashboard.

Requirement

Running

  1. clone this project

  2. create an environment file with the name .env in the project. An example of a variable is like this:

    APP_NAME="GR Multi Aggregator"
    APP_ENV=local
    DASHBOARD_PORT="4000"
    API_PORT="4001"
    
    # Database Local
    DB_DRIVER=mysql # or psql or postgres
    DB_HOST=
    DB_PORT=
    DB_USER=
    DB_NAME=
    DB_PASS=
    OPSIGO_PREF_AIRLINE=2
    
  3. from inside project run this command:

    • For install the dependency (Library)

      go mod download

      or

      go mod install
    • Use the makefile. Detail in project

      • To migration the tables
        make migration_up
      • To run all service
        make start
      • To run only api service
        make start_api
      • To run only web service
        make start_web
      • To stop all service
        make stop
      • To stop only api service
        make stop_api
      • To stop only web service
        make stop_web
  4. App Running

    1. Dashboard alt text
    • baseurl: host + DASHBOARD_PORT
    • username: admin
    • password: admin123
    1. Api alt text
    • baseurl: host + API_PORT

Another Document

Example input & response body for consuming API. Reference from Opsigo

  • json input body
  • json response
  • API DOCS:
    • swag:
      swag init -g ./cmd/api/api.main.go -o ./docs
    • open from browser: host + API_PORT + /docs/index.html alt text

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors