mirror of
https://github.com/rancher/steve.git
synced 2025-08-20 23:34:00 +00:00
Update formatter signature to use the interface to facilitate using a fake for testing
This commit is contained in:
parent
1a4e6ebfcd
commit
cbefe738ef
@ -7,7 +7,9 @@ import (
|
|||||||
"github.com/rancher/apiserver/pkg/types"
|
"github.com/rancher/apiserver/pkg/types"
|
||||||
"github.com/rancher/steve/pkg/accesscontrol"
|
"github.com/rancher/steve/pkg/accesscontrol"
|
||||||
"github.com/rancher/steve/pkg/attributes"
|
"github.com/rancher/steve/pkg/attributes"
|
||||||
|
"github.com/rancher/steve/pkg/resources/virtual/common"
|
||||||
"github.com/rancher/steve/pkg/schema"
|
"github.com/rancher/steve/pkg/schema"
|
||||||
|
metricsStore "githu
|
||||||
metricsStore "github.com/rancher/steve/pkg/stores/metrics"
|
metricsStore "github.com/rancher/steve/pkg/stores/metrics"
|
||||||
"github.com/rancher/steve/pkg/stores/proxy"
|
"github.com/rancher/steve/pkg/stores/proxy"
|
||||||
"github.com/rancher/steve/pkg/summarycache"
|
"github.com/rancher/steve/pkg/summarycache"
|
||||||
@ -73,7 +75,7 @@ func selfLink(gvr schema2.GroupVersionResource, meta metav1.Object) (prefix stri
|
|||||||
return buf.String()
|
return buf.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
func formatter(summarycache *summarycache.SummaryCache, asl accesscontrol.AccessSetLookup) types.Formatter {
|
func formatter(summarycache common.SummaryCache, asl accesscontrol.AccessSetLookup) types.Formatter {
|
||||||
return func(request *types.APIRequest, resource *types.RawResource) {
|
return func(request *types.APIRequest, resource *types.RawResource) {
|
||||||
if resource.Schema == nil {
|
if resource.Schema == nil {
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user