From 36294eeed217af5c9be8038cfac51fea4325d597 Mon Sep 17 00:00:00 2001 From: Fabian Vowie Date: Sun, 26 Dec 2021 23:51:38 +0100 Subject: [PATCH] Initial commit --- .gitignore | 15 +++++++++++++++ go.mod | 5 +++++ go.sum | 2 ++ lithium.md | 16 ++++++++++++++++ main.go | 18 ++++++++++++++++++ 5 files changed, 56 insertions(+) create mode 100644 .gitignore create mode 100644 go.mod create mode 100644 go.sum create mode 100644 lithium.md create mode 100644 main.go diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5bbec02 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Go workspace file +go.work \ No newline at end of file diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..e8488cb --- /dev/null +++ b/go.mod @@ -0,0 +1,5 @@ +module github.com/geplauder/lithium + +go 1.17 + +require github.com/gorilla/mux v1.8.0 diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..5350288 --- /dev/null +++ b/go.sum @@ -0,0 +1,2 @@ +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= diff --git a/lithium.md b/lithium.md new file mode 100644 index 0000000..6d0ed5c --- /dev/null +++ b/lithium.md @@ -0,0 +1,16 @@ +# Lithium + +Micro-service for file storage and processing. + +## Features + +- File storing with various providers + - S3 (or S3 compatible like MinIO) + - Locally (for development purposes) +- File processing "pipelines" for various formats + - Compression, Resizing for images + - Encoding for videos + - Remove metadata (e.g. EXIF) +- File-based configuration for pipelines + - JSON/YAML/TOML? +- Web api to store and retrieve files diff --git a/main.go b/main.go new file mode 100644 index 0000000..a12eff1 --- /dev/null +++ b/main.go @@ -0,0 +1,18 @@ +package main + +import ( + "net/http" + + "github.com/gorilla/mux" +) + +func IndexHandler(w http.ResponseWriter, r *http.Request) { + w.Write([]byte("hello world!")) +} + +func main() { + r := mux.NewRouter() + r.HandleFunc("/", IndexHandler) + + http.ListenAndServe(":8000", r) +}