Export and rename resourceAliasForStorageResource
Rename the resolver helper to ResourceAliasResolver so it reads as a resolver rather than a storage-resource-specific accessor, and update its three call sites in the trust center resolvers. Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
@@ -24,7 +24,7 @@ import (
|
||||
"go.probo.inc/probo/pkg/server/gqlutils"
|
||||
)
|
||||
|
||||
func (r *Resolver) resourceAliasForStorageResource(
|
||||
func (r *Resolver) ResourceAliasResolver(
|
||||
ctx context.Context,
|
||||
storageResourceID gid.GID,
|
||||
) (*string, error) {
|
||||
|
||||
@@ -71,7 +71,7 @@ func (r *auditResolver) ReportFile(ctx context.Context, obj *types.Audit) (*type
|
||||
|
||||
// Alias is the resolver for the alias field.
|
||||
func (r *auditReportResolver) Alias(ctx context.Context, obj *types.AuditReport) (*string, error) {
|
||||
return r.resourceAliasForStorageResource(ctx, obj.ID)
|
||||
return r.ResourceAliasResolver(ctx, obj.ID)
|
||||
}
|
||||
|
||||
// IsUserAuthorized is the resolver for the isUserAuthorized field.
|
||||
@@ -176,7 +176,7 @@ func (r *complianceFrameworkResolver) Framework(ctx context.Context, obj *types.
|
||||
|
||||
// Alias is the resolver for the alias field.
|
||||
func (r *documentResolver) Alias(ctx context.Context, obj *types.Document) (*string, error) {
|
||||
return r.resourceAliasForStorageResource(ctx, obj.ID)
|
||||
return r.ResourceAliasResolver(ctx, obj.ID)
|
||||
}
|
||||
|
||||
// IsUserAuthorized is the resolver for the isUserAuthorized field.
|
||||
@@ -920,7 +920,7 @@ func (r *trustCenterResolver) Updates(ctx context.Context, obj *types.TrustCente
|
||||
|
||||
// Alias is the resolver for the alias field.
|
||||
func (r *trustCenterFileResolver) Alias(ctx context.Context, obj *types.TrustCenterFile) (*string, error) {
|
||||
return r.resourceAliasForStorageResource(ctx, obj.ID)
|
||||
return r.ResourceAliasResolver(ctx, obj.ID)
|
||||
}
|
||||
|
||||
// IsUserAuthorized is the resolver for the isUserAuthorized field.
|
||||
|
||||
Reference in New Issue
Block a user