feat: add assessment, privacy and support flows

This commit is contained in:
TakuyaYagam1 committed 2026-10-08 08:08:25 +03:00
1 parent ee3738ee73
commit e4f24fa202
339 files changed
+56454 -1126

No files matched your search

@@ -256,6 +256,22 @@ func (ledger consentLedger) Current(ctx context.Context, subjectID uuid.UUID, pu
return consentRecordFromRow(consentRecordRow(row))
}
func (ledger consentLedger) LockCurrentForUse(
ctx context.Context,
subjectID uuid.UUID,
purpose domain.ConsentPurpose,
) (domain.ConsentRecord, error) {
const location = "consentLedger.LockCurrentForUse"
if subjectID == uuid.Nil || purpose != domain.ConsentPurposeAutoCategorization {
return domain.ConsentRecord{}, fmt.Errorf("%s - only a valid subject and C3 can authorize automated use: %w", location, domain.ErrInvalidConsent)
}
row, err := ledger.queries.LockCurrentConsentForUse(ctx, pgUUID(subjectID))
if err != nil {
return domain.ConsentRecord{}, fmt.Errorf("%s - lock current C3 record: %w", location, mapConsentNoRows(err, outbound.ErrConsentNotFound))
}
return consentRecordFromRow(consentRecordRow(row))
}
func (ledger consentLedger) LockRegistration(
ctx context.Context,
subjectID uuid.UUID,