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

Add column support

This commit is contained in:
Darren Shepherd
2019-08-14 11:08:34 -07:00
parent db650d6c19
commit 583309b969
23 changed files with 365 additions and 177 deletions

View File

@@ -122,3 +122,14 @@ func SetAPIResource(s *types.Schema, resource v1.APIResource) {
SetVerbs(s, resource.Verbs)
SetNamespaced(s, resource.Namespaced)
}
func SetColumns(s *types.Schema, columns interface{}) {
if s.Attributes == nil {
s.Attributes = map[string]interface{}{}
}
s.Attributes["columns"] = columns
}
func Columns(s *types.Schema) interface{} {
return s.Attributes["columns"]
}