1
0
mirror of https://github.com/rancher/steve.git synced 2025-08-21 07:44:24 +00:00

Update formatter signature to use the interface to facilitate using a fake for testing

This commit is contained in:
Chad Roberts 2025-04-15 12:59:32 -04:00
parent 1a4e6ebfcd
commit cbefe738ef
No known key found for this signature in database
GPG Key ID: 1F6B1A7A4D54C39A

View File

@ -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