committed by
Sacha Al Himdani
parent
288c59a5f2
commit
f9216d30b2
@@ -28,6 +28,13 @@ const (
|
||||
AssetTypeVirtual AssetType = "VIRTUAL"
|
||||
)
|
||||
|
||||
func AssetTypes() []AssetType {
|
||||
return []AssetType{
|
||||
AssetTypePhysical,
|
||||
AssetTypeVirtual,
|
||||
}
|
||||
}
|
||||
|
||||
func (at AssetType) MarshalText() ([]byte, error) {
|
||||
return []byte(at.String()), nil
|
||||
}
|
||||
|
||||
@@ -29,6 +29,16 @@ const (
|
||||
AuditStateOutdated AuditState = "OUTDATED"
|
||||
)
|
||||
|
||||
func AuditStates() []AuditState {
|
||||
return []AuditState{
|
||||
AuditStateNotStarted,
|
||||
AuditStateInProgress,
|
||||
AuditStateCompleted,
|
||||
AuditStateRejected,
|
||||
AuditStateOutdated,
|
||||
}
|
||||
}
|
||||
|
||||
func (as AuditState) String() string {
|
||||
return string(as)
|
||||
}
|
||||
|
||||
@@ -29,6 +29,15 @@ const (
|
||||
BusinessImpactCritical BusinessImpact = "CRITICAL"
|
||||
)
|
||||
|
||||
func BusinessImpacts() []BusinessImpact {
|
||||
return []BusinessImpact{
|
||||
BusinessImpactLow,
|
||||
BusinessImpactMedium,
|
||||
BusinessImpactHigh,
|
||||
BusinessImpactCritical,
|
||||
}
|
||||
}
|
||||
|
||||
func (i BusinessImpact) String() string {
|
||||
return string(i)
|
||||
}
|
||||
|
||||
@@ -25,6 +25,12 @@ const (
|
||||
ConnectorProtocolOAuth2 ConnectorProtocol = "OAUTH2"
|
||||
)
|
||||
|
||||
func ConnectorProtocols() []ConnectorProtocol {
|
||||
return []ConnectorProtocol{
|
||||
ConnectorProtocolOAuth2,
|
||||
}
|
||||
}
|
||||
|
||||
func (cp ConnectorProtocol) String() string {
|
||||
return string(cp)
|
||||
}
|
||||
|
||||
@@ -25,6 +25,12 @@ const (
|
||||
ConnectorProviderSlack ConnectorProvider = "SLACK"
|
||||
)
|
||||
|
||||
func ConnectorProviders() []ConnectorProvider {
|
||||
return []ConnectorProvider{
|
||||
ConnectorProviderSlack,
|
||||
}
|
||||
}
|
||||
|
||||
func (cp ConnectorProvider) String() string {
|
||||
return string(cp)
|
||||
}
|
||||
|
||||
@@ -27,6 +27,14 @@ const (
|
||||
ContinualImprovementPriorityHigh ContinualImprovementPriority = "HIGH"
|
||||
)
|
||||
|
||||
func ContinualImprovementPriorities() []ContinualImprovementPriority {
|
||||
return []ContinualImprovementPriority{
|
||||
ContinualImprovementPriorityLow,
|
||||
ContinualImprovementPriorityMedium,
|
||||
ContinualImprovementPriorityHigh,
|
||||
}
|
||||
}
|
||||
|
||||
func (cip ContinualImprovementPriority) String() string {
|
||||
return string(cip)
|
||||
}
|
||||
|
||||
@@ -27,6 +27,14 @@ const (
|
||||
ContinualImprovementStatusClosed ContinualImprovementStatus = "CLOSED"
|
||||
)
|
||||
|
||||
func ContinualImprovementStatuses() []ContinualImprovementStatus {
|
||||
return []ContinualImprovementStatus{
|
||||
ContinualImprovementStatusOpen,
|
||||
ContinualImprovementStatusInProgress,
|
||||
ContinualImprovementStatusClosed,
|
||||
}
|
||||
}
|
||||
|
||||
func (cis ContinualImprovementStatus) String() string {
|
||||
return string(cis)
|
||||
}
|
||||
|
||||
@@ -26,6 +26,13 @@ const (
|
||||
ControlStatusExcluded ControlStatus = "EXCLUDED"
|
||||
)
|
||||
|
||||
func ControlStatuses() []ControlStatus {
|
||||
return []ControlStatus{
|
||||
ControlStatusIncluded,
|
||||
ControlStatusExcluded,
|
||||
}
|
||||
}
|
||||
|
||||
func (cs ControlStatus) String() string {
|
||||
return string(cs)
|
||||
}
|
||||
|
||||
@@ -22,3 +22,12 @@ const (
|
||||
DataClassificationConfidential DataClassification = "CONFIDENTIAL"
|
||||
DataClassificationSecret DataClassification = "SECRET"
|
||||
)
|
||||
|
||||
func DataClassifications() []DataClassification {
|
||||
return []DataClassification{
|
||||
DataClassificationPublic,
|
||||
DataClassificationInternal,
|
||||
DataClassificationConfidential,
|
||||
DataClassificationSecret,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,16 @@ const (
|
||||
DataSensitivityCritical DataSensitivity = "CRITICAL"
|
||||
)
|
||||
|
||||
func DataSensitivities() []DataSensitivity {
|
||||
return []DataSensitivity{
|
||||
DataSensitivityNone,
|
||||
DataSensitivityLow,
|
||||
DataSensitivityMedium,
|
||||
DataSensitivityHigh,
|
||||
DataSensitivityCritical,
|
||||
}
|
||||
}
|
||||
|
||||
func (i DataSensitivity) String() string {
|
||||
return string(i)
|
||||
}
|
||||
|
||||
@@ -14,6 +14,15 @@ const (
|
||||
DocumentClassificationSecret DocumentClassification = "SECRET"
|
||||
)
|
||||
|
||||
func DocumentClassifications() []DocumentClassification {
|
||||
return []DocumentClassification{
|
||||
DocumentClassificationPublic,
|
||||
DocumentClassificationInternal,
|
||||
DocumentClassificationConfidential,
|
||||
DocumentClassificationSecret,
|
||||
}
|
||||
}
|
||||
|
||||
func (dc DocumentClassification) String() string {
|
||||
switch dc {
|
||||
case DocumentClassificationPublic:
|
||||
|
||||
@@ -30,6 +30,15 @@ const (
|
||||
DocumentTypeProcedure DocumentType = "PROCEDURE"
|
||||
)
|
||||
|
||||
func DocumentTypes() []DocumentType {
|
||||
return []DocumentType{
|
||||
DocumentTypeOther,
|
||||
DocumentTypeISMS,
|
||||
DocumentTypePolicy,
|
||||
DocumentTypeProcedure,
|
||||
}
|
||||
}
|
||||
|
||||
func (dt DocumentType) MarshalText() ([]byte, error) {
|
||||
return []byte(dt.String()), nil
|
||||
}
|
||||
|
||||
@@ -21,49 +21,49 @@ var (
|
||||
)
|
||||
|
||||
const (
|
||||
OrganizationEntityType uint16 = iota
|
||||
FrameworkEntityType
|
||||
MeasureEntityType
|
||||
TaskEntityType
|
||||
EvidenceEntityType
|
||||
ConnectorEntityType
|
||||
VendorRiskAssessmentEntityType
|
||||
VendorEntityType
|
||||
PeopleEntityType
|
||||
VendorComplianceReportEntityType
|
||||
DocumentEntityType
|
||||
UserEntityType
|
||||
SessionEntityType
|
||||
EmailEntityType
|
||||
ControlEntityType
|
||||
RiskEntityType
|
||||
DocumentVersionEntityType
|
||||
DocumentVersionSignatureEntityType
|
||||
AssetEntityType
|
||||
DatumEntityType
|
||||
AuditEntityType
|
||||
ReportEntityType
|
||||
TrustCenterEntityType
|
||||
TrustCenterAccessEntityType
|
||||
VendorBusinessAssociateAgreementEntityType
|
||||
FileEntityType
|
||||
VendorContactEntityType
|
||||
VendorDataPrivacyAgreementEntityType
|
||||
NonconformityEntityType
|
||||
ObligationEntityType
|
||||
VendorServiceEntityType
|
||||
SnapshotEntityType
|
||||
ContinualImprovementEntityType
|
||||
ProcessingActivityEntityType
|
||||
ExportJobEntityType
|
||||
TrustCenterReferenceEntityType
|
||||
TrustCenterDocumentAccessEntityType
|
||||
CustomDomainEntityType
|
||||
InvitationEntityType
|
||||
MembershipEntityType
|
||||
SlackMessageEntityType
|
||||
TrustCenterFileEntityType
|
||||
SAMLConfigurationEntityType
|
||||
UserAPIKeyEntityType
|
||||
UserAPIKeyMembershipEntityType
|
||||
OrganizationEntityType uint16 = 0
|
||||
FrameworkEntityType uint16 = 1
|
||||
MeasureEntityType uint16 = 2
|
||||
TaskEntityType uint16 = 3
|
||||
EvidenceEntityType uint16 = 4
|
||||
ConnectorEntityType uint16 = 5
|
||||
VendorRiskAssessmentEntityType uint16 = 6
|
||||
VendorEntityType uint16 = 7
|
||||
PeopleEntityType uint16 = 8
|
||||
VendorComplianceReportEntityType uint16 = 9
|
||||
DocumentEntityType uint16 = 10
|
||||
UserEntityType uint16 = 11
|
||||
SessionEntityType uint16 = 12
|
||||
EmailEntityType uint16 = 13
|
||||
ControlEntityType uint16 = 14
|
||||
RiskEntityType uint16 = 15
|
||||
DocumentVersionEntityType uint16 = 16
|
||||
DocumentVersionSignatureEntityType uint16 = 17
|
||||
AssetEntityType uint16 = 18
|
||||
DatumEntityType uint16 = 19
|
||||
AuditEntityType uint16 = 20
|
||||
ReportEntityType uint16 = 21
|
||||
TrustCenterEntityType uint16 = 22
|
||||
TrustCenterAccessEntityType uint16 = 23
|
||||
VendorBusinessAssociateAgreementEntityType uint16 = 24
|
||||
FileEntityType uint16 = 25
|
||||
VendorContactEntityType uint16 = 26
|
||||
VendorDataPrivacyAgreementEntityType uint16 = 27
|
||||
NonconformityEntityType uint16 = 28
|
||||
ObligationEntityType uint16 = 29
|
||||
VendorServiceEntityType uint16 = 30
|
||||
SnapshotEntityType uint16 = 31
|
||||
ContinualImprovementEntityType uint16 = 32
|
||||
ProcessingActivityEntityType uint16 = 33
|
||||
ExportJobEntityType uint16 = 34
|
||||
TrustCenterReferenceEntityType uint16 = 35
|
||||
TrustCenterDocumentAccessEntityType uint16 = 36
|
||||
CustomDomainEntityType uint16 = 37
|
||||
InvitationEntityType uint16 = 38
|
||||
MembershipEntityType uint16 = 39
|
||||
SlackMessageEntityType uint16 = 40
|
||||
TrustCenterFileEntityType uint16 = 41
|
||||
SAMLConfigurationEntityType uint16 = 42
|
||||
UserAPIKeyEntityType uint16 = 43
|
||||
UserAPIKeyMembershipEntityType uint16 = 44
|
||||
)
|
||||
|
||||
@@ -30,6 +30,15 @@ const (
|
||||
MeasureStateImplemented
|
||||
)
|
||||
|
||||
func MeasureStates() []MeasureState {
|
||||
return []MeasureState{
|
||||
MeasureStateNotStarted,
|
||||
MeasureStateInProgress,
|
||||
MeasureStateNotApplicable,
|
||||
MeasureStateImplemented,
|
||||
}
|
||||
}
|
||||
|
||||
func (ms MeasureState) MarshalText() ([]byte, error) {
|
||||
return []byte(ms.String()), nil
|
||||
}
|
||||
|
||||
@@ -27,6 +27,14 @@ const (
|
||||
NonconformityStatusClosed NonconformityStatus = "CLOSED"
|
||||
)
|
||||
|
||||
func NonconformityStatuses() []NonconformityStatus {
|
||||
return []NonconformityStatus{
|
||||
NonconformityStatusOpen,
|
||||
NonconformityStatusInProgress,
|
||||
NonconformityStatusClosed,
|
||||
}
|
||||
}
|
||||
|
||||
func (ncs NonconformityStatus) String() string {
|
||||
return string(ncs)
|
||||
}
|
||||
|
||||
@@ -27,6 +27,14 @@ const (
|
||||
ObligationStatusCompliant ObligationStatus = "COMPLIANT"
|
||||
)
|
||||
|
||||
func ObligationStatuses() []ObligationStatus {
|
||||
return []ObligationStatus{
|
||||
ObligationStatusNonCompliant,
|
||||
ObligationStatusPartiallyCompliant,
|
||||
ObligationStatusCompliant,
|
||||
}
|
||||
}
|
||||
|
||||
func (os ObligationStatus) String() string {
|
||||
return string(os)
|
||||
}
|
||||
|
||||
@@ -29,6 +29,14 @@ const (
|
||||
PeopleKindServiceAccount
|
||||
)
|
||||
|
||||
func PeopleKinds() []PeopleKind {
|
||||
return []PeopleKind{
|
||||
PeopleKindEmployee,
|
||||
PeopleKindContractor,
|
||||
PeopleKindServiceAccount,
|
||||
}
|
||||
}
|
||||
|
||||
func (ps PeopleKind) MarshalText() ([]byte, error) {
|
||||
return []byte(ps.String()), nil
|
||||
}
|
||||
|
||||
@@ -20,10 +20,10 @@ import (
|
||||
"maps"
|
||||
"time"
|
||||
|
||||
"go.probo.inc/probo/pkg/gid"
|
||||
"go.probo.inc/probo/pkg/page"
|
||||
"github.com/jackc/pgx/v5"
|
||||
"go.gearno.de/kit/pg"
|
||||
"go.probo.inc/probo/pkg/gid"
|
||||
"go.probo.inc/probo/pkg/page"
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -36,13 +36,13 @@ type (
|
||||
Purpose *string `db:"purpose"`
|
||||
DataSubjectCategory *string `db:"data_subject_category"`
|
||||
PersonalDataCategory *string `db:"personal_data_category"`
|
||||
SpecialOrCriminalData ProcessingActivitySpecialOrCriminalData `db:"special_or_criminal_data"`
|
||||
SpecialOrCriminalData ProcessingActivitySpecialOrCriminalDatum `db:"special_or_criminal_data"`
|
||||
ConsentEvidenceLink *string `db:"consent_evidence_link"`
|
||||
LawfulBasis ProcessingActivityLawfulBasis `db:"lawful_basis"`
|
||||
Recipients *string `db:"recipients"`
|
||||
Location *string `db:"location"`
|
||||
InternationalTransfers bool `db:"international_transfers"`
|
||||
TransferSafeguards *ProcessingActivityTransferSafeguards `db:"transfer_safeguards"`
|
||||
TransferSafeguard *ProcessingActivityTransferSafeguard `db:"transfer_safeguards"`
|
||||
RetentionPeriod *string `db:"retention_period"`
|
||||
SecurityMeasures *string `db:"security_measures"`
|
||||
DataProtectionImpactAssessment ProcessingActivityDataProtectionImpactAssessment `db:"data_protection_impact_assessment"`
|
||||
@@ -290,7 +290,7 @@ INSERT INTO processing_activities (
|
||||
"recipients": p.Recipients,
|
||||
"location": p.Location,
|
||||
"international_transfers": p.InternationalTransfers,
|
||||
"transfer_safeguards": p.TransferSafeguards,
|
||||
"transfer_safeguards": p.TransferSafeguard,
|
||||
"retention_period": p.RetentionPeriod,
|
||||
"security_measures": p.SecurityMeasures,
|
||||
"data_protection_impact_assessment": p.DataProtectionImpactAssessment,
|
||||
@@ -351,7 +351,7 @@ WHERE
|
||||
"recipients": p.Recipients,
|
||||
"location": p.Location,
|
||||
"international_transfers": p.InternationalTransfers,
|
||||
"transfer_safeguards": p.TransferSafeguards,
|
||||
"transfer_safeguards": p.TransferSafeguard,
|
||||
"retention_period": p.RetentionPeriod,
|
||||
"security_measures": p.SecurityMeasures,
|
||||
"data_protection_impact_assessment": p.DataProtectionImpactAssessment,
|
||||
|
||||
@@ -26,6 +26,13 @@ const (
|
||||
ProcessingActivityDataProtectionImpactAssessmentNotNeeded ProcessingActivityDataProtectionImpactAssessment = "NOT_NEEDED"
|
||||
)
|
||||
|
||||
func ProcessingActivityDataProtectionImpactAssessments() []ProcessingActivityDataProtectionImpactAssessment {
|
||||
return []ProcessingActivityDataProtectionImpactAssessment{
|
||||
ProcessingActivityDataProtectionImpactAssessmentNeeded,
|
||||
ProcessingActivityDataProtectionImpactAssessmentNotNeeded,
|
||||
}
|
||||
}
|
||||
|
||||
func (p ProcessingActivityDataProtectionImpactAssessment) String() string {
|
||||
return string(p)
|
||||
}
|
||||
|
||||
@@ -30,6 +30,17 @@ const (
|
||||
ProcessingActivityLawfulBasisPublicTask ProcessingActivityLawfulBasis = "PUBLIC_TASK"
|
||||
)
|
||||
|
||||
func ProcessingActivityLawfulBases() []ProcessingActivityLawfulBasis {
|
||||
return []ProcessingActivityLawfulBasis{
|
||||
ProcessingActivityLawfulBasisLegitimateInterest,
|
||||
ProcessingActivityLawfulBasisConsent,
|
||||
ProcessingActivityLawfulBasisContractualNecessity,
|
||||
ProcessingActivityLawfulBasisLegalObligation,
|
||||
ProcessingActivityLawfulBasisVitalInterests,
|
||||
ProcessingActivityLawfulBasisPublicTask,
|
||||
}
|
||||
}
|
||||
|
||||
func (p ProcessingActivityLawfulBasis) String() string {
|
||||
return string(p)
|
||||
}
|
||||
|
||||
@@ -19,19 +19,27 @@ import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type ProcessingActivitySpecialOrCriminalData string
|
||||
type ProcessingActivitySpecialOrCriminalDatum string
|
||||
|
||||
const (
|
||||
ProcessingActivitySpecialOrCriminalDataYes ProcessingActivitySpecialOrCriminalData = "YES"
|
||||
ProcessingActivitySpecialOrCriminalDataNo ProcessingActivitySpecialOrCriminalData = "NO"
|
||||
ProcessingActivitySpecialOrCriminalDataPossible ProcessingActivitySpecialOrCriminalData = "POSSIBLE"
|
||||
ProcessingActivitySpecialOrCriminalDatumYes ProcessingActivitySpecialOrCriminalDatum = "YES"
|
||||
ProcessingActivitySpecialOrCriminalDatumNo ProcessingActivitySpecialOrCriminalDatum = "NO"
|
||||
ProcessingActivitySpecialOrCriminalDatumPossible ProcessingActivitySpecialOrCriminalDatum = "POSSIBLE"
|
||||
)
|
||||
|
||||
func (p ProcessingActivitySpecialOrCriminalData) String() string {
|
||||
func ProcessingActivitySpecialOrCriminalData() []ProcessingActivitySpecialOrCriminalDatum {
|
||||
return []ProcessingActivitySpecialOrCriminalDatum{
|
||||
ProcessingActivitySpecialOrCriminalDatumYes,
|
||||
ProcessingActivitySpecialOrCriminalDatumNo,
|
||||
ProcessingActivitySpecialOrCriminalDatumPossible,
|
||||
}
|
||||
}
|
||||
|
||||
func (p ProcessingActivitySpecialOrCriminalDatum) String() string {
|
||||
return string(p)
|
||||
}
|
||||
|
||||
func (p *ProcessingActivitySpecialOrCriminalData) Scan(value any) error {
|
||||
func (p *ProcessingActivitySpecialOrCriminalDatum) Scan(value any) error {
|
||||
var s string
|
||||
switch v := value.(type) {
|
||||
case string:
|
||||
@@ -39,22 +47,22 @@ func (p *ProcessingActivitySpecialOrCriminalData) Scan(value any) error {
|
||||
case []byte:
|
||||
s = string(v)
|
||||
default:
|
||||
return fmt.Errorf("unsupported type for ProcessingActivitySpecialOrCriminalData: %T", value)
|
||||
return fmt.Errorf("unsupported type for ProcessingActivitySpecialOrCriminalDatum: %T", value)
|
||||
}
|
||||
|
||||
switch s {
|
||||
case "YES":
|
||||
*p = ProcessingActivitySpecialOrCriminalDataYes
|
||||
*p = ProcessingActivitySpecialOrCriminalDatumYes
|
||||
case "NO":
|
||||
*p = ProcessingActivitySpecialOrCriminalDataNo
|
||||
*p = ProcessingActivitySpecialOrCriminalDatumNo
|
||||
case "POSSIBLE":
|
||||
*p = ProcessingActivitySpecialOrCriminalDataPossible
|
||||
*p = ProcessingActivitySpecialOrCriminalDatumPossible
|
||||
default:
|
||||
return fmt.Errorf("invalid ProcessingActivitySpecialOrCriminalData value: %q", s)
|
||||
return fmt.Errorf("invalid ProcessingActivitySpecialOrCriminalDatum value: %q", s)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p ProcessingActivitySpecialOrCriminalData) Value() (driver.Value, error) {
|
||||
func (p ProcessingActivitySpecialOrCriminalDatum) Value() (driver.Value, error) {
|
||||
return p.String(), nil
|
||||
}
|
||||
|
||||
@@ -26,6 +26,13 @@ const (
|
||||
ProcessingActivityTransferImpactAssessmentNotNeeded ProcessingActivityTransferImpactAssessment = "NOT_NEEDED"
|
||||
)
|
||||
|
||||
func ProcessingActivityTransferImpactAssessments() []ProcessingActivityTransferImpactAssessment {
|
||||
return []ProcessingActivityTransferImpactAssessment{
|
||||
ProcessingActivityTransferImpactAssessmentNeeded,
|
||||
ProcessingActivityTransferImpactAssessmentNotNeeded,
|
||||
}
|
||||
}
|
||||
|
||||
func (p ProcessingActivityTransferImpactAssessment) String() string {
|
||||
return string(p)
|
||||
}
|
||||
|
||||
@@ -19,22 +19,33 @@ import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type ProcessingActivityTransferSafeguards string
|
||||
type ProcessingActivityTransferSafeguard string
|
||||
|
||||
const (
|
||||
ProcessingActivityTransferSafeguardsStandardContractualClauses ProcessingActivityTransferSafeguards = "STANDARD_CONTRACTUAL_CLAUSES"
|
||||
ProcessingActivityTransferSafeguardsBindingCorporateRules ProcessingActivityTransferSafeguards = "BINDING_CORPORATE_RULES"
|
||||
ProcessingActivityTransferSafeguardsAdequacyDecision ProcessingActivityTransferSafeguards = "ADEQUACY_DECISION"
|
||||
ProcessingActivityTransferSafeguardsDerogations ProcessingActivityTransferSafeguards = "DEROGATIONS"
|
||||
ProcessingActivityTransferSafeguardsCodesOfConduct ProcessingActivityTransferSafeguards = "CODES_OF_CONDUCT"
|
||||
ProcessingActivityTransferSafeguardsCertificationMechanisms ProcessingActivityTransferSafeguards = "CERTIFICATION_MECHANISMS"
|
||||
ProcessingActivityTransferSafeguardStandardContractualClauses ProcessingActivityTransferSafeguard = "STANDARD_CONTRACTUAL_CLAUSES"
|
||||
ProcessingActivityTransferSafeguardBindingCorporateRules ProcessingActivityTransferSafeguard = "BINDING_CORPORATE_RULES"
|
||||
ProcessingActivityTransferSafeguardAdequacyDecision ProcessingActivityTransferSafeguard = "ADEQUACY_DECISION"
|
||||
ProcessingActivityTransferSafeguardDerogations ProcessingActivityTransferSafeguard = "DEROGATIONS"
|
||||
ProcessingActivityTransferSafeguardCodesOfConduct ProcessingActivityTransferSafeguard = "CODES_OF_CONDUCT"
|
||||
ProcessingActivityTransferSafeguardCertificationMechanisms ProcessingActivityTransferSafeguard = "CERTIFICATION_MECHANISMS"
|
||||
)
|
||||
|
||||
func (p ProcessingActivityTransferSafeguards) String() string {
|
||||
func ProcessingActivityTransferSafeguards() []ProcessingActivityTransferSafeguard {
|
||||
return []ProcessingActivityTransferSafeguard{
|
||||
ProcessingActivityTransferSafeguardStandardContractualClauses,
|
||||
ProcessingActivityTransferSafeguardBindingCorporateRules,
|
||||
ProcessingActivityTransferSafeguardAdequacyDecision,
|
||||
ProcessingActivityTransferSafeguardDerogations,
|
||||
ProcessingActivityTransferSafeguardCodesOfConduct,
|
||||
ProcessingActivityTransferSafeguardCertificationMechanisms,
|
||||
}
|
||||
}
|
||||
|
||||
func (p ProcessingActivityTransferSafeguard) String() string {
|
||||
return string(p)
|
||||
}
|
||||
|
||||
func (p *ProcessingActivityTransferSafeguards) Scan(value any) error {
|
||||
func (p *ProcessingActivityTransferSafeguard) Scan(value any) error {
|
||||
var s string
|
||||
switch v := value.(type) {
|
||||
case string:
|
||||
@@ -42,28 +53,28 @@ func (p *ProcessingActivityTransferSafeguards) Scan(value any) error {
|
||||
case []byte:
|
||||
s = string(v)
|
||||
default:
|
||||
return fmt.Errorf("unsupported type for ProcessingActivityTransferSafeguards: %T", value)
|
||||
return fmt.Errorf("unsupported type for ProcessingActivityTransferSafeguard: %T", value)
|
||||
}
|
||||
|
||||
switch s {
|
||||
case "STANDARD_CONTRACTUAL_CLAUSES":
|
||||
*p = ProcessingActivityTransferSafeguardsStandardContractualClauses
|
||||
*p = ProcessingActivityTransferSafeguardStandardContractualClauses
|
||||
case "BINDING_CORPORATE_RULES":
|
||||
*p = ProcessingActivityTransferSafeguardsBindingCorporateRules
|
||||
*p = ProcessingActivityTransferSafeguardBindingCorporateRules
|
||||
case "ADEQUACY_DECISION":
|
||||
*p = ProcessingActivityTransferSafeguardsAdequacyDecision
|
||||
*p = ProcessingActivityTransferSafeguardAdequacyDecision
|
||||
case "DEROGATIONS":
|
||||
*p = ProcessingActivityTransferSafeguardsDerogations
|
||||
*p = ProcessingActivityTransferSafeguardDerogations
|
||||
case "CODES_OF_CONDUCT":
|
||||
*p = ProcessingActivityTransferSafeguardsCodesOfConduct
|
||||
*p = ProcessingActivityTransferSafeguardCodesOfConduct
|
||||
case "CERTIFICATION_MECHANISMS":
|
||||
*p = ProcessingActivityTransferSafeguardsCertificationMechanisms
|
||||
*p = ProcessingActivityTransferSafeguardCertificationMechanisms
|
||||
default:
|
||||
return fmt.Errorf("invalid ProcessingActivityTransferSafeguards value: %q", s)
|
||||
return fmt.Errorf("invalid ProcessingActivityTransferSafeguard value: %q", s)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p ProcessingActivityTransferSafeguards) Value() (driver.Value, error) {
|
||||
func (p ProcessingActivityTransferSafeguard) Value() (driver.Value, error) {
|
||||
return p.String(), nil
|
||||
}
|
||||
|
||||
@@ -30,6 +30,15 @@ const (
|
||||
RiskTreatmentTransferred RiskTreatment = "TRANSFERRED"
|
||||
)
|
||||
|
||||
func RiskTreatments() []RiskTreatment {
|
||||
return []RiskTreatment{
|
||||
RiskTreatmentMitigated,
|
||||
RiskTreatmentAccepted,
|
||||
RiskTreatmentAvoided,
|
||||
RiskTreatmentTransferred,
|
||||
}
|
||||
}
|
||||
|
||||
func (rt RiskTreatment) MarshalText() ([]byte, error) {
|
||||
return []byte(rt.String()), nil
|
||||
}
|
||||
|
||||
@@ -34,6 +34,16 @@ const (
|
||||
SnapshotsTypeProcessingActivities SnapshotsType = "PROCESSING_ACTIVITIES"
|
||||
)
|
||||
|
||||
func SnapshotsTypes() []SnapshotsType {
|
||||
return []SnapshotsType{
|
||||
SnapshotsTypeRisks,
|
||||
SnapshotsTypeVendors,
|
||||
SnapshotsTypeAssets,
|
||||
SnapshotsTypeData,
|
||||
SnapshotsTypeNonconformities,
|
||||
}
|
||||
}
|
||||
|
||||
func (st SnapshotsType) String() string {
|
||||
return string(st)
|
||||
}
|
||||
|
||||
@@ -28,6 +28,13 @@ const (
|
||||
TaskStateDone
|
||||
)
|
||||
|
||||
func TaskStates() []TaskState {
|
||||
return []TaskState{
|
||||
TaskStateTodo,
|
||||
TaskStateDone,
|
||||
}
|
||||
}
|
||||
|
||||
func (ts TaskState) MarshalText() ([]byte, error) {
|
||||
return []byte(ts.String()), nil
|
||||
}
|
||||
|
||||
@@ -27,6 +27,14 @@ const (
|
||||
TrustCenterVisibilityPublic TrustCenterVisibility = "PUBLIC"
|
||||
)
|
||||
|
||||
func TrustCenterVisibilities() []TrustCenterVisibility {
|
||||
return []TrustCenterVisibility{
|
||||
TrustCenterVisibilityNone,
|
||||
TrustCenterVisibilityPrivate,
|
||||
TrustCenterVisibilityPublic,
|
||||
}
|
||||
}
|
||||
|
||||
func (tcv TrustCenterVisibility) String() string {
|
||||
return string(tcv)
|
||||
}
|
||||
|
||||
@@ -47,6 +47,33 @@ const (
|
||||
VendorCategoryVersionControl VendorCategory = "VERSION_CONTROL"
|
||||
)
|
||||
|
||||
func VendorCategories() []VendorCategory {
|
||||
return []VendorCategory{
|
||||
VendorCategoryAnalytics,
|
||||
VendorCategoryCloudMonitoring,
|
||||
VendorCategoryCloudProvider,
|
||||
VendorCategoryCollaboration,
|
||||
VendorCategoryCustomerSupport,
|
||||
VendorCategoryDataStorageAndProcessing,
|
||||
VendorCategoryDocumentManagement,
|
||||
VendorCategoryEmployeeManagement,
|
||||
VendorCategoryEngineering,
|
||||
VendorCategoryFinance,
|
||||
VendorCategoryIdentityProvider,
|
||||
VendorCategoryIT,
|
||||
VendorCategoryMarketing,
|
||||
VendorCategoryOfficeOperations,
|
||||
VendorCategoryOther,
|
||||
VendorCategoryPasswordManagement,
|
||||
VendorCategoryProductAndDesign,
|
||||
VendorCategoryProfessionalServices,
|
||||
VendorCategoryRecruiting,
|
||||
VendorCategorySales,
|
||||
VendorCategorySecurity,
|
||||
VendorCategoryVersionControl,
|
||||
}
|
||||
}
|
||||
|
||||
func (i VendorCategory) String() string {
|
||||
return string(i)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user