mirror of
https://github.com/minio/minio.git
synced 2025-04-29 06:08:00 -04:00
Merge pull request #9 from fkautz/pr_out_adding_bucket_and_object_route_in_gateway
Adding bucket and object route in gateway
This commit is contained in:
commit
74f989e3ce
13
gateway.go
13
gateway.go
@ -10,6 +10,15 @@ func GatewayHandler(w http.ResponseWriter, req *http.Request) {
|
|||||||
fmt.Fprintf(w, "Gateway")
|
fmt.Fprintf(w, "Gateway")
|
||||||
}
|
}
|
||||||
|
|
||||||
func RegisterGatewayHandlers(router *mux.Router) {
|
func GatewayGetObjectHandler(w http.ResponseWriter, req *http.Request) {
|
||||||
router.HandleFunc("/gateway/rpc", GatewayHandler)
|
vars := mux.Vars(req)
|
||||||
|
bucket := vars["bucket"]
|
||||||
|
object := vars["object"]
|
||||||
|
fmt.Fprintf(w, "bucket: "+bucket)
|
||||||
|
fmt.Fprintf(w, "\r")
|
||||||
|
fmt.Fprintf(w, "object: "+object)
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterGatewayHandlers(router *mux.Router) {
|
||||||
|
router.HandleFunc("/{bucket}/{object:.*}", GatewayGetObjectHandler).Methods("GET")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user