Fabian Vowie
3 years ago
No known key found for this signature in database
GPG Key ID: C27317C33B27C410
5 changed files with
56 additions and
0 deletions
-
.gitignore
-
go.mod
-
go.sum
-
lithium.md
-
main.go
|
@ -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 |
|
@ -0,0 +1,5 @@ |
|
|
|
|
|
module github.com/geplauder/lithium |
|
|
|
|
|
|
|
|
|
|
|
go 1.17 |
|
|
|
|
|
|
|
|
|
|
|
require github.com/gorilla/mux v1.8.0 |
|
@ -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= |
|
@ -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 |
|
@ -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) |
|
|
|
|
|
} |