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:
Bryan Frimin
2026-06-22 11:13:10 +02:00
parent 79c284a894
commit bfd672e0fe
2 changed files with 4 additions and 4 deletions

View File

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

View File

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