Giter Club home page Giter Club logo

export-service-go's Introduction

codecov

Export Service

The Export Service allows users to request and download data archives for auditing or use with their own tooling. Because many ConsoleDot applications need to export data, this service provides some common functionality.

For more information on integrating with the export service, see the integration documentation.

Dependencies

  • Golang >= 1.18
  • podman-compose
  • make (optional for running the Makefile)
  • jq (optional for running the Makefile)
  • ginkgo

Starting the service locally

You can start the database, minio, and the api using make run.

Ports now exposed:

  • public api on localhost:8000
  • metrics on localhost:9090
  • internal api on localhost:10010
  • minio on localhost:9099
  • psql on localhost:5432 (use minio as the access key and minioadmin as the secret key to view the dashboard) (use psql -h localhost -p 5432 -U postgres and the pass postgres to connect to the db)

To test local changes, you can restart the api server using make run-api.

Testing the service

You can create a new export request using make sample-request-create-export which pulls data from the example_export_request.json. It should respond with the following information:

{
    "id":"0b069353-6ace-4403-8162-3476df3ae4ab",
    "created_at":"2022-10-12T15:07:12.319191523Z",
    "name":"Example Export Request",
    "format":"json",
    "status":"pending",
    "sources":[{
        "id":"0b1386f4-2b91-44d7-bcb0-9391cfbba4c5","application":"exampleApplication",
        "status":"pending",
        "resource":"exampleResource",
        "filters":{}
    }]
}

Replace the EXPORT_ID and EXPORT_RESOURCE in the Makefile with the id and the sources id from the response.

You can then run make sample-request-internal-upload to upload example_export_upload.zip to the service. If this is successful, you should be able to download the uploaded file from the service using make sample-request-export-download.

export-service-go's People

Contributors

codywmitchell avatar dehort avatar maskarb avatar justinorringer avatar dscervantes avatar victoremepunto avatar mikelalejobr avatar tahmidefaz avatar chambridge avatar digitronik avatar xxlhacker 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.