diff options
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 +} |