mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Update comments across the codebase
This commit is contained in:
@@ -52,6 +52,7 @@ func validateHandler(conf config.Config, h http.Handler) http.Handler {
|
||||
return vHandler{conf, h}
|
||||
}
|
||||
|
||||
// Validate handler ServeHTTP() wrapper
|
||||
func (h vHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
accessKey := stripAccessKey(r)
|
||||
acceptsContentType := getContentType(r)
|
||||
@@ -95,6 +96,7 @@ func ignoreResourcesHandler(h http.Handler) http.Handler {
|
||||
return rHandler{h}
|
||||
}
|
||||
|
||||
// Resource handler ServeHTTP() wrapper
|
||||
func (h rHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
acceptsContentType := getContentType(r)
|
||||
if ignoreUnImplementedObjectResources(r) || ignoreUnImplementedBucketResources(r) {
|
||||
@@ -109,7 +111,7 @@ func (h rHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
//// helpers
|
||||
|
||||
// Checks requests for unimplemented resources
|
||||
// Checks requests for unimplemented Bucket resources
|
||||
func ignoreUnImplementedBucketResources(req *http.Request) bool {
|
||||
q := req.URL.Query()
|
||||
for name := range q {
|
||||
@@ -120,6 +122,7 @@ func ignoreUnImplementedBucketResources(req *http.Request) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// Checks requests for unimplemented Object resources
|
||||
func ignoreUnImplementedObjectResources(req *http.Request) bool {
|
||||
q := req.URL.Query()
|
||||
for name := range q {
|
||||
|
||||
@@ -56,8 +56,13 @@ func generateBucketsListResult(buckets []mstorage.BucketMetadata) BucketListResp
|
||||
|
||||
type ItemKey []*Item
|
||||
|
||||
func (b ItemKey) Len() int { return len(b) }
|
||||
func (b ItemKey) Swap(i, j int) { b[i], b[j] = b[j], b[i] }
|
||||
// Len
|
||||
func (b ItemKey) Len() int { return len(b) }
|
||||
|
||||
// Swap
|
||||
func (b ItemKey) Swap(i, j int) { b[i], b[j] = b[j], b[i] }
|
||||
|
||||
// Less
|
||||
func (b ItemKey) Less(i, j int) bool { return b[i].Key < b[j].Key }
|
||||
|
||||
// takes a set of objects and prepares the objects for serialization
|
||||
|
||||
@@ -42,6 +42,7 @@ type encoder interface {
|
||||
Encode(v interface{}) error
|
||||
}
|
||||
|
||||
// Http wrapper handler
|
||||
func HttpHandler() http.Handler {
|
||||
mux := mux.NewRouter()
|
||||
var api = webUiApi{}
|
||||
|
||||
Reference in New Issue
Block a user