aboutsummaryrefslogtreecommitdiff
path: root/middleware.go
diff options
context:
space:
mode:
authorQuentin <quentin@deuxfleurs.fr>2021-08-23 20:40:03 +0200
committerQuentin <quentin@deuxfleurs.fr>2021-08-23 20:40:03 +0200
commit15e4d10fd4b35a2e70cc4fa6ad4117cd5c402cbc (patch)
tree0fe31ac79d5dbe480b1b386845b3dd8fcaa55bd4 /middleware.go
parent5d64be33e64eb75160b6fe37b01997de7e96237a (diff)
downloadbagage-15e4d10fd4b35a2e70cc4fa6ad4117cd5c402cbc.tar.gz
bagage-15e4d10fd4b35a2e70cc4fa6ad4117cd5c402cbc.zip
Refactor the codebase
Diffstat (limited to 'middleware.go')
-rw-r--r--middleware.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/middleware.go b/middleware.go
new file mode 100644
index 0000000..8688347
--- /dev/null
+++ b/middleware.go
@@ -0,0 +1,17 @@
+package main
+
+import (
+ "github.com/minio/minio-go/v7"
+ "net/http"
+)
+
+/* We define some interface to enable our middleware to communicate */
+type ErrorHandler interface {
+ WithError(err error) http.Handler
+}
+type CredsHandler interface {
+ WithCreds(username, password string) http.Handler
+}
+type MinioClientHandler interface {
+ WithMC(mc *minio.Client) http.Handler
+}