ava

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2021 License: MIT Imports: 4 Imported by: 0

README

ava

The microservice for storing your users' avatars (or any kind of images for that matter).

Start it up via Docker or docker-compose. It will listen on port 42069. You could create a .env file where you may or may not specify an AVA_API_KEY variable like so:

# .env
AVA_API_KEY=mySuperSecretAPIKey

If you don't specify any AVA_API_KEY it is assumed to be "" and any request with a missing Ava-API-Key header will be authorized to proceed.

API

POST /upload/jpg

Put your image file into the request body and enjoy. This will respond with a simple string (e.g. 166ebdf66f4174b5.jpg) that you'll be able to use to retrieve the image.

GET /download/166ebdf66f4174b5.jpg

Given the string, send this request to get your image back. It will be attached to the response body with a proper MIME type header set.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package server contains all functions and methods for the main server that is the host to all API endpoints and static files for the chat.
Package server contains all functions and methods for the main server that is the host to all API endpoints and static files for the chat.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL