1
0
mirror of https://github.com/rancher/steve.git synced 2025-09-09 11:19:12 +00:00
This commit is contained in:
Darren Shepherd
2020-01-30 22:37:59 -07:00
parent 19c6732de0
commit 8b42d0aff8
71 changed files with 4024 additions and 507 deletions

View File

@@ -0,0 +1,23 @@
package parse
import (
"net/http"
"github.com/gorilla/mux"
"github.com/rancher/steve/pkg/schemaserver/types"
)
func MuxURLParser(rw http.ResponseWriter, req *http.Request, schemas *types.APISchemas) (ParsedURL, error) {
vars := mux.Vars(req)
url := ParsedURL{
Type: vars["type"],
Name: vars["name"],
Link: vars["link"],
Prefix: vars["prefix"],
Method: req.Method,
Action: vars["action"],
Query: req.URL.Query(),
}
return url, nil
}