Code Monkey home page Code Monkey logo

central-api's Introduction

Central API

Test codecov Build

The central api for the file-share-platform. Handles websocket connections from server agents, and requests from clients who wish to download a file.

Instructions

git clone https://github.com/file-share-platform/central-api.git
cd central-api

cp .example.env .env
nano .env #update any configuration files

cargo run --release

central-api's People

Contributors

github-actions[bot] avatar josiahbull avatar lachlan2k avatar

central-api's Issues

[BUG] - `/info` and `/agents/{agent_id}` endpoints are nonfunctional

Issue

Description

The /info and /agents/{agent_id} endpoints are non function, and should be implemented as per the spec. This will involved upgrading the ws-com-framework to support some extra message varieties.

Tasks/General Thoughts

  • Update ws-com-framework to support sending the message data
  • Implement /info
  • Implement /agents/{agent_id}
  • {x] Add tests for both above endpoints
  • Refactor the openapi.oas.yml spec as needed to make the endpoints make sense

Add `UPLOAD_RETRY` header to response on failed upload

Issue

Description

As per the OpenAPI spec, in the event an upload files to the api, it should provide a new URL in a UPLOAD_RETRY header so the agent can try the upload again.

Tasks/General Thoughts

  • Add UPLOAD_RETRY header
  • Add test to ensure it isn't there on successful uploads
  • Add test to ensure header appears after 1 failed attempt
  • Add test to make sure that after 2 failed try it fails outright without a new header

Improve Panic Measures

Description

In the event the central api encounters a failure, we want to forward a more "human" error to our users. To that end, lets setup the human-panic crate.

Tasks/General Thoughts

  • Setup the human-panic dependency, to build only for release distributions.
  • If possible, write a test for it.

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.