1
0
mirror of https://github.com/rancher/steve.git synced 2025-09-16 23:39:16 +00:00

Add kubectl shell support

This commit is contained in:
Darren Shepherd
2020-06-01 15:59:38 -07:00
parent 975393797d
commit 3eba71d06b
9 changed files with 426 additions and 23 deletions

View File

@@ -102,6 +102,15 @@ func (j *EncodingResponseWriter) addLinks(schema *types.APISchema, context *type
rawResource.Links["remove"] = self
}
}
for link := range schema.LinkHandlers {
rawResource.Links[link] = context.URLBuilder.Link(schema, rawResource.ID, link)
}
for action := range schema.ActionHandlers {
if rawResource.Actions == nil {
rawResource.Actions = map[string]string{}
}
rawResource.Actions[action] = context.URLBuilder.Action(schema, rawResource.ID, action)
}
}
func getLimit(req *http.Request) int {