bagage/middleware.go

18 lines
368 B
Go
Raw Permalink Normal View History

2021-08-23 18:40:03 +00:00
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
}