Giter VIP home page Giter VIP logo

mani-task's Introduction

Many-task

This microservice provides functionality for user authentication, file uploading, and file retrieval.

Setup

  1. Environment Configuration

    • To configure the environment variables, copy the .env.sample file to .env within each microservice directory using the following commands:

    For the Store Microservice:

    cd store-microservice
    cp .env.sample .env

    For the Retrieval Microservice:

    cd retreival-microservice
    cp .env.sample .env
  2. Running the Service

Start Docker Services:

```bash
docker-compose up
```

Run Store Microservice:

After the services are up and running, open a new terminal window or tab, navigate to the `store-microservice` directory, and execute the following command:

```bash
cd store-microservice
go run main.go
```

Running the above command will start the Store Microservice locally.

Note: Ensure that any necessary dependencies or environment variables are set before running the main.go file.

Endpoints

User Authentication

  • Register User

    • Method: POST
    • Endpoint: /api/v1/user/register
    • Request Body:
      {
          "username": "example",
          "email": "[email protected]",
          "password": "yourpassword",
          "first_name": "John",
          "last_name": "Doe"
      }
  • Login User

    • Method: POST
    • Endpoint: /api/v1/user/login
    • Request Body:
      {
          "identifier": "[email protected]",
          "password": "yourpassword"
      }
      Note: identifier can be an email or username.

File Handling

  • Upload File

    • Method: POST
    • Endpoint: /api/v1/file
    • Authentication: JWT Token required.
    • Request: Form data with a field file, tag and type .
  • Get File

    • Method: GET
    • Endpoint: /api/v1/file
    • Authentication: JWT Token required.
    • Query Params: tags or name for filtering files.
  • Retrieve File Names

    • Method: GET
    • Endpoint: /api/v1/file/names
    • Authentication: JWT Token required.
    • Retrieves file names based on provided tags or name.

Documentation

  • Postman Collection:
    • Access the Postman collection in the docs folder for detailed API usage.

Running Tests

  • To execute Golang tests for the Retrieval Microservice:
    cd retrieval_microservice_directory
    go test ./...

mani-task's People

Contributors

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