diff options
author | Quentin <quentin@deuxfleurs.fr> | 2021-08-23 20:40:03 +0200 |
---|---|---|
committer | Quentin <quentin@deuxfleurs.fr> | 2021-08-23 20:40:03 +0200 |
commit | 15e4d10fd4b35a2e70cc4fa6ad4117cd5c402cbc (patch) | |
tree | 0fe31ac79d5dbe480b1b386845b3dd8fcaa55bd4 /middleware.go | |
parent | 5d64be33e64eb75160b6fe37b01997de7e96237a (diff) | |
download | bagage-15e4d10fd4b35a2e70cc4fa6ad4117cd5c402cbc.tar.gz bagage-15e4d10fd4b35a2e70cc4fa6ad4117cd5c402cbc.zip |
Refactor the codebase
Diffstat (limited to 'middleware.go')
-rw-r--r-- | middleware.go | 17 |
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 +} |