Files
probo/pkg/server/api/console/v1/control_resolvers.go
dependabot[bot] a42df02829 Bump the go-dependencies group with 21 updates
Bumps the go-dependencies group with 21 updates:

| Package | From | To |
| --- | --- | --- |
| codeberg.org/miekg/dns | `0.6.81` | `0.6.83` |
| [github.com/99designs/gqlgen](https://github.com/99designs/gqlgen) | `0.17.90` | `0.17.93` |
| [github.com/anthropics/anthropic-sdk-go](https://github.com/anthropics/anthropic-sdk-go) | `1.48.0` | `1.55.0` |
| [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) | `1.42.0` | `1.42.1` |
| [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) | `1.32.23` | `1.32.27` |
| [github.com/aws/aws-sdk-go-v2/credentials](https://github.com/aws/aws-sdk-go-v2) | `1.19.22` | `1.19.26` |
| [github.com/aws/aws-sdk-go-v2/service/bedrockruntime](https://github.com/aws/aws-sdk-go-v2) | `1.53.4` | `1.54.2` |
| [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2) | `1.103.2` | `1.104.2` |
| [github.com/aws/aws-sdk-go-v2/service/secretsmanager](https://github.com/aws/aws-sdk-go-v2) | `1.42.3` | `1.42.5` |
| [github.com/aws/aws-sdk-go-v2/service/ssm](https://github.com/aws/aws-sdk-go-v2) | `1.69.3` | `1.69.5` |
| [github.com/pdfcpu/pdfcpu](https://github.com/pdfcpu/pdfcpu) | `0.12.1` | `0.13.0` |
| [github.com/pires/go-proxyproto](https://github.com/pires/go-proxyproto) | `0.12.0` | `0.13.0` |
| [github.com/sigstore/sigstore-go](https://github.com/sigstore/sigstore-go) | `1.2.0` | `1.2.1` |
| [github.com/vektah/gqlparser/v2](https://github.com/vektah/gqlparser) | `2.5.33` | `2.5.35` |
| [golang.org/x/crypto](https://github.com/golang/crypto) | `0.52.0` | `0.53.0` |
| [google.golang.org/api](https://github.com/googleapis/google-api-go-client) | `0.283.0` | `0.287.0` |
| gopkg.in/dnaeon/go-vcr.v4 | `4.0.6` | `4.0.7` |
| [github.com/aws/smithy-go](https://github.com/aws/smithy-go) | `1.27.1` | `1.27.3` |
| [golang.org/x/mod](https://github.com/golang/mod) | `0.36.0` | `0.37.0` |
| [golang.org/x/net](https://github.com/golang/net) | `0.55.0` | `0.56.0` |
| [golang.org/x/term](https://github.com/golang/term) | `0.43.0` | `0.44.0` |

Updates `codeberg.org/miekg/dns` from 0.6.81 to 0.6.83

Updates `github.com/99designs/gqlgen` from 0.17.90 to 0.17.93
- [Release notes](https://github.com/99designs/gqlgen/releases)
- [Changelog](https://github.com/99designs/gqlgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/99designs/gqlgen/compare/v0.17.90...v0.17.93)

Updates `github.com/anthropics/anthropic-sdk-go` from 1.48.0 to 1.55.0
- [Release notes](https://github.com/anthropics/anthropic-sdk-go/releases)
- [Changelog](https://github.com/anthropics/anthropic-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/anthropics/anthropic-sdk-go/compare/v1.48.0...v1.55.0)

Updates `github.com/aws/aws-sdk-go-v2` from 1.42.0 to 1.42.1
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.42.0...v1.42.1)

Updates `github.com/aws/aws-sdk-go-v2/config` from 1.32.23 to 1.32.27
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.32.23...config/v1.32.27)

Updates `github.com/aws/aws-sdk-go-v2/credentials` from 1.19.22 to 1.19.26
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/credentials/v1.19.22...credentials/v1.19.26)

Updates `github.com/aws/aws-sdk-go-v2/service/bedrockruntime` from 1.53.4 to 1.54.2
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/kms/v1.53.4...service/s3/v1.54.2)

Updates `github.com/aws/aws-sdk-go-v2/service/s3` from 1.103.2 to 1.104.2
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.103.2...service/s3/v1.104.2)

Updates `github.com/aws/aws-sdk-go-v2/service/secretsmanager` from 1.42.3 to 1.42.5
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/amp/v1.42.3...service/amp/v1.42.5)

Updates `github.com/aws/aws-sdk-go-v2/service/ssm` from 1.69.3 to 1.69.5
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/ecs/v1.69.3...service/ecs/v1.69.5)

Updates `github.com/pdfcpu/pdfcpu` from 0.12.1 to 0.13.0
- [Release notes](https://github.com/pdfcpu/pdfcpu/releases)
- [Commits](https://github.com/pdfcpu/pdfcpu/compare/v0.12.1...v0.13.0)

Updates `github.com/pires/go-proxyproto` from 0.12.0 to 0.13.0
- [Release notes](https://github.com/pires/go-proxyproto/releases)
- [Commits](https://github.com/pires/go-proxyproto/compare/v0.12.0...v0.13.0)

Updates `github.com/sigstore/sigstore-go` from 1.2.0 to 1.2.1
- [Release notes](https://github.com/sigstore/sigstore-go/releases)
- [Commits](https://github.com/sigstore/sigstore-go/compare/v1.2.0...v1.2.1)

Updates `github.com/vektah/gqlparser/v2` from 2.5.33 to 2.5.35
- [Release notes](https://github.com/vektah/gqlparser/releases)
- [Commits](https://github.com/vektah/gqlparser/compare/v2.5.33...v2.5.35)

Updates `golang.org/x/crypto` from 0.52.0 to 0.53.0
- [Commits](https://github.com/golang/crypto/compare/v0.52.0...v0.53.0)

Updates `google.golang.org/api` from 0.283.0 to 0.287.0
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.283.0...v0.287.0)

Updates `gopkg.in/dnaeon/go-vcr.v4` from 4.0.6 to 4.0.7

Updates `github.com/aws/smithy-go` from 1.27.1 to 1.27.3
- [Release notes](https://github.com/aws/smithy-go/releases)
- [Changelog](https://github.com/aws/smithy-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/smithy-go/compare/v1.27.1...v1.27.3)

Updates `golang.org/x/mod` from 0.36.0 to 0.37.0
- [Commits](https://github.com/golang/mod/compare/v0.36.0...v0.37.0)

Updates `golang.org/x/net` from 0.55.0 to 0.56.0
- [Commits](https://github.com/golang/net/compare/v0.55.0...v0.56.0)

Updates `golang.org/x/term` from 0.43.0 to 0.44.0
- [Commits](https://github.com/golang/term/compare/v0.43.0...v0.44.0)

---
updated-dependencies:
- dependency-name: codeberg.org/miekg/dns
  dependency-version: 0.6.83
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-dependencies
- dependency-name: github.com/99designs/gqlgen
  dependency-version: 0.17.93
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-dependencies
- dependency-name: github.com/anthropics/anthropic-sdk-go
  dependency-version: 1.55.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-dependencies
- dependency-name: github.com/aws/aws-sdk-go-v2
  dependency-version: 1.42.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-dependencies
- dependency-name: github.com/aws/aws-sdk-go-v2/config
  dependency-version: 1.32.27
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-dependencies
- dependency-name: github.com/aws/aws-sdk-go-v2/credentials
  dependency-version: 1.19.26
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-dependencies
- dependency-name: github.com/aws/aws-sdk-go-v2/service/bedrockruntime
  dependency-version: 1.54.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-dependencies
- dependency-name: github.com/aws/aws-sdk-go-v2/service/s3
  dependency-version: 1.104.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-dependencies
- dependency-name: github.com/aws/aws-sdk-go-v2/service/secretsmanager
  dependency-version: 1.42.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-dependencies
- dependency-name: github.com/aws/aws-sdk-go-v2/service/ssm
  dependency-version: 1.69.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-dependencies
- dependency-name: github.com/pdfcpu/pdfcpu
  dependency-version: 0.13.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-dependencies
- dependency-name: github.com/pires/go-proxyproto
  dependency-version: 0.13.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-dependencies
- dependency-name: github.com/sigstore/sigstore-go
  dependency-version: 1.2.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-dependencies
- dependency-name: github.com/vektah/gqlparser/v2
  dependency-version: 2.5.35
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-dependencies
- dependency-name: golang.org/x/crypto
  dependency-version: 0.53.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-dependencies
- dependency-name: google.golang.org/api
  dependency-version: 0.287.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-dependencies
- dependency-name: gopkg.in/dnaeon/go-vcr.v4
  dependency-version: 4.0.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-dependencies
- dependency-name: github.com/aws/smithy-go
  dependency-version: 1.27.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-dependencies
- dependency-name: golang.org/x/mod
  dependency-version: 0.37.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-dependencies
- dependency-name: golang.org/x/net
  dependency-version: 0.56.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-dependencies
- dependency-name: golang.org/x/term
  dependency-version: 0.44.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-02 18:05:43 +02:00

940 lines
34 KiB
Go

package console_v1
// This file will be automatically regenerated based on the schema, any resolver
// implementations
// will be copied through when generating and any unknown code will be moved to the end.
// Code generated by github.com/99designs/gqlgen version v0.17.93
import (
"context"
"errors"
"fmt"
"github.com/vikstrous/dataloadgen"
"go.gearno.de/kit/log"
"go.probo.inc/probo/pkg/coredata"
"go.probo.inc/probo/pkg/page"
"go.probo.inc/probo/pkg/probo"
"go.probo.inc/probo/pkg/server/api/console/v1/dataloader"
"go.probo.inc/probo/pkg/server/api/console/v1/schema"
"go.probo.inc/probo/pkg/server/api/console/v1/types"
"go.probo.inc/probo/pkg/server/gqlutils"
"go.probo.inc/probo/pkg/validator"
)
// StatementOfApplicability is the resolver for the statementOfApplicability field.
func (r *applicabilityStatementResolver) StatementOfApplicability(ctx context.Context, obj *types.ApplicabilityStatement) (*types.StatementOfApplicability, error) {
scope, err := r.authorize(ctx, obj.StatementOfApplicability.ID, probo.ActionStatementOfApplicabilityGet)
if err != nil {
return nil, err
}
soa, err := r.probo.StatementsOfApplicability.Get(ctx, scope, obj.StatementOfApplicability.ID)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot get statement of applicability", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return types.NewStatementOfApplicability(soa), nil
}
// Control is the resolver for the control field.
func (r *applicabilityStatementResolver) Control(ctx context.Context, obj *types.ApplicabilityStatement) (*types.Control, error) {
if _, err := r.authorize(ctx, obj.ID, probo.ActionControlGet); err != nil {
return nil, err
}
loaders := dataloader.FromContext(ctx)
control, err := loaders.Control.Load(ctx, obj.Control.ID)
if err != nil {
if errors.Is(err, dataloadgen.ErrNotFound) {
return nil, gqlutils.NotFound(ctx, err)
}
r.logger.ErrorCtx(ctx, "cannot get control", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return types.NewControl(control), nil
}
// Permission is the resolver for the permission field.
func (r *applicabilityStatementResolver) Permission(ctx context.Context, obj *types.ApplicabilityStatement, action string) (bool, error) {
return r.Resolver.Permission(ctx, obj, action)
}
// TotalCount is the resolver for the totalCount field.
func (r *applicabilityStatementConnectionResolver) TotalCount(ctx context.Context, obj *types.ApplicabilityStatementConnection) (int, error) {
scope, err := r.authorize(ctx, obj.ParentID, probo.ActionApplicabilityStatementList)
if err != nil {
return 0, err
}
switch obj.Resolver.(type) {
case *statementOfApplicabilityResolver:
count, err := r.probo.StatementsOfApplicability.CountApplicabilityStatements(ctx, scope, obj.ParentID)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot count applicability statements", log.Error(err))
return 0, gqlutils.Internal(ctx)
}
return count, nil
}
r.logger.ErrorCtx(ctx, "unsupported resolver for applicability statement connection", log.String("resolver", fmt.Sprintf("%T", obj.Resolver)))
return 0, gqlutils.Internal(ctx)
}
// Organization is the resolver for the organization field.
func (r *controlResolver) Organization(ctx context.Context, obj *types.Control) (*types.Organization, error) {
if _, err := r.authorize(ctx, obj.ID, probo.ActionOrganizationGet); err != nil {
return nil, err
}
loaders := dataloader.FromContext(ctx)
organization, err := loaders.Organization.Load(ctx, obj.Organization.ID)
if err != nil {
if errors.Is(err, coredata.ErrResourceNotFound) || errors.Is(err, dataloadgen.ErrNotFound) {
return nil, gqlutils.NotFound(ctx, err)
}
r.logger.ErrorCtx(ctx, "cannot get organization", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return types.NewOrganization(organization), nil
}
// Regulatory is the resolver for the regulatory field.
func (r *controlResolver) Regulatory(ctx context.Context, obj *types.Control) (bool, error) {
scope, err := r.authorize(ctx, obj.ID, probo.ActionControlGet)
if err != nil {
return false, err
}
hasRegulatory, err := r.probo.Controls.HasRegulatoryObligation(ctx, scope, obj.ID)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot check regulatory obligation", log.Error(err))
return false, gqlutils.Internal(ctx)
}
return hasRegulatory, nil
}
// Contractual is the resolver for the contractual field.
func (r *controlResolver) Contractual(ctx context.Context, obj *types.Control) (bool, error) {
scope, err := r.authorize(ctx, obj.ID, probo.ActionControlGet)
if err != nil {
return false, err
}
hasContractual, err := r.probo.Controls.HasContractualObligation(ctx, scope, obj.ID)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot check contractual obligation", log.Error(err))
return false, gqlutils.Internal(ctx)
}
return hasContractual, nil
}
// RiskAssessment is the resolver for the riskAssessment field.
func (r *controlResolver) RiskAssessment(ctx context.Context, obj *types.Control) (bool, error) {
scope, err := r.authorize(ctx, obj.ID, probo.ActionControlGet)
if err != nil {
return false, err
}
hasRisk, err := r.probo.Controls.HasRiskAssessment(ctx, scope, obj.ID)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot check risk assessment", log.Error(err))
return false, gqlutils.Internal(ctx)
}
return hasRisk, nil
}
// Framework is the resolver for the framework field.
func (r *controlResolver) Framework(ctx context.Context, obj *types.Control) (*types.Framework, error) {
if _, err := r.authorize(ctx, obj.ID, probo.ActionFrameworkGet); err != nil {
return nil, err
}
loaders := dataloader.FromContext(ctx)
framework, err := loaders.Framework.Load(ctx, obj.Framework.ID)
if err != nil {
if errors.Is(err, coredata.ErrResourceNotFound) || errors.Is(err, dataloadgen.ErrNotFound) {
return nil, gqlutils.NotFound(ctx, err)
}
r.logger.ErrorCtx(ctx, "cannot get framework", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return types.NewFramework(framework), nil
}
// Measures is the resolver for the measures field.
func (r *controlResolver) Measures(ctx context.Context, obj *types.Control, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.MeasureOrderBy, filter *types.MeasureFilter) (*types.MeasureConnection, error) {
scope, err := r.authorize(ctx, obj.ID, probo.ActionMeasureList)
if err != nil {
return nil, err
}
pageOrderBy := page.OrderBy[coredata.MeasureOrderField]{
Field: coredata.MeasureOrderFieldCreatedAt,
Direction: page.OrderDirectionDesc,
}
if orderBy != nil {
pageOrderBy = page.OrderBy[coredata.MeasureOrderField]{
Field: orderBy.Field,
Direction: orderBy.Direction,
}
}
cursor := types.NewCursor(first, after, last, before, pageOrderBy)
var measureFilter = coredata.NewMeasureFilter(nil, nil, nil)
if filter != nil {
measureFilter = coredata.NewMeasureFilter(filter.Query, filter.State, filter.Category)
}
page, err := r.probo.Measures.ListForControlID(ctx, scope, obj.ID, cursor, measureFilter)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot list measures", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return types.NewMeasureConnection(page, r, obj.ID, measureFilter), nil
}
// Documents is the resolver for the documents field.
func (r *controlResolver) Documents(ctx context.Context, obj *types.Control, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.DocumentOrderBy, filter *types.DocumentFilter) (*types.DocumentConnection, error) {
scope, err := r.authorize(ctx, obj.ID, probo.ActionDocumentList)
if err != nil {
return nil, err
}
pageOrderBy := page.OrderBy[coredata.DocumentOrderField]{
Field: coredata.DocumentOrderFieldCreatedAt,
Direction: page.OrderDirectionDesc,
}
if orderBy != nil {
pageOrderBy = page.OrderBy[coredata.DocumentOrderField]{
Field: orderBy.Field,
Direction: orderBy.Direction,
}
}
cursor := types.NewCursor(first, after, last, before, pageOrderBy)
var documentFilter = coredata.NewDocumentFilter(nil)
if filter != nil {
documentFilter = coredata.NewDocumentFilter(filter.Query).
WithWriteModes(filter.WriteModes).
WithDocumentTypes(filter.DocumentTypes).
WithClassifications(filter.Classifications)
}
page, err := r.probo.Documents.ListForControlID(ctx, scope, obj.ID, cursor, documentFilter)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot list documents", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return types.NewDocumentConnection(page, r, obj.ID, documentFilter), nil
}
// Audits is the resolver for the audits field.
func (r *controlResolver) Audits(ctx context.Context, obj *types.Control, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.AuditOrderBy) (*types.AuditConnection, error) {
scope, err := r.authorize(ctx, obj.ID, probo.ActionAuditList)
if err != nil {
return nil, err
}
pageOrderBy := page.OrderBy[coredata.AuditOrderField]{
Field: coredata.AuditOrderFieldCreatedAt,
Direction: page.OrderDirectionDesc,
}
if orderBy != nil {
pageOrderBy = page.OrderBy[coredata.AuditOrderField]{
Field: orderBy.Field,
Direction: orderBy.Direction,
}
}
cursor := types.NewCursor(first, after, last, before, pageOrderBy)
page, err := r.probo.Audits.ListForControlID(ctx, scope, obj.ID, cursor)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot list control audits", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return types.NewAuditConnection(page, r, obj.ID), nil
}
// Obligations is the resolver for the obligations field.
func (r *controlResolver) Obligations(ctx context.Context, obj *types.Control, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.ObligationOrderBy) (*types.ObligationConnection, error) {
scope, err := r.authorize(ctx, obj.ID, probo.ActionObligationList)
if err != nil {
return nil, err
}
pageOrderBy := page.OrderBy[coredata.ObligationOrderField]{
Field: coredata.ObligationOrderFieldCreatedAt,
Direction: page.OrderDirectionDesc,
}
if orderBy != nil {
pageOrderBy = page.OrderBy[coredata.ObligationOrderField]{
Field: orderBy.Field,
Direction: orderBy.Direction,
}
}
cursor := types.NewCursor(first, after, last, before, pageOrderBy)
page, err := r.probo.Obligations.ListForControlID(ctx, scope, obj.ID, cursor)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot list control obligations", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return types.NewObligationConnection(page, r, obj.ID), nil
}
// Permission is the resolver for the permission field.
func (r *controlResolver) Permission(ctx context.Context, obj *types.Control, action string) (bool, error) {
return r.Resolver.Permission(ctx, obj, action)
}
// TotalCount is the resolver for the totalCount field.
func (r *controlConnectionResolver) TotalCount(ctx context.Context, obj *types.ControlConnection) (int, error) {
scope, err := r.authorize(ctx, obj.ParentID, probo.ActionControlList)
if err != nil {
return 0, err
}
switch obj.Resolver.(type) {
case *organizationResolver:
count, err := r.probo.Controls.CountForOrganizationID(ctx, scope, obj.ParentID, obj.Filters)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot count controls", log.Error(err))
return 0, gqlutils.Internal(ctx)
}
return count, nil
case *frameworkResolver:
count, err := r.probo.Controls.CountForFrameworkID(ctx, scope, obj.ParentID, obj.Filters)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot count controls", log.Error(err))
return 0, gqlutils.Internal(ctx)
}
return count, nil
case *documentResolver:
count, err := r.probo.Controls.CountForDocumentID(ctx, scope, obj.ParentID, obj.Filters)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot count controls", log.Error(err))
return 0, gqlutils.Internal(ctx)
}
return count, nil
case *measureResolver:
count, err := r.probo.Controls.CountForMeasureID(ctx, scope, obj.ParentID, obj.Filters)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot count controls", log.Error(err))
return 0, gqlutils.Internal(ctx)
}
return count, nil
case *riskResolver:
count, err := r.probo.Controls.CountForRiskID(ctx, scope, obj.ParentID, obj.Filters)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot count controls", log.Error(err))
return 0, gqlutils.Internal(ctx)
}
return count, nil
case *statementOfApplicabilityResolver:
count, err := r.probo.Controls.CountForStatementOfApplicabilityID(ctx, scope, obj.ParentID, obj.Filters)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot count controls", log.Error(err))
return 0, gqlutils.Internal(ctx)
}
return count, nil
}
r.logger.ErrorCtx(ctx, "unsupported resolver")
return 0, gqlutils.Internal(ctx)
}
// CreateControl is the resolver for the createControl field.
func (r *mutationResolver) CreateControl(ctx context.Context, input types.CreateControlInput) (*types.CreateControlPayload, error) {
scope, err := r.authorize(ctx, input.FrameworkID, probo.ActionControlCreate)
if err != nil {
return nil, err
}
control, err := r.probo.Controls.Create(
ctx, scope,
probo.CreateControlRequest{
FrameworkID: input.FrameworkID,
Name: input.Name,
Description: input.Description,
SectionTitle: input.SectionTitle,
BestPractice: input.BestPractice,
MaturityLevel: input.MaturityLevel,
NotImplementedJustification: input.NotImplementedJustification,
},
)
if err != nil {
if errors.Is(err, coredata.ErrResourceAlreadyExists) {
return nil, gqlutils.Conflict(ctx, err)
}
if validationErrors, ok := errors.AsType[validator.ValidationErrors](err); ok {
return nil, gqlutils.InvalidValidationErrors(ctx, validationErrors)
}
r.logger.ErrorCtx(ctx, "cannot create control", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return &types.CreateControlPayload{
ControlEdge: types.NewControlEdge(control, coredata.ControlOrderFieldCreatedAt),
}, nil
}
// UpdateControl is the resolver for the updateControl field.
func (r *mutationResolver) UpdateControl(ctx context.Context, input types.UpdateControlInput) (*types.UpdateControlPayload, error) {
scope, err := r.authorize(ctx, input.ID, probo.ActionControlUpdate)
if err != nil {
return nil, err
}
control, err := r.probo.Controls.Update(
ctx, scope,
probo.UpdateControlRequest{
ID: input.ID,
Name: input.Name,
Description: gqlutils.UnwrapOmittable(input.Description),
SectionTitle: input.SectionTitle,
BestPractice: input.BestPractice,
MaturityLevel: input.MaturityLevel,
NotImplementedJustification: gqlutils.UnwrapOmittable(input.NotImplementedJustification),
},
)
if err != nil {
if errors.Is(err, coredata.ErrResourceAlreadyExists) {
return nil, gqlutils.Conflict(ctx, err)
}
if validationErrors, ok := errors.AsType[validator.ValidationErrors](err); ok {
return nil, gqlutils.InvalidValidationErrors(ctx, validationErrors)
}
r.logger.ErrorCtx(ctx, "cannot update control", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return &types.UpdateControlPayload{
Control: types.NewControl(control),
}, nil
}
// DeleteControl is the resolver for the deleteControl field.
func (r *mutationResolver) DeleteControl(ctx context.Context, input types.DeleteControlInput) (*types.DeleteControlPayload, error) {
scope, err := r.authorize(ctx, input.ControlID, probo.ActionControlDelete)
if err != nil {
return nil, err
}
if err := r.probo.Controls.Delete(ctx, scope, input.ControlID); err != nil {
r.logger.ErrorCtx(ctx, "cannot delete control", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return &types.DeleteControlPayload{
DeletedControlID: input.ControlID,
}, nil
}
// CreateControlMeasureMapping is the resolver for the createControlMeasureMapping field.
func (r *mutationResolver) CreateControlMeasureMapping(ctx context.Context, input types.CreateControlMeasureMappingInput) (*types.CreateControlMeasureMappingPayload, error) {
scope, err := r.authorize(ctx, input.ControlID, probo.ActionControlMeasureMappingCreate)
if err != nil {
return nil, err
}
control, measure, err := r.probo.Controls.CreateMeasureMapping(ctx, scope, input.ControlID, input.MeasureID)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot create control measure mapping", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return &types.CreateControlMeasureMappingPayload{
ControlEdge: types.NewControlEdge(control, coredata.ControlOrderFieldCreatedAt),
MeasureEdge: types.NewMeasureEdge(measure, coredata.MeasureOrderFieldCreatedAt),
}, nil
}
// CreateControlDocumentMapping is the resolver for the createControlDocumentMapping field.
func (r *mutationResolver) CreateControlDocumentMapping(ctx context.Context, input types.CreateControlDocumentMappingInput) (*types.CreateControlDocumentMappingPayload, error) {
scope, err := r.authorize(ctx, input.ControlID, probo.ActionControlDocumentMappingCreate)
if err != nil {
return nil, err
}
control, document, err := r.probo.Controls.CreateDocumentMapping(ctx, scope, input.ControlID, input.DocumentID)
if err != nil {
if errors.Is(err, coredata.ErrResourceAlreadyExists) {
return nil, gqlutils.Conflict(ctx, err)
}
r.logger.ErrorCtx(ctx, "cannot create control document mapping", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return &types.CreateControlDocumentMappingPayload{
ControlEdge: types.NewControlEdge(control, coredata.ControlOrderFieldCreatedAt),
DocumentEdge: types.NewDocumentEdge(document, coredata.DocumentOrderFieldTitle),
}, nil
}
// DeleteControlMeasureMapping is the resolver for the deleteControlMeasureMapping field.
func (r *mutationResolver) DeleteControlMeasureMapping(ctx context.Context, input types.DeleteControlMeasureMappingInput) (*types.DeleteControlMeasureMappingPayload, error) {
scope, err := r.authorize(ctx, input.ControlID, probo.ActionControlMeasureMappingDelete)
if err != nil {
return nil, err
}
control, measure, err := r.probo.Controls.DeleteMeasureMapping(ctx, scope, input.ControlID, input.MeasureID)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot delete control measure mapping", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return &types.DeleteControlMeasureMappingPayload{
DeletedControlID: control.ID,
DeletedMeasureID: measure.ID,
}, nil
}
// DeleteControlDocumentMapping is the resolver for the deleteControlDocumentMapping field.
func (r *mutationResolver) DeleteControlDocumentMapping(ctx context.Context, input types.DeleteControlDocumentMappingInput) (*types.DeleteControlDocumentMappingPayload, error) {
scope, err := r.authorize(ctx, input.ControlID, probo.ActionControlDocumentMappingDelete)
if err != nil {
return nil, err
}
control, document, err := r.probo.Controls.DeleteDocumentMapping(ctx, scope, input.ControlID, input.DocumentID)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot delete control document mapping", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return &types.DeleteControlDocumentMappingPayload{
DeletedControlID: control.ID,
DeletedDocumentID: document.ID,
}, nil
}
// CreateApplicabilityStatement is the resolver for the createApplicabilityStatement field.
func (r *mutationResolver) CreateApplicabilityStatement(ctx context.Context, input types.CreateApplicabilityStatementInput) (*types.CreateApplicabilityStatementPayload, error) {
scope, err := r.authorize(ctx, input.ControlID, probo.ActionApplicabilityStatementCreate)
if err != nil {
return nil, err
}
applicabilityStatement, err := r.probo.StatementsOfApplicability.CreateApplicabilityStatement(ctx, scope, input.StatementOfApplicabilityID, input.ControlID, input.Applicability, input.Justification)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot create applicability statement", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return &types.CreateApplicabilityStatementPayload{
ApplicabilityStatementEdge: types.NewApplicabilityStatementEdge(applicabilityStatement, coredata.ApplicabilityStatementOrderFieldCreatedAt),
}, nil
}
// UpdateApplicabilityStatement is the resolver for the updateApplicabilityStatement field.
func (r *mutationResolver) UpdateApplicabilityStatement(ctx context.Context, input types.UpdateApplicabilityStatementInput) (*types.UpdateApplicabilityStatementPayload, error) {
scope, err := r.authorize(ctx, input.ApplicabilityStatementID, probo.ActionApplicabilityStatementUpdate)
if err != nil {
return nil, err
}
applicabilityStatement, err := r.probo.StatementsOfApplicability.UpdateApplicabilityStatement(ctx, scope, input.ApplicabilityStatementID, input.Applicability, input.Justification)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot update applicability statement", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return &types.UpdateApplicabilityStatementPayload{
ApplicabilityStatement: types.NewApplicabilityStatement(applicabilityStatement),
}, nil
}
// DeleteApplicabilityStatement is the resolver for the deleteApplicabilityStatement field.
func (r *mutationResolver) DeleteApplicabilityStatement(ctx context.Context, input types.DeleteApplicabilityStatementInput) (*types.DeleteApplicabilityStatementPayload, error) {
scope, err := r.authorize(ctx, input.ApplicabilityStatementID, probo.ActionApplicabilityStatementDelete)
if err != nil {
return nil, err
}
if err := r.probo.StatementsOfApplicability.DeleteApplicabilityStatement(ctx, scope, input.ApplicabilityStatementID); err != nil {
r.logger.ErrorCtx(ctx, "cannot delete applicability statement", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return &types.DeleteApplicabilityStatementPayload{
DeletedApplicabilityStatementID: input.ApplicabilityStatementID,
}, nil
}
// CreateControlAuditMapping is the resolver for the createControlAuditMapping field.
func (r *mutationResolver) CreateControlAuditMapping(ctx context.Context, input types.CreateControlAuditMappingInput) (*types.CreateControlAuditMappingPayload, error) {
scope, err := r.authorize(ctx, input.ControlID, probo.ActionControlAuditMappingCreate)
if err != nil {
return nil, err
}
control, audit, err := r.probo.Controls.CreateAuditMapping(ctx, scope, input.ControlID, input.AuditID)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot create control audit mapping", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return &types.CreateControlAuditMappingPayload{
ControlEdge: types.NewControlEdge(control, coredata.ControlOrderFieldCreatedAt),
AuditEdge: types.NewAuditEdge(audit, coredata.AuditOrderFieldCreatedAt),
}, nil
}
// DeleteControlAuditMapping is the resolver for the deleteControlAuditMapping field.
func (r *mutationResolver) DeleteControlAuditMapping(ctx context.Context, input types.DeleteControlAuditMappingInput) (*types.DeleteControlAuditMappingPayload, error) {
scope, err := r.authorize(ctx, input.ControlID, probo.ActionControlAuditMappingDelete)
if err != nil {
return nil, err
}
control, audit, err := r.probo.Controls.DeleteAuditMapping(ctx, scope, input.ControlID, input.AuditID)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot delete control audit mapping", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return &types.DeleteControlAuditMappingPayload{
DeletedControlID: &control.ID,
DeletedAuditID: &audit.ID,
}, nil
}
// CreateControlObligationMapping is the resolver for the createControlObligationMapping field.
func (r *mutationResolver) CreateControlObligationMapping(ctx context.Context, input types.CreateControlObligationMappingInput) (*types.CreateControlObligationMappingPayload, error) {
scope, err := r.authorize(ctx, input.ControlID, probo.ActionControlObligationMappingCreate)
if err != nil {
return nil, err
}
control, obligation, err := r.probo.Controls.CreateObligationMapping(ctx, scope, input.ControlID, input.ObligationID)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot create control obligation mapping", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return &types.CreateControlObligationMappingPayload{
ControlEdge: types.NewControlEdge(control, coredata.ControlOrderFieldCreatedAt),
ObligationEdge: types.NewObligationEdge(obligation, coredata.ObligationOrderFieldCreatedAt),
}, nil
}
// DeleteControlObligationMapping is the resolver for the deleteControlObligationMapping field.
func (r *mutationResolver) DeleteControlObligationMapping(ctx context.Context, input types.DeleteControlObligationMappingInput) (*types.DeleteControlObligationMappingPayload, error) {
scope, err := r.authorize(ctx, input.ControlID, probo.ActionControlObligationMappingDelete)
if err != nil {
return nil, err
}
control, obligation, err := r.probo.Controls.DeleteObligationMapping(ctx, scope, input.ControlID, input.ObligationID)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot delete control obligation mapping", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return &types.DeleteControlObligationMappingPayload{
DeletedControlID: control.ID,
DeletedObligationID: obligation.ID,
}, nil
}
// CreateStatementOfApplicability is the resolver for the createStatementOfApplicability field.
func (r *mutationResolver) CreateStatementOfApplicability(ctx context.Context, input types.CreateStatementOfApplicabilityInput) (*types.CreateStatementOfApplicabilityPayload, error) {
scope, err := r.authorize(ctx, input.OrganizationID, probo.ActionStatementOfApplicabilityCreate)
if err != nil {
return nil, err
}
statementOfApplicability, err := r.probo.StatementsOfApplicability.Create(
ctx, scope,
probo.CreateStatementOfApplicabilityRequest{
OrganizationID: input.OrganizationID,
Name: input.Name,
},
)
if err != nil {
if errors.Is(err, coredata.ErrResourceAlreadyExists) {
return nil, gqlutils.Conflict(ctx, err)
}
if validationErrors, ok := errors.AsType[validator.ValidationErrors](err); ok {
return nil, gqlutils.InvalidValidationErrors(ctx, validationErrors)
}
r.logger.ErrorCtx(ctx, "cannot create statement_of_applicability", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return &types.CreateStatementOfApplicabilityPayload{
StatementOfApplicabilityEdge: types.NewStatementOfApplicabilityEdge(statementOfApplicability, coredata.StatementOfApplicabilityOrderFieldCreatedAt),
}, nil
}
// UpdateStatementOfApplicability is the resolver for the updateStatementOfApplicability field.
func (r *mutationResolver) UpdateStatementOfApplicability(ctx context.Context, input types.UpdateStatementOfApplicabilityInput) (*types.UpdateStatementOfApplicabilityPayload, error) {
scope, err := r.authorize(ctx, input.ID, probo.ActionStatementOfApplicabilityUpdate)
if err != nil {
return nil, err
}
var name *string
if input.Name != nil {
name = input.Name
}
statementOfApplicability, err := r.probo.StatementsOfApplicability.Update(
ctx, scope,
probo.UpdateStatementOfApplicabilityRequest{
StatementOfApplicabilityID: input.ID,
Name: name,
},
)
if err != nil {
if errors.Is(err, coredata.ErrResourceAlreadyExists) {
return nil, gqlutils.Conflict(ctx, err)
}
if validationErrors, ok := errors.AsType[validator.ValidationErrors](err); ok {
return nil, gqlutils.InvalidValidationErrors(ctx, validationErrors)
}
r.logger.ErrorCtx(ctx, "cannot update statement_of_applicability", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return &types.UpdateStatementOfApplicabilityPayload{
StatementOfApplicability: types.NewStatementOfApplicability(statementOfApplicability),
}, nil
}
// DeleteStatementOfApplicability is the resolver for the deleteStatementOfApplicability field.
func (r *mutationResolver) DeleteStatementOfApplicability(ctx context.Context, input types.DeleteStatementOfApplicabilityInput) (*types.DeleteStatementOfApplicabilityPayload, error) {
scope, err := r.authorize(ctx, input.StatementOfApplicabilityID, probo.ActionStatementOfApplicabilityDelete)
if err != nil {
return nil, err
}
if err := r.probo.StatementsOfApplicability.Delete(ctx, scope, input.StatementOfApplicabilityID); err != nil {
r.logger.ErrorCtx(ctx, "cannot delete statement_of_applicability", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return &types.DeleteStatementOfApplicabilityPayload{
DeletedStatementOfApplicabilityID: input.StatementOfApplicabilityID,
}, nil
}
// PublishStatementOfApplicability is the resolver for the publishStatementOfApplicability field.
func (r *mutationResolver) PublishStatementOfApplicability(ctx context.Context, input types.PublishStatementOfApplicabilityInput) (*types.PublishStatementOfApplicabilityPayload, error) {
scope, err := r.authorize(ctx, input.StatementOfApplicabilityID, probo.ActionStatementOfApplicabilityPublish)
if err != nil {
return nil, err
}
document, documentVersion, err := r.probo.GeneratedDocuments.PublishStatementOfApplicability(ctx, scope, input.StatementOfApplicabilityID, input.ApproverIds, input.Minor)
if err != nil {
if errors.Is(err, coredata.ErrResourceAlreadyExists) {
return nil, gqlutils.Conflict(ctx, err)
}
r.logger.ErrorCtx(ctx, "cannot publish statement of applicability", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return &types.PublishStatementOfApplicabilityPayload{
DocumentEdge: types.NewDocumentEdge(document, coredata.DocumentOrderFieldCreatedAt),
DocumentVersionEdge: types.NewDocumentVersionEdge(documentVersion, coredata.DocumentVersionOrderFieldCreatedAt),
}, nil
}
// Document is the resolver for the document field.
func (r *statementOfApplicabilityResolver) Document(ctx context.Context, obj *types.StatementOfApplicability) (*types.Document, error) {
if obj.Document == nil {
return nil, nil
}
scope, err := r.authorize(ctx, obj.Document.ID, probo.ActionDocumentGet)
if err != nil {
return nil, err
}
document, err := r.probo.Documents.Get(ctx, scope, obj.Document.ID)
if err != nil {
if errors.Is(err, coredata.ErrResourceNotFound) {
return nil, nil
}
r.logger.ErrorCtx(ctx, "cannot load document", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return types.NewDocument(document), nil
}
// Organization is the resolver for the organization field.
func (r *statementOfApplicabilityResolver) Organization(ctx context.Context, obj *types.StatementOfApplicability) (*types.Organization, error) {
if _, err := r.authorize(ctx, obj.ID, probo.ActionOrganizationGet); err != nil {
return nil, err
}
loaders := dataloader.FromContext(ctx)
organization, err := loaders.Organization.Load(ctx, obj.Organization.ID)
if err != nil {
if errors.Is(err, coredata.ErrResourceNotFound) || errors.Is(err, dataloadgen.ErrNotFound) {
return nil, gqlutils.NotFound(ctx, err)
}
r.logger.ErrorCtx(ctx, "cannot load organization", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return types.NewOrganization(organization), nil
}
// ApplicabilityStatements is the resolver for the applicabilityStatements field.
func (r *statementOfApplicabilityResolver) ApplicabilityStatements(ctx context.Context, obj *types.StatementOfApplicability, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.ApplicabilityStatementOrderBy) (*types.ApplicabilityStatementConnection, error) {
scope, err := r.authorize(ctx, obj.ID, probo.ActionApplicabilityStatementList)
if err != nil {
return nil, err
}
pageOrderBy := page.OrderBy[coredata.ApplicabilityStatementOrderField]{
Field: coredata.ApplicabilityStatementOrderFieldCreatedAt,
Direction: page.OrderDirectionAsc,
}
if orderBy != nil {
pageOrderBy = page.OrderBy[coredata.ApplicabilityStatementOrderField]{
Field: coredata.ApplicabilityStatementOrderField(orderBy.Field),
Direction: orderBy.Direction,
}
}
cursor := types.NewCursor(first, after, last, before, pageOrderBy)
p, err := r.probo.StatementsOfApplicability.ListApplicabilityStatements(ctx, scope, obj.ID, cursor)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot list applicability statements", log.Error(err))
return nil, gqlutils.Internal(ctx)
}
return types.NewApplicabilityStatementConnection(p, r, obj.ID), nil
}
// Permission is the resolver for the permission field.
func (r *statementOfApplicabilityResolver) Permission(ctx context.Context, obj *types.StatementOfApplicability, action string) (bool, error) {
return r.Resolver.Permission(ctx, obj, action)
}
// TotalCount is the resolver for the totalCount field.
func (r *statementOfApplicabilityConnectionResolver) TotalCount(ctx context.Context, obj *types.StatementOfApplicabilityConnection) (int, error) {
scope, err := r.authorize(ctx, obj.ParentID, probo.ActionStatementOfApplicabilityList)
if err != nil {
return 0, err
}
switch obj.Resolver.(type) {
case *organizationResolver:
count, err := r.probo.StatementsOfApplicability.CountForOrganizationID(ctx, scope, obj.ParentID)
if err != nil {
r.logger.ErrorCtx(ctx, "cannot count statements_of_applicability", log.Error(err))
return 0, gqlutils.Internal(ctx)
}
return count, nil
}
r.logger.ErrorCtx(ctx, "unsupported resolver")
return 0, gqlutils.Internal(ctx)
}
// ApplicabilityStatement returns schema.ApplicabilityStatementResolver implementation.
func (r *Resolver) ApplicabilityStatement() schema.ApplicabilityStatementResolver {
return &applicabilityStatementResolver{r}
}
// ApplicabilityStatementConnection returns schema.ApplicabilityStatementConnectionResolver implementation.
func (r *Resolver) ApplicabilityStatementConnection() schema.ApplicabilityStatementConnectionResolver {
return &applicabilityStatementConnectionResolver{r}
}
// Control returns schema.ControlResolver implementation.
func (r *Resolver) Control() schema.ControlResolver { return &controlResolver{r} }
// ControlConnection returns schema.ControlConnectionResolver implementation.
func (r *Resolver) ControlConnection() schema.ControlConnectionResolver {
return &controlConnectionResolver{r}
}
// StatementOfApplicability returns schema.StatementOfApplicabilityResolver implementation.
func (r *Resolver) StatementOfApplicability() schema.StatementOfApplicabilityResolver {
return &statementOfApplicabilityResolver{r}
}
// StatementOfApplicabilityConnection returns schema.StatementOfApplicabilityConnectionResolver implementation.
func (r *Resolver) StatementOfApplicabilityConnection() schema.StatementOfApplicabilityConnectionResolver {
return &statementOfApplicabilityConnectionResolver{r}
}
type (
applicabilityStatementResolver struct{ *Resolver }
applicabilityStatementConnectionResolver struct{ *Resolver }
controlResolver struct{ *Resolver }
controlConnectionResolver struct{ *Resolver }
statementOfApplicabilityResolver struct{ *Resolver }
statementOfApplicabilityConnectionResolver struct{ *Resolver }
)