mirror of
https://github.com/rancher/steve.git
synced 2025-09-18 00:08:17 +00:00
Refactor schema IDs and paths
This commit is contained in:
23
pkg/resources/schema.go
Normal file
23
pkg/resources/schema.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package resources
|
||||
|
||||
import (
|
||||
"github.com/rancher/naok/pkg/accesscontrol"
|
||||
"github.com/rancher/naok/pkg/counts"
|
||||
"github.com/rancher/naok/pkg/resources/common"
|
||||
"github.com/rancher/naok/pkg/resources/schema"
|
||||
"github.com/rancher/norman/pkg/store/proxy"
|
||||
"github.com/rancher/norman/pkg/subscribe"
|
||||
"github.com/rancher/norman/pkg/types"
|
||||
)
|
||||
|
||||
func SchemaFactory(getter proxy.ClientGetter, as *accesscontrol.AccessStore) *schema.Collection {
|
||||
baseSchema := types.EmptySchemas()
|
||||
collection := schema.NewCollection(baseSchema, as)
|
||||
|
||||
counts.Register(baseSchema)
|
||||
subscribe.Register(baseSchema)
|
||||
|
||||
common.Register(collection, getter)
|
||||
|
||||
return collection
|
||||
}
|
Reference in New Issue
Block a user