filevault

command module
v0.0.0-...-1c3d171 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

README

filevault

filevault is a simple fileserver which is providing an http interface to save, delete and retrieve files.

Provided API-Interface

POST /api/v1/

This path is storing the given file which is provided under the multipart form key file in the directory defined by the query parameter dir. It will automatically append the filename to the dir so it is expected that dir is only containing the path of teh directory.

GET /api/v1/

Using the query parameter path you can retrieve a saved file if the file exists. The Content-Type will automatically be set to the right mime-type if an official mime-type exists.

DELETE /api/v1/

Using the query parameter path you can delete a saved file if the file exists. If the file does not exist the error will be ignored. If after the deletion of the file the directory is empty, the directory will also be deleted. A non-empty directory cannot be deleted.

GET /api/v1/health

This endpoint allows for an automatic healthcheck of the application which is useful in the context of Docker and Kubernetes.

Configuration

The configuration of filevault can be done using environment variables or by flags using the CLI. CLI configuration takes precedence over environment variables if both are set.

FILEVAULT_DIR (-dir)

Directory under which the uploaded files will be stored.

FILEVAULT_HOST (-host)

Host address for the http server to listen to

FILEVAULT_PORT (-port)

Port of the http server to listen to

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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