Documentation
¶
Index ¶
- Constants
- Variables
- func ApprovalListeners(concern MutationConcern, ...) []gala.Registration
- func CatalogListeners() []gala.Registration
- func ConsoleLanding(schemaType string) string
- func ConsoleObjectPath(schemaType, objectID string) string
- func CreateNotifications(ctx context.Context, client *generated.Client, recipients []string, ...) error
- func EmissionVetoed(ctx context.Context) bool
- func EmitMutation(ctx context.Context, runtimes []*gala.Gala, payload MutationPayload)
- func EncodeLookupKey(alternative LookupAlternative, keys LookupValues) string
- func FieldValue(row json.RawMessage, field string) string
- func ForSchemas(schemas []*Schema, base MutationListener) []gala.Registration
- func GroupMemberUserIDs(ctx context.Context, client *generated.Client, groupID string) ([]string, error)
- func InjectCreateLinks(ctx context.Context, client *generated.Client, ownerID string, schema *Schema, ...) (json.RawMessage, error)
- func InterestedInMutation(runtimes []*gala.Gala, schemaType, operation string) bool
- func LoadEntity[T any](ctx context.Context, entityID string, ...) (T, bool, error)
- func MentionListeners(concern MutationConcern, ...) []gala.Registration
- func MentionTexts(payload MutationPayload, spec MentionSpec) (string, string)
- func MentionedUsers(ctx context.Context, client *generated.Client, ...) ([]string, error)
- func MutationConcernTopics(schemaType string) [4]gala.TopicName
- func MutationTopic(concern MutationConcern, schemaType string) gala.Topic[MutationPayload]
- func MutationTopicName(concern MutationConcern, schemaType string) gala.TopicName
- func NormalizeStrings(values []string) []string
- func ParseEnum[T ~string](raw any, parser EnumParser[T], invalid ...T) (T, bool)
- func PrefetchLinkTargets(ctx context.Context, client *generated.Client, ownerID string, schema *Schema, ...) (context.Context, error)
- func RecipientsFromField(fieldName string) func(Invocation, MutationPayload, json.RawMessage) ([]string, error)
- func RegisterIngestListeners(runtime *gala.Gala, resolveIntegration IngestIntegrationResolver) error
- func RequireDep[D any](handle func(Invocation, MutationPayload, D) error) func(Invocation, MutationPayload) error
- func StampProvenance(payload json.RawMessage, schema *Schema, integration *generated.Integration, ...) json.RawMessage
- func ValueAsString(raw any) (string, bool)
- func VetoEmission(ctx context.Context)
- func WithActiveIntegrations(ctx context.Context, ids []string) context.Context
- func WithEmissionVeto(ctx context.Context) context.Context
- func WithEmissionVetoed(ctx context.Context) context.Context
- func WithLookupMatches(ctx context.Context, schema *Schema, ...) context.Context
- type ActionPlanProjection
- type ApprovalSpec
- type AssessmentPolicyProjection
- type AssessmentProjection
- type AssessmentResponseProjection
- type AssetProjection
- type CampaignProjection
- type CampaignTargetProjection
- type CatalogCapability
- type ChangeSet
- func (set ChangeSet) Clone() ChangeSet
- func (set ChangeSet) Empty() bool
- func (set ChangeSet) FieldChanged(field string) bool
- func (set ChangeSet) Filter(keepField, keepEdge func(string) bool) ChangeSet
- func (set ChangeSet) OldStringValue(field string) (string, bool)
- func (set ChangeSet) OldValue(field string) (any, bool)
- func (set ChangeSet) StringSliceValue(field string) []string
- func (set ChangeSet) StringValue(field string) (string, bool)
- func (set ChangeSet) Value(field string) (any, bool)
- type CheckResultProjection
- type ConsoleRoute
- type ContactProjection
- type ControlImplementationProjection
- type ControlObjectiveProjection
- type ControlProjection
- type CustomTypeEnumProjection
- type DirectoryAccountProjection
- type DirectoryGroupProjection
- type DirectoryMembershipProjection
- type DiscussionProjection
- type DocumentDataProjection
- type EdgeDescriptor
- type EmailTemplateProjection
- type EntityProjection
- type EntityTypeProjection
- type EnumParser
- type EventProjection
- type EvidenceProjection
- type FieldDescriptor
- type FieldMatch
- type FieldTaskRule
- type FileProjection
- type FindingControlProjection
- type FindingProjection
- type GroupMembershipProjection
- type GroupProjection
- type GroupSettingProjection
- type IdentityHolderProjection
- type IngestCapability
- type IngestIntegrationResolver
- type IngestPersist
- type IngestRequest
- type IntegrationProjection
- type IntegrationRunProjection
- type InternalPolicyProjection
- type InviteProjection
- type Invocation
- type KeyMatch
- type LinkSpec
- type LookupAlternative
- type LookupValues
- type MappedControlProjection
- type MappingEntry
- type MatchCandidate
- type MentionSpec
- type MutationConcern
- type MutationListener
- type MutationPayload
- type NarrativeProjection
- type NoteProjection
- type NotificationContent
- type NotificationTemplateProjection
- type NotifySpec
- type OrganizationProjection
- type PlatformProjection
- type ProcedureProjection
- type ProgramMembershipProjection
- type ProgramProjection
- type RemediationProjection
- type ReviewProjection
- type RiskProjection
- type ScanProjection
- type Schema
- func (s *Schema) Adopt(ctx context.Context, client *generated.Client, catalogID, ownerID string, ...) (id string, created bool, err error)
- func (s *Schema) AllTaskRules() []FieldTaskRule
- func (s *Schema) ApplyWorkflowFields(ctx context.Context, client *generated.Client, objectID string, ...) error
- func (s *Schema) CoerceValue(name string, value any) (any, error)
- func (s *Schema) DisplayField() (FieldDescriptor, bool)
- func (s *Schema) DisplayValue(row json.RawMessage) string
- func (s *Schema) EdgeByName(name string) (EdgeDescriptor, bool)
- func (s *Schema) EmitIngest(ctx context.Context, runtime *gala.Gala, headers gala.Headers, ...) error
- func (s *Schema) EnrichWorkflowPayload(ctx context.Context, client *generated.Client, objectID string, ...) error
- func (s *Schema) FieldByName(name string) (FieldDescriptor, bool)
- func (s *Schema) FilterWorkflowInstances(query *generated.WorkflowInstanceQuery, objectID string) (*generated.WorkflowInstanceQuery, error)
- func (s *Schema) FilterWorkflowObjectRefs(query *generated.WorkflowObjectRefQuery, objectID string) (*generated.WorkflowObjectRefQuery, error)
- func (s *Schema) LoadWorkflowObject(ctx context.Context, client *generated.Client, objectID string) (generated.Noder, error)
- func (s *Schema) Match(ctx context.Context, client *generated.Client, candidates ...MatchCandidate) (string, bool, error)
- func (s *Schema) MatchKeyField(field string) bool
- func (s *Schema) PersistIngest(ctx context.Context, client *generated.Client, ...) (id string, changed bool, managed bool, err error)
- func (s *Schema) RefreshAdopted(ctx context.Context, client *generated.Client, catalogID string) (int, error)
- func (s *Schema) RelinkAdopted(ctx context.Context, client *generated.Client, catalogID string) (int, error)
- func (s *Schema) ResolveInputKey(name string) (string, bool)
- func (s *Schema) SetWorkflowInstanceObjectID(builder *generated.WorkflowInstanceCreate, objectID string) error
- func (s *Schema) SetWorkflowObjectRefObjectID(builder *generated.WorkflowObjectRefCreate, objectID string) error
- func (s *Schema) SoftDeletes() bool
- func (s *Schema) SystemControlledOnly(set ChangeSet) bool
- func (s *Schema) TaskRuleEligible() bool
- func (s *Schema) Upsert(ctx context.Context, client *generated.Client, ownerID string, ...) (id string, changed bool, managed bool, err error)
- func (s *Schema) WorkflowChangeSet(changes ChangeSet) ChangeSet
- func (s *Schema) WorkflowEdges() []EdgeDescriptor
- func (s *Schema) WorkflowFields() []FieldDescriptor
- func (s *Schema) WorkflowOwnerID(ctx context.Context, client *generated.Client, objectID string) (string, error)
- type SchemaDescriptor
- type SchemaRef
- type StandardProjection
- type SubcontrolProjection
- type SubprocessorProjection
- type SubscriberProjection
- type SystemDetailProjection
- type TagDefinitionProjection
- type TargetSelector
- type TaskProjection
- type TaskRuleDescriptor
- type TemplateProjection
- type TrustCenterProjection
- type UserProjection
- type VendorRiskScoreProjection
- type VulnerabilityProjection
- type WorkflowDefinitionProjection
- type WorkflowInstanceProjection
- type WorkflowObjectRefProjection
Constants ¶
const ( // MutationPropertyEntityID is the standard mutation metadata key used for entity identifiers MutationPropertyEntityID = "ID" // MutationPropertyOperation is the mutation metadata key used for the operation type MutationPropertyOperation = "operation" // MutationPropertyMutationType is the mutation metadata key used for the ent schema type MutationPropertyMutationType = "mutation_type" )
const ( // FieldIntegrationID is the provenance column recording the writing installation's FK FieldIntegrationID = "integration_id" // FieldManagedBy is the provenance column recording which installation owns a record FieldManagedBy = "managed_by" // FieldPlatformID is the provenance column recording the platform of the writing installation FieldPlatformID = "platform_id" // FieldSourceDefinitionID is the provenance column recording the source definition id FieldSourceDefinitionID = "source_definition_id" // FieldSourceDefinitionVersion is the provenance column recording the source definition version FieldSourceDefinitionVersion = "source_definition_version" // FieldSourceInstanceID is the provenance column recording the external tenant or instance FieldSourceInstanceID = "source_instance_id" // FieldIntegrationRunID is the provenance column recording the integration run that last wrote a record FieldIntegrationRunID = "integration_run_id" )
const (
// FieldSchema is the log field key for the schema name
FieldSchema = "schema"
)
const OpSoftDelete = "OpSoftDelete"
OpSoftDelete is the soft-delete operation, classified at emit when the entx soft-delete mixin rewrites a delete into an update
Variables ¶
var ( // ErrSchemaNotFound indicates the schema name could not be resolved ErrSchemaNotFound = errors.New("entityops: schema not found") // ErrCreateFailed indicates an entity creation failed ErrCreateFailed = errors.New("entityops: create failed") // ErrUpdateFailed indicates an entity update failed ErrUpdateFailed = errors.New("entityops: update failed") // ErrQueryFailed indicates an entity query failed ErrQueryFailed = errors.New("entityops: query failed") // ErrLoadFailed indicates an entity load failed ErrLoadFailed = errors.New("entityops: load failed") // ErrLinkFailed indicates an edge link operation failed ErrLinkFailed = errors.New("entityops: link failed") // ErrEdgeNotFound indicates the named edge does not exist or is not linkable on the source schema ErrEdgeNotFound = errors.New("entityops: edge not found") // ErrDecodeFailed indicates input JSON decoding failed ErrDecodeFailed = errors.New("entityops: decode failed") // ErrMarshalFailed indicates entity JSON marshaling failed ErrMarshalFailed = errors.New("entityops: marshal failed") // ErrEmitFailed indicates a gala event emission failed ErrEmitFailed = errors.New("entityops: emit failed") // ErrPersistFailed indicates a generic persistence failure ErrPersistFailed = errors.New("entityops: persist failed") // ErrValidationFailed indicates the input did not satisfy schema constraints ErrValidationFailed = errors.New("entityops: validation failed") // ErrUpsertConflict indicates an upsert matched more than one existing record ErrUpsertConflict = errors.New("entityops: upsert conflict") // ErrUpsertKeyMissing indicates the payload omitted the schema's lookup key value ErrUpsertKeyMissing = errors.New("entityops: upsert key missing") // ErrUpsertUnsupported indicates the schema does not support catalog-driven upserts ErrUpsertUnsupported = errors.New("entityops: upsert unsupported") // ErrFieldNotFound indicates a field name could not be resolved on the schema ErrFieldNotFound = errors.New("entityops: field not found") // ErrValueCoercion indicates a raw value could not be coerced to the field's type ErrValueCoercion = errors.New("entityops: value coercion failed") // ErrListenerRegistrationFailed indicates a gala listener could not be registered ErrListenerRegistrationFailed = errors.New("entityops: listener registration failed") // ErrMutationListenerInvalid indicates a listener is missing its schema or handler ErrMutationListenerInvalid = errors.New("entityops: invalid mutation listener") // ErrNotifySpecInvalid indicates a notify spec is missing recipients or content ErrNotifySpecInvalid = errors.New("entityops: notify spec requires recipients, type, topic, and title and body templates") // ErrMutationSchemaMismatch indicates a payload was delivered to a listener for another schema ErrMutationSchemaMismatch = errors.New("entityops: mutation schema mismatch") // ErrClientResolveFailed indicates the ent client could not be resolved from the injector ErrClientResolveFailed = errors.New("entityops: client resolve failed") // ErrQueryUnsupported indicates the schema does not support org-scoped queries ErrQueryUnsupported = errors.New("entityops: query unsupported") // ErrEvaluationFailed indicates a CEL expression evaluation failed ErrEvaluationFailed = errors.New("entityops: evaluation failed") // ErrKeyMatchUnsupported indicates the schema does not support key-based target queries ErrKeyMatchUnsupported = errors.New("entityops: key match unsupported") // ErrInvalidKeyField indicates a key match referenced a field that is not an indexable key on the schema ErrInvalidKeyField = errors.New("entityops: invalid key field") // ErrEvaluatorBuildFailed indicates the typed CEL evaluator for a schema projection could not be built ErrEvaluatorBuildFailed = errors.New("entityops: evaluator build failed") // ErrIngestUnsupported indicates the schema has no generated ingest capability ErrIngestUnsupported = errors.New("entityops: ingest unsupported") // ErrIngestMisconfigured indicates a schema ingest capability was registered incorrectly at startup ErrIngestMisconfigured = errors.New("entityops: ingest misconfigured") // ErrIngestIntegrationResolveFailed indicates the durable command's integration could not be resolved ErrIngestIntegrationResolveFailed = errors.New("entityops: ingest integration resolve failed") // ErrUpsertStaleRun indicates an ingest update was superseded by a newer or equal integration run ErrUpsertStaleRun = errors.New("entityops: upsert stale run") // ErrLookupAlternativeInvalid indicates a lookup names an alternative index the schema does not declare ErrLookupAlternativeInvalid = errors.New("entityops: lookup alternative invalid") // ErrCatalogUnsupported indicates the schema has no catalog adoption capability ErrCatalogUnsupported = errors.New("entityops: catalog unsupported") // ErrCatalogRowNotSystemOwned indicates the catalog row does not exist or is not system owned ErrCatalogRowNotSystemOwned = errors.New("entityops: catalog row not system owned") // ErrCatalogRowNotVisible indicates the catalog row is system owned but not visible to organizations ErrCatalogRowNotVisible = errors.New("entityops: catalog row not visible") // ErrCatalogMatchFieldUnsupported indicates a match candidate names a field that is not a matchable string or string-array column ErrCatalogMatchFieldUnsupported = errors.New("entityops: catalog match field unsupported") )
var ( // OpCreate is the create mutation operation OpCreate = ent.OpCreate.String() // OpUpdate is the bulk update mutation operation OpUpdate = ent.OpUpdate.String() // OpUpdateOne is the single-row update mutation operation OpUpdateOne = ent.OpUpdateOne.String() // OpDelete is the bulk hard-delete mutation operation OpDelete = ent.OpDelete.String() // OpDeleteOne is the single-row hard-delete mutation operation OpDeleteOne = ent.OpDeleteOne.String() )
mutation operation vocabulary for listener registration and payload matching
var ( SchemaAPIToken = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "APIToken", Snake: "api_token", Lower: "apitoken", }, OwnerField: apitoken.FieldOwnerID, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "api_token", Operation: refOpLoad, EntityID: entityID} entity, err := client.APIToken.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaActionPlan = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "ActionPlan", Snake: "action_plan", Lower: "actionplan", WorkflowEligible: true, }, ProjectionType: reflect.TypeFor[ActionPlanProjection](), MentionSpec: &MentionSpec{Schema: "ActionPlan", NameField: "name", DetailsField: "details", DetailsJSONField: "details_json", OwnerField: "owner_id"}, ApprovalSpec: &ApprovalSpec{Schema: "ActionPlan", StatusField: "status", ApproverField: "approver_id"}, OwnerField: actionplan.FieldOwnerID, IntegrationM2MEdge: "integrations", IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, {Fields: []string{"external_file_id"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "action_plan", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateActionPlanInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.ActionPlan.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "action_plan", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateActionPlanInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.ActionPlan.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "action_plan", Operation: refOpQuery} entities, err := client.ActionPlan.Query(). Where(ownerScopeActionPlan(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "action_plan", Operation: refOpLoad, EntityID: entityID} entity, err := client.ActionPlan.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, LoadObject: func(ctx context.Context, client *generated.Client, entityID string) (any, error) { entity, err := client.ActionPlan.Get(ctx, entityID) if err != nil { return nil, logError(ctx, SchemaRef{Schema: "action_plan", Operation: refOpLoad, EntityID: entityID}, ErrLoadFailed, err) } return entity, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "action_plan.ingest.requested"), }, } SchemaAssessment = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Assessment", Snake: "assessment", Lower: "assessment", WorkflowEligible: true, }, ProjectionType: reflect.TypeFor[AssessmentProjection](), OwnerField: assessment.FieldOwnerID, IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "assessment", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateAssessmentInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Assessment.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "assessment", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateAssessmentInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Assessment.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "assessment", Operation: refOpQuery} entities, err := client.Assessment.Query(). Where(ownerScopeAssessment(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "assessment", Operation: refOpLoad, EntityID: entityID} entity, err := client.Assessment.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, LoadObject: func(ctx context.Context, client *generated.Client, entityID string) (any, error) { entity, err := client.Assessment.Get(ctx, entityID) if err != nil { return nil, logError(ctx, SchemaRef{Schema: "assessment", Operation: refOpLoad, EntityID: entityID}, ErrLoadFailed, err) } return entity, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "assessment.ingest.requested"), }, } SchemaAssessmentPolicy = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "AssessmentPolicy", Snake: "assessment_policy", Lower: "assessmentpolicy", }, ProjectionType: reflect.TypeFor[AssessmentPolicyProjection](), OwnerField: assessmentpolicy.FieldOwnerID, IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "assessment_policy", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateAssessmentPolicyInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.AssessmentPolicy.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "assessment_policy", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateAssessmentPolicyInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.AssessmentPolicy.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "assessment_policy", Operation: refOpQuery} entities, err := client.AssessmentPolicy.Query(). Where(assessmentpolicy.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "assessment_policy", Operation: refOpLoad, EntityID: entityID} entity, err := client.AssessmentPolicy.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "assessment_policy.ingest.requested"), }, } SchemaAssessmentResponse = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "AssessmentResponse", Snake: "assessment_response", Lower: "assessmentresponse", WorkflowEligible: true, }, ProjectionType: reflect.TypeFor[AssessmentResponseProjection](), OwnerField: assessmentresponse.FieldOwnerID, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "assessment_response", Operation: refOpQuery} entities, err := client.AssessmentResponse.Query(). Where(assessmentresponse.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "assessment_response", Operation: refOpLoad, EntityID: entityID} entity, err := client.AssessmentResponse.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, LoadObject: func(ctx context.Context, client *generated.Client, entityID string) (any, error) { entity, err := client.AssessmentResponse.Get(ctx, entityID) if err != nil { return nil, logError(ctx, SchemaRef{Schema: "assessment_response", Operation: refOpLoad, EntityID: entityID}, ErrLoadFailed, err) } return entity, nil }, } SchemaAsset = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Asset", Snake: "asset", Lower: "asset", }, ProjectionType: reflect.TypeFor[AssetProjection](), OwnerField: asset.FieldOwnerID, IntegrationFKField: "integration_id", IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, {Fields: []string{"source_identifier"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "asset", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateAssetInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Asset.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "asset", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateAssetInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Asset.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "asset", Operation: refOpQuery} entities, err := client.Asset.Query(). Where(ownerScopeAsset(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "asset", Operation: refOpLoad, EntityID: entityID} entity, err := client.Asset.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "asset.ingest.requested"), }, } SchemaCampaign = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Campaign", Snake: "campaign", Lower: "campaign", WorkflowEligible: true, }, ProjectionType: reflect.TypeFor[CampaignProjection](), OwnerField: campaign.FieldOwnerID, IntegrationFKField: "integration_id", IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "campaign", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateCampaignInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Campaign.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "campaign", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateCampaignInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Campaign.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "campaign", Operation: refOpQuery} entities, err := client.Campaign.Query(). Where(campaign.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "campaign", Operation: refOpLoad, EntityID: entityID} entity, err := client.Campaign.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, LoadObject: func(ctx context.Context, client *generated.Client, entityID string) (any, error) { entity, err := client.Campaign.Get(ctx, entityID) if err != nil { return nil, logError(ctx, SchemaRef{Schema: "campaign", Operation: refOpLoad, EntityID: entityID}, ErrLoadFailed, err) } return entity, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "campaign.ingest.requested"), }, } SchemaCampaignTarget = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "CampaignTarget", Snake: "campaign_target", Lower: "campaigntarget", WorkflowEligible: true, }, ProjectionType: reflect.TypeFor[CampaignTargetProjection](), OwnerField: campaigntarget.FieldOwnerID, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "campaign_target", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateCampaignTargetInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.CampaignTarget.UpdateOneID(entityID).SetInput(decoded) if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "campaign_target", Operation: refOpQuery} entities, err := client.CampaignTarget.Query(). Where(campaigntarget.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "campaign_target", Operation: refOpLoad, EntityID: entityID} entity, err := client.CampaignTarget.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, LoadObject: func(ctx context.Context, client *generated.Client, entityID string) (any, error) { entity, err := client.CampaignTarget.Get(ctx, entityID) if err != nil { return nil, logError(ctx, SchemaRef{Schema: "campaign_target", Operation: refOpLoad, EntityID: entityID}, ErrLoadFailed, err) } return entity, nil }, } SchemaCheckResult = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "CheckResult", Snake: "check_result", Lower: "checkresult", }, ProjectionType: reflect.TypeFor[CheckResultProjection](), OwnerField: checkresult.FieldOwnerID, IntegrationFKField: "integration_id", IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"parent_external_id"}}, }, InstanceScoped: true, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "check_result", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateCheckResultInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.CheckResult.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "check_result", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateCheckResultInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.CheckResult.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "check_result", Operation: refOpQuery} entities, err := client.CheckResult.Query(). Where(checkresult.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "check_result", Operation: refOpLoad, EntityID: entityID} entity, err := client.CheckResult.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "check_result.ingest.requested"), }, } SchemaContact = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Contact", Snake: "contact", Lower: "contact", }, ProjectionType: reflect.TypeFor[ContactProjection](), OwnerField: contact.FieldOwnerID, IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, {Fields: []string{"email"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "contact", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateContactInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Contact.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "contact", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateContactInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Contact.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "contact", Operation: refOpQuery} entities, err := client.Contact.Query(). Where(contact.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "contact", Operation: refOpLoad, EntityID: entityID} entity, err := client.Contact.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "contact.ingest.requested"), }, } SchemaControl = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Control", Snake: "control", Lower: "control", WorkflowEligible: true, }, ProjectionType: reflect.TypeFor[ControlProjection](), ConsoleRoute: &ConsoleRoute{Base: "controls"}, OwnerField: control.FieldOwnerID, IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, {Fields: []string{"ref_code"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "control", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateControlInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Control.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "control", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateControlInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Control.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "control", Operation: refOpQuery} entities, err := client.Control.Query(). Where(ownerScopeControl(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "control", Operation: refOpLoad, EntityID: entityID} entity, err := client.Control.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, LoadObject: func(ctx context.Context, client *generated.Client, entityID string) (any, error) { entity, err := client.Control.Get(ctx, entityID) if err != nil { return nil, logError(ctx, SchemaRef{Schema: "control", Operation: refOpLoad, EntityID: entityID}, ErrLoadFailed, err) } return entity, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "control.ingest.requested"), }, } SchemaControlImplementation = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "ControlImplementation", Snake: "control_implementation", Lower: "controlimplementation", }, ProjectionType: reflect.TypeFor[ControlImplementationProjection](), OwnerField: controlimplementation.FieldOwnerID, IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "control_implementation", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateControlImplementationInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.ControlImplementation.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "control_implementation", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateControlImplementationInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.ControlImplementation.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "control_implementation", Operation: refOpQuery} entities, err := client.ControlImplementation.Query(). Where(ownerScopeControlImplementation(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "control_implementation", Operation: refOpLoad, EntityID: entityID} entity, err := client.ControlImplementation.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "control_implementation.ingest.requested"), }, } SchemaControlObjective = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "ControlObjective", Snake: "control_objective", Lower: "controlobjective", }, ProjectionType: reflect.TypeFor[ControlObjectiveProjection](), OwnerField: controlobjective.FieldOwnerID, IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "control_objective", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateControlObjectiveInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.ControlObjective.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "control_objective", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateControlObjectiveInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.ControlObjective.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "control_objective", Operation: refOpQuery} entities, err := client.ControlObjective.Query(). Where(ownerScopeControlObjective(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "control_objective", Operation: refOpLoad, EntityID: entityID} entity, err := client.ControlObjective.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "control_objective.ingest.requested"), }, } SchemaCustomDomain = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "CustomDomain", Snake: "custom_domain", Lower: "customdomain", }, OwnerField: customdomain.FieldOwnerID, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "custom_domain", Operation: refOpLoad, EntityID: entityID} entity, err := client.CustomDomain.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaCustomTypeEnum = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "CustomTypeEnum", Snake: "custom_type_enum", Lower: "customtypeenum", }, ProjectionType: reflect.TypeFor[CustomTypeEnumProjection](), OwnerField: customtypeenum.FieldOwnerID, IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "custom_type_enum", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateCustomTypeEnumInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.CustomTypeEnum.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "custom_type_enum", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateCustomTypeEnumInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.CustomTypeEnum.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "custom_type_enum", Operation: refOpQuery} entities, err := client.CustomTypeEnum.Query(). Where(ownerScopeCustomTypeEnum(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "custom_type_enum", Operation: refOpLoad, EntityID: entityID} entity, err := client.CustomTypeEnum.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "custom_type_enum.ingest.requested"), }, } SchemaDNSVerification = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "DNSVerification", Snake: "dns_verification", Lower: "dnsverification", }, OwnerField: dnsverification.FieldOwnerID, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "dns_verification", Operation: refOpLoad, EntityID: entityID} entity, err := client.DNSVerification.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaDirectoryAccount = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "DirectoryAccount", Snake: "directory_account", Lower: "directoryaccount", }, ProjectionType: reflect.TypeFor[DirectoryAccountProjection](), OwnerField: directoryaccount.FieldOwnerID, IntegrationFKField: "integration_id", IntegrationRunM2MEdge: "integration_runs", RemovedAtField: "removed_at", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, }, InstanceScoped: true, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "directory_account", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateDirectoryAccountInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.DirectoryAccount.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "directory_account", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateDirectoryAccountInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.DirectoryAccount.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "directory_account", Operation: refOpQuery} entities, err := client.DirectoryAccount.Query(). Where(directoryaccount.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "directory_account", Operation: refOpLoad, EntityID: entityID} entity, err := client.DirectoryAccount.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "directory_account.ingest.requested"), }, } SchemaDirectoryGroup = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "DirectoryGroup", Snake: "directory_group", Lower: "directorygroup", }, ProjectionType: reflect.TypeFor[DirectoryGroupProjection](), OwnerField: directorygroup.FieldOwnerID, IntegrationFKField: "integration_id", IntegrationRunM2MEdge: "integration_runs", RemovedAtField: "removed_at", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, }, InstanceScoped: true, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "directory_group", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateDirectoryGroupInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.DirectoryGroup.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "directory_group", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateDirectoryGroupInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.DirectoryGroup.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "directory_group", Operation: refOpQuery} entities, err := client.DirectoryGroup.Query(). Where(directorygroup.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "directory_group", Operation: refOpLoad, EntityID: entityID} entity, err := client.DirectoryGroup.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "directory_group.ingest.requested"), }, } SchemaDirectoryMembership = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "DirectoryMembership", Snake: "directory_membership", Lower: "directorymembership", }, ProjectionType: reflect.TypeFor[DirectoryMembershipProjection](), OwnerField: directorymembership.FieldOwnerID, IntegrationFKField: "integration_id", IntegrationRunM2MEdge: "integration_runs", RemovedAtField: "removed_at", RemovedAtEpisodic: true, Lookup: []LookupAlternative{ {Fields: []string{"directory_account_id", "directory_group_id"}}, }, InstanceScoped: true, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "directory_membership", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateDirectoryMembershipInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.DirectoryMembership.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "directory_membership", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateDirectoryMembershipInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.DirectoryMembership.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "directory_membership", Operation: refOpQuery} entities, err := client.DirectoryMembership.Query(). Where(directorymembership.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "directory_membership", Operation: refOpLoad, EntityID: entityID} entity, err := client.DirectoryMembership.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "directory_membership.ingest.requested"), }, } SchemaDiscussion = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Discussion", Snake: "discussion", Lower: "discussion", }, ProjectionType: reflect.TypeFor[DiscussionProjection](), OwnerField: discussion.FieldOwnerID, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "discussion", Operation: refOpQuery} entities, err := client.Discussion.Query(). Where(discussion.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "discussion", Operation: refOpLoad, EntityID: entityID} entity, err := client.Discussion.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaDocumentData = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "DocumentData", Snake: "document_data", Lower: "documentdata", }, ProjectionType: reflect.TypeFor[DocumentDataProjection](), OwnerField: documentdata.FieldOwnerID, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "document_data", Operation: refOpQuery} entities, err := client.DocumentData.Query(). Where(documentdata.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "document_data", Operation: refOpLoad, EntityID: entityID} entity, err := client.DocumentData.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaEmailTemplate = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "EmailTemplate", Snake: "email_template", Lower: "emailtemplate", }, ProjectionType: reflect.TypeFor[EmailTemplateProjection](), OwnerField: emailtemplate.FieldOwnerID, IntegrationFKField: "integration_id", IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "email_template", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateEmailTemplateInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.EmailTemplate.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "email_template", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateEmailTemplateInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.EmailTemplate.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "email_template", Operation: refOpQuery} entities, err := client.EmailTemplate.Query(). Where(ownerScopeEmailTemplate(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "email_template", Operation: refOpLoad, EntityID: entityID} entity, err := client.EmailTemplate.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "email_template.ingest.requested"), }, } SchemaEmailVerificationToken = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "EmailVerificationToken", Snake: "email_verification_token", Lower: "emailverificationtoken", }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "email_verification_token", Operation: refOpLoad, EntityID: entityID} entity, err := client.EmailVerificationToken.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaEntity = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Entity", Snake: "entity", Lower: "entity", }, ProjectionType: reflect.TypeFor[EntityProjection](), OwnerField: entity.FieldOwnerID, IntegrationM2MEdge: "integrations", IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, }, Catalog: &CatalogCapability{PointerField: "catalog_id", VisibilityField: "externally_visible", KeyField: "catalog_key", Fields: []string{"display_name", "description", "domains", "aliases", "status_page_url", "provided_services", "links", "logo_remote_url"}}, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "entity", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateEntityInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Entity.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, "catalog_id", "catalog_key", FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "entity", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateEntityInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Entity.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "entity", Operation: refOpQuery} entities, err := client.Entity.Query(). Where(ownerScopeEntity(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "entity", Operation: refOpLoad, EntityID: entityID} entity, err := client.Entity.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "entity.ingest.requested"), }, } SchemaEntityType = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "EntityType", Snake: "entity_type", Lower: "entitytype", }, ProjectionType: reflect.TypeFor[EntityTypeProjection](), OwnerField: entitytype.FieldOwnerID, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "entity_type", Operation: refOpQuery} entities, err := client.EntityType.Query(). Where(ownerScopeEntityType(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "entity_type", Operation: refOpLoad, EntityID: entityID} entity, err := client.EntityType.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaEvent = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Event", Snake: "event", Lower: "event", }, ProjectionType: reflect.TypeFor[EventProjection](), IntegrationM2MEdge: "integrations", Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "event", Operation: refOpLoad, EntityID: entityID} entity, err := client.Event.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaEvidence = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Evidence", Snake: "evidence", Lower: "evidence", WorkflowEligible: true, }, ProjectionType: reflect.TypeFor[EvidenceProjection](), ConsoleRoute: &ConsoleRoute{Base: "evidence", IDParam: "id"}, OwnerField: evidence.FieldOwnerID, IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "evidence", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateEvidenceInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Evidence.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "evidence", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateEvidenceInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Evidence.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "evidence", Operation: refOpQuery} entities, err := client.Evidence.Query(). Where(evidence.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "evidence", Operation: refOpLoad, EntityID: entityID} entity, err := client.Evidence.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, LoadObject: func(ctx context.Context, client *generated.Client, entityID string) (any, error) { entity, err := client.Evidence.Get(ctx, entityID) if err != nil { return nil, logError(ctx, SchemaRef{Schema: "evidence", Operation: refOpLoad, EntityID: entityID}, ErrLoadFailed, err) } return entity, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "evidence.ingest.requested"), }, } SchemaExport = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Export", Snake: "export", Lower: "export", }, OwnerField: export.FieldOwnerID, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "export", Operation: refOpLoad, EntityID: entityID} entity, err := client.Export.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaFile = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "File", Snake: "file", Lower: "file", }, ProjectionType: reflect.TypeFor[FileProjection](), IntegrationM2MEdge: "integrations", Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "file", Operation: refOpLoad, EntityID: entityID} entity, err := client.File.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaFileDownloadToken = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "FileDownloadToken", Snake: "file_download_token", Lower: "filedownloadtoken", }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "file_download_token", Operation: refOpLoad, EntityID: entityID} entity, err := client.FileDownloadToken.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaFinding = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Finding", Snake: "finding", Lower: "finding", WorkflowEligible: true, }, ProjectionType: reflect.TypeFor[FindingProjection](), ConsoleRoute: &ConsoleRoute{Base: "exposure/findings", IDParam: "id"}, OwnerField: finding.FieldOwnerID, IntegrationM2MEdge: "integrations", IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id", "external_owner_id"}}, {Fields: []string{"external_id"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "finding", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateFindingInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Finding.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "finding", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateFindingInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Finding.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "finding", Operation: refOpQuery} entities, err := client.Finding.Query(). Where(ownerScopeFinding(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "finding", Operation: refOpLoad, EntityID: entityID} entity, err := client.Finding.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, LoadObject: func(ctx context.Context, client *generated.Client, entityID string) (any, error) { entity, err := client.Finding.Get(ctx, entityID) if err != nil { return nil, logError(ctx, SchemaRef{Schema: "finding", Operation: refOpLoad, EntityID: entityID}, ErrLoadFailed, err) } return entity, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "finding.ingest.requested"), }, } SchemaFindingControl = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "FindingControl", Snake: "finding_control", Lower: "findingcontrol", }, ProjectionType: reflect.TypeFor[FindingControlProjection](), OwnerField: findingcontrol.FieldOwnerID, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "finding_control", Operation: refOpQuery} entities, err := client.FindingControl.Query(). Where(findingcontrol.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "finding_control", Operation: refOpLoad, EntityID: entityID} entity, err := client.FindingControl.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaGroup = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Group", Snake: "group", Lower: "group", }, ProjectionType: reflect.TypeFor[GroupProjection](), OwnerField: group.FieldOwnerID, IntegrationM2MEdge: "integrations", IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, {Fields: []string{"name"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "group", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateGroupInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Group.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "group", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateGroupInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Group.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "group", Operation: refOpQuery} entities, err := client.Group.Query(). Where(group.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "group", Operation: refOpLoad, EntityID: entityID} entity, err := client.Group.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "group.ingest.requested"), }, } SchemaGroupMembership = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "GroupMembership", Snake: "group_membership", Lower: "groupmembership", }, ProjectionType: reflect.TypeFor[GroupMembershipProjection](), Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "group_membership", Operation: refOpLoad, EntityID: entityID} entity, err := client.GroupMembership.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaGroupSetting = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "GroupSetting", Snake: "group_setting", Lower: "groupsetting", }, ProjectionType: reflect.TypeFor[GroupSettingProjection](), Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "group_setting", Operation: refOpLoad, EntityID: entityID} entity, err := client.GroupSetting.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaHush = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Hush", Snake: "hush", Lower: "hush", }, OwnerField: hush.FieldOwnerID, IntegrationM2MEdge: "integrations", Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "hush", Operation: refOpLoad, EntityID: entityID} entity, err := client.Hush.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaIdentityHolder = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "IdentityHolder", Snake: "identity_holder", Lower: "identityholder", WorkflowEligible: true, }, ProjectionType: reflect.TypeFor[IdentityHolderProjection](), OwnerField: identityholder.FieldOwnerID, IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, {Fields: []string{"external_reference_id"}}, {Fields: []string{"email"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "identity_holder", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateIdentityHolderInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.IdentityHolder.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "identity_holder", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateIdentityHolderInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.IdentityHolder.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "identity_holder", Operation: refOpQuery} entities, err := client.IdentityHolder.Query(). Where(identityholder.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "identity_holder", Operation: refOpLoad, EntityID: entityID} entity, err := client.IdentityHolder.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, LoadObject: func(ctx context.Context, client *generated.Client, entityID string) (any, error) { entity, err := client.IdentityHolder.Get(ctx, entityID) if err != nil { return nil, logError(ctx, SchemaRef{Schema: "identity_holder", Operation: refOpLoad, EntityID: entityID}, ErrLoadFailed, err) } return entity, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "identity_holder.ingest.requested"), }, } SchemaImpersonationEvent = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "ImpersonationEvent", Snake: "impersonation_event", Lower: "impersonationevent", }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "impersonation_event", Operation: refOpLoad, EntityID: entityID} entity, err := client.ImpersonationEvent.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaIntegration = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Integration", Snake: "integration", Lower: "integration", }, ProjectionType: reflect.TypeFor[IntegrationProjection](), ConsoleRoute: &ConsoleRoute{Base: "automation/integrations"}, OwnerField: integration.FieldOwnerID, IntegrationRunM2MEdge: "integration_runs", Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "integration", Operation: refOpQuery} entities, err := client.Integration.Query(). Where(ownerScopeIntegration(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "integration", Operation: refOpLoad, EntityID: entityID} entity, err := client.Integration.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaIntegrationRun = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "IntegrationRun", Snake: "integration_run", Lower: "integrationrun", }, ProjectionType: reflect.TypeFor[IntegrationRunProjection](), OwnerField: integrationrun.FieldOwnerID, IntegrationFKField: "integration_id", Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "integration_run", Operation: refOpQuery} entities, err := client.IntegrationRun.Query(). Where(integrationrun.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "integration_run", Operation: refOpLoad, EntityID: entityID} entity, err := client.IntegrationRun.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaIntegrationWebhook = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "IntegrationWebhook", Snake: "integration_webhook", Lower: "integrationwebhook", }, OwnerField: integrationwebhook.FieldOwnerID, IntegrationFKField: "integration_id", Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "integration_webhook", Operation: refOpLoad, EntityID: entityID} entity, err := client.IntegrationWebhook.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaInternalPolicy = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "InternalPolicy", Snake: "internal_policy", Lower: "internalpolicy", WorkflowEligible: true, }, ProjectionType: reflect.TypeFor[InternalPolicyProjection](), ConsoleRoute: &ConsoleRoute{Base: "policies", Suffix: "view"}, MentionSpec: &MentionSpec{Schema: "InternalPolicy", NameField: "name", DetailsField: "details", DetailsJSONField: "details_json", OwnerField: "owner_id"}, ApprovalSpec: &ApprovalSpec{Schema: "InternalPolicy", StatusField: "status", ApproverField: "approver_id"}, OwnerField: internalpolicy.FieldOwnerID, IntegrationM2MEdge: "integrations", IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, {Fields: []string{"external_file_id"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "internal_policy", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateInternalPolicyInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.InternalPolicy.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "internal_policy", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateInternalPolicyInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.InternalPolicy.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "internal_policy", Operation: refOpQuery} entities, err := client.InternalPolicy.Query(). Where(ownerScopeInternalPolicy(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "internal_policy", Operation: refOpLoad, EntityID: entityID} entity, err := client.InternalPolicy.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, LoadObject: func(ctx context.Context, client *generated.Client, entityID string) (any, error) { entity, err := client.InternalPolicy.Get(ctx, entityID) if err != nil { return nil, logError(ctx, SchemaRef{Schema: "internal_policy", Operation: refOpLoad, EntityID: entityID}, ErrLoadFailed, err) } return entity, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "internal_policy.ingest.requested"), }, } SchemaInvite = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Invite", Snake: "invite", Lower: "invite", }, ProjectionType: reflect.TypeFor[InviteProjection](), OwnerField: invite.FieldOwnerID, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "invite", Operation: refOpQuery} entities, err := client.Invite.Query(). Where(invite.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "invite", Operation: refOpLoad, EntityID: entityID} entity, err := client.Invite.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaMappableDomain = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "MappableDomain", Snake: "mappable_domain", Lower: "mappabledomain", }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "mappable_domain", Operation: refOpLoad, EntityID: entityID} entity, err := client.MappableDomain.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaMappedControl = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "MappedControl", Snake: "mapped_control", Lower: "mappedcontrol", }, ProjectionType: reflect.TypeFor[MappedControlProjection](), OwnerField: mappedcontrol.FieldOwnerID, IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "mapped_control", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateMappedControlInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.MappedControl.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "mapped_control", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateMappedControlInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.MappedControl.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "mapped_control", Operation: refOpQuery} entities, err := client.MappedControl.Query(). Where(ownerScopeMappedControl(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "mapped_control", Operation: refOpLoad, EntityID: entityID} entity, err := client.MappedControl.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "mapped_control.ingest.requested"), }, } SchemaNarrative = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Narrative", Snake: "narrative", Lower: "narrative", }, ProjectionType: reflect.TypeFor[NarrativeProjection](), OwnerField: narrative.FieldOwnerID, IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "narrative", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateNarrativeInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Narrative.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "narrative", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateNarrativeInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Narrative.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "narrative", Operation: refOpQuery} entities, err := client.Narrative.Query(). Where(ownerScopeNarrative(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "narrative", Operation: refOpLoad, EntityID: entityID} entity, err := client.Narrative.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "narrative.ingest.requested"), }, } SchemaNote = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Note", Snake: "note", Lower: "note", }, ProjectionType: reflect.TypeFor[NoteProjection](), MentionSpec: &MentionSpec{Schema: "Note", NameField: "title", DetailsField: "text", DetailsJSONField: "text_json", OwnerField: "owner_id"}, OwnerField: note.FieldOwnerID, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "note", Operation: refOpQuery} entities, err := client.Note.Query(). Where(note.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "note", Operation: refOpLoad, EntityID: entityID} entity, err := client.Note.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaNotification = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Notification", Snake: "notification", Lower: "notification", }, OwnerField: notification.FieldOwnerID, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "notification", Operation: refOpLoad, EntityID: entityID} entity, err := client.Notification.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaNotificationPreference = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "NotificationPreference", Snake: "notification_preference", Lower: "notificationpreference", }, OwnerField: notificationpreference.FieldOwnerID, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "notification_preference", Operation: refOpLoad, EntityID: entityID} entity, err := client.NotificationPreference.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaNotificationTemplate = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "NotificationTemplate", Snake: "notification_template", Lower: "notificationtemplate", }, ProjectionType: reflect.TypeFor[NotificationTemplateProjection](), OwnerField: notificationtemplate.FieldOwnerID, IntegrationFKField: "integration_id", Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "notification_template", Operation: refOpQuery} entities, err := client.NotificationTemplate.Query(). Where(ownerScopeNotificationTemplate(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "notification_template", Operation: refOpLoad, EntityID: entityID} entity, err := client.NotificationTemplate.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaOnboarding = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Onboarding", Snake: "onboarding", Lower: "onboarding", }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "onboarding", Operation: refOpLoad, EntityID: entityID} entity, err := client.Onboarding.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaOrgMembership = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "OrgMembership", Snake: "org_membership", Lower: "orgmembership", }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "org_membership", Operation: refOpLoad, EntityID: entityID} entity, err := client.OrgMembership.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaOrgModule = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "OrgModule", Snake: "org_module", Lower: "orgmodule", }, OwnerField: orgmodule.FieldOwnerID, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "org_module", Operation: refOpLoad, EntityID: entityID} entity, err := client.OrgModule.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaOrgPrice = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "OrgPrice", Snake: "org_price", Lower: "orgprice", }, OwnerField: orgprice.FieldOwnerID, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "org_price", Operation: refOpLoad, EntityID: entityID} entity, err := client.OrgPrice.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaOrgProduct = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "OrgProduct", Snake: "org_product", Lower: "orgproduct", }, OwnerField: orgproduct.FieldOwnerID, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "org_product", Operation: refOpLoad, EntityID: entityID} entity, err := client.OrgProduct.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaOrgSubscription = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "OrgSubscription", Snake: "org_subscription", Lower: "orgsubscription", }, OwnerField: orgsubscription.FieldOwnerID, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "org_subscription", Operation: refOpLoad, EntityID: entityID} entity, err := client.OrgSubscription.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaOrganization = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Organization", Snake: "organization", Lower: "organization", }, ProjectionType: reflect.TypeFor[OrganizationProjection](), IntegrationM2MEdge: "integrations", IntegrationRunM2MEdge: "integration_runs", Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "organization", Operation: refOpLoad, EntityID: entityID} entity, err := client.Organization.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaOrganizationSetting = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "OrganizationSetting", Snake: "organization_setting", Lower: "organizationsetting", }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "organization_setting", Operation: refOpLoad, EntityID: entityID} entity, err := client.OrganizationSetting.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaPasswordResetToken = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "PasswordResetToken", Snake: "password_reset_token", Lower: "passwordresettoken", }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "password_reset_token", Operation: refOpLoad, EntityID: entityID} entity, err := client.PasswordResetToken.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaPersonalAccessToken = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "PersonalAccessToken", Snake: "personal_access_token", Lower: "personalaccesstoken", }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "personal_access_token", Operation: refOpLoad, EntityID: entityID} entity, err := client.PersonalAccessToken.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaPlatform = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Platform", Snake: "platform", Lower: "platform", WorkflowEligible: true, }, ProjectionType: reflect.TypeFor[PlatformProjection](), OwnerField: platform.FieldOwnerID, IntegrationM2MEdge: "integrations", IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, {Fields: []string{"name"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "platform", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreatePlatformInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Platform.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "platform", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdatePlatformInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Platform.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "platform", Operation: refOpQuery} entities, err := client.Platform.Query(). Where(platform.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "platform", Operation: refOpLoad, EntityID: entityID} entity, err := client.Platform.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, LoadObject: func(ctx context.Context, client *generated.Client, entityID string) (any, error) { entity, err := client.Platform.Get(ctx, entityID) if err != nil { return nil, logError(ctx, SchemaRef{Schema: "platform", Operation: refOpLoad, EntityID: entityID}, ErrLoadFailed, err) } return entity, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "platform.ingest.requested"), }, } SchemaProcedure = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Procedure", Snake: "procedure", Lower: "procedure", WorkflowEligible: true, }, ProjectionType: reflect.TypeFor[ProcedureProjection](), ConsoleRoute: &ConsoleRoute{Base: "procedures", Suffix: "view"}, MentionSpec: &MentionSpec{Schema: "Procedure", NameField: "name", DetailsField: "details", DetailsJSONField: "details_json", OwnerField: "owner_id"}, ApprovalSpec: &ApprovalSpec{Schema: "Procedure", StatusField: "status", ApproverField: "approver_id"}, OwnerField: procedure.FieldOwnerID, IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, {Fields: []string{"external_file_id"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "procedure", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateProcedureInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Procedure.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "procedure", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateProcedureInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Procedure.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "procedure", Operation: refOpQuery} entities, err := client.Procedure.Query(). Where(ownerScopeProcedure(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "procedure", Operation: refOpLoad, EntityID: entityID} entity, err := client.Procedure.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, LoadObject: func(ctx context.Context, client *generated.Client, entityID string) (any, error) { entity, err := client.Procedure.Get(ctx, entityID) if err != nil { return nil, logError(ctx, SchemaRef{Schema: "procedure", Operation: refOpLoad, EntityID: entityID}, ErrLoadFailed, err) } return entity, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "procedure.ingest.requested"), }, } SchemaProgram = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Program", Snake: "program", Lower: "program", }, ProjectionType: reflect.TypeFor[ProgramProjection](), ConsoleRoute: &ConsoleRoute{Base: "programs"}, OwnerField: program.FieldOwnerID, IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, {Fields: []string{"external_uuid"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "program", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateProgramInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Program.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "program", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateProgramInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Program.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "program", Operation: refOpQuery} entities, err := client.Program.Query(). Where(program.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "program", Operation: refOpLoad, EntityID: entityID} entity, err := client.Program.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "program.ingest.requested"), }, } SchemaProgramMembership = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "ProgramMembership", Snake: "program_membership", Lower: "programmembership", }, ProjectionType: reflect.TypeFor[ProgramMembershipProjection](), Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "program_membership", Operation: refOpLoad, EntityID: entityID} entity, err := client.ProgramMembership.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaRemediation = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Remediation", Snake: "remediation", Lower: "remediation", WorkflowEligible: true, }, ProjectionType: reflect.TypeFor[RemediationProjection](), OwnerField: remediation.FieldOwnerID, IntegrationM2MEdge: "integrations", IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id", "external_owner_id"}}, {Fields: []string{"external_id"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "remediation", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateRemediationInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Remediation.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "remediation", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateRemediationInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Remediation.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "remediation", Operation: refOpQuery} entities, err := client.Remediation.Query(). Where(ownerScopeRemediation(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "remediation", Operation: refOpLoad, EntityID: entityID} entity, err := client.Remediation.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, LoadObject: func(ctx context.Context, client *generated.Client, entityID string) (any, error) { entity, err := client.Remediation.Get(ctx, entityID) if err != nil { return nil, logError(ctx, SchemaRef{Schema: "remediation", Operation: refOpLoad, EntityID: entityID}, ErrLoadFailed, err) } return entity, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "remediation.ingest.requested"), }, } SchemaReview = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Review", Snake: "review", Lower: "review", }, ProjectionType: reflect.TypeFor[ReviewProjection](), OwnerField: review.FieldOwnerID, IntegrationM2MEdge: "integrations", IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id", "external_owner_id"}}, {Fields: []string{"external_id"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "review", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateReviewInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Review.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "review", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateReviewInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Review.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "review", Operation: refOpQuery} entities, err := client.Review.Query(). Where(ownerScopeReview(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "review", Operation: refOpLoad, EntityID: entityID} entity, err := client.Review.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "review.ingest.requested"), }, } SchemaRisk = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Risk", Snake: "risk", Lower: "risk", WorkflowEligible: true, }, ProjectionType: reflect.TypeFor[RiskProjection](), ConsoleRoute: &ConsoleRoute{Base: "exposure/risks"}, MentionSpec: &MentionSpec{Schema: "Risk", NameField: "name", DetailsField: "details", DetailsJSONField: "details_json", OwnerField: "owner_id"}, OwnerField: risk.FieldOwnerID, IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "risk", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateRiskInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Risk.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "risk", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateRiskInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Risk.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "risk", Operation: refOpQuery} entities, err := client.Risk.Query(). Where(risk.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "risk", Operation: refOpLoad, EntityID: entityID} entity, err := client.Risk.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, LoadObject: func(ctx context.Context, client *generated.Client, entityID string) (any, error) { entity, err := client.Risk.Get(ctx, entityID) if err != nil { return nil, logError(ctx, SchemaRef{Schema: "risk", Operation: refOpLoad, EntityID: entityID}, ErrLoadFailed, err) } return entity, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "risk.ingest.requested"), }, } SchemaSLADefinition = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "SLADefinition", Snake: "sla_definition", Lower: "sladefinition", }, OwnerField: sladefinition.FieldOwnerID, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "sla_definition", Operation: refOpLoad, EntityID: entityID} entity, err := client.SLADefinition.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaScan = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Scan", Snake: "scan", Lower: "scan", }, ProjectionType: reflect.TypeFor[ScanProjection](), OwnerField: scan.FieldOwnerID, IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "scan", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateScanInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Scan.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "scan", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateScanInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Scan.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "scan", Operation: refOpQuery} entities, err := client.Scan.Query(). Where(ownerScopeScan(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "scan", Operation: refOpLoad, EntityID: entityID} entity, err := client.Scan.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "scan.ingest.requested"), }, } SchemaStandard = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Standard", Snake: "standard", Lower: "standard", }, ProjectionType: reflect.TypeFor[StandardProjection](), ConsoleRoute: &ConsoleRoute{Base: "standards"}, OwnerField: standard.FieldOwnerID, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "standard", Operation: refOpQuery} entities, err := client.Standard.Query(). Where(ownerScopeStandard(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "standard", Operation: refOpLoad, EntityID: entityID} entity, err := client.Standard.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaSubcontrol = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Subcontrol", Snake: "subcontrol", Lower: "subcontrol", WorkflowEligible: true, }, ProjectionType: reflect.TypeFor[SubcontrolProjection](), OwnerField: subcontrol.FieldOwnerID, IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, {Fields: []string{"control_id", "ref_code"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "subcontrol", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateSubcontrolInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Subcontrol.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "subcontrol", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateSubcontrolInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Subcontrol.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "subcontrol", Operation: refOpQuery} entities, err := client.Subcontrol.Query(). Where(ownerScopeSubcontrol(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "subcontrol", Operation: refOpLoad, EntityID: entityID} entity, err := client.Subcontrol.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, LoadObject: func(ctx context.Context, client *generated.Client, entityID string) (any, error) { entity, err := client.Subcontrol.Get(ctx, entityID) if err != nil { return nil, logError(ctx, SchemaRef{Schema: "subcontrol", Operation: refOpLoad, EntityID: entityID}, ErrLoadFailed, err) } return entity, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "subcontrol.ingest.requested"), }, } SchemaSubprocessor = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Subprocessor", Snake: "subprocessor", Lower: "subprocessor", }, ProjectionType: reflect.TypeFor[SubprocessorProjection](), OwnerField: subprocessor.FieldOwnerID, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "subprocessor", Operation: refOpQuery} entities, err := client.Subprocessor.Query(). Where(ownerScopeSubprocessor(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "subprocessor", Operation: refOpLoad, EntityID: entityID} entity, err := client.Subprocessor.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaSubscriber = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Subscriber", Snake: "subscriber", Lower: "subscriber", }, ProjectionType: reflect.TypeFor[SubscriberProjection](), AnonymousInputFields: []string{"trustCenterID", "email"}, OwnerField: subscriber.FieldOwnerID, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "subscriber", Operation: refOpQuery} entities, err := client.Subscriber.Query(). Where(subscriber.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "subscriber", Operation: refOpLoad, EntityID: entityID} entity, err := client.Subscriber.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaSystemDetail = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "SystemDetail", Snake: "system_detail", Lower: "systemdetail", }, ProjectionType: reflect.TypeFor[SystemDetailProjection](), OwnerField: systemdetail.FieldOwnerID, IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, {Fields: []string{"system_name"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "system_detail", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateSystemDetailInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.SystemDetail.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "system_detail", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateSystemDetailInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.SystemDetail.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "system_detail", Operation: refOpQuery} entities, err := client.SystemDetail.Query(). Where(systemdetail.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "system_detail", Operation: refOpLoad, EntityID: entityID} entity, err := client.SystemDetail.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "system_detail.ingest.requested"), }, } SchemaTFASetting = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "TFASetting", Snake: "tfa_setting", Lower: "tfasetting", }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "tfa_setting", Operation: refOpLoad, EntityID: entityID} entity, err := client.TFASetting.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaTagDefinition = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "TagDefinition", Snake: "tag_definition", Lower: "tagdefinition", }, ProjectionType: reflect.TypeFor[TagDefinitionProjection](), OwnerField: tagdefinition.FieldOwnerID, IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, {Fields: []string{"name"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "tag_definition", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateTagDefinitionInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.TagDefinition.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "tag_definition", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateTagDefinitionInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.TagDefinition.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "tag_definition", Operation: refOpQuery} entities, err := client.TagDefinition.Query(). Where(ownerScopeTagDefinition(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "tag_definition", Operation: refOpLoad, EntityID: entityID} entity, err := client.TagDefinition.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "tag_definition.ingest.requested"), }, } SchemaTask = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Task", Snake: "task", Lower: "task", WorkflowEligible: true, }, ProjectionType: reflect.TypeFor[TaskProjection](), ConsoleRoute: &ConsoleRoute{Base: "automation/tasks", IDParam: "id"}, MentionSpec: &MentionSpec{Schema: "Task", NameField: "title", DetailsField: "details", DetailsJSONField: "details_json", OwnerField: "owner_id"}, OwnerField: task.FieldOwnerID, IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "task", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateTaskInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Task.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "task", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateTaskInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Task.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "task", Operation: refOpQuery} entities, err := client.Task.Query(). Where(task.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "task", Operation: refOpLoad, EntityID: entityID} entity, err := client.Task.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, LoadObject: func(ctx context.Context, client *generated.Client, entityID string) (any, error) { entity, err := client.Task.Get(ctx, entityID) if err != nil { return nil, logError(ctx, SchemaRef{Schema: "task", Operation: refOpLoad, EntityID: entityID}, ErrLoadFailed, err) } return entity, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "task.ingest.requested"), }, } SchemaTemplate = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Template", Snake: "template", Lower: "template", }, ProjectionType: reflect.TypeFor[TemplateProjection](), OwnerField: template.FieldOwnerID, IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, {Fields: []string{"name", "template_type"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "template", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateTemplateInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Template.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "template", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateTemplateInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Template.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "template", Operation: refOpQuery} entities, err := client.Template.Query(). Where(ownerScopeTemplate(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "template", Operation: refOpLoad, EntityID: entityID} entity, err := client.Template.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "template.ingest.requested"), }, } SchemaTrustCenter = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "TrustCenter", Snake: "trust_center", Lower: "trustcenter", }, ProjectionType: reflect.TypeFor[TrustCenterProjection](), ConsoleRoute: &ConsoleRoute{Base: "trust-center"}, OwnerField: trustcenter.FieldOwnerID, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "trust_center", Operation: refOpQuery} entities, err := client.TrustCenter.Query(). Where(trustcenter.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "trust_center", Operation: refOpLoad, EntityID: entityID} entity, err := client.TrustCenter.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaTrustCenterCompliance = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "TrustCenterCompliance", Snake: "trust_center_compliance", Lower: "trustcentercompliance", }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "trust_center_compliance", Operation: refOpLoad, EntityID: entityID} entity, err := client.TrustCenterCompliance.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaTrustCenterDoc = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "TrustCenterDoc", Snake: "trust_center_doc", Lower: "trustcenterdoc", }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "trust_center_doc", Operation: refOpLoad, EntityID: entityID} entity, err := client.TrustCenterDoc.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaTrustCenterEntity = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "TrustCenterEntity", Snake: "trust_center_entity", Lower: "trustcenterentity", }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "trust_center_entity", Operation: refOpLoad, EntityID: entityID} entity, err := client.TrustCenterEntity.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaTrustCenterFAQ = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "TrustCenterFAQ", Snake: "trust_center_faq", Lower: "trustcenterfaq", }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "trust_center_faq", Operation: refOpLoad, EntityID: entityID} entity, err := client.TrustCenterFAQ.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaTrustCenterNDARequest = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "TrustCenterNDARequest", Snake: "trust_center_nda_request", Lower: "trustcenterndarequest", }, AnonymousInputFields: []string{"trustCenterID", "firstName", "lastName", "email", "companyName", "reason", "accessLevel"}, ConsoleRoute: &ConsoleRoute{Base: "trust-center/NDAs"}, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "trust_center_nda_request", Operation: refOpLoad, EntityID: entityID} entity, err := client.TrustCenterNDARequest.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaTrustCenterSetting = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "TrustCenterSetting", Snake: "trust_center_setting", Lower: "trustcentersetting", }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "trust_center_setting", Operation: refOpLoad, EntityID: entityID} entity, err := client.TrustCenterSetting.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaTrustCenterSubprocessor = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "TrustCenterSubprocessor", Snake: "trust_center_subprocessor", Lower: "trustcentersubprocessor", }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "trust_center_subprocessor", Operation: refOpLoad, EntityID: entityID} entity, err := client.TrustCenterSubprocessor.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaTrustCenterWatermarkConfig = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "TrustCenterWatermarkConfig", Snake: "trust_center_watermark_config", Lower: "trustcenterwatermarkconfig", }, OwnerField: trustcenterwatermarkconfig.FieldOwnerID, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "trust_center_watermark_config", Operation: refOpLoad, EntityID: entityID} entity, err := client.TrustCenterWatermarkConfig.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaUser = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "User", Snake: "user", Lower: "user", }, ProjectionType: reflect.TypeFor[UserProjection](), Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "user", Operation: refOpLoad, EntityID: entityID} entity, err := client.User.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaUserSetting = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "UserSetting", Snake: "user_setting", Lower: "usersetting", }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "user_setting", Operation: refOpLoad, EntityID: entityID} entity, err := client.UserSetting.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaVendorRiskScore = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "VendorRiskScore", Snake: "vendor_risk_score", Lower: "vendorriskscore", }, ProjectionType: reflect.TypeFor[VendorRiskScoreProjection](), OwnerField: vendorriskscore.FieldOwnerID, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "vendor_risk_score", Operation: refOpQuery} entities, err := client.VendorRiskScore.Query(). Where(vendorriskscore.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "vendor_risk_score", Operation: refOpLoad, EntityID: entityID} entity, err := client.VendorRiskScore.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaVendorScoringConfig = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "VendorScoringConfig", Snake: "vendor_scoring_config", Lower: "vendorscoringconfig", }, OwnerField: vendorscoringconfig.FieldOwnerID, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "vendor_scoring_config", Operation: refOpLoad, EntityID: entityID} entity, err := client.VendorScoringConfig.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaVulnerability = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Vulnerability", Snake: "vulnerability", Lower: "vulnerability", WorkflowEligible: true, }, ProjectionType: reflect.TypeFor[VulnerabilityProjection](), ConsoleRoute: &ConsoleRoute{Base: "exposure/vulnerabilities", IDParam: "id"}, OwnerField: vulnerability.FieldOwnerID, IntegrationM2MEdge: "integrations", IntegrationRunM2MEdge: "integration_runs", Lookup: []LookupAlternative{ {Fields: []string{"external_id"}}, }, Create: func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error) { ref := SchemaRef{Schema: "vulnerability", Operation: refOpCreate} decoded, err := jsonx.Decode[generated.CreateVulnerabilityInput](input) if err != nil { return "", logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Vulnerability.Create().SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return "", logError(ctx, ref, ErrCreateFailed, err) } entity, err := builder.Save(ctx) if err != nil { return "", logPersistError(ctx, ref, ErrCreateFailed, err) } return entity.ID, nil }, Update: func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error { ref := SchemaRef{Schema: "vulnerability", Operation: refOpUpdate, EntityID: entityID} decoded, err := jsonx.Decode[generated.UpdateVulnerabilityInput](applyClears(input)) if err != nil { return logError(ctx, ref, ErrDecodeFailed, err) } builder := client.Vulnerability.UpdateOneID(entityID).SetInput(decoded) if err := applyStampedFields(builder.Mutation(), input, FieldIntegrationRunID, FieldManagedBy, FieldSourceDefinitionID, FieldSourceDefinitionVersion, FieldSourceInstanceID); err != nil { return logError(ctx, ref, ErrUpdateFailed, err) } if err := builder.Exec(ctx); err != nil { return logPersistError(ctx, ref, ErrUpdateFailed, err) } return nil }, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "vulnerability", Operation: refOpQuery} entities, err := client.Vulnerability.Query(). Where(ownerScopeVulnerability(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "vulnerability", Operation: refOpLoad, EntityID: entityID} entity, err := client.Vulnerability.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, LoadObject: func(ctx context.Context, client *generated.Client, entityID string) (any, error) { entity, err := client.Vulnerability.Get(ctx, entityID) if err != nil { return nil, logError(ctx, SchemaRef{Schema: "vulnerability", Operation: refOpLoad, EntityID: entityID}, ErrLoadFailed, err) } return entity, nil }, Ingest: &IngestCapability{ Topic: gala.NamespacedTopic[IngestRequest](IngestTopics, "vulnerability.ingest.requested"), }, } SchemaWebauthn = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "Webauthn", Snake: "webauthn", Lower: "webauthn", }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "webauthn", Operation: refOpLoad, EntityID: entityID} entity, err := client.Webauthn.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaWorkflowAssignment = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "WorkflowAssignment", Snake: "workflow_assignment", Lower: "workflowassignment", }, OwnerField: workflowassignment.FieldOwnerID, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "workflow_assignment", Operation: refOpLoad, EntityID: entityID} entity, err := client.WorkflowAssignment.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaWorkflowAssignmentTarget = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "WorkflowAssignmentTarget", Snake: "workflow_assignment_target", Lower: "workflowassignmenttarget", }, OwnerField: workflowassignmenttarget.FieldOwnerID, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "workflow_assignment_target", Operation: refOpLoad, EntityID: entityID} entity, err := client.WorkflowAssignmentTarget.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaWorkflowDefinition = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "WorkflowDefinition", Snake: "workflow_definition", Lower: "workflowdefinition", }, ProjectionType: reflect.TypeFor[WorkflowDefinitionProjection](), OwnerField: workflowdefinition.FieldOwnerID, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "workflow_definition", Operation: refOpQuery} entities, err := client.WorkflowDefinition.Query(). Where(ownerScopeWorkflowDefinition(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "workflow_definition", Operation: refOpLoad, EntityID: entityID} entity, err := client.WorkflowDefinition.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaWorkflowEvent = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "WorkflowEvent", Snake: "workflow_event", Lower: "workflowevent", }, OwnerField: workflowevent.FieldOwnerID, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "workflow_event", Operation: refOpLoad, EntityID: entityID} entity, err := client.WorkflowEvent.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaWorkflowInstance = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "WorkflowInstance", Snake: "workflow_instance", Lower: "workflowinstance", }, ProjectionType: reflect.TypeFor[WorkflowInstanceProjection](), OwnerField: workflowinstance.FieldOwnerID, IntegrationFKField: "integration_id", Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "workflow_instance", Operation: refOpQuery} entities, err := client.WorkflowInstance.Query(). Where(workflowinstance.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "workflow_instance", Operation: refOpLoad, EntityID: entityID} entity, err := client.WorkflowInstance.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaWorkflowObjectRef = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "WorkflowObjectRef", Snake: "workflow_object_ref", Lower: "workflowobjectref", }, ProjectionType: reflect.TypeFor[WorkflowObjectRefProjection](), OwnerField: workflowobjectref.FieldOwnerID, Query: func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error) { ref := SchemaRef{Schema: "workflow_object_ref", Operation: refOpQuery} entities, err := client.WorkflowObjectRef.Query(). Where(workflowobjectref.OwnerID(orgID)). All(ctx) if err != nil { return nil, logError(ctx, ref, ErrQueryFailed, err) } results := make([]json.RawMessage, 0, len(entities)) for _, e := range entities { data, err := json.Marshal(e) if err != nil { logError(ctx, ref, ErrMarshalFailed, err) continue } results = append(results, data) } return results, nil }, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "workflow_object_ref", Operation: refOpLoad, EntityID: entityID} entity, err := client.WorkflowObjectRef.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } SchemaWorkflowProposal = &Schema{ SchemaDescriptor: SchemaDescriptor{ Name: "WorkflowProposal", Snake: "workflow_proposal", Lower: "workflowproposal", }, OwnerField: workflowproposal.FieldOwnerID, Load: func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error) { ref := SchemaRef{Schema: "workflow_proposal", Operation: refOpLoad, EntityID: entityID} entity, err := client.WorkflowProposal.Get(ctx, entityID) if err != nil { return nil, logError(ctx, ref, ErrLoadFailed, err) } data, err := json.Marshal(entity) if err != nil { return nil, logError(ctx, ref, ErrMarshalFailed, err) } return data, nil }, } )
var ActionPlanFields = struct { // ActionPlanKindID is the action_plan_kind_id field ActionPlanKindID FieldDescriptor // ActionPlanKindName is the action_plan_kind_name field ActionPlanKindName FieldDescriptor // ApprovalRequired is the approval_required field ApprovalRequired FieldDescriptor // ApproverID is the approver_id field ApproverID FieldDescriptor // Blocked is the blocked field Blocked FieldDescriptor // BlockerReason is the blocker_reason field BlockerReason FieldDescriptor // CompletedAt is the completed_at field CompletedAt FieldDescriptor // ControlSuggestions is the control_suggestions field ControlSuggestions FieldDescriptor // DelegateID is the delegate_id field DelegateID FieldDescriptor // Description is the description field Description FieldDescriptor // Details is the details field Details FieldDescriptor // DetailsJSON is the details_json field DetailsJSON FieldDescriptor // DismissedControlSuggestions is the dismissed_control_suggestions field DismissedControlSuggestions FieldDescriptor // DismissedImprovementSuggestions is the dismissed_improvement_suggestions field DismissedImprovementSuggestions FieldDescriptor // DismissedTagSuggestions is the dismissed_tag_suggestions field DismissedTagSuggestions FieldDescriptor // DueDate is the due_date field DueDate FieldDescriptor // ExternalContents is the external_contents field ExternalContents FieldDescriptor // ExternalFileID is the external_file_id field ExternalFileID FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // ImprovementSuggestions is the improvement_suggestions field ImprovementSuggestions FieldDescriptor // InternalNotes is the internal_notes field InternalNotes FieldDescriptor // InternalOwner is the internal_owner field InternalOwner FieldDescriptor // InternalOwnerGroupID is the internal_owner_group_id field InternalOwnerGroupID FieldDescriptor // InternalOwnerIdentityHolderID is the internal_owner_identity_holder_id field InternalOwnerIdentityHolderID FieldDescriptor // InternalOwnerUserID is the internal_owner_user_id field InternalOwnerUserID FieldDescriptor // ManagementMode is the management_mode field ManagementMode FieldDescriptor // Metadata is the metadata field Metadata FieldDescriptor // Name is the name field Name FieldDescriptor // Priority is the priority field Priority FieldDescriptor // RawPayload is the raw_payload field RawPayload FieldDescriptor // RequiresApproval is the requires_approval field RequiresApproval FieldDescriptor // ReviewDue is the review_due field ReviewDue FieldDescriptor // ReviewFrequency is the review_frequency field ReviewFrequency FieldDescriptor // Revision is the revision field Revision FieldDescriptor // Source is the source field Source FieldDescriptor // Status is the status field Status FieldDescriptor // SystemInternalID is the system_internal_id field SystemInternalID FieldDescriptor // TagSuggestions is the tag_suggestions field TagSuggestions FieldDescriptor // Tags is the tags field Tags FieldDescriptor // Title is the title field Title FieldDescriptor // URL is the url field URL FieldDescriptor }{ ActionPlanKindID: FieldDescriptor{Name: "action_plan_kind_id", Label: "ActionPlanKindID", Type: "string", MatchKey: true, InputKey: "action_plan_kind_id", Clearable: true}, ActionPlanKindName: FieldDescriptor{Name: "action_plan_kind_name", Label: "ActionPlanKindName", Type: "string", MatchKey: true, InputKey: "action_plan_kind_name", Clearable: true, CaseInsensitive: true}, ApprovalRequired: FieldDescriptor{Name: "approval_required", Label: "ApprovalRequired", Type: "bool", InputKey: "approval_required", Clearable: true}, ApproverID: FieldDescriptor{Name: "approver_id", Label: "ApproverID", Type: "string", MatchKey: true, InputKey: "approver_id", Clearable: true}, Blocked: FieldDescriptor{Name: "blocked", Label: "Blocked", Type: "bool", InputKey: "blocked"}, BlockerReason: FieldDescriptor{Name: "blocker_reason", Label: "BlockerReason", Type: "string", MatchKey: true, InputKey: "blocker_reason", Clearable: true}, CompletedAt: FieldDescriptor{Name: "completed_at", Label: "CompletedAt", Type: "time.Time", InputKey: "completed_at", Clearable: true}, ControlSuggestions: FieldDescriptor{Name: "control_suggestions", Label: "ControlSuggestions", Type: "[]string", InputKey: "control_suggestions", Clearable: true}, DelegateID: FieldDescriptor{Name: "delegate_id", Label: "DelegateID", Type: "string", MatchKey: true, InputKey: "delegate_id", Clearable: true}, Description: FieldDescriptor{Name: "description", Label: "Description", Type: "string", MatchKey: true, InputKey: "description", Clearable: true}, Details: FieldDescriptor{Name: "details", Label: "Details", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "details", Clearable: true}, DetailsJSON: FieldDescriptor{Name: "details_json", Label: "DetailsJSON", Type: "[]interface {}", WorkflowEligible: true, InputKey: "details_json", Clearable: true}, DismissedControlSuggestions: FieldDescriptor{Name: "dismissed_control_suggestions", Label: "DismissedControlSuggestions", Type: "[]string", InputKey: "dismissed_control_suggestions", Clearable: true}, DismissedImprovementSuggestions: FieldDescriptor{Name: "dismissed_improvement_suggestions", Label: "DismissedImprovementSuggestions", Type: "[]string", InputKey: "dismissed_improvement_suggestions", Clearable: true}, DismissedTagSuggestions: FieldDescriptor{Name: "dismissed_tag_suggestions", Label: "DismissedTagSuggestions", Type: "[]string", InputKey: "dismissed_tag_suggestions", Clearable: true}, DueDate: FieldDescriptor{Name: "due_date", Label: "DueDate", Type: "time.Time", InputKey: "due_date", Clearable: true}, ExternalContents: FieldDescriptor{Name: "external_contents", Label: "ExternalContents", Type: "string", MatchKey: true, InputKey: "external_contents", Clearable: true}, ExternalFileID: FieldDescriptor{Name: "external_file_id", Label: "ExternalFileID", Type: "string", MatchKey: true, InputKey: "external_file_id", LookupKey: true, Clearable: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, ImprovementSuggestions: FieldDescriptor{Name: "improvement_suggestions", Label: "ImprovementSuggestions", Type: "[]string", InputKey: "improvement_suggestions", Clearable: true}, InternalNotes: FieldDescriptor{Name: "internal_notes", Label: "InternalNotes", Type: "string", MatchKey: true, InputKey: "internal_notes", Clearable: true}, InternalOwner: FieldDescriptor{Name: "internal_owner", Label: "InternalOwner", Type: "string", MatchKey: true, InputKey: "internal_owner", Clearable: true}, InternalOwnerGroupID: FieldDescriptor{Name: "internal_owner_group_id", Label: "InternalOwnerGroupID", Type: "string", MatchKey: true, InputKey: "internal_owner_group_id", Clearable: true}, InternalOwnerIdentityHolderID: FieldDescriptor{Name: "internal_owner_identity_holder_id", Label: "InternalOwnerIdentityHolderID", Type: "string", MatchKey: true, InputKey: "internal_owner_identity_holder_id", Clearable: true}, InternalOwnerUserID: FieldDescriptor{Name: "internal_owner_user_id", Label: "InternalOwnerUserID", Type: "string", MatchKey: true, InputKey: "internal_owner_user_id", Clearable: true}, ManagementMode: FieldDescriptor{Name: "management_mode", Label: "ManagementMode", Type: "enums.DocumentManagementMode", InputKey: "management_mode", Clearable: true}, Metadata: FieldDescriptor{Name: "metadata", Label: "Metadata", Type: "map[string]interface {}", InputKey: "metadata", Clearable: true, Volatile: true}, Name: FieldDescriptor{Name: "name", Label: "Name", Type: "string", MatchKey: true, InputKey: "name", DisplayKey: true}, Priority: FieldDescriptor{Name: "priority", Label: "Priority", Type: "enums.Priority", InputKey: "priority", Clearable: true}, RawPayload: FieldDescriptor{Name: "raw_payload", Label: "RawPayload", Type: "map[string]interface {}", InputKey: "raw_payload", Clearable: true, Volatile: true}, RequiresApproval: FieldDescriptor{Name: "requires_approval", Label: "RequiresApproval", Type: "bool", InputKey: "requires_approval"}, ReviewDue: FieldDescriptor{Name: "review_due", Label: "ReviewDue", Type: "time.Time", InputKey: "review_due", Clearable: true}, ReviewFrequency: FieldDescriptor{Name: "review_frequency", Label: "ReviewFrequency", Type: "enums.Frequency", InputKey: "review_frequency", Clearable: true}, Revision: FieldDescriptor{Name: "revision", Label: "Revision", Type: "string", MatchKey: true, InputKey: "revision", Clearable: true}, Source: FieldDescriptor{Name: "source", Label: "Source", Type: "string", MatchKey: true, InputKey: "source", Clearable: true}, Status: FieldDescriptor{Name: "status", Label: "Status", Type: "enums.DocumentStatus", WorkflowEligible: true, InputKey: "status", Clearable: true}, SystemInternalID: FieldDescriptor{Name: "system_internal_id", Label: "SystemInternalID", Type: "string", MatchKey: true, InputKey: "system_internal_id", Clearable: true}, TagSuggestions: FieldDescriptor{Name: "tag_suggestions", Label: "TagSuggestions", Type: "[]string", InputKey: "tag_suggestions", Clearable: true}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, Title: FieldDescriptor{Name: "title", Label: "Title", Type: "string", MatchKey: true, InputKey: "title"}, URL: FieldDescriptor{Name: "url", Label: "URL", Type: "string", MatchKey: true, InputKey: "url", Clearable: true}, }
ActionPlanFields indexes the provider-mappable fields of ActionPlan
var AllMutationOps = []string{OpCreate, OpUpdate, OpUpdateOne, OpDelete, OpDeleteOne, OpSoftDelete}
AllMutationOps is every operation including soft deletes
var AssessmentFields = struct { // AssessmentType is the assessment_type field AssessmentType FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // InternalNotes is the internal_notes field InternalNotes FieldDescriptor // Jsonconfig is the jsonconfig field Jsonconfig FieldDescriptor // Name is the name field Name FieldDescriptor // ResponseDueDuration is the response_due_duration field ResponseDueDuration FieldDescriptor // SystemInternalID is the system_internal_id field SystemInternalID FieldDescriptor // Tags is the tags field Tags FieldDescriptor // TemplateID is the template_id field TemplateID FieldDescriptor // Uischema is the uischema field Uischema FieldDescriptor }{ AssessmentType: FieldDescriptor{Name: "assessment_type", Label: "AssessmentType", Type: "enums.AssessmentType", InputKey: "assessment_type"}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, InternalNotes: FieldDescriptor{Name: "internal_notes", Label: "InternalNotes", Type: "string", MatchKey: true, InputKey: "internal_notes", Clearable: true}, Jsonconfig: FieldDescriptor{Name: "jsonconfig", Label: "Jsonconfig", Type: "map[string]interface {}", InputKey: "jsonconfig", Clearable: true}, Name: FieldDescriptor{Name: "name", Label: "Name", Type: "string", MatchKey: true, InputKey: "name"}, ResponseDueDuration: FieldDescriptor{Name: "response_due_duration", Label: "ResponseDueDuration", Type: "int64", WorkflowEligible: true, InputKey: "response_due_duration", Clearable: true}, SystemInternalID: FieldDescriptor{Name: "system_internal_id", Label: "SystemInternalID", Type: "string", MatchKey: true, InputKey: "system_internal_id", Clearable: true}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, TemplateID: FieldDescriptor{Name: "template_id", Label: "TemplateID", Type: "string", MatchKey: true, InputKey: "template_id", Clearable: true}, Uischema: FieldDescriptor{Name: "uischema", Label: "Uischema", Type: "map[string]interface {}", InputKey: "uischema", Clearable: true}, }
AssessmentFields indexes the provider-mappable fields of Assessment
var AssessmentPolicyFields = struct { // AssessmentID is the assessment_id field AssessmentID FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // InternalPolicyID is the internal_policy_id field InternalPolicyID FieldDescriptor // PolicyRevision is the policy_revision field PolicyRevision FieldDescriptor }{ AssessmentID: FieldDescriptor{Name: "assessment_id", Label: "AssessmentID", Type: "string", MatchKey: true, InputKey: "assessment_id"}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, InternalPolicyID: FieldDescriptor{Name: "internal_policy_id", Label: "InternalPolicyID", Type: "string", MatchKey: true, InputKey: "internal_policy_id"}, PolicyRevision: FieldDescriptor{Name: "policy_revision", Label: "PolicyRevision", Type: "string", MatchKey: true, InputKey: "policy_revision", Clearable: true}, }
AssessmentPolicyFields indexes the provider-mappable fields of AssessmentPolicy
var AssetFields = struct { // AccessModelID is the access_model_id field AccessModelID FieldDescriptor // AccessModelName is the access_model_name field AccessModelName FieldDescriptor // AssetDataClassificationID is the asset_data_classification_id field AssetDataClassificationID FieldDescriptor // AssetDataClassificationName is the asset_data_classification_name field AssetDataClassificationName FieldDescriptor // AssetSubtypeID is the asset_subtype_id field AssetSubtypeID FieldDescriptor // AssetSubtypeName is the asset_subtype_name field AssetSubtypeName FieldDescriptor // AssetType is the asset_type field AssetType FieldDescriptor // Categories is the categories field Categories FieldDescriptor // ContainsPii is the contains_pii field ContainsPii FieldDescriptor // CostCenter is the cost_center field CostCenter FieldDescriptor // CriticalityID is the criticality_id field CriticalityID FieldDescriptor // CriticalityName is the criticality_name field CriticalityName FieldDescriptor // Description is the description field Description FieldDescriptor // DisplayName is the display_name field DisplayName FieldDescriptor // EncryptionStatusID is the encryption_status_id field EncryptionStatusID FieldDescriptor // EncryptionStatusName is the encryption_status_name field EncryptionStatusName FieldDescriptor // EnvironmentID is the environment_id field EnvironmentID FieldDescriptor // EnvironmentName is the environment_name field EnvironmentName FieldDescriptor // EstimatedMonthlyCost is the estimated_monthly_cost field EstimatedMonthlyCost FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // Identifier is the identifier field Identifier FieldDescriptor // InternalNotes is the internal_notes field InternalNotes FieldDescriptor // InternalOwner is the internal_owner field InternalOwner FieldDescriptor // InternalOwnerGroupID is the internal_owner_group_id field InternalOwnerGroupID FieldDescriptor // InternalOwnerIdentityHolderID is the internal_owner_identity_holder_id field InternalOwnerIdentityHolderID FieldDescriptor // InternalOwnerUserID is the internal_owner_user_id field InternalOwnerUserID FieldDescriptor // Name is the name field Name FieldDescriptor // ObservedAt is the observed_at field ObservedAt FieldDescriptor // PhysicalLocation is the physical_location field PhysicalLocation FieldDescriptor // PurchaseDate is the purchase_date field PurchaseDate FieldDescriptor // Region is the region field Region FieldDescriptor // ScopeID is the scope_id field ScopeID FieldDescriptor // ScopeName is the scope_name field ScopeName FieldDescriptor // SecurityTierID is the security_tier_id field SecurityTierID FieldDescriptor // SecurityTierName is the security_tier_name field SecurityTierName FieldDescriptor // SourceIdentifier is the source_identifier field SourceIdentifier FieldDescriptor // SourceType is the source_type field SourceType FieldDescriptor // SystemInternalID is the system_internal_id field SystemInternalID FieldDescriptor // Tags is the tags field Tags FieldDescriptor // Website is the website field Website FieldDescriptor }{ AccessModelID: FieldDescriptor{Name: "access_model_id", Label: "AccessModelID", Type: "string", MatchKey: true, InputKey: "access_model_id", Clearable: true}, AccessModelName: FieldDescriptor{Name: "access_model_name", Label: "AccessModelName", Type: "string", MatchKey: true, InputKey: "access_model_name", Clearable: true, CaseInsensitive: true}, AssetDataClassificationID: FieldDescriptor{Name: "asset_data_classification_id", Label: "AssetDataClassificationID", Type: "string", MatchKey: true, InputKey: "asset_data_classification_id", Clearable: true}, AssetDataClassificationName: FieldDescriptor{Name: "asset_data_classification_name", Label: "AssetDataClassificationName", Type: "string", MatchKey: true, InputKey: "asset_data_classification_name", Clearable: true, CaseInsensitive: true}, AssetSubtypeID: FieldDescriptor{Name: "asset_subtype_id", Label: "AssetSubtypeID", Type: "string", MatchKey: true, InputKey: "asset_subtype_id", Clearable: true}, AssetSubtypeName: FieldDescriptor{Name: "asset_subtype_name", Label: "AssetSubtypeName", Type: "string", MatchKey: true, InputKey: "asset_subtype_name", Clearable: true, CaseInsensitive: true}, AssetType: FieldDescriptor{Name: "asset_type", Label: "AssetType", Type: "enums.AssetType", InputKey: "asset_type"}, Categories: FieldDescriptor{Name: "categories", Label: "Categories", Type: "[]string", InputKey: "categories", Clearable: true}, ContainsPii: FieldDescriptor{Name: "contains_pii", Label: "ContainsPii", Type: "bool", InputKey: "contains_pii", Clearable: true}, CostCenter: FieldDescriptor{Name: "cost_center", Label: "CostCenter", Type: "string", MatchKey: true, InputKey: "cost_center", Clearable: true}, CriticalityID: FieldDescriptor{Name: "criticality_id", Label: "CriticalityID", Type: "string", MatchKey: true, InputKey: "criticality_id", Clearable: true}, CriticalityName: FieldDescriptor{Name: "criticality_name", Label: "CriticalityName", Type: "string", MatchKey: true, InputKey: "criticality_name", Clearable: true, CaseInsensitive: true}, Description: FieldDescriptor{Name: "description", Label: "Description", Type: "string", MatchKey: true, InputKey: "description", Clearable: true}, DisplayName: FieldDescriptor{Name: "display_name", Label: "DisplayName", Type: "string", MatchKey: true, InputKey: "display_name", Clearable: true}, EncryptionStatusID: FieldDescriptor{Name: "encryption_status_id", Label: "EncryptionStatusID", Type: "string", MatchKey: true, InputKey: "encryption_status_id", Clearable: true}, EncryptionStatusName: FieldDescriptor{Name: "encryption_status_name", Label: "EncryptionStatusName", Type: "string", MatchKey: true, InputKey: "encryption_status_name", Clearable: true, CaseInsensitive: true}, EnvironmentID: FieldDescriptor{Name: "environment_id", Label: "EnvironmentID", Type: "string", MatchKey: true, InputKey: "environment_id", Clearable: true}, EnvironmentName: FieldDescriptor{Name: "environment_name", Label: "EnvironmentName", Type: "string", MatchKey: true, InputKey: "environment_name", Clearable: true, CaseInsensitive: true}, EstimatedMonthlyCost: FieldDescriptor{Name: "estimated_monthly_cost", Label: "EstimatedMonthlyCost", Type: "float64", InputKey: "estimated_monthly_cost", Clearable: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, Identifier: FieldDescriptor{Name: "identifier", Label: "Identifier", Type: "string", MatchKey: true, InputKey: "identifier", Clearable: true}, InternalNotes: FieldDescriptor{Name: "internal_notes", Label: "InternalNotes", Type: "string", MatchKey: true, InputKey: "internal_notes", Clearable: true}, InternalOwner: FieldDescriptor{Name: "internal_owner", Label: "InternalOwner", Type: "string", MatchKey: true, InputKey: "internal_owner", Clearable: true}, InternalOwnerGroupID: FieldDescriptor{Name: "internal_owner_group_id", Label: "InternalOwnerGroupID", Type: "string", MatchKey: true, InputKey: "internal_owner_group_id", Clearable: true}, InternalOwnerIdentityHolderID: FieldDescriptor{Name: "internal_owner_identity_holder_id", Label: "InternalOwnerIdentityHolderID", Type: "string", MatchKey: true, InputKey: "internal_owner_identity_holder_id", Clearable: true}, InternalOwnerUserID: FieldDescriptor{Name: "internal_owner_user_id", Label: "InternalOwnerUserID", Type: "string", MatchKey: true, InputKey: "internal_owner_user_id", Clearable: true}, Name: FieldDescriptor{Name: "name", Label: "Name", Type: "string", MatchKey: true, InputKey: "name"}, ObservedAt: FieldDescriptor{Name: "observed_at", Label: "ObservedAt", Type: "models.DateTime", InputKey: "observed_at", Clearable: true, Volatile: true}, PhysicalLocation: FieldDescriptor{Name: "physical_location", Label: "PhysicalLocation", Type: "string", MatchKey: true, InputKey: "physical_location", Clearable: true}, PurchaseDate: FieldDescriptor{Name: "purchase_date", Label: "PurchaseDate", Type: "models.DateTime", InputKey: "purchase_date", Clearable: true}, Region: FieldDescriptor{Name: "region", Label: "Region", Type: "string", MatchKey: true, InputKey: "region", Clearable: true}, ScopeID: FieldDescriptor{Name: "scope_id", Label: "ScopeID", Type: "string", MatchKey: true, InputKey: "scope_id", Clearable: true}, ScopeName: FieldDescriptor{Name: "scope_name", Label: "ScopeName", Type: "string", MatchKey: true, InputKey: "scope_name", Clearable: true, CaseInsensitive: true}, SecurityTierID: FieldDescriptor{Name: "security_tier_id", Label: "SecurityTierID", Type: "string", MatchKey: true, InputKey: "security_tier_id", Clearable: true}, SecurityTierName: FieldDescriptor{Name: "security_tier_name", Label: "SecurityTierName", Type: "string", MatchKey: true, InputKey: "security_tier_name", Clearable: true, CaseInsensitive: true}, SourceIdentifier: FieldDescriptor{Name: "source_identifier", Label: "SourceIdentifier", Type: "string", MatchKey: true, InputKey: "source_identifier", LookupKey: true, Clearable: true}, SourceType: FieldDescriptor{Name: "source_type", Label: "SourceType", Type: "enums.SourceType", InputKey: "source_type"}, SystemInternalID: FieldDescriptor{Name: "system_internal_id", Label: "SystemInternalID", Type: "string", MatchKey: true, InputKey: "system_internal_id", Clearable: true}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, Website: FieldDescriptor{Name: "website", Label: "Website", Type: "string", MatchKey: true, InputKey: "website", Clearable: true}, }
AssetFields indexes the provider-mappable fields of Asset
var CampaignFields = struct { // AssessmentID is the assessment_id field AssessmentID FieldDescriptor // CampaignType is the campaign_type field CampaignType FieldDescriptor // CompletedAt is the completed_at field CompletedAt FieldDescriptor // Description is the description field Description FieldDescriptor // DueDate is the due_date field DueDate FieldDescriptor // EmailBrandingID is the email_branding_id field EmailBrandingID FieldDescriptor // EmailTemplateID is the email_template_id field EmailTemplateID FieldDescriptor // EntityID is the entity_id field EntityID FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // IntegrationID is the integration_id field IntegrationID FieldDescriptor // InternalOwner is the internal_owner field InternalOwner FieldDescriptor // InternalOwnerGroupID is the internal_owner_group_id field InternalOwnerGroupID FieldDescriptor // InternalOwnerIdentityHolderID is the internal_owner_identity_holder_id field InternalOwnerIdentityHolderID FieldDescriptor // InternalOwnerUserID is the internal_owner_user_id field InternalOwnerUserID FieldDescriptor // IsActive is the is_active field IsActive FieldDescriptor // IsRecurring is the is_recurring field IsRecurring FieldDescriptor // LastResentAt is the last_resent_at field LastResentAt FieldDescriptor // LastRunAt is the last_run_at field LastRunAt FieldDescriptor // LaunchedAt is the launched_at field LaunchedAt FieldDescriptor // Metadata is the metadata field Metadata FieldDescriptor // Name is the name field Name FieldDescriptor // NextRunAt is the next_run_at field NextRunAt FieldDescriptor // RecipientCount is the recipient_count field RecipientCount FieldDescriptor // RecurrenceEndAt is the recurrence_end_at field RecurrenceEndAt FieldDescriptor // RecurrenceFrequency is the recurrence_frequency field RecurrenceFrequency FieldDescriptor // RecurrenceInterval is the recurrence_interval field RecurrenceInterval FieldDescriptor // RecurrenceTimezone is the recurrence_timezone field RecurrenceTimezone FieldDescriptor // ResendCount is the resend_count field ResendCount FieldDescriptor // ScheduledAt is the scheduled_at field ScheduledAt FieldDescriptor // Status is the status field Status FieldDescriptor // Tags is the tags field Tags FieldDescriptor // TemplateID is the template_id field TemplateID FieldDescriptor // TrustCenterID is the trust_center_id field TrustCenterID FieldDescriptor }{ AssessmentID: FieldDescriptor{Name: "assessment_id", Label: "AssessmentID", Type: "string", MatchKey: true, InputKey: "assessment_id", Clearable: true}, CampaignType: FieldDescriptor{Name: "campaign_type", Label: "CampaignType", Type: "enums.CampaignType", InputKey: "campaign_type"}, CompletedAt: FieldDescriptor{Name: "completed_at", Label: "CompletedAt", Type: "models.DateTime", InputKey: "completed_at", Clearable: true}, Description: FieldDescriptor{Name: "description", Label: "Description", Type: "string", MatchKey: true, InputKey: "description", Clearable: true}, DueDate: FieldDescriptor{Name: "due_date", Label: "DueDate", Type: "models.DateTime", WorkflowEligible: true, InputKey: "due_date", Clearable: true}, EmailBrandingID: FieldDescriptor{Name: "email_branding_id", Label: "EmailBrandingID", Type: "string", MatchKey: true, InputKey: "email_branding_id", Clearable: true}, EmailTemplateID: FieldDescriptor{Name: "email_template_id", Label: "EmailTemplateID", Type: "string", MatchKey: true, InputKey: "email_template_id", Clearable: true}, EntityID: FieldDescriptor{Name: "entity_id", Label: "EntityID", Type: "string", MatchKey: true, InputKey: "entity_id", Clearable: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, IntegrationID: FieldDescriptor{Name: "integration_id", Label: "IntegrationID", Type: "string", MatchKey: true, InputKey: "integration_id", Clearable: true}, InternalOwner: FieldDescriptor{Name: "internal_owner", Label: "InternalOwner", Type: "string", MatchKey: true, InputKey: "internal_owner", Clearable: true}, InternalOwnerGroupID: FieldDescriptor{Name: "internal_owner_group_id", Label: "InternalOwnerGroupID", Type: "string", MatchKey: true, InputKey: "internal_owner_group_id", Clearable: true}, InternalOwnerIdentityHolderID: FieldDescriptor{Name: "internal_owner_identity_holder_id", Label: "InternalOwnerIdentityHolderID", Type: "string", MatchKey: true, InputKey: "internal_owner_identity_holder_id", Clearable: true}, InternalOwnerUserID: FieldDescriptor{Name: "internal_owner_user_id", Label: "InternalOwnerUserID", Type: "string", MatchKey: true, InputKey: "internal_owner_user_id", Clearable: true}, IsActive: FieldDescriptor{Name: "is_active", Label: "IsActive", Type: "bool", WorkflowEligible: true, InputKey: "is_active"}, IsRecurring: FieldDescriptor{Name: "is_recurring", Label: "IsRecurring", Type: "bool", WorkflowEligible: true, InputKey: "is_recurring"}, LastResentAt: FieldDescriptor{Name: "last_resent_at", Label: "LastResentAt", Type: "models.DateTime", InputKey: "last_resent_at", Clearable: true}, LastRunAt: FieldDescriptor{Name: "last_run_at", Label: "LastRunAt", Type: "models.DateTime", InputKey: "last_run_at", Clearable: true}, LaunchedAt: FieldDescriptor{Name: "launched_at", Label: "LaunchedAt", Type: "models.DateTime", InputKey: "launched_at", Clearable: true}, Metadata: FieldDescriptor{Name: "metadata", Label: "Metadata", Type: "map[string]interface {}", InputKey: "metadata", Clearable: true}, Name: FieldDescriptor{Name: "name", Label: "Name", Type: "string", MatchKey: true, InputKey: "name"}, NextRunAt: FieldDescriptor{Name: "next_run_at", Label: "NextRunAt", Type: "models.DateTime", InputKey: "next_run_at", Clearable: true}, RecipientCount: FieldDescriptor{Name: "recipient_count", Label: "RecipientCount", Type: "int", WorkflowEligible: true, InputKey: "recipient_count", Clearable: true}, RecurrenceEndAt: FieldDescriptor{Name: "recurrence_end_at", Label: "RecurrenceEndAt", Type: "models.DateTime", InputKey: "recurrence_end_at", Clearable: true}, RecurrenceFrequency: FieldDescriptor{Name: "recurrence_frequency", Label: "RecurrenceFrequency", Type: "enums.Frequency", WorkflowEligible: true, InputKey: "recurrence_frequency", Clearable: true}, RecurrenceInterval: FieldDescriptor{Name: "recurrence_interval", Label: "RecurrenceInterval", Type: "int", InputKey: "recurrence_interval", Clearable: true}, RecurrenceTimezone: FieldDescriptor{Name: "recurrence_timezone", Label: "RecurrenceTimezone", Type: "string", MatchKey: true, InputKey: "recurrence_timezone", Clearable: true}, ResendCount: FieldDescriptor{Name: "resend_count", Label: "ResendCount", Type: "int", WorkflowEligible: true, InputKey: "resend_count", Clearable: true}, ScheduledAt: FieldDescriptor{Name: "scheduled_at", Label: "ScheduledAt", Type: "models.DateTime", WorkflowEligible: true, InputKey: "scheduled_at", Clearable: true}, Status: FieldDescriptor{Name: "status", Label: "Status", Type: "enums.CampaignStatus", WorkflowEligible: true, InputKey: "status"}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, TemplateID: FieldDescriptor{Name: "template_id", Label: "TemplateID", Type: "string", MatchKey: true, InputKey: "template_id", Clearable: true}, TrustCenterID: FieldDescriptor{Name: "trust_center_id", Label: "TrustCenterID", Type: "string", MatchKey: true, InputKey: "trust_center_id", Clearable: true}, }
CampaignFields indexes the provider-mappable fields of Campaign
var CheckResultFields = struct { // Details is the details field Details FieldDescriptor // ExternalURI is the external_uri field ExternalURI FieldDescriptor // LastObservedAt is the last_observed_at field LastObservedAt FieldDescriptor // ParentExternalID is the parent_external_id field ParentExternalID FieldDescriptor // Source is the source field Source FieldDescriptor // Status is the status field Status FieldDescriptor // Tags is the tags field Tags FieldDescriptor }{ Details: FieldDescriptor{Name: "details", Label: "Details", Type: "string", MatchKey: true, InputKey: "details", Clearable: true}, ExternalURI: FieldDescriptor{Name: "external_uri", Label: "ExternalURI", Type: "string", MatchKey: true, InputKey: "external_uri", Clearable: true}, LastObservedAt: FieldDescriptor{Name: "last_observed_at", Label: "LastObservedAt", Type: "models.DateTime", InputKey: "last_observed_at", Clearable: true, Volatile: true}, ParentExternalID: FieldDescriptor{Name: "parent_external_id", Label: "ParentExternalID", Type: "string", MatchKey: true, InputKey: "parent_external_id", LookupKey: true, Clearable: true}, Source: FieldDescriptor{Name: "source", Label: "Source", Type: "string", MatchKey: true, InputKey: "source"}, Status: FieldDescriptor{Name: "status", Label: "Status", Type: "enums.CheckStatus", InputKey: "status"}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, }
CheckResultFields indexes the provider-mappable fields of CheckResult
var ContactFields = struct { // Address is the address field Address FieldDescriptor // Company is the company field Company FieldDescriptor // Email is the email field Email FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // FullName is the full_name field FullName FieldDescriptor // ObservedAt is the observed_at field ObservedAt FieldDescriptor // PhoneNumber is the phone_number field PhoneNumber FieldDescriptor // Status is the status field Status FieldDescriptor // Tags is the tags field Tags FieldDescriptor // Title is the title field Title FieldDescriptor }{ Address: FieldDescriptor{Name: "address", Label: "Address", Type: "string", MatchKey: true, InputKey: "address", Clearable: true}, Company: FieldDescriptor{Name: "company", Label: "Company", Type: "string", MatchKey: true, InputKey: "company", Clearable: true}, Email: FieldDescriptor{Name: "email", Label: "Email", Type: "string", MatchKey: true, InputKey: "email", Clearable: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, FullName: FieldDescriptor{Name: "full_name", Label: "FullName", Type: "string", MatchKey: true, InputKey: "full_name", Clearable: true}, ObservedAt: FieldDescriptor{Name: "observed_at", Label: "ObservedAt", Type: "models.DateTime", InputKey: "observed_at", Clearable: true, Volatile: true}, PhoneNumber: FieldDescriptor{Name: "phone_number", Label: "PhoneNumber", Type: "string", MatchKey: true, InputKey: "phone_number", Clearable: true}, Status: FieldDescriptor{Name: "status", Label: "Status", Type: "enums.UserStatus", InputKey: "status"}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, Title: FieldDescriptor{Name: "title", Label: "Title", Type: "string", MatchKey: true, InputKey: "title", Clearable: true}, }
ContactFields indexes the provider-mappable fields of Contact
var ControlFields = struct { // Aliases is the aliases field Aliases FieldDescriptor // AssessmentMethods is the assessment_methods field AssessmentMethods FieldDescriptor // AssessmentObjectives is the assessment_objectives field AssessmentObjectives FieldDescriptor // AuditorReferenceID is the auditor_reference_id field AuditorReferenceID FieldDescriptor // Category is the category field Category FieldDescriptor // CategoryID is the category_id field CategoryID FieldDescriptor // ControlKindID is the control_kind_id field ControlKindID FieldDescriptor // ControlKindName is the control_kind_name field ControlKindName FieldDescriptor // ControlOwnerID is the control_owner_id field ControlOwnerID FieldDescriptor // ControlQuestions is the control_questions field ControlQuestions FieldDescriptor // DelegateID is the delegate_id field DelegateID FieldDescriptor // Description is the description field Description FieldDescriptor // DescriptionJSON is the description_json field DescriptionJSON FieldDescriptor // EnvironmentID is the environment_id field EnvironmentID FieldDescriptor // EnvironmentName is the environment_name field EnvironmentName FieldDescriptor // EvidenceRequests is the evidence_requests field EvidenceRequests FieldDescriptor // ExampleEvidence is the example_evidence field ExampleEvidence FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // ExternalUUID is the external_uuid field ExternalUUID FieldDescriptor // ImplementationDescription is the implementation_description field ImplementationDescription FieldDescriptor // ImplementationGuidance is the implementation_guidance field ImplementationGuidance FieldDescriptor // ImplementationStatus is the implementation_status field ImplementationStatus FieldDescriptor // InternalNotes is the internal_notes field InternalNotes FieldDescriptor // MappedCategories is the mapped_categories field MappedCategories FieldDescriptor // PublicRepresentation is the public_representation field PublicRepresentation FieldDescriptor // RefCode is the ref_code field RefCode FieldDescriptor // ReferenceFrameworkRevision is the reference_framework_revision field ReferenceFrameworkRevision FieldDescriptor // ReferenceID is the reference_id field ReferenceID FieldDescriptor // References is the references field References FieldDescriptor // ResponsiblePartyID is the responsible_party_id field ResponsiblePartyID FieldDescriptor // ScopeID is the scope_id field ScopeID FieldDescriptor // ScopeName is the scope_name field ScopeName FieldDescriptor // Source is the source field Source FieldDescriptor // SourceName is the source_name field SourceName FieldDescriptor // StandardID is the standard_id field StandardID FieldDescriptor // Status is the status field Status FieldDescriptor // Subcategory is the subcategory field Subcategory FieldDescriptor // SystemInternalID is the system_internal_id field SystemInternalID FieldDescriptor // Tags is the tags field Tags FieldDescriptor // TestingProcedures is the testing_procedures field TestingProcedures FieldDescriptor // Title is the title field Title FieldDescriptor // TrustCenterVisibility is the trust_center_visibility field TrustCenterVisibility FieldDescriptor }{ Aliases: FieldDescriptor{Name: "aliases", Label: "Aliases", Type: "[]string", InputKey: "aliases", Clearable: true}, AssessmentMethods: FieldDescriptor{Name: "assessment_methods", Label: "AssessmentMethods", Type: "[]models.AssessmentMethod", InputKey: "assessment_methods", Clearable: true}, AssessmentObjectives: FieldDescriptor{Name: "assessment_objectives", Label: "AssessmentObjectives", Type: "[]models.AssessmentObjective", InputKey: "assessment_objectives", Clearable: true}, AuditorReferenceID: FieldDescriptor{Name: "auditor_reference_id", Label: "AuditorReferenceID", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "auditor_reference_id", Clearable: true}, Category: FieldDescriptor{Name: "category", Label: "Category", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "category", Clearable: true}, CategoryID: FieldDescriptor{Name: "category_id", Label: "CategoryID", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "category_id", Clearable: true}, ControlKindID: FieldDescriptor{Name: "control_kind_id", Label: "ControlKindID", Type: "string", MatchKey: true, InputKey: "control_kind_id", Clearable: true}, ControlKindName: FieldDescriptor{Name: "control_kind_name", Label: "ControlKindName", Type: "string", MatchKey: true, InputKey: "control_kind_name", Clearable: true, CaseInsensitive: true}, ControlOwnerID: FieldDescriptor{Name: "control_owner_id", Label: "ControlOwnerID", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "control_owner_id", Clearable: true}, ControlQuestions: FieldDescriptor{Name: "control_questions", Label: "ControlQuestions", Type: "[]string", InputKey: "control_questions", Clearable: true}, DelegateID: FieldDescriptor{Name: "delegate_id", Label: "DelegateID", Type: "string", MatchKey: true, InputKey: "delegate_id", Clearable: true}, Description: FieldDescriptor{Name: "description", Label: "Description", Type: "string", MatchKey: true, InputKey: "description", Clearable: true}, DescriptionJSON: FieldDescriptor{Name: "description_json", Label: "DescriptionJSON", Type: "[]interface {}", InputKey: "description_json", Clearable: true}, EnvironmentID: FieldDescriptor{Name: "environment_id", Label: "EnvironmentID", Type: "string", MatchKey: true, InputKey: "environment_id", Clearable: true}, EnvironmentName: FieldDescriptor{Name: "environment_name", Label: "EnvironmentName", Type: "string", MatchKey: true, InputKey: "environment_name", Clearable: true, CaseInsensitive: true}, EvidenceRequests: FieldDescriptor{Name: "evidence_requests", Label: "EvidenceRequests", Type: "[]models.EvidenceRequests", InputKey: "evidence_requests", Clearable: true}, ExampleEvidence: FieldDescriptor{Name: "example_evidence", Label: "ExampleEvidence", Type: "[]models.ExampleEvidence", InputKey: "example_evidence", Clearable: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, ExternalUUID: FieldDescriptor{Name: "external_uuid", Label: "ExternalUUID", Type: "string", MatchKey: true, InputKey: "external_uuid", Clearable: true}, ImplementationDescription: FieldDescriptor{Name: "implementation_description", Label: "ImplementationDescription", Type: "string", MatchKey: true, InputKey: "implementation_description", Clearable: true}, ImplementationGuidance: FieldDescriptor{Name: "implementation_guidance", Label: "ImplementationGuidance", Type: "[]models.ImplementationGuidance", InputKey: "implementation_guidance", Clearable: true}, ImplementationStatus: FieldDescriptor{Name: "implementation_status", Label: "ImplementationStatus", Type: "enums.ControlImplementationStatus", InputKey: "implementation_status", Clearable: true}, InternalNotes: FieldDescriptor{Name: "internal_notes", Label: "InternalNotes", Type: "string", MatchKey: true, InputKey: "internal_notes", Clearable: true}, MappedCategories: FieldDescriptor{Name: "mapped_categories", Label: "MappedCategories", Type: "[]string", InputKey: "mapped_categories", Clearable: true}, PublicRepresentation: FieldDescriptor{Name: "public_representation", Label: "PublicRepresentation", Type: "string", MatchKey: true, InputKey: "public_representation", Clearable: true}, RefCode: FieldDescriptor{Name: "ref_code", Label: "RefCode", Type: "string", MatchKey: true, InputKey: "ref_code", WebhookPayload: true}, ReferenceFrameworkRevision: FieldDescriptor{Name: "reference_framework_revision", Label: "ReferenceFrameworkRevision", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "reference_framework_revision", Clearable: true}, ReferenceID: FieldDescriptor{Name: "reference_id", Label: "ReferenceID", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "reference_id", Clearable: true}, References: FieldDescriptor{Name: "references", Label: "References", Type: "[]models.Reference", InputKey: "references", Clearable: true}, ResponsiblePartyID: FieldDescriptor{Name: "responsible_party_id", Label: "ResponsiblePartyID", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "responsible_party_id", Clearable: true}, ScopeID: FieldDescriptor{Name: "scope_id", Label: "ScopeID", Type: "string", MatchKey: true, InputKey: "scope_id", Clearable: true}, ScopeName: FieldDescriptor{Name: "scope_name", Label: "ScopeName", Type: "string", MatchKey: true, InputKey: "scope_name", Clearable: true, CaseInsensitive: true}, Source: FieldDescriptor{Name: "source", Label: "Source", Type: "enums.ControlSource", InputKey: "source", Clearable: true}, SourceName: FieldDescriptor{Name: "source_name", Label: "SourceName", Type: "string", MatchKey: true, InputKey: "source_name", Clearable: true}, StandardID: FieldDescriptor{Name: "standard_id", Label: "StandardID", Type: "string", MatchKey: true, InputKey: "standard_id", Clearable: true}, Status: FieldDescriptor{Name: "status", Label: "Status", Type: "enums.ControlStatus", WorkflowEligible: true, InputKey: "status", Clearable: true, WebhookPayload: true}, Subcategory: FieldDescriptor{Name: "subcategory", Label: "Subcategory", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "subcategory", Clearable: true}, SystemInternalID: FieldDescriptor{Name: "system_internal_id", Label: "SystemInternalID", Type: "string", MatchKey: true, InputKey: "system_internal_id", Clearable: true}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, TestingProcedures: FieldDescriptor{Name: "testing_procedures", Label: "TestingProcedures", Type: "[]models.TestingProcedures", InputKey: "testing_procedures", Clearable: true}, Title: FieldDescriptor{Name: "title", Label: "Title", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "title", DisplayKey: true, Clearable: true, WebhookPayload: true}, TrustCenterVisibility: FieldDescriptor{Name: "trust_center_visibility", Label: "TrustCenterVisibility", Type: "enums.TrustCenterControlVisibility", InputKey: "trust_center_visibility", Clearable: true}, }
ControlFields indexes the provider-mappable fields of Control
var ControlImplementationFields = struct { // Details is the details field Details FieldDescriptor // DetailsJSON is the details_json field DetailsJSON FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // ImplementationDate is the implementation_date field ImplementationDate FieldDescriptor // InternalNotes is the internal_notes field InternalNotes FieldDescriptor // Status is the status field Status FieldDescriptor // SystemInternalID is the system_internal_id field SystemInternalID FieldDescriptor // Tags is the tags field Tags FieldDescriptor // VerificationDate is the verification_date field VerificationDate FieldDescriptor // Verified is the verified field Verified FieldDescriptor }{ Details: FieldDescriptor{Name: "details", Label: "Details", Type: "string", MatchKey: true, InputKey: "details", Clearable: true}, DetailsJSON: FieldDescriptor{Name: "details_json", Label: "DetailsJSON", Type: "[]interface {}", InputKey: "details_json", Clearable: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, ImplementationDate: FieldDescriptor{Name: "implementation_date", Label: "ImplementationDate", Type: "time.Time", InputKey: "implementation_date", Clearable: true}, InternalNotes: FieldDescriptor{Name: "internal_notes", Label: "InternalNotes", Type: "string", MatchKey: true, InputKey: "internal_notes", Clearable: true}, Status: FieldDescriptor{Name: "status", Label: "Status", Type: "enums.DocumentStatus", InputKey: "status", Clearable: true}, SystemInternalID: FieldDescriptor{Name: "system_internal_id", Label: "SystemInternalID", Type: "string", MatchKey: true, InputKey: "system_internal_id", Clearable: true}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, VerificationDate: FieldDescriptor{Name: "verification_date", Label: "VerificationDate", Type: "time.Time", InputKey: "verification_date", Clearable: true}, Verified: FieldDescriptor{Name: "verified", Label: "Verified", Type: "bool", InputKey: "verified", Clearable: true}, }
ControlImplementationFields indexes the provider-mappable fields of ControlImplementation
var ControlObjectiveFields = struct { // Category is the category field Category FieldDescriptor // ControlObjectiveType is the control_objective_type field ControlObjectiveType FieldDescriptor // DesiredOutcome is the desired_outcome field DesiredOutcome FieldDescriptor // DesiredOutcomeJSON is the desired_outcome_json field DesiredOutcomeJSON FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // InternalNotes is the internal_notes field InternalNotes FieldDescriptor // Name is the name field Name FieldDescriptor // Revision is the revision field Revision FieldDescriptor // Source is the source field Source FieldDescriptor // Status is the status field Status FieldDescriptor // Subcategory is the subcategory field Subcategory FieldDescriptor // SystemInternalID is the system_internal_id field SystemInternalID FieldDescriptor // Tags is the tags field Tags FieldDescriptor }{ Category: FieldDescriptor{Name: "category", Label: "Category", Type: "string", MatchKey: true, InputKey: "category", Clearable: true}, ControlObjectiveType: FieldDescriptor{Name: "control_objective_type", Label: "ControlObjectiveType", Type: "string", MatchKey: true, InputKey: "control_objective_type", Clearable: true}, DesiredOutcome: FieldDescriptor{Name: "desired_outcome", Label: "DesiredOutcome", Type: "string", MatchKey: true, InputKey: "desired_outcome", Clearable: true}, DesiredOutcomeJSON: FieldDescriptor{Name: "desired_outcome_json", Label: "DesiredOutcomeJSON", Type: "[]interface {}", InputKey: "desired_outcome_json", Clearable: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, InternalNotes: FieldDescriptor{Name: "internal_notes", Label: "InternalNotes", Type: "string", MatchKey: true, InputKey: "internal_notes", Clearable: true}, Name: FieldDescriptor{Name: "name", Label: "Name", Type: "string", MatchKey: true, InputKey: "name"}, Revision: FieldDescriptor{Name: "revision", Label: "Revision", Type: "string", MatchKey: true, InputKey: "revision", Clearable: true}, Source: FieldDescriptor{Name: "source", Label: "Source", Type: "enums.ControlSource", InputKey: "source", Clearable: true}, Status: FieldDescriptor{Name: "status", Label: "Status", Type: "enums.ObjectiveStatus", InputKey: "status", Clearable: true}, Subcategory: FieldDescriptor{Name: "subcategory", Label: "Subcategory", Type: "string", MatchKey: true, InputKey: "subcategory", Clearable: true}, SystemInternalID: FieldDescriptor{Name: "system_internal_id", Label: "SystemInternalID", Type: "string", MatchKey: true, InputKey: "system_internal_id", Clearable: true}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, }
ControlObjectiveFields indexes the provider-mappable fields of ControlObjective
var CustomTypeEnumFields = struct { // Color is the color field Color FieldDescriptor // Description is the description field Description FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // Field is the field field Field FieldDescriptor // Icon is the icon field Icon FieldDescriptor // InternalNotes is the internal_notes field InternalNotes FieldDescriptor // Name is the name field Name FieldDescriptor // ObjectType is the object_type field ObjectType FieldDescriptor // SystemInternalID is the system_internal_id field SystemInternalID FieldDescriptor }{ Color: FieldDescriptor{Name: "color", Label: "Color", Type: "string", MatchKey: true, InputKey: "color", Clearable: true}, Description: FieldDescriptor{Name: "description", Label: "Description", Type: "string", MatchKey: true, InputKey: "description", Clearable: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, Field: FieldDescriptor{Name: "field", Label: "Field", Type: "string", MatchKey: true, InputKey: "field"}, Icon: FieldDescriptor{Name: "icon", Label: "Icon", Type: "string", MatchKey: true, InputKey: "icon", Clearable: true}, InternalNotes: FieldDescriptor{Name: "internal_notes", Label: "InternalNotes", Type: "string", MatchKey: true, InputKey: "internal_notes", Clearable: true}, Name: FieldDescriptor{Name: "name", Label: "Name", Type: "string", MatchKey: true, InputKey: "name"}, ObjectType: FieldDescriptor{Name: "object_type", Label: "ObjectType", Type: "string", MatchKey: true, InputKey: "object_type"}, SystemInternalID: FieldDescriptor{Name: "system_internal_id", Label: "SystemInternalID", Type: "string", MatchKey: true, InputKey: "system_internal_id", Clearable: true}, }
CustomTypeEnumFields indexes the provider-mappable fields of CustomTypeEnum
var DirectoryAccountFields = struct { // AccountType is the account_type field AccountType FieldDescriptor // AddedAt is the added_at field AddedAt FieldDescriptor // AvatarRemoteURL is the avatar_remote_url field AvatarRemoteURL FieldDescriptor // AvatarUpdatedAt is the avatar_updated_at field AvatarUpdatedAt FieldDescriptor // CanonicalEmail is the canonical_email field CanonicalEmail FieldDescriptor // Department is the department field Department FieldDescriptor // DirectoryName is the directory_name field DirectoryName FieldDescriptor // DisplayName is the display_name field DisplayName FieldDescriptor // EmailAliases is the email_aliases field EmailAliases FieldDescriptor // EnvironmentID is the environment_id field EnvironmentID FieldDescriptor // EnvironmentName is the environment_name field EnvironmentName FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // FamilyName is the family_name field FamilyName FieldDescriptor // GivenName is the given_name field GivenName FieldDescriptor // IdentityHolderID is the identity_holder_id field IdentityHolderID FieldDescriptor // JobTitle is the job_title field JobTitle FieldDescriptor // LastSeenIP is the last_seen_ip field LastSeenIP FieldDescriptor // Metadata is the metadata field Metadata FieldDescriptor // MfaState is the mfa_state field MfaState FieldDescriptor // ObservedAt is the observed_at field ObservedAt FieldDescriptor // OrganizationUnit is the organization_unit field OrganizationUnit FieldDescriptor // PhoneNumber is the phone_number field PhoneNumber FieldDescriptor // PrimarySource is the primary_source field PrimarySource FieldDescriptor // Profile is the profile field Profile FieldDescriptor // RemovedAt is the removed_at field RemovedAt FieldDescriptor // ScopeID is the scope_id field ScopeID FieldDescriptor // ScopeName is the scope_name field ScopeName FieldDescriptor // SecondaryKey is the secondary_key field SecondaryKey FieldDescriptor // SourceVersion is the source_version field SourceVersion FieldDescriptor // Status is the status field Status FieldDescriptor // Tags is the tags field Tags FieldDescriptor }{ AccountType: FieldDescriptor{Name: "account_type", Label: "AccountType", Type: "enums.DirectoryAccountType", InputKey: "account_type", Clearable: true}, AddedAt: FieldDescriptor{Name: "added_at", Label: "AddedAt", Type: "time.Time", InputKey: "added_at", Clearable: true}, AvatarRemoteURL: FieldDescriptor{Name: "avatar_remote_url", Label: "AvatarRemoteURL", Type: "string", MatchKey: true, InputKey: "avatar_remote_url", Clearable: true}, AvatarUpdatedAt: FieldDescriptor{Name: "avatar_updated_at", Label: "AvatarUpdatedAt", Type: "time.Time", InputKey: "avatar_updated_at", Clearable: true}, CanonicalEmail: FieldDescriptor{Name: "canonical_email", Label: "CanonicalEmail", Type: "string", MatchKey: true, InputKey: "canonical_email", Clearable: true}, Department: FieldDescriptor{Name: "department", Label: "Department", Type: "string", MatchKey: true, InputKey: "department", Clearable: true}, DirectoryName: FieldDescriptor{Name: "directory_name", Label: "DirectoryName", Type: "string", MatchKey: true, InputKey: "directory_name", Clearable: true}, DisplayName: FieldDescriptor{Name: "display_name", Label: "DisplayName", Type: "string", MatchKey: true, InputKey: "display_name", Clearable: true}, EmailAliases: FieldDescriptor{Name: "email_aliases", Label: "EmailAliases", Type: "[]string", InputKey: "email_aliases", Clearable: true}, EnvironmentID: FieldDescriptor{Name: "environment_id", Label: "EnvironmentID", Type: "string", MatchKey: true, InputKey: "environment_id", Clearable: true}, EnvironmentName: FieldDescriptor{Name: "environment_name", Label: "EnvironmentName", Type: "string", MatchKey: true, InputKey: "environment_name", Clearable: true, CaseInsensitive: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true}, FamilyName: FieldDescriptor{Name: "family_name", Label: "FamilyName", Type: "string", MatchKey: true, InputKey: "family_name", Clearable: true}, GivenName: FieldDescriptor{Name: "given_name", Label: "GivenName", Type: "string", MatchKey: true, InputKey: "given_name", Clearable: true}, IdentityHolderID: FieldDescriptor{Name: "identity_holder_id", Label: "IdentityHolderID", Type: "string", MatchKey: true, InputKey: "identity_holder_id", Clearable: true}, JobTitle: FieldDescriptor{Name: "job_title", Label: "JobTitle", Type: "string", MatchKey: true, InputKey: "job_title", Clearable: true}, LastSeenIP: FieldDescriptor{Name: "last_seen_ip", Label: "LastSeenIP", Type: "string", MatchKey: true, InputKey: "last_seen_ip", Clearable: true}, Metadata: FieldDescriptor{Name: "metadata", Label: "Metadata", Type: "map[string]interface {}", InputKey: "metadata", Clearable: true, Volatile: true}, MfaState: FieldDescriptor{Name: "mfa_state", Label: "MfaState", Type: "enums.DirectoryAccountMFAState", InputKey: "mfa_state"}, ObservedAt: FieldDescriptor{Name: "observed_at", Label: "ObservedAt", Type: "time.Time", InputKey: "observed_at"}, OrganizationUnit: FieldDescriptor{Name: "organization_unit", Label: "OrganizationUnit", Type: "string", MatchKey: true, InputKey: "organization_unit", Clearable: true}, PhoneNumber: FieldDescriptor{Name: "phone_number", Label: "PhoneNumber", Type: "string", MatchKey: true, InputKey: "phone_number", Clearable: true}, PrimarySource: FieldDescriptor{Name: "primary_source", Label: "PrimarySource", Type: "bool", InputKey: "primary_source"}, Profile: FieldDescriptor{Name: "profile", Label: "Profile", Type: "map[string]interface {}", InputKey: "profile", Clearable: true, Volatile: true}, RemovedAt: FieldDescriptor{Name: "removed_at", Label: "RemovedAt", Type: "time.Time", InputKey: "removed_at", Clearable: true}, ScopeID: FieldDescriptor{Name: "scope_id", Label: "ScopeID", Type: "string", MatchKey: true, InputKey: "scope_id", Clearable: true}, ScopeName: FieldDescriptor{Name: "scope_name", Label: "ScopeName", Type: "string", MatchKey: true, InputKey: "scope_name", Clearable: true, CaseInsensitive: true}, SecondaryKey: FieldDescriptor{Name: "secondary_key", Label: "SecondaryKey", Type: "string", MatchKey: true, InputKey: "secondary_key", Clearable: true}, SourceVersion: FieldDescriptor{Name: "source_version", Label: "SourceVersion", Type: "string", MatchKey: true, InputKey: "source_version", Clearable: true}, Status: FieldDescriptor{Name: "status", Label: "Status", Type: "enums.DirectoryAccountStatus", InputKey: "status"}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, }
DirectoryAccountFields indexes the provider-mappable fields of DirectoryAccount
var DirectoryGroupFields = struct { // AddedAt is the added_at field AddedAt FieldDescriptor // Classification is the classification field Classification FieldDescriptor // DirectoryName is the directory_name field DirectoryName FieldDescriptor // DisplayName is the display_name field DisplayName FieldDescriptor // Email is the email field Email FieldDescriptor // EnvironmentID is the environment_id field EnvironmentID FieldDescriptor // EnvironmentName is the environment_name field EnvironmentName FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // ExternalSharingAllowed is the external_sharing_allowed field ExternalSharingAllowed FieldDescriptor // MemberCount is the member_count field MemberCount FieldDescriptor // Metadata is the metadata field Metadata FieldDescriptor // ObservedAt is the observed_at field ObservedAt FieldDescriptor // Profile is the profile field Profile FieldDescriptor // RemovedAt is the removed_at field RemovedAt FieldDescriptor // ScopeID is the scope_id field ScopeID FieldDescriptor // ScopeName is the scope_name field ScopeName FieldDescriptor // SourceVersion is the source_version field SourceVersion FieldDescriptor // Status is the status field Status FieldDescriptor // Tags is the tags field Tags FieldDescriptor }{ AddedAt: FieldDescriptor{Name: "added_at", Label: "AddedAt", Type: "time.Time", InputKey: "added_at", Clearable: true}, Classification: FieldDescriptor{Name: "classification", Label: "Classification", Type: "enums.DirectoryGroupClassification", InputKey: "classification"}, DirectoryName: FieldDescriptor{Name: "directory_name", Label: "DirectoryName", Type: "string", MatchKey: true, InputKey: "directory_name", Clearable: true}, DisplayName: FieldDescriptor{Name: "display_name", Label: "DisplayName", Type: "string", MatchKey: true, InputKey: "display_name", Clearable: true}, Email: FieldDescriptor{Name: "email", Label: "Email", Type: "string", MatchKey: true, InputKey: "email", Clearable: true}, EnvironmentID: FieldDescriptor{Name: "environment_id", Label: "EnvironmentID", Type: "string", MatchKey: true, InputKey: "environment_id", Clearable: true}, EnvironmentName: FieldDescriptor{Name: "environment_name", Label: "EnvironmentName", Type: "string", MatchKey: true, InputKey: "environment_name", Clearable: true, CaseInsensitive: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true}, ExternalSharingAllowed: FieldDescriptor{Name: "external_sharing_allowed", Label: "ExternalSharingAllowed", Type: "bool", InputKey: "external_sharing_allowed", Clearable: true}, MemberCount: FieldDescriptor{Name: "member_count", Label: "MemberCount", Type: "int", InputKey: "member_count", Clearable: true}, Metadata: FieldDescriptor{Name: "metadata", Label: "Metadata", Type: "map[string]interface {}", InputKey: "metadata", Clearable: true, Volatile: true}, ObservedAt: FieldDescriptor{Name: "observed_at", Label: "ObservedAt", Type: "time.Time", InputKey: "observed_at"}, Profile: FieldDescriptor{Name: "profile", Label: "Profile", Type: "map[string]interface {}", InputKey: "profile", Clearable: true, Volatile: true}, RemovedAt: FieldDescriptor{Name: "removed_at", Label: "RemovedAt", Type: "time.Time", InputKey: "removed_at", Clearable: true}, ScopeID: FieldDescriptor{Name: "scope_id", Label: "ScopeID", Type: "string", MatchKey: true, InputKey: "scope_id", Clearable: true}, ScopeName: FieldDescriptor{Name: "scope_name", Label: "ScopeName", Type: "string", MatchKey: true, InputKey: "scope_name", Clearable: true, CaseInsensitive: true}, SourceVersion: FieldDescriptor{Name: "source_version", Label: "SourceVersion", Type: "string", MatchKey: true, InputKey: "source_version", Clearable: true, Volatile: true}, Status: FieldDescriptor{Name: "status", Label: "Status", Type: "enums.DirectoryGroupStatus", InputKey: "status"}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, }
DirectoryGroupFields indexes the provider-mappable fields of DirectoryGroup
var DirectoryMembershipFields = struct { // AddedAt is the added_at field AddedAt FieldDescriptor // DirectoryAccountID is the directory_account_id field DirectoryAccountID FieldDescriptor // DirectoryGroupID is the directory_group_id field DirectoryGroupID FieldDescriptor // DirectoryName is the directory_name field DirectoryName FieldDescriptor // EnvironmentID is the environment_id field EnvironmentID FieldDescriptor // EnvironmentName is the environment_name field EnvironmentName FieldDescriptor // Metadata is the metadata field Metadata FieldDescriptor // ObservedAt is the observed_at field ObservedAt FieldDescriptor // PlatformID is the platform_id field PlatformID FieldDescriptor // RemovedAt is the removed_at field RemovedAt FieldDescriptor // Role is the role field Role FieldDescriptor // ScopeID is the scope_id field ScopeID FieldDescriptor // ScopeName is the scope_name field ScopeName FieldDescriptor // Source is the source field Source FieldDescriptor }{ AddedAt: FieldDescriptor{Name: "added_at", Label: "AddedAt", Type: "time.Time", InputKey: "added_at", Clearable: true}, DirectoryAccountID: FieldDescriptor{Name: "directory_account_id", Label: "DirectoryAccountID", Type: "string", MatchKey: true, InputKey: "directory_account_id", LookupKey: true}, DirectoryGroupID: FieldDescriptor{Name: "directory_group_id", Label: "DirectoryGroupID", Type: "string", MatchKey: true, InputKey: "directory_group_id", LookupKey: true}, DirectoryName: FieldDescriptor{Name: "directory_name", Label: "DirectoryName", Type: "string", MatchKey: true, InputKey: "directory_name", Clearable: true}, EnvironmentID: FieldDescriptor{Name: "environment_id", Label: "EnvironmentID", Type: "string", MatchKey: true, InputKey: "environment_id", Clearable: true}, EnvironmentName: FieldDescriptor{Name: "environment_name", Label: "EnvironmentName", Type: "string", MatchKey: true, InputKey: "environment_name", Clearable: true, CaseInsensitive: true}, Metadata: FieldDescriptor{Name: "metadata", Label: "Metadata", Type: "map[string]interface {}", InputKey: "metadata", Clearable: true, Volatile: true}, ObservedAt: FieldDescriptor{Name: "observed_at", Label: "ObservedAt", Type: "time.Time", InputKey: "observed_at"}, PlatformID: FieldDescriptor{Name: "platform_id", Label: "PlatformID", Type: "string", MatchKey: true, InputKey: "platform_id", Clearable: true}, RemovedAt: FieldDescriptor{Name: "removed_at", Label: "RemovedAt", Type: "time.Time", InputKey: "removed_at", Clearable: true}, Role: FieldDescriptor{Name: "role", Label: "Role", Type: "enums.DirectoryMembershipRole", InputKey: "role", Clearable: true}, ScopeID: FieldDescriptor{Name: "scope_id", Label: "ScopeID", Type: "string", MatchKey: true, InputKey: "scope_id", Clearable: true}, ScopeName: FieldDescriptor{Name: "scope_name", Label: "ScopeName", Type: "string", MatchKey: true, InputKey: "scope_name", Clearable: true, CaseInsensitive: true}, Source: FieldDescriptor{Name: "source", Label: "Source", Type: "string", MatchKey: true, InputKey: "source", Clearable: true}, }
DirectoryMembershipFields indexes the provider-mappable fields of DirectoryMembership
var EmailTemplateFields = struct { // Active is the active field Active FieldDescriptor // Description is the description field Description FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // Format is the format field Format FieldDescriptor // IntegrationID is the integration_id field IntegrationID FieldDescriptor // InternalNotes is the internal_notes field InternalNotes FieldDescriptor // Key is the key field Key FieldDescriptor // Locale is the locale field Locale FieldDescriptor // Name is the name field Name FieldDescriptor // Revision is the revision field Revision FieldDescriptor // SystemInternalID is the system_internal_id field SystemInternalID FieldDescriptor // TemplateContext is the template_context field TemplateContext FieldDescriptor // TrustCenterID is the trust_center_id field TrustCenterID FieldDescriptor // Version is the version field Version FieldDescriptor // WorkflowDefinitionID is the workflow_definition_id field WorkflowDefinitionID FieldDescriptor // WorkflowInstanceID is the workflow_instance_id field WorkflowInstanceID FieldDescriptor }{ Active: FieldDescriptor{Name: "active", Label: "Active", Type: "bool", InputKey: "active"}, Description: FieldDescriptor{Name: "description", Label: "Description", Type: "string", MatchKey: true, InputKey: "description", Clearable: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, Format: FieldDescriptor{Name: "format", Label: "Format", Type: "enums.NotificationTemplateFormat", InputKey: "format", Clearable: true}, IntegrationID: FieldDescriptor{Name: "integration_id", Label: "IntegrationID", Type: "string", MatchKey: true, InputKey: "integration_id", Clearable: true}, InternalNotes: FieldDescriptor{Name: "internal_notes", Label: "InternalNotes", Type: "string", MatchKey: true, InputKey: "internal_notes", Clearable: true}, Key: FieldDescriptor{Name: "key", Label: "Key", Type: "string", MatchKey: true, InputKey: "key"}, Locale: FieldDescriptor{Name: "locale", Label: "Locale", Type: "string", MatchKey: true, InputKey: "locale"}, Name: FieldDescriptor{Name: "name", Label: "Name", Type: "string", MatchKey: true, InputKey: "name"}, Revision: FieldDescriptor{Name: "revision", Label: "Revision", Type: "string", MatchKey: true, InputKey: "revision", Clearable: true}, SystemInternalID: FieldDescriptor{Name: "system_internal_id", Label: "SystemInternalID", Type: "string", MatchKey: true, InputKey: "system_internal_id", Clearable: true}, TemplateContext: FieldDescriptor{Name: "template_context", Label: "TemplateContext", Type: "enums.TemplateContext", InputKey: "template_context", Clearable: true}, TrustCenterID: FieldDescriptor{Name: "trust_center_id", Label: "TrustCenterID", Type: "string", MatchKey: true, InputKey: "trust_center_id", Clearable: true}, Version: FieldDescriptor{Name: "version", Label: "Version", Type: "int", InputKey: "version"}, WorkflowDefinitionID: FieldDescriptor{Name: "workflow_definition_id", Label: "WorkflowDefinitionID", Type: "string", MatchKey: true, InputKey: "workflow_definition_id", Clearable: true}, WorkflowInstanceID: FieldDescriptor{Name: "workflow_instance_id", Label: "WorkflowInstanceID", Type: "string", MatchKey: true, InputKey: "workflow_instance_id", Clearable: true}, }
EmailTemplateFields indexes the provider-mappable fields of EmailTemplate
var EntityFields = struct { // Aliases is the aliases field Aliases FieldDescriptor // AnnualSpend is the annual_spend field AnnualSpend FieldDescriptor // ApprovedForUse is the approved_for_use field ApprovedForUse FieldDescriptor // AutoRenews is the auto_renews field AutoRenews FieldDescriptor // BillingModel is the billing_model field BillingModel FieldDescriptor // ContractEndDate is the contract_end_date field ContractEndDate FieldDescriptor // ContractRenewalAt is the contract_renewal_at field ContractRenewalAt FieldDescriptor // ContractStartDate is the contract_start_date field ContractStartDate FieldDescriptor // Description is the description field Description FieldDescriptor // DisplayName is the display_name field DisplayName FieldDescriptor // Domains is the domains field Domains FieldDescriptor // EntityRelationshipStateID is the entity_relationship_state_id field EntityRelationshipStateID FieldDescriptor // EntityRelationshipStateName is the entity_relationship_state_name field EntityRelationshipStateName FieldDescriptor // EntitySecurityQuestionnaireStatusID is the entity_security_questionnaire_status_id field EntitySecurityQuestionnaireStatusID FieldDescriptor // EntitySecurityQuestionnaireStatusName is the entity_security_questionnaire_status_name field EntitySecurityQuestionnaireStatusName FieldDescriptor // EntitySourceTypeID is the entity_source_type_id field EntitySourceTypeID FieldDescriptor // EntitySourceTypeName is the entity_source_type_name field EntitySourceTypeName FieldDescriptor // EnvironmentID is the environment_id field EnvironmentID FieldDescriptor // EnvironmentName is the environment_name field EnvironmentName FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // ExternallyVisible is the externally_visible field ExternallyVisible FieldDescriptor // HasSoc2 is the has_soc2 field HasSoc2 FieldDescriptor // InternalNotes is the internal_notes field InternalNotes FieldDescriptor // InternalOwner is the internal_owner field InternalOwner FieldDescriptor // InternalOwnerGroupID is the internal_owner_group_id field InternalOwnerGroupID FieldDescriptor // InternalOwnerIdentityHolderID is the internal_owner_identity_holder_id field InternalOwnerIdentityHolderID FieldDescriptor // InternalOwnerUserID is the internal_owner_user_id field InternalOwnerUserID FieldDescriptor // LastReviewedAt is the last_reviewed_at field LastReviewedAt FieldDescriptor // Links is the links field Links FieldDescriptor // LogoRemoteURL is the logo_remote_url field LogoRemoteURL FieldDescriptor // MfaEnforced is the mfa_enforced field MfaEnforced FieldDescriptor // MfaSupported is the mfa_supported field MfaSupported FieldDescriptor // Name is the name field Name FieldDescriptor // NextReviewAt is the next_review_at field NextReviewAt FieldDescriptor // ObservedAt is the observed_at field ObservedAt FieldDescriptor // ProvidedServices is the provided_services field ProvidedServices FieldDescriptor // RawIngestPayload is the raw_ingest_payload field RawIngestPayload FieldDescriptor // RenewalRisk is the renewal_risk field RenewalRisk FieldDescriptor // ReviewFrequency is the review_frequency field ReviewFrequency FieldDescriptor // ReviewedBy is the reviewed_by field ReviewedBy FieldDescriptor // ReviewedByGroupID is the reviewed_by_group_id field ReviewedByGroupID FieldDescriptor // ReviewedByIdentityHolderID is the reviewed_by_identity_holder_id field ReviewedByIdentityHolderID FieldDescriptor // ReviewedByUserID is the reviewed_by_user_id field ReviewedByUserID FieldDescriptor // RiskRating is the risk_rating field RiskRating FieldDescriptor // RiskScore is the risk_score field RiskScore FieldDescriptor // ScopeID is the scope_id field ScopeID FieldDescriptor // ScopeName is the scope_name field ScopeName FieldDescriptor // Soc2PeriodEnd is the soc2_period_end field Soc2PeriodEnd FieldDescriptor // SpendCurrency is the spend_currency field SpendCurrency FieldDescriptor // SSOEnforced is the sso_enforced field SSOEnforced FieldDescriptor // Status is the status field Status FieldDescriptor // StatusPageURL is the status_page_url field StatusPageURL FieldDescriptor // SystemInternalID is the system_internal_id field SystemInternalID FieldDescriptor // Tags is the tags field Tags FieldDescriptor // TerminationNoticeDays is the termination_notice_days field TerminationNoticeDays FieldDescriptor // Tier is the tier field Tier FieldDescriptor // VendorMetadata is the vendor_metadata field VendorMetadata FieldDescriptor }{ Aliases: FieldDescriptor{Name: "aliases", Label: "Aliases", Type: "[]string", InputKey: "aliases", Clearable: true, SourceManaged: true}, AnnualSpend: FieldDescriptor{Name: "annual_spend", Label: "AnnualSpend", Type: "float64", InputKey: "annual_spend", Clearable: true}, ApprovedForUse: FieldDescriptor{Name: "approved_for_use", Label: "ApprovedForUse", Type: "bool", InputKey: "approved_for_use", Clearable: true}, AutoRenews: FieldDescriptor{Name: "auto_renews", Label: "AutoRenews", Type: "bool", InputKey: "auto_renews", Clearable: true}, BillingModel: FieldDescriptor{Name: "billing_model", Label: "BillingModel", Type: "string", MatchKey: true, InputKey: "billing_model", Clearable: true}, ContractEndDate: FieldDescriptor{Name: "contract_end_date", Label: "ContractEndDate", Type: "models.DateTime", InputKey: "contract_end_date", Clearable: true}, ContractRenewalAt: FieldDescriptor{Name: "contract_renewal_at", Label: "ContractRenewalAt", Type: "models.DateTime", InputKey: "contract_renewal_at", Clearable: true}, ContractStartDate: FieldDescriptor{Name: "contract_start_date", Label: "ContractStartDate", Type: "models.DateTime", InputKey: "contract_start_date", Clearable: true}, Description: FieldDescriptor{Name: "description", Label: "Description", Type: "string", MatchKey: true, InputKey: "description", Clearable: true, SourceManaged: true}, DisplayName: FieldDescriptor{Name: "display_name", Label: "DisplayName", Type: "string", MatchKey: true, InputKey: "display_name", Clearable: true, SourceManaged: true}, Domains: FieldDescriptor{Name: "domains", Label: "Domains", Type: "[]string", InputKey: "domains", Clearable: true, SourceManaged: true}, EntityRelationshipStateID: FieldDescriptor{Name: "entity_relationship_state_id", Label: "EntityRelationshipStateID", Type: "string", MatchKey: true, InputKey: "entity_relationship_state_id", Clearable: true}, EntityRelationshipStateName: FieldDescriptor{Name: "entity_relationship_state_name", Label: "EntityRelationshipStateName", Type: "string", MatchKey: true, InputKey: "entity_relationship_state_name", Clearable: true, CaseInsensitive: true}, EntitySecurityQuestionnaireStatusID: FieldDescriptor{Name: "entity_security_questionnaire_status_id", Label: "EntitySecurityQuestionnaireStatusID", Type: "string", MatchKey: true, InputKey: "entity_security_questionnaire_status_id", Clearable: true}, EntitySecurityQuestionnaireStatusName: FieldDescriptor{Name: "entity_security_questionnaire_status_name", Label: "EntitySecurityQuestionnaireStatusName", Type: "string", MatchKey: true, InputKey: "entity_security_questionnaire_status_name", Clearable: true, CaseInsensitive: true}, EntitySourceTypeID: FieldDescriptor{Name: "entity_source_type_id", Label: "EntitySourceTypeID", Type: "string", MatchKey: true, InputKey: "entity_source_type_id", Clearable: true}, EntitySourceTypeName: FieldDescriptor{Name: "entity_source_type_name", Label: "EntitySourceTypeName", Type: "string", MatchKey: true, InputKey: "entity_source_type_name", Clearable: true, CaseInsensitive: true}, EnvironmentID: FieldDescriptor{Name: "environment_id", Label: "EnvironmentID", Type: "string", MatchKey: true, InputKey: "environment_id", Clearable: true}, EnvironmentName: FieldDescriptor{Name: "environment_name", Label: "EnvironmentName", Type: "string", MatchKey: true, InputKey: "environment_name", Clearable: true, CaseInsensitive: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, ExternallyVisible: FieldDescriptor{Name: "externally_visible", Label: "ExternallyVisible", Type: "bool", InputKey: "externally_visible", Clearable: true}, HasSoc2: FieldDescriptor{Name: "has_soc2", Label: "HasSoc2", Type: "bool", InputKey: "has_soc2", Clearable: true}, InternalNotes: FieldDescriptor{Name: "internal_notes", Label: "InternalNotes", Type: "string", MatchKey: true, InputKey: "internal_notes", Clearable: true}, InternalOwner: FieldDescriptor{Name: "internal_owner", Label: "InternalOwner", Type: "string", MatchKey: true, InputKey: "internal_owner", Clearable: true}, InternalOwnerGroupID: FieldDescriptor{Name: "internal_owner_group_id", Label: "InternalOwnerGroupID", Type: "string", MatchKey: true, InputKey: "internal_owner_group_id", Clearable: true}, InternalOwnerIdentityHolderID: FieldDescriptor{Name: "internal_owner_identity_holder_id", Label: "InternalOwnerIdentityHolderID", Type: "string", MatchKey: true, InputKey: "internal_owner_identity_holder_id", Clearable: true}, InternalOwnerUserID: FieldDescriptor{Name: "internal_owner_user_id", Label: "InternalOwnerUserID", Type: "string", MatchKey: true, InputKey: "internal_owner_user_id", Clearable: true}, LastReviewedAt: FieldDescriptor{Name: "last_reviewed_at", Label: "LastReviewedAt", Type: "models.DateTime", InputKey: "last_reviewed_at", Clearable: true}, Links: FieldDescriptor{Name: "links", Label: "Links", Type: "[]string", InputKey: "links", Clearable: true, SourceManaged: true}, LogoRemoteURL: FieldDescriptor{Name: "logo_remote_url", Label: "LogoRemoteURL", Type: "string", MatchKey: true, InputKey: "logo_remote_url", Clearable: true, SourceManaged: true}, MfaEnforced: FieldDescriptor{Name: "mfa_enforced", Label: "MfaEnforced", Type: "bool", InputKey: "mfa_enforced", Clearable: true}, MfaSupported: FieldDescriptor{Name: "mfa_supported", Label: "MfaSupported", Type: "bool", InputKey: "mfa_supported", Clearable: true}, Name: FieldDescriptor{Name: "name", Label: "Name", Type: "string", MatchKey: true, InputKey: "name", Clearable: true}, NextReviewAt: FieldDescriptor{Name: "next_review_at", Label: "NextReviewAt", Type: "models.DateTime", InputKey: "next_review_at", Clearable: true}, ObservedAt: FieldDescriptor{Name: "observed_at", Label: "ObservedAt", Type: "models.DateTime", InputKey: "observed_at", Clearable: true}, ProvidedServices: FieldDescriptor{Name: "provided_services", Label: "ProvidedServices", Type: "[]string", InputKey: "provided_services", Clearable: true, SourceManaged: true}, RawIngestPayload: FieldDescriptor{Name: "raw_ingest_payload", Label: "RawIngestPayload", Type: "map[string]interface {}", InputKey: "raw_ingest_payload", Clearable: true, Volatile: true}, RenewalRisk: FieldDescriptor{Name: "renewal_risk", Label: "RenewalRisk", Type: "string", MatchKey: true, InputKey: "renewal_risk", Clearable: true}, ReviewFrequency: FieldDescriptor{Name: "review_frequency", Label: "ReviewFrequency", Type: "enums.Frequency", InputKey: "review_frequency", Clearable: true}, ReviewedBy: FieldDescriptor{Name: "reviewed_by", Label: "ReviewedBy", Type: "string", MatchKey: true, InputKey: "reviewed_by", Clearable: true}, ReviewedByGroupID: FieldDescriptor{Name: "reviewed_by_group_id", Label: "ReviewedByGroupID", Type: "string", MatchKey: true, InputKey: "reviewed_by_group_id", Clearable: true}, ReviewedByIdentityHolderID: FieldDescriptor{Name: "reviewed_by_identity_holder_id", Label: "ReviewedByIdentityHolderID", Type: "string", MatchKey: true, InputKey: "reviewed_by_identity_holder_id", Clearable: true}, ReviewedByUserID: FieldDescriptor{Name: "reviewed_by_user_id", Label: "ReviewedByUserID", Type: "string", MatchKey: true, InputKey: "reviewed_by_user_id", Clearable: true}, RiskRating: FieldDescriptor{Name: "risk_rating", Label: "RiskRating", Type: "string", MatchKey: true, InputKey: "risk_rating", Clearable: true}, RiskScore: FieldDescriptor{Name: "risk_score", Label: "RiskScore", Type: "int", InputKey: "risk_score", Clearable: true}, ScopeID: FieldDescriptor{Name: "scope_id", Label: "ScopeID", Type: "string", MatchKey: true, InputKey: "scope_id", Clearable: true}, ScopeName: FieldDescriptor{Name: "scope_name", Label: "ScopeName", Type: "string", MatchKey: true, InputKey: "scope_name", Clearable: true, CaseInsensitive: true}, Soc2PeriodEnd: FieldDescriptor{Name: "soc2_period_end", Label: "Soc2PeriodEnd", Type: "models.DateTime", InputKey: "soc2_period_end", Clearable: true}, SpendCurrency: FieldDescriptor{Name: "spend_currency", Label: "SpendCurrency", Type: "string", MatchKey: true, InputKey: "spend_currency", Clearable: true}, SSOEnforced: FieldDescriptor{Name: "sso_enforced", Label: "SSOEnforced", Type: "bool", InputKey: "sso_enforced", Clearable: true}, Status: FieldDescriptor{Name: "status", Label: "Status", Type: "enums.EntityStatus", InputKey: "status", Clearable: true}, StatusPageURL: FieldDescriptor{Name: "status_page_url", Label: "StatusPageURL", Type: "string", MatchKey: true, InputKey: "status_page_url", Clearable: true, SourceManaged: true}, SystemInternalID: FieldDescriptor{Name: "system_internal_id", Label: "SystemInternalID", Type: "string", MatchKey: true, InputKey: "system_internal_id", Clearable: true}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, TerminationNoticeDays: FieldDescriptor{Name: "termination_notice_days", Label: "TerminationNoticeDays", Type: "int", InputKey: "termination_notice_days", Clearable: true}, Tier: FieldDescriptor{Name: "tier", Label: "Tier", Type: "enums.VendorTier", InputKey: "tier", Clearable: true}, VendorMetadata: FieldDescriptor{Name: "vendor_metadata", Label: "VendorMetadata", Type: "map[string]interface {}", InputKey: "vendor_metadata", Clearable: true, Volatile: true}, }
EntityFields indexes the provider-mappable fields of Entity
var EvidenceFields = struct { // AuditorReferenceID is the auditor_reference_id field AuditorReferenceID FieldDescriptor // CollectionProcedure is the collection_procedure field CollectionProcedure FieldDescriptor // CreationDate is the creation_date field CreationDate FieldDescriptor // Description is the description field Description FieldDescriptor // EnvironmentID is the environment_id field EnvironmentID FieldDescriptor // EnvironmentName is the environment_name field EnvironmentName FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // ExternalUUID is the external_uuid field ExternalUUID FieldDescriptor // IsAutomated is the is_automated field IsAutomated FieldDescriptor // Name is the name field Name FieldDescriptor // RenewalDate is the renewal_date field RenewalDate FieldDescriptor // ReviewFrequency is the review_frequency field ReviewFrequency FieldDescriptor // ScopeID is the scope_id field ScopeID FieldDescriptor // ScopeName is the scope_name field ScopeName FieldDescriptor // Source is the source field Source FieldDescriptor // Status is the status field Status FieldDescriptor // Tags is the tags field Tags FieldDescriptor // URL is the url field URL FieldDescriptor }{ AuditorReferenceID: FieldDescriptor{Name: "auditor_reference_id", Label: "AuditorReferenceID", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "auditor_reference_id", Clearable: true}, CollectionProcedure: FieldDescriptor{Name: "collection_procedure", Label: "CollectionProcedure", Type: "string", MatchKey: true, InputKey: "collection_procedure", Clearable: true}, CreationDate: FieldDescriptor{Name: "creation_date", Label: "CreationDate", Type: "models.DateTime", InputKey: "creation_date", Clearable: true}, Description: FieldDescriptor{Name: "description", Label: "Description", Type: "string", MatchKey: true, InputKey: "description", Clearable: true}, EnvironmentID: FieldDescriptor{Name: "environment_id", Label: "EnvironmentID", Type: "string", MatchKey: true, InputKey: "environment_id", Clearable: true}, EnvironmentName: FieldDescriptor{Name: "environment_name", Label: "EnvironmentName", Type: "string", MatchKey: true, InputKey: "environment_name", Clearable: true, CaseInsensitive: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, ExternalUUID: FieldDescriptor{Name: "external_uuid", Label: "ExternalUUID", Type: "string", MatchKey: true, InputKey: "external_uuid", Clearable: true}, IsAutomated: FieldDescriptor{Name: "is_automated", Label: "IsAutomated", Type: "bool", InputKey: "is_automated", Clearable: true}, Name: FieldDescriptor{Name: "name", Label: "Name", Type: "string", MatchKey: true, InputKey: "name", DisplayKey: true}, RenewalDate: FieldDescriptor{Name: "renewal_date", Label: "RenewalDate", Type: "models.DateTime", InputKey: "renewal_date", Clearable: true}, ReviewFrequency: FieldDescriptor{Name: "review_frequency", Label: "ReviewFrequency", Type: "enums.Frequency", InputKey: "review_frequency", Clearable: true}, ScopeID: FieldDescriptor{Name: "scope_id", Label: "ScopeID", Type: "string", MatchKey: true, InputKey: "scope_id", Clearable: true}, ScopeName: FieldDescriptor{Name: "scope_name", Label: "ScopeName", Type: "string", MatchKey: true, InputKey: "scope_name", Clearable: true, CaseInsensitive: true}, Source: FieldDescriptor{Name: "source", Label: "Source", Type: "string", MatchKey: true, InputKey: "source", Clearable: true}, Status: FieldDescriptor{Name: "status", Label: "Status", Type: "enums.EvidenceStatus", InputKey: "status", Clearable: true}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, URL: FieldDescriptor{Name: "url", Label: "URL", Type: "string", MatchKey: true, InputKey: "url", Clearable: true}, }
EvidenceFields indexes the provider-mappable fields of Evidence
var FindingFields = struct { // AssessmentID is the assessment_id field AssessmentID FieldDescriptor // AssignedTo is the assigned_to field AssignedTo FieldDescriptor // AssignedToGroupID is the assigned_to_group_id field AssignedToGroupID FieldDescriptor // AssignedToIdentityHolderID is the assigned_to_identity_holder_id field AssignedToIdentityHolderID FieldDescriptor // AssignedToUserID is the assigned_to_user_id field AssignedToUserID FieldDescriptor // BlocksProduction is the blocks_production field BlocksProduction FieldDescriptor // Categories is the categories field Categories FieldDescriptor // Category is the category field Category FieldDescriptor // Description is the description field Description FieldDescriptor // DisplayName is the display_name field DisplayName FieldDescriptor // EnvironmentID is the environment_id field EnvironmentID FieldDescriptor // EnvironmentName is the environment_name field EnvironmentName FieldDescriptor // EventTime is the event_time field EventTime FieldDescriptor // Exploitability is the exploitability field Exploitability FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // ExternalOwnerID is the external_owner_id field ExternalOwnerID FieldDescriptor // ExternalURI is the external_uri field ExternalURI FieldDescriptor // FindingClass is the finding_class field FindingClass FieldDescriptor // FindingStatusID is the finding_status_id field FindingStatusID FieldDescriptor // FindingStatusName is the finding_status_name field FindingStatusName FieldDescriptor // Impact is the impact field Impact FieldDescriptor // InternalNotes is the internal_notes field InternalNotes FieldDescriptor // InternalOwner is the internal_owner field InternalOwner FieldDescriptor // InternalOwnerGroupID is the internal_owner_group_id field InternalOwnerGroupID FieldDescriptor // InternalOwnerIdentityHolderID is the internal_owner_identity_holder_id field InternalOwnerIdentityHolderID FieldDescriptor // InternalOwnerUserID is the internal_owner_user_id field InternalOwnerUserID FieldDescriptor // Metadata is the metadata field Metadata FieldDescriptor // NumericSeverity is the numeric_severity field NumericSeverity FieldDescriptor // Open is the open field Open FieldDescriptor // Priority is the priority field Priority FieldDescriptor // Production is the production field Production FieldDescriptor // Public is the public field Public FieldDescriptor // RawPayload is the raw_payload field RawPayload FieldDescriptor // Recommendation is the recommendation field Recommendation FieldDescriptor // RecommendedActions is the recommended_actions field RecommendedActions FieldDescriptor // References is the references field References FieldDescriptor // RemediationSLA is the remediation_sla field RemediationSLA FieldDescriptor // ReportedAt is the reported_at field ReportedAt FieldDescriptor // ResourceName is the resource_name field ResourceName FieldDescriptor // ReviewedBy is the reviewed_by field ReviewedBy FieldDescriptor // ReviewedByGroupID is the reviewed_by_group_id field ReviewedByGroupID FieldDescriptor // ReviewedByIdentityHolderID is the reviewed_by_identity_holder_id field ReviewedByIdentityHolderID FieldDescriptor // ReviewedByUserID is the reviewed_by_user_id field ReviewedByUserID FieldDescriptor // ScopeID is the scope_id field ScopeID FieldDescriptor // ScopeName is the scope_name field ScopeName FieldDescriptor // Score is the score field Score FieldDescriptor // Severity is the severity field Severity FieldDescriptor // Source is the source field Source FieldDescriptor // SourceUpdatedAt is the source_updated_at field SourceUpdatedAt FieldDescriptor // State is the state field State FieldDescriptor // StepsToReproduce is the steps_to_reproduce field StepsToReproduce FieldDescriptor // SystemInternalID is the system_internal_id field SystemInternalID FieldDescriptor // Tags is the tags field Tags FieldDescriptor // TargetDetails is the target_details field TargetDetails FieldDescriptor // Targets is the targets field Targets FieldDescriptor // Validated is the validated field Validated FieldDescriptor // Vector is the vector field Vector FieldDescriptor }{ AssessmentID: FieldDescriptor{Name: "assessment_id", Label: "AssessmentID", Type: "string", MatchKey: true, InputKey: "assessment_id", Clearable: true}, AssignedTo: FieldDescriptor{Name: "assigned_to", Label: "AssignedTo", Type: "string", MatchKey: true, InputKey: "assigned_to", Clearable: true}, AssignedToGroupID: FieldDescriptor{Name: "assigned_to_group_id", Label: "AssignedToGroupID", Type: "string", MatchKey: true, InputKey: "assigned_to_group_id", Clearable: true}, AssignedToIdentityHolderID: FieldDescriptor{Name: "assigned_to_identity_holder_id", Label: "AssignedToIdentityHolderID", Type: "string", MatchKey: true, InputKey: "assigned_to_identity_holder_id", Clearable: true}, AssignedToUserID: FieldDescriptor{Name: "assigned_to_user_id", Label: "AssignedToUserID", Type: "string", MatchKey: true, InputKey: "assigned_to_user_id", Clearable: true}, BlocksProduction: FieldDescriptor{Name: "blocks_production", Label: "BlocksProduction", Type: "bool", WorkflowEligible: true, InputKey: "blocks_production", Clearable: true}, Categories: FieldDescriptor{Name: "categories", Label: "Categories", Type: "[]string", InputKey: "categories", Clearable: true}, Category: FieldDescriptor{Name: "category", Label: "Category", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "category", Clearable: true}, Description: FieldDescriptor{Name: "description", Label: "Description", Type: "string", MatchKey: true, InputKey: "description", Clearable: true}, DisplayName: FieldDescriptor{Name: "display_name", Label: "DisplayName", Type: "string", MatchKey: true, InputKey: "display_name", Clearable: true}, EnvironmentID: FieldDescriptor{Name: "environment_id", Label: "EnvironmentID", Type: "string", MatchKey: true, InputKey: "environment_id", Clearable: true}, EnvironmentName: FieldDescriptor{Name: "environment_name", Label: "EnvironmentName", Type: "string", MatchKey: true, InputKey: "environment_name", Clearable: true, CaseInsensitive: true}, EventTime: FieldDescriptor{Name: "event_time", Label: "EventTime", Type: "models.DateTime", WorkflowEligible: true, InputKey: "event_time", Clearable: true, Volatile: true}, Exploitability: FieldDescriptor{Name: "exploitability", Label: "Exploitability", Type: "float64", InputKey: "exploitability", Clearable: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, ExternalOwnerID: FieldDescriptor{Name: "external_owner_id", Label: "ExternalOwnerID", Type: "string", MatchKey: true, InputKey: "external_owner_id", Clearable: true}, ExternalURI: FieldDescriptor{Name: "external_uri", Label: "ExternalURI", Type: "string", MatchKey: true, InputKey: "external_uri", Clearable: true}, FindingClass: FieldDescriptor{Name: "finding_class", Label: "FindingClass", Type: "string", MatchKey: true, InputKey: "finding_class", Clearable: true}, FindingStatusID: FieldDescriptor{Name: "finding_status_id", Label: "FindingStatusID", Type: "string", MatchKey: true, InputKey: "finding_status_id", Clearable: true}, FindingStatusName: FieldDescriptor{Name: "finding_status_name", Label: "FindingStatusName", Type: "string", MatchKey: true, InputKey: "finding_status_name", Clearable: true, CaseInsensitive: true}, Impact: FieldDescriptor{Name: "impact", Label: "Impact", Type: "float64", InputKey: "impact", Clearable: true}, InternalNotes: FieldDescriptor{Name: "internal_notes", Label: "InternalNotes", Type: "string", MatchKey: true, InputKey: "internal_notes", Clearable: true}, InternalOwner: FieldDescriptor{Name: "internal_owner", Label: "InternalOwner", Type: "string", MatchKey: true, InputKey: "internal_owner", Clearable: true}, InternalOwnerGroupID: FieldDescriptor{Name: "internal_owner_group_id", Label: "InternalOwnerGroupID", Type: "string", MatchKey: true, InputKey: "internal_owner_group_id", Clearable: true}, InternalOwnerIdentityHolderID: FieldDescriptor{Name: "internal_owner_identity_holder_id", Label: "InternalOwnerIdentityHolderID", Type: "string", MatchKey: true, InputKey: "internal_owner_identity_holder_id", Clearable: true}, InternalOwnerUserID: FieldDescriptor{Name: "internal_owner_user_id", Label: "InternalOwnerUserID", Type: "string", MatchKey: true, InputKey: "internal_owner_user_id", Clearable: true}, Metadata: FieldDescriptor{Name: "metadata", Label: "Metadata", Type: "map[string]interface {}", InputKey: "metadata", Clearable: true, Volatile: true}, NumericSeverity: FieldDescriptor{Name: "numeric_severity", Label: "NumericSeverity", Type: "float64", InputKey: "numeric_severity", Clearable: true}, Open: FieldDescriptor{Name: "open", Label: "Open", Type: "bool", WorkflowEligible: true, InputKey: "open", Clearable: true}, Priority: FieldDescriptor{Name: "priority", Label: "Priority", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "priority", Clearable: true}, Production: FieldDescriptor{Name: "production", Label: "Production", Type: "bool", WorkflowEligible: true, InputKey: "production", Clearable: true}, Public: FieldDescriptor{Name: "public", Label: "Public", Type: "bool", WorkflowEligible: true, InputKey: "public", Clearable: true}, RawPayload: FieldDescriptor{Name: "raw_payload", Label: "RawPayload", Type: "map[string]interface {}", InputKey: "raw_payload", Clearable: true, Volatile: true}, Recommendation: FieldDescriptor{Name: "recommendation", Label: "Recommendation", Type: "string", MatchKey: true, InputKey: "recommendation", Clearable: true}, RecommendedActions: FieldDescriptor{Name: "recommended_actions", Label: "RecommendedActions", Type: "string", MatchKey: true, InputKey: "recommended_actions", Clearable: true}, References: FieldDescriptor{Name: "references", Label: "References", Type: "[]string", InputKey: "references", Clearable: true}, RemediationSLA: FieldDescriptor{Name: "remediation_sla", Label: "RemediationSLA", Type: "int", WorkflowEligible: true, InputKey: "remediation_sla", Clearable: true}, ReportedAt: FieldDescriptor{Name: "reported_at", Label: "ReportedAt", Type: "models.DateTime", WorkflowEligible: true, InputKey: "reported_at", Clearable: true}, ResourceName: FieldDescriptor{Name: "resource_name", Label: "ResourceName", Type: "string", MatchKey: true, InputKey: "resource_name", Clearable: true}, ReviewedBy: FieldDescriptor{Name: "reviewed_by", Label: "ReviewedBy", Type: "string", MatchKey: true, InputKey: "reviewed_by", Clearable: true}, ReviewedByGroupID: FieldDescriptor{Name: "reviewed_by_group_id", Label: "ReviewedByGroupID", Type: "string", MatchKey: true, InputKey: "reviewed_by_group_id", Clearable: true}, ReviewedByIdentityHolderID: FieldDescriptor{Name: "reviewed_by_identity_holder_id", Label: "ReviewedByIdentityHolderID", Type: "string", MatchKey: true, InputKey: "reviewed_by_identity_holder_id", Clearable: true}, ReviewedByUserID: FieldDescriptor{Name: "reviewed_by_user_id", Label: "ReviewedByUserID", Type: "string", MatchKey: true, InputKey: "reviewed_by_user_id", Clearable: true}, ScopeID: FieldDescriptor{Name: "scope_id", Label: "ScopeID", Type: "string", MatchKey: true, InputKey: "scope_id", Clearable: true}, ScopeName: FieldDescriptor{Name: "scope_name", Label: "ScopeName", Type: "string", MatchKey: true, InputKey: "scope_name", Clearable: true, CaseInsensitive: true}, Score: FieldDescriptor{Name: "score", Label: "Score", Type: "float64", WorkflowEligible: true, InputKey: "score", Clearable: true}, Severity: FieldDescriptor{Name: "severity", Label: "Severity", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "severity", Clearable: true}, Source: FieldDescriptor{Name: "source", Label: "Source", Type: "string", MatchKey: true, InputKey: "source", Clearable: true}, SourceUpdatedAt: FieldDescriptor{Name: "source_updated_at", Label: "SourceUpdatedAt", Type: "models.DateTime", InputKey: "source_updated_at", Clearable: true, Volatile: true}, State: FieldDescriptor{Name: "state", Label: "State", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "state", Clearable: true}, StepsToReproduce: FieldDescriptor{Name: "steps_to_reproduce", Label: "StepsToReproduce", Type: "[]string", InputKey: "steps_to_reproduce", Clearable: true}, SystemInternalID: FieldDescriptor{Name: "system_internal_id", Label: "SystemInternalID", Type: "string", MatchKey: true, InputKey: "system_internal_id", Clearable: true}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, TargetDetails: FieldDescriptor{Name: "target_details", Label: "TargetDetails", Type: "map[string]interface {}", InputKey: "target_details", Clearable: true}, Targets: FieldDescriptor{Name: "targets", Label: "Targets", Type: "[]string", InputKey: "targets", Clearable: true}, Validated: FieldDescriptor{Name: "validated", Label: "Validated", Type: "bool", WorkflowEligible: true, InputKey: "validated", Clearable: true}, Vector: FieldDescriptor{Name: "vector", Label: "Vector", Type: "string", MatchKey: true, InputKey: "vector", Clearable: true}, }
FindingFields indexes the provider-mappable fields of Finding
var GroupFields = struct { // DisplayName is the display_name field DisplayName FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // Name is the name field Name FieldDescriptor // OscalContactUuids is the oscal_contact_uuids field OscalContactUuids FieldDescriptor // OscalPartyUUID is the oscal_party_uuid field OscalPartyUUID FieldDescriptor // OscalRole is the oscal_role field OscalRole FieldDescriptor // ScimActive is the scim_active field ScimActive FieldDescriptor // ScimDisplayName is the scim_display_name field ScimDisplayName FieldDescriptor // ScimExternalID is the scim_external_id field ScimExternalID FieldDescriptor // ScimGroupMailing is the scim_group_mailing field ScimGroupMailing FieldDescriptor // Tags is the tags field Tags FieldDescriptor }{ DisplayName: FieldDescriptor{Name: "display_name", Label: "DisplayName", Type: "string", MatchKey: true, InputKey: "display_name"}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, Name: FieldDescriptor{Name: "name", Label: "Name", Type: "string", MatchKey: true, InputKey: "name"}, OscalContactUuids: FieldDescriptor{Name: "oscal_contact_uuids", Label: "OscalContactUuids", Type: "[]string", InputKey: "oscal_contact_uuids", Clearable: true}, OscalPartyUUID: FieldDescriptor{Name: "oscal_party_uuid", Label: "OscalPartyUUID", Type: "string", MatchKey: true, InputKey: "oscal_party_uuid", Clearable: true}, OscalRole: FieldDescriptor{Name: "oscal_role", Label: "OscalRole", Type: "string", MatchKey: true, InputKey: "oscal_role", Clearable: true}, ScimActive: FieldDescriptor{Name: "scim_active", Label: "ScimActive", Type: "bool", InputKey: "scim_active", Clearable: true}, ScimDisplayName: FieldDescriptor{Name: "scim_display_name", Label: "ScimDisplayName", Type: "string", MatchKey: true, InputKey: "scim_display_name", Clearable: true}, ScimExternalID: FieldDescriptor{Name: "scim_external_id", Label: "ScimExternalID", Type: "string", MatchKey: true, InputKey: "scim_external_id", Clearable: true}, ScimGroupMailing: FieldDescriptor{Name: "scim_group_mailing", Label: "ScimGroupMailing", Type: "string", MatchKey: true, InputKey: "scim_group_mailing", Clearable: true}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, }
GroupFields indexes the provider-mappable fields of Group
var IdentityHolderFields = struct { // AlternateEmail is the alternate_email field AlternateEmail FieldDescriptor // AvatarRemoteURL is the avatar_remote_url field AvatarRemoteURL FieldDescriptor // Department is the department field Department FieldDescriptor // Email is the email field Email FieldDescriptor // EmailAliases is the email_aliases field EmailAliases FieldDescriptor // EmployerEntityID is the employer_entity_id field EmployerEntityID FieldDescriptor // EndDate is the end_date field EndDate FieldDescriptor // EnvironmentID is the environment_id field EnvironmentID FieldDescriptor // EnvironmentName is the environment_name field EnvironmentName FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // ExternalReferenceID is the external_reference_id field ExternalReferenceID FieldDescriptor // ExternalUserID is the external_user_id field ExternalUserID FieldDescriptor // FullName is the full_name field FullName FieldDescriptor // IdentityHolderType is the identity_holder_type field IdentityHolderType FieldDescriptor // InternalOwner is the internal_owner field InternalOwner FieldDescriptor // InternalOwnerGroupID is the internal_owner_group_id field InternalOwnerGroupID FieldDescriptor // InternalOwnerIdentityHolderID is the internal_owner_identity_holder_id field InternalOwnerIdentityHolderID FieldDescriptor // InternalOwnerUserID is the internal_owner_user_id field InternalOwnerUserID FieldDescriptor // IsActive is the is_active field IsActive FieldDescriptor // IsOpenlaneUser is the is_openlane_user field IsOpenlaneUser FieldDescriptor // Location is the location field Location FieldDescriptor // Metadata is the metadata field Metadata FieldDescriptor // PhoneNumber is the phone_number field PhoneNumber FieldDescriptor // ScopeID is the scope_id field ScopeID FieldDescriptor // ScopeName is the scope_name field ScopeName FieldDescriptor // StartDate is the start_date field StartDate FieldDescriptor // Status is the status field Status FieldDescriptor // Tags is the tags field Tags FieldDescriptor // Team is the team field Team FieldDescriptor // Title is the title field Title FieldDescriptor // UserID is the user_id field UserID FieldDescriptor }{ AlternateEmail: FieldDescriptor{Name: "alternate_email", Label: "AlternateEmail", Type: "string", MatchKey: true, InputKey: "alternate_email", Clearable: true}, AvatarRemoteURL: FieldDescriptor{Name: "avatar_remote_url", Label: "AvatarRemoteURL", Type: "string", MatchKey: true, InputKey: "avatar_remote_url", Clearable: true}, Department: FieldDescriptor{Name: "department", Label: "Department", Type: "string", MatchKey: true, InputKey: "department", Clearable: true}, Email: FieldDescriptor{Name: "email", Label: "Email", Type: "string", MatchKey: true, InputKey: "email"}, EmailAliases: FieldDescriptor{Name: "email_aliases", Label: "EmailAliases", Type: "[]string", InputKey: "email_aliases", Clearable: true}, EmployerEntityID: FieldDescriptor{Name: "employer_entity_id", Label: "EmployerEntityID", Type: "string", MatchKey: true, InputKey: "employer_entity_id", Clearable: true}, EndDate: FieldDescriptor{Name: "end_date", Label: "EndDate", Type: "models.DateTime", WorkflowEligible: true, InputKey: "end_date", Clearable: true}, EnvironmentID: FieldDescriptor{Name: "environment_id", Label: "EnvironmentID", Type: "string", MatchKey: true, InputKey: "environment_id", Clearable: true}, EnvironmentName: FieldDescriptor{Name: "environment_name", Label: "EnvironmentName", Type: "string", MatchKey: true, InputKey: "environment_name", Clearable: true, CaseInsensitive: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, ExternalReferenceID: FieldDescriptor{Name: "external_reference_id", Label: "ExternalReferenceID", Type: "string", MatchKey: true, InputKey: "external_reference_id", Clearable: true}, ExternalUserID: FieldDescriptor{Name: "external_user_id", Label: "ExternalUserID", Type: "string", MatchKey: true, InputKey: "external_user_id", Clearable: true}, FullName: FieldDescriptor{Name: "full_name", Label: "FullName", Type: "string", MatchKey: true, InputKey: "full_name"}, IdentityHolderType: FieldDescriptor{Name: "identity_holder_type", Label: "IdentityHolderType", Type: "enums.IdentityHolderType", InputKey: "identity_holder_type"}, InternalOwner: FieldDescriptor{Name: "internal_owner", Label: "InternalOwner", Type: "string", MatchKey: true, InputKey: "internal_owner", Clearable: true}, InternalOwnerGroupID: FieldDescriptor{Name: "internal_owner_group_id", Label: "InternalOwnerGroupID", Type: "string", MatchKey: true, InputKey: "internal_owner_group_id", Clearable: true}, InternalOwnerIdentityHolderID: FieldDescriptor{Name: "internal_owner_identity_holder_id", Label: "InternalOwnerIdentityHolderID", Type: "string", MatchKey: true, InputKey: "internal_owner_identity_holder_id", Clearable: true}, InternalOwnerUserID: FieldDescriptor{Name: "internal_owner_user_id", Label: "InternalOwnerUserID", Type: "string", MatchKey: true, InputKey: "internal_owner_user_id", Clearable: true}, IsActive: FieldDescriptor{Name: "is_active", Label: "IsActive", Type: "bool", WorkflowEligible: true, InputKey: "is_active"}, IsOpenlaneUser: FieldDescriptor{Name: "is_openlane_user", Label: "IsOpenlaneUser", Type: "bool", InputKey: "is_openlane_user", Clearable: true}, Location: FieldDescriptor{Name: "location", Label: "Location", Type: "string", MatchKey: true, InputKey: "location", Clearable: true}, Metadata: FieldDescriptor{Name: "metadata", Label: "Metadata", Type: "map[string]interface {}", InputKey: "metadata", Clearable: true}, PhoneNumber: FieldDescriptor{Name: "phone_number", Label: "PhoneNumber", Type: "string", MatchKey: true, InputKey: "phone_number", Clearable: true}, ScopeID: FieldDescriptor{Name: "scope_id", Label: "ScopeID", Type: "string", MatchKey: true, InputKey: "scope_id", Clearable: true}, ScopeName: FieldDescriptor{Name: "scope_name", Label: "ScopeName", Type: "string", MatchKey: true, InputKey: "scope_name", Clearable: true, CaseInsensitive: true}, StartDate: FieldDescriptor{Name: "start_date", Label: "StartDate", Type: "models.DateTime", WorkflowEligible: true, InputKey: "start_date", Clearable: true}, Status: FieldDescriptor{Name: "status", Label: "Status", Type: "enums.UserStatus", WorkflowEligible: true, InputKey: "status"}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, Team: FieldDescriptor{Name: "team", Label: "Team", Type: "string", MatchKey: true, InputKey: "team", Clearable: true}, Title: FieldDescriptor{Name: "title", Label: "Title", Type: "string", MatchKey: true, InputKey: "title", Clearable: true}, UserID: FieldDescriptor{Name: "user_id", Label: "UserID", Type: "string", MatchKey: true, InputKey: "user_id", Clearable: true}, }
IdentityHolderFields indexes the provider-mappable fields of IdentityHolder
var IngestTopics = gala.IntegrationIngest.At("entityops")
IngestTopics is the namespace for every generated asynchronous schema-ingest topic.
var InternalPolicyFields = struct { // ApprovalRequired is the approval_required field ApprovalRequired FieldDescriptor // ApproverID is the approver_id field ApproverID FieldDescriptor // ControlSuggestions is the control_suggestions field ControlSuggestions FieldDescriptor // DelegateID is the delegate_id field DelegateID FieldDescriptor // Details is the details field Details FieldDescriptor // DetailsJSON is the details_json field DetailsJSON FieldDescriptor // DismissedControlSuggestions is the dismissed_control_suggestions field DismissedControlSuggestions FieldDescriptor // DismissedImprovementSuggestions is the dismissed_improvement_suggestions field DismissedImprovementSuggestions FieldDescriptor // DismissedTagSuggestions is the dismissed_tag_suggestions field DismissedTagSuggestions FieldDescriptor // EnvironmentID is the environment_id field EnvironmentID FieldDescriptor // EnvironmentName is the environment_name field EnvironmentName FieldDescriptor // ExternalContents is the external_contents field ExternalContents FieldDescriptor // ExternalFileID is the external_file_id field ExternalFileID FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // ExternalUUID is the external_uuid field ExternalUUID FieldDescriptor // ImprovementSuggestions is the improvement_suggestions field ImprovementSuggestions FieldDescriptor // InternalNotes is the internal_notes field InternalNotes FieldDescriptor // InternalPolicyKindID is the internal_policy_kind_id field InternalPolicyKindID FieldDescriptor // InternalPolicyKindName is the internal_policy_kind_name field InternalPolicyKindName FieldDescriptor // ManagementMode is the management_mode field ManagementMode FieldDescriptor // Name is the name field Name FieldDescriptor // ReviewDue is the review_due field ReviewDue FieldDescriptor // ReviewFrequency is the review_frequency field ReviewFrequency FieldDescriptor // Revision is the revision field Revision FieldDescriptor // ScopeID is the scope_id field ScopeID FieldDescriptor // ScopeName is the scope_name field ScopeName FieldDescriptor // Status is the status field Status FieldDescriptor // SystemInternalID is the system_internal_id field SystemInternalID FieldDescriptor // TagSuggestions is the tag_suggestions field TagSuggestions FieldDescriptor // Tags is the tags field Tags FieldDescriptor // URL is the url field URL FieldDescriptor }{ ApprovalRequired: FieldDescriptor{Name: "approval_required", Label: "ApprovalRequired", Type: "bool", InputKey: "approval_required", Clearable: true}, ApproverID: FieldDescriptor{Name: "approver_id", Label: "ApproverID", Type: "string", MatchKey: true, InputKey: "approver_id", Clearable: true}, ControlSuggestions: FieldDescriptor{Name: "control_suggestions", Label: "ControlSuggestions", Type: "[]string", InputKey: "control_suggestions", Clearable: true}, DelegateID: FieldDescriptor{Name: "delegate_id", Label: "DelegateID", Type: "string", MatchKey: true, InputKey: "delegate_id", Clearable: true}, Details: FieldDescriptor{Name: "details", Label: "Details", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "details", Clearable: true}, DetailsJSON: FieldDescriptor{Name: "details_json", Label: "DetailsJSON", Type: "[]interface {}", WorkflowEligible: true, InputKey: "details_json", Clearable: true}, DismissedControlSuggestions: FieldDescriptor{Name: "dismissed_control_suggestions", Label: "DismissedControlSuggestions", Type: "[]string", InputKey: "dismissed_control_suggestions", Clearable: true}, DismissedImprovementSuggestions: FieldDescriptor{Name: "dismissed_improvement_suggestions", Label: "DismissedImprovementSuggestions", Type: "[]string", InputKey: "dismissed_improvement_suggestions", Clearable: true}, DismissedTagSuggestions: FieldDescriptor{Name: "dismissed_tag_suggestions", Label: "DismissedTagSuggestions", Type: "[]string", InputKey: "dismissed_tag_suggestions", Clearable: true}, EnvironmentID: FieldDescriptor{Name: "environment_id", Label: "EnvironmentID", Type: "string", MatchKey: true, InputKey: "environment_id", Clearable: true}, EnvironmentName: FieldDescriptor{Name: "environment_name", Label: "EnvironmentName", Type: "string", MatchKey: true, InputKey: "environment_name", Clearable: true, CaseInsensitive: true}, ExternalContents: FieldDescriptor{Name: "external_contents", Label: "ExternalContents", Type: "string", MatchKey: true, InputKey: "external_contents", Clearable: true}, ExternalFileID: FieldDescriptor{Name: "external_file_id", Label: "ExternalFileID", Type: "string", MatchKey: true, InputKey: "external_file_id", LookupKey: true, Clearable: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, ExternalUUID: FieldDescriptor{Name: "external_uuid", Label: "ExternalUUID", Type: "string", MatchKey: true, InputKey: "external_uuid", Clearable: true}, ImprovementSuggestions: FieldDescriptor{Name: "improvement_suggestions", Label: "ImprovementSuggestions", Type: "[]string", InputKey: "improvement_suggestions", Clearable: true}, InternalNotes: FieldDescriptor{Name: "internal_notes", Label: "InternalNotes", Type: "string", MatchKey: true, InputKey: "internal_notes", Clearable: true}, InternalPolicyKindID: FieldDescriptor{Name: "internal_policy_kind_id", Label: "InternalPolicyKindID", Type: "string", MatchKey: true, InputKey: "internal_policy_kind_id", Clearable: true}, InternalPolicyKindName: FieldDescriptor{Name: "internal_policy_kind_name", Label: "InternalPolicyKindName", Type: "string", MatchKey: true, InputKey: "internal_policy_kind_name", Clearable: true, CaseInsensitive: true}, ManagementMode: FieldDescriptor{Name: "management_mode", Label: "ManagementMode", Type: "enums.DocumentManagementMode", InputKey: "management_mode", Clearable: true}, Name: FieldDescriptor{Name: "name", Label: "Name", Type: "string", MatchKey: true, InputKey: "name", DisplayKey: true}, ReviewDue: FieldDescriptor{Name: "review_due", Label: "ReviewDue", Type: "time.Time", InputKey: "review_due", Clearable: true}, ReviewFrequency: FieldDescriptor{Name: "review_frequency", Label: "ReviewFrequency", Type: "enums.Frequency", InputKey: "review_frequency", Clearable: true}, Revision: FieldDescriptor{Name: "revision", Label: "Revision", Type: "string", MatchKey: true, InputKey: "revision", Clearable: true}, ScopeID: FieldDescriptor{Name: "scope_id", Label: "ScopeID", Type: "string", MatchKey: true, InputKey: "scope_id", Clearable: true}, ScopeName: FieldDescriptor{Name: "scope_name", Label: "ScopeName", Type: "string", MatchKey: true, InputKey: "scope_name", Clearable: true, CaseInsensitive: true}, Status: FieldDescriptor{Name: "status", Label: "Status", Type: "enums.DocumentStatus", WorkflowEligible: true, InputKey: "status", Clearable: true}, SystemInternalID: FieldDescriptor{Name: "system_internal_id", Label: "SystemInternalID", Type: "string", MatchKey: true, InputKey: "system_internal_id", Clearable: true}, TagSuggestions: FieldDescriptor{Name: "tag_suggestions", Label: "TagSuggestions", Type: "[]string", InputKey: "tag_suggestions", Clearable: true}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, URL: FieldDescriptor{Name: "url", Label: "URL", Type: "string", MatchKey: true, InputKey: "url", Clearable: true}, }
InternalPolicyFields indexes the provider-mappable fields of InternalPolicy
var MappedControlFields = struct { // Confidence is the confidence field Confidence FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // InternalNotes is the internal_notes field InternalNotes FieldDescriptor // MappingType is the mapping_type field MappingType FieldDescriptor // Relation is the relation field Relation FieldDescriptor // Source is the source field Source FieldDescriptor // SystemInternalID is the system_internal_id field SystemInternalID FieldDescriptor // Tags is the tags field Tags FieldDescriptor }{ Confidence: FieldDescriptor{Name: "confidence", Label: "Confidence", Type: "int", InputKey: "confidence", Clearable: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, InternalNotes: FieldDescriptor{Name: "internal_notes", Label: "InternalNotes", Type: "string", MatchKey: true, InputKey: "internal_notes", Clearable: true}, MappingType: FieldDescriptor{Name: "mapping_type", Label: "MappingType", Type: "enums.MappingType", InputKey: "mapping_type"}, Relation: FieldDescriptor{Name: "relation", Label: "Relation", Type: "string", MatchKey: true, InputKey: "relation", Clearable: true}, Source: FieldDescriptor{Name: "source", Label: "Source", Type: "enums.MappingSource", InputKey: "source", Clearable: true}, SystemInternalID: FieldDescriptor{Name: "system_internal_id", Label: "SystemInternalID", Type: "string", MatchKey: true, InputKey: "system_internal_id", Clearable: true}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, }
MappedControlFields indexes the provider-mappable fields of MappedControl
var NarrativeFields = struct { // Description is the description field Description FieldDescriptor // Details is the details field Details FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // InternalNotes is the internal_notes field InternalNotes FieldDescriptor // Name is the name field Name FieldDescriptor // SystemInternalID is the system_internal_id field SystemInternalID FieldDescriptor // Tags is the tags field Tags FieldDescriptor }{ Description: FieldDescriptor{Name: "description", Label: "Description", Type: "string", MatchKey: true, InputKey: "description", Clearable: true}, Details: FieldDescriptor{Name: "details", Label: "Details", Type: "string", MatchKey: true, InputKey: "details", Clearable: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, InternalNotes: FieldDescriptor{Name: "internal_notes", Label: "InternalNotes", Type: "string", MatchKey: true, InputKey: "internal_notes", Clearable: true}, Name: FieldDescriptor{Name: "name", Label: "Name", Type: "string", MatchKey: true, InputKey: "name"}, SystemInternalID: FieldDescriptor{Name: "system_internal_id", Label: "SystemInternalID", Type: "string", MatchKey: true, InputKey: "system_internal_id", Clearable: true}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, }
NarrativeFields indexes the provider-mappable fields of Narrative
var PlatformFields = struct { // AccessModelID is the access_model_id field AccessModelID FieldDescriptor // AccessModelName is the access_model_name field AccessModelName FieldDescriptor // BusinessOwner is the business_owner field BusinessOwner FieldDescriptor // BusinessOwnerGroupID is the business_owner_group_id field BusinessOwnerGroupID FieldDescriptor // BusinessOwnerIdentityHolderID is the business_owner_identity_holder_id field BusinessOwnerIdentityHolderID FieldDescriptor // BusinessOwnerUserID is the business_owner_user_id field BusinessOwnerUserID FieldDescriptor // BusinessPurpose is the business_purpose field BusinessPurpose FieldDescriptor // ContainsPii is the contains_pii field ContainsPii FieldDescriptor // CostCenter is the cost_center field CostCenter FieldDescriptor // CriticalityID is the criticality_id field CriticalityID FieldDescriptor // CriticalityName is the criticality_name field CriticalityName FieldDescriptor // Description is the description field Description FieldDescriptor // EncryptionStatusID is the encryption_status_id field EncryptionStatusID FieldDescriptor // EncryptionStatusName is the encryption_status_name field EncryptionStatusName FieldDescriptor // EnvironmentID is the environment_id field EnvironmentID FieldDescriptor // EnvironmentName is the environment_name field EnvironmentName FieldDescriptor // EstimatedMonthlyCost is the estimated_monthly_cost field EstimatedMonthlyCost FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // ExternalReferenceID is the external_reference_id field ExternalReferenceID FieldDescriptor // ExternalUUID is the external_uuid field ExternalUUID FieldDescriptor // InternalOwner is the internal_owner field InternalOwner FieldDescriptor // InternalOwnerGroupID is the internal_owner_group_id field InternalOwnerGroupID FieldDescriptor // InternalOwnerIdentityHolderID is the internal_owner_identity_holder_id field InternalOwnerIdentityHolderID FieldDescriptor // InternalOwnerUserID is the internal_owner_user_id field InternalOwnerUserID FieldDescriptor // Metadata is the metadata field Metadata FieldDescriptor // Name is the name field Name FieldDescriptor // PhysicalLocation is the physical_location field PhysicalLocation FieldDescriptor // PlatformDataClassificationID is the platform_data_classification_id field PlatformDataClassificationID FieldDescriptor // PlatformDataClassificationName is the platform_data_classification_name field PlatformDataClassificationName FieldDescriptor // PlatformKindID is the platform_kind_id field PlatformKindID FieldDescriptor // PlatformKindName is the platform_kind_name field PlatformKindName FieldDescriptor // PlatformOwnerID is the platform_owner_id field PlatformOwnerID FieldDescriptor // PurchaseDate is the purchase_date field PurchaseDate FieldDescriptor // Region is the region field Region FieldDescriptor // ScopeID is the scope_id field ScopeID FieldDescriptor // ScopeName is the scope_name field ScopeName FieldDescriptor // SecurityOwner is the security_owner field SecurityOwner FieldDescriptor // SecurityOwnerGroupID is the security_owner_group_id field SecurityOwnerGroupID FieldDescriptor // SecurityOwnerIdentityHolderID is the security_owner_identity_holder_id field SecurityOwnerIdentityHolderID FieldDescriptor // SecurityOwnerUserID is the security_owner_user_id field SecurityOwnerUserID FieldDescriptor // SecurityTierID is the security_tier_id field SecurityTierID FieldDescriptor // SecurityTierName is the security_tier_name field SecurityTierName FieldDescriptor // SourceIdentifier is the source_identifier field SourceIdentifier FieldDescriptor // SourceType is the source_type field SourceType FieldDescriptor // Status is the status field Status FieldDescriptor // Tags is the tags field Tags FieldDescriptor // TechnicalOwner is the technical_owner field TechnicalOwner FieldDescriptor // TechnicalOwnerGroupID is the technical_owner_group_id field TechnicalOwnerGroupID FieldDescriptor // TechnicalOwnerIdentityHolderID is the technical_owner_identity_holder_id field TechnicalOwnerIdentityHolderID FieldDescriptor // TechnicalOwnerUserID is the technical_owner_user_id field TechnicalOwnerUserID FieldDescriptor }{ AccessModelID: FieldDescriptor{Name: "access_model_id", Label: "AccessModelID", Type: "string", MatchKey: true, InputKey: "access_model_id", Clearable: true}, AccessModelName: FieldDescriptor{Name: "access_model_name", Label: "AccessModelName", Type: "string", MatchKey: true, InputKey: "access_model_name", Clearable: true, CaseInsensitive: true}, BusinessOwner: FieldDescriptor{Name: "business_owner", Label: "BusinessOwner", Type: "string", MatchKey: true, InputKey: "business_owner", Clearable: true}, BusinessOwnerGroupID: FieldDescriptor{Name: "business_owner_group_id", Label: "BusinessOwnerGroupID", Type: "string", MatchKey: true, InputKey: "business_owner_group_id", Clearable: true}, BusinessOwnerIdentityHolderID: FieldDescriptor{Name: "business_owner_identity_holder_id", Label: "BusinessOwnerIdentityHolderID", Type: "string", MatchKey: true, InputKey: "business_owner_identity_holder_id", Clearable: true}, BusinessOwnerUserID: FieldDescriptor{Name: "business_owner_user_id", Label: "BusinessOwnerUserID", Type: "string", MatchKey: true, InputKey: "business_owner_user_id", Clearable: true}, BusinessPurpose: FieldDescriptor{Name: "business_purpose", Label: "BusinessPurpose", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "business_purpose", Clearable: true}, ContainsPii: FieldDescriptor{Name: "contains_pii", Label: "ContainsPii", Type: "bool", WorkflowEligible: true, InputKey: "contains_pii", Clearable: true}, CostCenter: FieldDescriptor{Name: "cost_center", Label: "CostCenter", Type: "string", MatchKey: true, InputKey: "cost_center", Clearable: true}, CriticalityID: FieldDescriptor{Name: "criticality_id", Label: "CriticalityID", Type: "string", MatchKey: true, InputKey: "criticality_id", Clearable: true}, CriticalityName: FieldDescriptor{Name: "criticality_name", Label: "CriticalityName", Type: "string", MatchKey: true, InputKey: "criticality_name", Clearable: true, CaseInsensitive: true}, Description: FieldDescriptor{Name: "description", Label: "Description", Type: "string", MatchKey: true, InputKey: "description", Clearable: true}, EncryptionStatusID: FieldDescriptor{Name: "encryption_status_id", Label: "EncryptionStatusID", Type: "string", MatchKey: true, InputKey: "encryption_status_id", Clearable: true}, EncryptionStatusName: FieldDescriptor{Name: "encryption_status_name", Label: "EncryptionStatusName", Type: "string", MatchKey: true, InputKey: "encryption_status_name", Clearable: true, CaseInsensitive: true}, EnvironmentID: FieldDescriptor{Name: "environment_id", Label: "EnvironmentID", Type: "string", MatchKey: true, InputKey: "environment_id", Clearable: true}, EnvironmentName: FieldDescriptor{Name: "environment_name", Label: "EnvironmentName", Type: "string", MatchKey: true, InputKey: "environment_name", Clearable: true, CaseInsensitive: true}, EstimatedMonthlyCost: FieldDescriptor{Name: "estimated_monthly_cost", Label: "EstimatedMonthlyCost", Type: "float64", InputKey: "estimated_monthly_cost", Clearable: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, ExternalReferenceID: FieldDescriptor{Name: "external_reference_id", Label: "ExternalReferenceID", Type: "string", MatchKey: true, InputKey: "external_reference_id", Clearable: true}, ExternalUUID: FieldDescriptor{Name: "external_uuid", Label: "ExternalUUID", Type: "string", MatchKey: true, InputKey: "external_uuid", Clearable: true}, InternalOwner: FieldDescriptor{Name: "internal_owner", Label: "InternalOwner", Type: "string", MatchKey: true, InputKey: "internal_owner", Clearable: true}, InternalOwnerGroupID: FieldDescriptor{Name: "internal_owner_group_id", Label: "InternalOwnerGroupID", Type: "string", MatchKey: true, InputKey: "internal_owner_group_id", Clearable: true}, InternalOwnerIdentityHolderID: FieldDescriptor{Name: "internal_owner_identity_holder_id", Label: "InternalOwnerIdentityHolderID", Type: "string", MatchKey: true, InputKey: "internal_owner_identity_holder_id", Clearable: true}, InternalOwnerUserID: FieldDescriptor{Name: "internal_owner_user_id", Label: "InternalOwnerUserID", Type: "string", MatchKey: true, InputKey: "internal_owner_user_id", Clearable: true}, Metadata: FieldDescriptor{Name: "metadata", Label: "Metadata", Type: "map[string]interface {}", InputKey: "metadata", Clearable: true}, Name: FieldDescriptor{Name: "name", Label: "Name", Type: "string", MatchKey: true, InputKey: "name"}, PhysicalLocation: FieldDescriptor{Name: "physical_location", Label: "PhysicalLocation", Type: "string", MatchKey: true, InputKey: "physical_location", Clearable: true}, PlatformDataClassificationID: FieldDescriptor{Name: "platform_data_classification_id", Label: "PlatformDataClassificationID", Type: "string", MatchKey: true, InputKey: "platform_data_classification_id", Clearable: true}, PlatformDataClassificationName: FieldDescriptor{Name: "platform_data_classification_name", Label: "PlatformDataClassificationName", Type: "string", MatchKey: true, InputKey: "platform_data_classification_name", Clearable: true, CaseInsensitive: true}, PlatformKindID: FieldDescriptor{Name: "platform_kind_id", Label: "PlatformKindID", Type: "string", MatchKey: true, InputKey: "platform_kind_id", Clearable: true}, PlatformKindName: FieldDescriptor{Name: "platform_kind_name", Label: "PlatformKindName", Type: "string", MatchKey: true, InputKey: "platform_kind_name", Clearable: true, CaseInsensitive: true}, PlatformOwnerID: FieldDescriptor{Name: "platform_owner_id", Label: "PlatformOwnerID", Type: "string", MatchKey: true, InputKey: "platform_owner_id", Clearable: true}, PurchaseDate: FieldDescriptor{Name: "purchase_date", Label: "PurchaseDate", Type: "models.DateTime", InputKey: "purchase_date", Clearable: true}, Region: FieldDescriptor{Name: "region", Label: "Region", Type: "string", MatchKey: true, InputKey: "region", Clearable: true}, ScopeID: FieldDescriptor{Name: "scope_id", Label: "ScopeID", Type: "string", MatchKey: true, InputKey: "scope_id", Clearable: true}, ScopeName: FieldDescriptor{Name: "scope_name", Label: "ScopeName", Type: "string", MatchKey: true, InputKey: "scope_name", Clearable: true, CaseInsensitive: true}, SecurityOwner: FieldDescriptor{Name: "security_owner", Label: "SecurityOwner", Type: "string", MatchKey: true, InputKey: "security_owner", Clearable: true}, SecurityOwnerGroupID: FieldDescriptor{Name: "security_owner_group_id", Label: "SecurityOwnerGroupID", Type: "string", MatchKey: true, InputKey: "security_owner_group_id", Clearable: true}, SecurityOwnerIdentityHolderID: FieldDescriptor{Name: "security_owner_identity_holder_id", Label: "SecurityOwnerIdentityHolderID", Type: "string", MatchKey: true, InputKey: "security_owner_identity_holder_id", Clearable: true}, SecurityOwnerUserID: FieldDescriptor{Name: "security_owner_user_id", Label: "SecurityOwnerUserID", Type: "string", MatchKey: true, InputKey: "security_owner_user_id", Clearable: true}, SecurityTierID: FieldDescriptor{Name: "security_tier_id", Label: "SecurityTierID", Type: "string", MatchKey: true, InputKey: "security_tier_id", Clearable: true}, SecurityTierName: FieldDescriptor{Name: "security_tier_name", Label: "SecurityTierName", Type: "string", MatchKey: true, InputKey: "security_tier_name", Clearable: true, CaseInsensitive: true}, SourceIdentifier: FieldDescriptor{Name: "source_identifier", Label: "SourceIdentifier", Type: "string", MatchKey: true, InputKey: "source_identifier", Clearable: true}, SourceType: FieldDescriptor{Name: "source_type", Label: "SourceType", Type: "enums.SourceType", InputKey: "source_type"}, Status: FieldDescriptor{Name: "status", Label: "Status", Type: "enums.PlatformStatus", WorkflowEligible: true, InputKey: "status"}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, TechnicalOwner: FieldDescriptor{Name: "technical_owner", Label: "TechnicalOwner", Type: "string", MatchKey: true, InputKey: "technical_owner", Clearable: true}, TechnicalOwnerGroupID: FieldDescriptor{Name: "technical_owner_group_id", Label: "TechnicalOwnerGroupID", Type: "string", MatchKey: true, InputKey: "technical_owner_group_id", Clearable: true}, TechnicalOwnerIdentityHolderID: FieldDescriptor{Name: "technical_owner_identity_holder_id", Label: "TechnicalOwnerIdentityHolderID", Type: "string", MatchKey: true, InputKey: "technical_owner_identity_holder_id", Clearable: true}, TechnicalOwnerUserID: FieldDescriptor{Name: "technical_owner_user_id", Label: "TechnicalOwnerUserID", Type: "string", MatchKey: true, InputKey: "technical_owner_user_id", Clearable: true}, }
PlatformFields indexes the provider-mappable fields of Platform
var ProcedureFields = struct { // ApprovalRequired is the approval_required field ApprovalRequired FieldDescriptor // ApproverID is the approver_id field ApproverID FieldDescriptor // ControlSuggestions is the control_suggestions field ControlSuggestions FieldDescriptor // DelegateID is the delegate_id field DelegateID FieldDescriptor // Details is the details field Details FieldDescriptor // DetailsJSON is the details_json field DetailsJSON FieldDescriptor // DismissedControlSuggestions is the dismissed_control_suggestions field DismissedControlSuggestions FieldDescriptor // DismissedImprovementSuggestions is the dismissed_improvement_suggestions field DismissedImprovementSuggestions FieldDescriptor // DismissedTagSuggestions is the dismissed_tag_suggestions field DismissedTagSuggestions FieldDescriptor // EnvironmentID is the environment_id field EnvironmentID FieldDescriptor // EnvironmentName is the environment_name field EnvironmentName FieldDescriptor // ExternalContents is the external_contents field ExternalContents FieldDescriptor // ExternalFileID is the external_file_id field ExternalFileID FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // ImprovementSuggestions is the improvement_suggestions field ImprovementSuggestions FieldDescriptor // InternalNotes is the internal_notes field InternalNotes FieldDescriptor // ManagementMode is the management_mode field ManagementMode FieldDescriptor // Name is the name field Name FieldDescriptor // ProcedureKindID is the procedure_kind_id field ProcedureKindID FieldDescriptor // ProcedureKindName is the procedure_kind_name field ProcedureKindName FieldDescriptor // ReviewDue is the review_due field ReviewDue FieldDescriptor // ReviewFrequency is the review_frequency field ReviewFrequency FieldDescriptor // Revision is the revision field Revision FieldDescriptor // ScopeID is the scope_id field ScopeID FieldDescriptor // ScopeName is the scope_name field ScopeName FieldDescriptor // Status is the status field Status FieldDescriptor // SystemInternalID is the system_internal_id field SystemInternalID FieldDescriptor // TagSuggestions is the tag_suggestions field TagSuggestions FieldDescriptor // Tags is the tags field Tags FieldDescriptor // URL is the url field URL FieldDescriptor }{ ApprovalRequired: FieldDescriptor{Name: "approval_required", Label: "ApprovalRequired", Type: "bool", InputKey: "approval_required", Clearable: true}, ApproverID: FieldDescriptor{Name: "approver_id", Label: "ApproverID", Type: "string", MatchKey: true, InputKey: "approver_id", Clearable: true}, ControlSuggestions: FieldDescriptor{Name: "control_suggestions", Label: "ControlSuggestions", Type: "[]string", InputKey: "control_suggestions", Clearable: true}, DelegateID: FieldDescriptor{Name: "delegate_id", Label: "DelegateID", Type: "string", MatchKey: true, InputKey: "delegate_id", Clearable: true}, Details: FieldDescriptor{Name: "details", Label: "Details", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "details", Clearable: true}, DetailsJSON: FieldDescriptor{Name: "details_json", Label: "DetailsJSON", Type: "[]interface {}", WorkflowEligible: true, InputKey: "details_json", Clearable: true}, DismissedControlSuggestions: FieldDescriptor{Name: "dismissed_control_suggestions", Label: "DismissedControlSuggestions", Type: "[]string", InputKey: "dismissed_control_suggestions", Clearable: true}, DismissedImprovementSuggestions: FieldDescriptor{Name: "dismissed_improvement_suggestions", Label: "DismissedImprovementSuggestions", Type: "[]string", InputKey: "dismissed_improvement_suggestions", Clearable: true}, DismissedTagSuggestions: FieldDescriptor{Name: "dismissed_tag_suggestions", Label: "DismissedTagSuggestions", Type: "[]string", InputKey: "dismissed_tag_suggestions", Clearable: true}, EnvironmentID: FieldDescriptor{Name: "environment_id", Label: "EnvironmentID", Type: "string", MatchKey: true, InputKey: "environment_id", Clearable: true}, EnvironmentName: FieldDescriptor{Name: "environment_name", Label: "EnvironmentName", Type: "string", MatchKey: true, InputKey: "environment_name", Clearable: true, CaseInsensitive: true}, ExternalContents: FieldDescriptor{Name: "external_contents", Label: "ExternalContents", Type: "string", MatchKey: true, InputKey: "external_contents", Clearable: true}, ExternalFileID: FieldDescriptor{Name: "external_file_id", Label: "ExternalFileID", Type: "string", MatchKey: true, InputKey: "external_file_id", LookupKey: true, Clearable: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, ImprovementSuggestions: FieldDescriptor{Name: "improvement_suggestions", Label: "ImprovementSuggestions", Type: "[]string", InputKey: "improvement_suggestions", Clearable: true}, InternalNotes: FieldDescriptor{Name: "internal_notes", Label: "InternalNotes", Type: "string", MatchKey: true, InputKey: "internal_notes", Clearable: true}, ManagementMode: FieldDescriptor{Name: "management_mode", Label: "ManagementMode", Type: "enums.DocumentManagementMode", InputKey: "management_mode", Clearable: true}, Name: FieldDescriptor{Name: "name", Label: "Name", Type: "string", MatchKey: true, InputKey: "name", DisplayKey: true}, ProcedureKindID: FieldDescriptor{Name: "procedure_kind_id", Label: "ProcedureKindID", Type: "string", MatchKey: true, InputKey: "procedure_kind_id", Clearable: true}, ProcedureKindName: FieldDescriptor{Name: "procedure_kind_name", Label: "ProcedureKindName", Type: "string", MatchKey: true, InputKey: "procedure_kind_name", Clearable: true, CaseInsensitive: true}, ReviewDue: FieldDescriptor{Name: "review_due", Label: "ReviewDue", Type: "time.Time", InputKey: "review_due", Clearable: true}, ReviewFrequency: FieldDescriptor{Name: "review_frequency", Label: "ReviewFrequency", Type: "enums.Frequency", InputKey: "review_frequency", Clearable: true}, Revision: FieldDescriptor{Name: "revision", Label: "Revision", Type: "string", MatchKey: true, InputKey: "revision", Clearable: true}, ScopeID: FieldDescriptor{Name: "scope_id", Label: "ScopeID", Type: "string", MatchKey: true, InputKey: "scope_id", Clearable: true}, ScopeName: FieldDescriptor{Name: "scope_name", Label: "ScopeName", Type: "string", MatchKey: true, InputKey: "scope_name", Clearable: true, CaseInsensitive: true}, Status: FieldDescriptor{Name: "status", Label: "Status", Type: "enums.DocumentStatus", WorkflowEligible: true, InputKey: "status", Clearable: true}, SystemInternalID: FieldDescriptor{Name: "system_internal_id", Label: "SystemInternalID", Type: "string", MatchKey: true, InputKey: "system_internal_id", Clearable: true}, TagSuggestions: FieldDescriptor{Name: "tag_suggestions", Label: "TagSuggestions", Type: "[]string", InputKey: "tag_suggestions", Clearable: true}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, URL: FieldDescriptor{Name: "url", Label: "URL", Type: "string", MatchKey: true, InputKey: "url", Clearable: true}, }
ProcedureFields indexes the provider-mappable fields of Procedure
var ProgramFields = struct { // AuditFirm is the audit_firm field AuditFirm FieldDescriptor // Auditor is the auditor field Auditor FieldDescriptor // AuditorEmail is the auditor_email field AuditorEmail FieldDescriptor // AuditorReadComments is the auditor_read_comments field AuditorReadComments FieldDescriptor // AuditorReady is the auditor_ready field AuditorReady FieldDescriptor // AuditorWriteComments is the auditor_write_comments field AuditorWriteComments FieldDescriptor // Description is the description field Description FieldDescriptor // EndDate is the end_date field EndDate FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // ExternalUUID is the external_uuid field ExternalUUID FieldDescriptor // FieldworkEndDate is the fieldwork_end_date field FieldworkEndDate FieldDescriptor // FieldworkStartDate is the fieldwork_start_date field FieldworkStartDate FieldDescriptor // FrameworkName is the framework_name field FrameworkName FieldDescriptor // Name is the name field Name FieldDescriptor // ObservationPeriodEndDate is the observation_period_end_date field ObservationPeriodEndDate FieldDescriptor // ObservationPeriodStartDate is the observation_period_start_date field ObservationPeriodStartDate FieldDescriptor // ProgramKindID is the program_kind_id field ProgramKindID FieldDescriptor // ProgramKindName is the program_kind_name field ProgramKindName FieldDescriptor // ProgramOwnerID is the program_owner_id field ProgramOwnerID FieldDescriptor // StartDate is the start_date field StartDate FieldDescriptor // Status is the status field Status FieldDescriptor // Tags is the tags field Tags FieldDescriptor }{ AuditFirm: FieldDescriptor{Name: "audit_firm", Label: "AuditFirm", Type: "string", MatchKey: true, InputKey: "audit_firm", Clearable: true}, Auditor: FieldDescriptor{Name: "auditor", Label: "Auditor", Type: "string", MatchKey: true, InputKey: "auditor", Clearable: true}, AuditorEmail: FieldDescriptor{Name: "auditor_email", Label: "AuditorEmail", Type: "string", MatchKey: true, InputKey: "auditor_email", Clearable: true}, AuditorReadComments: FieldDescriptor{Name: "auditor_read_comments", Label: "AuditorReadComments", Type: "bool", InputKey: "auditor_read_comments"}, AuditorReady: FieldDescriptor{Name: "auditor_ready", Label: "AuditorReady", Type: "bool", InputKey: "auditor_ready"}, AuditorWriteComments: FieldDescriptor{Name: "auditor_write_comments", Label: "AuditorWriteComments", Type: "bool", InputKey: "auditor_write_comments"}, Description: FieldDescriptor{Name: "description", Label: "Description", Type: "string", MatchKey: true, InputKey: "description", Clearable: true}, EndDate: FieldDescriptor{Name: "end_date", Label: "EndDate", Type: "time.Time", InputKey: "end_date", Clearable: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, ExternalUUID: FieldDescriptor{Name: "external_uuid", Label: "ExternalUUID", Type: "string", MatchKey: true, InputKey: "external_uuid", Clearable: true}, FieldworkEndDate: FieldDescriptor{Name: "fieldwork_end_date", Label: "FieldworkEndDate", Type: "time.Time", InputKey: "fieldwork_end_date", Clearable: true}, FieldworkStartDate: FieldDescriptor{Name: "fieldwork_start_date", Label: "FieldworkStartDate", Type: "time.Time", InputKey: "fieldwork_start_date", Clearable: true}, FrameworkName: FieldDescriptor{Name: "framework_name", Label: "FrameworkName", Type: "string", MatchKey: true, InputKey: "framework_name", Clearable: true}, Name: FieldDescriptor{Name: "name", Label: "Name", Type: "string", MatchKey: true, InputKey: "name"}, ObservationPeriodEndDate: FieldDescriptor{Name: "observation_period_end_date", Label: "ObservationPeriodEndDate", Type: "time.Time", InputKey: "observation_period_end_date", Clearable: true}, ObservationPeriodStartDate: FieldDescriptor{Name: "observation_period_start_date", Label: "ObservationPeriodStartDate", Type: "time.Time", InputKey: "observation_period_start_date", Clearable: true}, ProgramKindID: FieldDescriptor{Name: "program_kind_id", Label: "ProgramKindID", Type: "string", MatchKey: true, InputKey: "program_kind_id", Clearable: true}, ProgramKindName: FieldDescriptor{Name: "program_kind_name", Label: "ProgramKindName", Type: "string", MatchKey: true, InputKey: "program_kind_name", Clearable: true, CaseInsensitive: true}, ProgramOwnerID: FieldDescriptor{Name: "program_owner_id", Label: "ProgramOwnerID", Type: "string", MatchKey: true, InputKey: "program_owner_id", Clearable: true}, StartDate: FieldDescriptor{Name: "start_date", Label: "StartDate", Type: "time.Time", InputKey: "start_date", Clearable: true}, Status: FieldDescriptor{Name: "status", Label: "Status", Type: "enums.ProgramStatus", InputKey: "status"}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, }
ProgramFields indexes the provider-mappable fields of Program
var RegularMutationOps = []string{OpCreate, OpUpdate, OpUpdateOne, OpDelete, OpDeleteOne}
RegularMutationOps is every operation except soft deletes; empty listener Operations expand to this set so soft deletes stay explicit opt-in
var RemediationFields = struct { // CompletedAt is the completed_at field CompletedAt FieldDescriptor // DueAt is the due_at field DueAt FieldDescriptor // EnvironmentID is the environment_id field EnvironmentID FieldDescriptor // EnvironmentName is the environment_name field EnvironmentName FieldDescriptor // Error is the error field Error FieldDescriptor // Explanation is the explanation field Explanation FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // ExternalOwnerID is the external_owner_id field ExternalOwnerID FieldDescriptor // ExternalURI is the external_uri field ExternalURI FieldDescriptor // Instructions is the instructions field Instructions FieldDescriptor // Intent is the intent field Intent FieldDescriptor // InternalNotes is the internal_notes field InternalNotes FieldDescriptor // Metadata is the metadata field Metadata FieldDescriptor // OwnerReference is the owner_reference field OwnerReference FieldDescriptor // PrGeneratedAt is the pr_generated_at field PrGeneratedAt FieldDescriptor // PullRequestURI is the pull_request_uri field PullRequestURI FieldDescriptor // RepositoryURI is the repository_uri field RepositoryURI FieldDescriptor // ScopeID is the scope_id field ScopeID FieldDescriptor // ScopeName is the scope_name field ScopeName FieldDescriptor // Source is the source field Source FieldDescriptor // State is the state field State FieldDescriptor // Status is the status field Status FieldDescriptor // Summary is the summary field Summary FieldDescriptor // SystemInternalID is the system_internal_id field SystemInternalID FieldDescriptor // Tags is the tags field Tags FieldDescriptor // TicketReference is the ticket_reference field TicketReference FieldDescriptor // Title is the title field Title FieldDescriptor }{ CompletedAt: FieldDescriptor{Name: "completed_at", Label: "CompletedAt", Type: "models.DateTime", WorkflowEligible: true, InputKey: "completed_at", Clearable: true}, DueAt: FieldDescriptor{Name: "due_at", Label: "DueAt", Type: "models.DateTime", WorkflowEligible: true, InputKey: "due_at", Clearable: true}, EnvironmentID: FieldDescriptor{Name: "environment_id", Label: "EnvironmentID", Type: "string", MatchKey: true, InputKey: "environment_id", Clearable: true}, EnvironmentName: FieldDescriptor{Name: "environment_name", Label: "EnvironmentName", Type: "string", MatchKey: true, InputKey: "environment_name", Clearable: true, CaseInsensitive: true}, Error: FieldDescriptor{Name: "error", Label: "Error", Type: "string", MatchKey: true, InputKey: "error", Clearable: true}, Explanation: FieldDescriptor{Name: "explanation", Label: "Explanation", Type: "string", MatchKey: true, InputKey: "explanation", Clearable: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, ExternalOwnerID: FieldDescriptor{Name: "external_owner_id", Label: "ExternalOwnerID", Type: "string", MatchKey: true, InputKey: "external_owner_id", Clearable: true}, ExternalURI: FieldDescriptor{Name: "external_uri", Label: "ExternalURI", Type: "string", MatchKey: true, InputKey: "external_uri", Clearable: true}, Instructions: FieldDescriptor{Name: "instructions", Label: "Instructions", Type: "string", MatchKey: true, InputKey: "instructions", Clearable: true}, Intent: FieldDescriptor{Name: "intent", Label: "Intent", Type: "string", MatchKey: true, InputKey: "intent", Clearable: true}, InternalNotes: FieldDescriptor{Name: "internal_notes", Label: "InternalNotes", Type: "string", MatchKey: true, InputKey: "internal_notes", Clearable: true}, Metadata: FieldDescriptor{Name: "metadata", Label: "Metadata", Type: "map[string]interface {}", InputKey: "metadata", Clearable: true}, OwnerReference: FieldDescriptor{Name: "owner_reference", Label: "OwnerReference", Type: "string", MatchKey: true, InputKey: "owner_reference", Clearable: true}, PrGeneratedAt: FieldDescriptor{Name: "pr_generated_at", Label: "PrGeneratedAt", Type: "models.DateTime", InputKey: "pr_generated_at", Clearable: true}, PullRequestURI: FieldDescriptor{Name: "pull_request_uri", Label: "PullRequestURI", Type: "string", MatchKey: true, InputKey: "pull_request_uri", Clearable: true}, RepositoryURI: FieldDescriptor{Name: "repository_uri", Label: "RepositoryURI", Type: "string", MatchKey: true, InputKey: "repository_uri", Clearable: true}, ScopeID: FieldDescriptor{Name: "scope_id", Label: "ScopeID", Type: "string", MatchKey: true, InputKey: "scope_id", Clearable: true}, ScopeName: FieldDescriptor{Name: "scope_name", Label: "ScopeName", Type: "string", MatchKey: true, InputKey: "scope_name", Clearable: true, CaseInsensitive: true}, Source: FieldDescriptor{Name: "source", Label: "Source", Type: "string", MatchKey: true, InputKey: "source", Clearable: true}, State: FieldDescriptor{Name: "state", Label: "State", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "state", Clearable: true}, Status: FieldDescriptor{Name: "status", Label: "Status", Type: "enums.RemediationStatus", WorkflowEligible: true, InputKey: "status", Clearable: true}, Summary: FieldDescriptor{Name: "summary", Label: "Summary", Type: "string", MatchKey: true, InputKey: "summary", Clearable: true}, SystemInternalID: FieldDescriptor{Name: "system_internal_id", Label: "SystemInternalID", Type: "string", MatchKey: true, InputKey: "system_internal_id", Clearable: true}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, TicketReference: FieldDescriptor{Name: "ticket_reference", Label: "TicketReference", Type: "string", MatchKey: true, InputKey: "ticket_reference", Clearable: true}, Title: FieldDescriptor{Name: "title", Label: "Title", Type: "string", MatchKey: true, InputKey: "title", Clearable: true}, }
RemediationFields indexes the provider-mappable fields of Remediation
var ReviewFields = struct { // Approved is the approved field Approved FieldDescriptor // ApprovedAt is the approved_at field ApprovedAt FieldDescriptor // Category is the category field Category FieldDescriptor // Classification is the classification field Classification FieldDescriptor // Details is the details field Details FieldDescriptor // EnvironmentID is the environment_id field EnvironmentID FieldDescriptor // EnvironmentName is the environment_name field EnvironmentName FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // ExternalOwnerID is the external_owner_id field ExternalOwnerID FieldDescriptor // ExternalURI is the external_uri field ExternalURI FieldDescriptor // InternalNotes is the internal_notes field InternalNotes FieldDescriptor // Metadata is the metadata field Metadata FieldDescriptor // RawPayload is the raw_payload field RawPayload FieldDescriptor // ReportedAt is the reported_at field ReportedAt FieldDescriptor // Reporter is the reporter field Reporter FieldDescriptor // ReviewedAt is the reviewed_at field ReviewedAt FieldDescriptor // ScopeID is the scope_id field ScopeID FieldDescriptor // ScopeName is the scope_name field ScopeName FieldDescriptor // Source is the source field Source FieldDescriptor // State is the state field State FieldDescriptor // Status is the status field Status FieldDescriptor // Summary is the summary field Summary FieldDescriptor // SystemInternalID is the system_internal_id field SystemInternalID FieldDescriptor // Tags is the tags field Tags FieldDescriptor // Title is the title field Title FieldDescriptor }{ Approved: FieldDescriptor{Name: "approved", Label: "Approved", Type: "bool", InputKey: "approved", Clearable: true}, ApprovedAt: FieldDescriptor{Name: "approved_at", Label: "ApprovedAt", Type: "models.DateTime", InputKey: "approved_at", Clearable: true}, Category: FieldDescriptor{Name: "category", Label: "Category", Type: "string", MatchKey: true, InputKey: "category", Clearable: true}, Classification: FieldDescriptor{Name: "classification", Label: "Classification", Type: "string", MatchKey: true, InputKey: "classification", Clearable: true}, Details: FieldDescriptor{Name: "details", Label: "Details", Type: "string", MatchKey: true, InputKey: "details", Clearable: true}, EnvironmentID: FieldDescriptor{Name: "environment_id", Label: "EnvironmentID", Type: "string", MatchKey: true, InputKey: "environment_id", Clearable: true}, EnvironmentName: FieldDescriptor{Name: "environment_name", Label: "EnvironmentName", Type: "string", MatchKey: true, InputKey: "environment_name", Clearable: true, CaseInsensitive: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, ExternalOwnerID: FieldDescriptor{Name: "external_owner_id", Label: "ExternalOwnerID", Type: "string", MatchKey: true, InputKey: "external_owner_id", Clearable: true}, ExternalURI: FieldDescriptor{Name: "external_uri", Label: "ExternalURI", Type: "string", MatchKey: true, InputKey: "external_uri", Clearable: true}, InternalNotes: FieldDescriptor{Name: "internal_notes", Label: "InternalNotes", Type: "string", MatchKey: true, InputKey: "internal_notes", Clearable: true}, Metadata: FieldDescriptor{Name: "metadata", Label: "Metadata", Type: "map[string]interface {}", InputKey: "metadata", Clearable: true}, RawPayload: FieldDescriptor{Name: "raw_payload", Label: "RawPayload", Type: "map[string]interface {}", InputKey: "raw_payload", Clearable: true}, ReportedAt: FieldDescriptor{Name: "reported_at", Label: "ReportedAt", Type: "models.DateTime", InputKey: "reported_at", Clearable: true}, Reporter: FieldDescriptor{Name: "reporter", Label: "Reporter", Type: "string", MatchKey: true, InputKey: "reporter", Clearable: true}, ReviewedAt: FieldDescriptor{Name: "reviewed_at", Label: "ReviewedAt", Type: "models.DateTime", InputKey: "reviewed_at", Clearable: true}, ScopeID: FieldDescriptor{Name: "scope_id", Label: "ScopeID", Type: "string", MatchKey: true, InputKey: "scope_id", Clearable: true}, ScopeName: FieldDescriptor{Name: "scope_name", Label: "ScopeName", Type: "string", MatchKey: true, InputKey: "scope_name", Clearable: true, CaseInsensitive: true}, Source: FieldDescriptor{Name: "source", Label: "Source", Type: "string", MatchKey: true, InputKey: "source", Clearable: true}, State: FieldDescriptor{Name: "state", Label: "State", Type: "string", MatchKey: true, InputKey: "state", Clearable: true}, Status: FieldDescriptor{Name: "status", Label: "Status", Type: "enums.ReviewStatus", InputKey: "status", Clearable: true}, Summary: FieldDescriptor{Name: "summary", Label: "Summary", Type: "string", MatchKey: true, InputKey: "summary", Clearable: true}, SystemInternalID: FieldDescriptor{Name: "system_internal_id", Label: "SystemInternalID", Type: "string", MatchKey: true, InputKey: "system_internal_id", Clearable: true}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, Title: FieldDescriptor{Name: "title", Label: "Title", Type: "string", MatchKey: true, InputKey: "title"}, }
ReviewFields indexes the provider-mappable fields of Review
var RiskFields = struct { // BusinessCosts is the business_costs field BusinessCosts FieldDescriptor // BusinessCostsJSON is the business_costs_json field BusinessCostsJSON FieldDescriptor // DelegateGroupID is the delegate_group_id field DelegateGroupID FieldDescriptor // DelegateIdentityHolderID is the delegate_identity_holder_id field DelegateIdentityHolderID FieldDescriptor // DelegateName is the delegate_name field DelegateName FieldDescriptor // DelegateUserID is the delegate_user_id field DelegateUserID FieldDescriptor // Details is the details field Details FieldDescriptor // DetailsJSON is the details_json field DetailsJSON FieldDescriptor // DueDate is the due_date field DueDate FieldDescriptor // EnvironmentID is the environment_id field EnvironmentID FieldDescriptor // EnvironmentName is the environment_name field EnvironmentName FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // ExternalUUID is the external_uuid field ExternalUUID FieldDescriptor // Impact is the impact field Impact FieldDescriptor // LastReviewedAt is the last_reviewed_at field LastReviewedAt FieldDescriptor // Likelihood is the likelihood field Likelihood FieldDescriptor // MitigatedAt is the mitigated_at field MitigatedAt FieldDescriptor // Mitigation is the mitigation field Mitigation FieldDescriptor // MitigationJSON is the mitigation_json field MitigationJSON FieldDescriptor // Name is the name field Name FieldDescriptor // NextReviewDueAt is the next_review_due_at field NextReviewDueAt FieldDescriptor // ObservedAt is the observed_at field ObservedAt FieldDescriptor // ResidualScore is the residual_score field ResidualScore FieldDescriptor // ReviewFrequency is the review_frequency field ReviewFrequency FieldDescriptor // ReviewRequired is the review_required field ReviewRequired FieldDescriptor // RiskCategoryID is the risk_category_id field RiskCategoryID FieldDescriptor // RiskCategoryName is the risk_category_name field RiskCategoryName FieldDescriptor // RiskDecision is the risk_decision field RiskDecision FieldDescriptor // RiskKindID is the risk_kind_id field RiskKindID FieldDescriptor // RiskKindName is the risk_kind_name field RiskKindName FieldDescriptor // ScopeID is the scope_id field ScopeID FieldDescriptor // ScopeName is the scope_name field ScopeName FieldDescriptor // Score is the score field Score FieldDescriptor // StakeholderGroupID is the stakeholder_group_id field StakeholderGroupID FieldDescriptor // StakeholderIdentityHolderID is the stakeholder_identity_holder_id field StakeholderIdentityHolderID FieldDescriptor // StakeholderName is the stakeholder_name field StakeholderName FieldDescriptor // StakeholderUserID is the stakeholder_user_id field StakeholderUserID FieldDescriptor // Status is the status field Status FieldDescriptor // Tags is the tags field Tags FieldDescriptor }{ BusinessCosts: FieldDescriptor{Name: "business_costs", Label: "BusinessCosts", Type: "string", MatchKey: true, InputKey: "business_costs", Clearable: true}, BusinessCostsJSON: FieldDescriptor{Name: "business_costs_json", Label: "BusinessCostsJSON", Type: "[]interface {}", InputKey: "business_costs_json", Clearable: true}, DelegateGroupID: FieldDescriptor{Name: "delegate_group_id", Label: "DelegateGroupID", Type: "string", MatchKey: true, InputKey: "delegate_group_id", Clearable: true}, DelegateIdentityHolderID: FieldDescriptor{Name: "delegate_identity_holder_id", Label: "DelegateIdentityHolderID", Type: "string", MatchKey: true, InputKey: "delegate_identity_holder_id", Clearable: true}, DelegateName: FieldDescriptor{Name: "delegate_name", Label: "DelegateName", Type: "string", MatchKey: true, InputKey: "delegate_name", Clearable: true}, DelegateUserID: FieldDescriptor{Name: "delegate_user_id", Label: "DelegateUserID", Type: "string", MatchKey: true, InputKey: "delegate_user_id", Clearable: true}, Details: FieldDescriptor{Name: "details", Label: "Details", Type: "string", MatchKey: true, InputKey: "details", Clearable: true}, DetailsJSON: FieldDescriptor{Name: "details_json", Label: "DetailsJSON", Type: "[]interface {}", InputKey: "details_json", Clearable: true}, DueDate: FieldDescriptor{Name: "due_date", Label: "DueDate", Type: "models.DateTime", WorkflowEligible: true, InputKey: "due_date", Clearable: true}, EnvironmentID: FieldDescriptor{Name: "environment_id", Label: "EnvironmentID", Type: "string", MatchKey: true, InputKey: "environment_id", Clearable: true}, EnvironmentName: FieldDescriptor{Name: "environment_name", Label: "EnvironmentName", Type: "string", MatchKey: true, InputKey: "environment_name", Clearable: true, CaseInsensitive: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, ExternalUUID: FieldDescriptor{Name: "external_uuid", Label: "ExternalUUID", Type: "string", MatchKey: true, InputKey: "external_uuid", Clearable: true}, Impact: FieldDescriptor{Name: "impact", Label: "Impact", Type: "enums.RiskImpact", WorkflowEligible: true, InputKey: "impact", Clearable: true}, LastReviewedAt: FieldDescriptor{Name: "last_reviewed_at", Label: "LastReviewedAt", Type: "models.DateTime", WorkflowEligible: true, InputKey: "last_reviewed_at", Clearable: true}, Likelihood: FieldDescriptor{Name: "likelihood", Label: "Likelihood", Type: "enums.RiskLikelihood", WorkflowEligible: true, InputKey: "likelihood", Clearable: true}, MitigatedAt: FieldDescriptor{Name: "mitigated_at", Label: "MitigatedAt", Type: "models.DateTime", WorkflowEligible: true, InputKey: "mitigated_at", Clearable: true}, Mitigation: FieldDescriptor{Name: "mitigation", Label: "Mitigation", Type: "string", MatchKey: true, InputKey: "mitigation", Clearable: true}, MitigationJSON: FieldDescriptor{Name: "mitigation_json", Label: "MitigationJSON", Type: "[]interface {}", InputKey: "mitigation_json", Clearable: true}, Name: FieldDescriptor{Name: "name", Label: "Name", Type: "string", MatchKey: true, InputKey: "name", DisplayKey: true}, NextReviewDueAt: FieldDescriptor{Name: "next_review_due_at", Label: "NextReviewDueAt", Type: "models.DateTime", WorkflowEligible: true, InputKey: "next_review_due_at", Clearable: true}, ObservedAt: FieldDescriptor{Name: "observed_at", Label: "ObservedAt", Type: "models.DateTime", InputKey: "observed_at", Clearable: true, Volatile: true}, ResidualScore: FieldDescriptor{Name: "residual_score", Label: "ResidualScore", Type: "int", WorkflowEligible: true, InputKey: "residual_score", Clearable: true}, ReviewFrequency: FieldDescriptor{Name: "review_frequency", Label: "ReviewFrequency", Type: "enums.Frequency", WorkflowEligible: true, InputKey: "review_frequency", Clearable: true}, ReviewRequired: FieldDescriptor{Name: "review_required", Label: "ReviewRequired", Type: "bool", WorkflowEligible: true, InputKey: "review_required", Clearable: true}, RiskCategoryID: FieldDescriptor{Name: "risk_category_id", Label: "RiskCategoryID", Type: "string", MatchKey: true, InputKey: "risk_category_id", Clearable: true}, RiskCategoryName: FieldDescriptor{Name: "risk_category_name", Label: "RiskCategoryName", Type: "string", MatchKey: true, InputKey: "risk_category_name", Clearable: true, CaseInsensitive: true}, RiskDecision: FieldDescriptor{Name: "risk_decision", Label: "RiskDecision", Type: "enums.RiskDecision", WorkflowEligible: true, InputKey: "risk_decision", Clearable: true}, RiskKindID: FieldDescriptor{Name: "risk_kind_id", Label: "RiskKindID", Type: "string", MatchKey: true, InputKey: "risk_kind_id", Clearable: true}, RiskKindName: FieldDescriptor{Name: "risk_kind_name", Label: "RiskKindName", Type: "string", MatchKey: true, InputKey: "risk_kind_name", Clearable: true, CaseInsensitive: true}, ScopeID: FieldDescriptor{Name: "scope_id", Label: "ScopeID", Type: "string", MatchKey: true, InputKey: "scope_id", Clearable: true}, ScopeName: FieldDescriptor{Name: "scope_name", Label: "ScopeName", Type: "string", MatchKey: true, InputKey: "scope_name", Clearable: true, CaseInsensitive: true}, Score: FieldDescriptor{Name: "score", Label: "Score", Type: "int", WorkflowEligible: true, InputKey: "score", Clearable: true}, StakeholderGroupID: FieldDescriptor{Name: "stakeholder_group_id", Label: "StakeholderGroupID", Type: "string", MatchKey: true, InputKey: "stakeholder_group_id", Clearable: true}, StakeholderIdentityHolderID: FieldDescriptor{Name: "stakeholder_identity_holder_id", Label: "StakeholderIdentityHolderID", Type: "string", MatchKey: true, InputKey: "stakeholder_identity_holder_id", Clearable: true}, StakeholderName: FieldDescriptor{Name: "stakeholder_name", Label: "StakeholderName", Type: "string", MatchKey: true, InputKey: "stakeholder_name", Clearable: true}, StakeholderUserID: FieldDescriptor{Name: "stakeholder_user_id", Label: "StakeholderUserID", Type: "string", MatchKey: true, InputKey: "stakeholder_user_id", Clearable: true}, Status: FieldDescriptor{Name: "status", Label: "Status", Type: "enums.RiskStatus", WorkflowEligible: true, InputKey: "status", Clearable: true}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, }
RiskFields indexes the provider-mappable fields of Risk
var ScanFields = struct { // AssignedTo is the assigned_to field AssignedTo FieldDescriptor // AssignedToGroupID is the assigned_to_group_id field AssignedToGroupID FieldDescriptor // AssignedToIdentityHolderID is the assigned_to_identity_holder_id field AssignedToIdentityHolderID FieldDescriptor // AssignedToUserID is the assigned_to_user_id field AssignedToUserID FieldDescriptor // DiscoveredVulnerabilityIds is the discovered_vulnerability_ids field DiscoveredVulnerabilityIds FieldDescriptor // EnvironmentID is the environment_id field EnvironmentID FieldDescriptor // EnvironmentName is the environment_name field EnvironmentName FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // GeneratedByPlatformID is the generated_by_platform_id field GeneratedByPlatformID FieldDescriptor // InternalNotes is the internal_notes field InternalNotes FieldDescriptor // Metadata is the metadata field Metadata FieldDescriptor // NextScanRunAt is the next_scan_run_at field NextScanRunAt FieldDescriptor // PerformedBy is the performed_by field PerformedBy FieldDescriptor // PerformedByGroupID is the performed_by_group_id field PerformedByGroupID FieldDescriptor // PerformedByUserID is the performed_by_user_id field PerformedByUserID FieldDescriptor // ReviewedBy is the reviewed_by field ReviewedBy FieldDescriptor // ReviewedByGroupID is the reviewed_by_group_id field ReviewedByGroupID FieldDescriptor // ReviewedByIdentityHolderID is the reviewed_by_identity_holder_id field ReviewedByIdentityHolderID FieldDescriptor // ReviewedByUserID is the reviewed_by_user_id field ReviewedByUserID FieldDescriptor // ScanDate is the scan_date field ScanDate FieldDescriptor // ScanType is the scan_type field ScanType FieldDescriptor // ScopeID is the scope_id field ScopeID FieldDescriptor // ScopeName is the scope_name field ScopeName FieldDescriptor // Status is the status field Status FieldDescriptor // SystemInternalID is the system_internal_id field SystemInternalID FieldDescriptor // Tags is the tags field Tags FieldDescriptor // Target is the target field Target FieldDescriptor }{ AssignedTo: FieldDescriptor{Name: "assigned_to", Label: "AssignedTo", Type: "string", MatchKey: true, InputKey: "assigned_to", Clearable: true}, AssignedToGroupID: FieldDescriptor{Name: "assigned_to_group_id", Label: "AssignedToGroupID", Type: "string", MatchKey: true, InputKey: "assigned_to_group_id", Clearable: true}, AssignedToIdentityHolderID: FieldDescriptor{Name: "assigned_to_identity_holder_id", Label: "AssignedToIdentityHolderID", Type: "string", MatchKey: true, InputKey: "assigned_to_identity_holder_id", Clearable: true}, AssignedToUserID: FieldDescriptor{Name: "assigned_to_user_id", Label: "AssignedToUserID", Type: "string", MatchKey: true, InputKey: "assigned_to_user_id", Clearable: true}, DiscoveredVulnerabilityIds: FieldDescriptor{Name: "discovered_vulnerability_ids", Label: "DiscoveredVulnerabilityIds", Type: "[]string", InputKey: "discovered_vulnerability_ids", Clearable: true}, EnvironmentID: FieldDescriptor{Name: "environment_id", Label: "EnvironmentID", Type: "string", MatchKey: true, InputKey: "environment_id", Clearable: true}, EnvironmentName: FieldDescriptor{Name: "environment_name", Label: "EnvironmentName", Type: "string", MatchKey: true, InputKey: "environment_name", Clearable: true, CaseInsensitive: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, GeneratedByPlatformID: FieldDescriptor{Name: "generated_by_platform_id", Label: "GeneratedByPlatformID", Type: "string", MatchKey: true, InputKey: "generated_by_platform_id", Clearable: true}, InternalNotes: FieldDescriptor{Name: "internal_notes", Label: "InternalNotes", Type: "string", MatchKey: true, InputKey: "internal_notes", Clearable: true}, Metadata: FieldDescriptor{Name: "metadata", Label: "Metadata", Type: "map[string]interface {}", InputKey: "metadata", Clearable: true}, NextScanRunAt: FieldDescriptor{Name: "next_scan_run_at", Label: "NextScanRunAt", Type: "models.DateTime", InputKey: "next_scan_run_at", Clearable: true}, PerformedBy: FieldDescriptor{Name: "performed_by", Label: "PerformedBy", Type: "string", MatchKey: true, InputKey: "performed_by", Clearable: true}, PerformedByGroupID: FieldDescriptor{Name: "performed_by_group_id", Label: "PerformedByGroupID", Type: "string", MatchKey: true, InputKey: "performed_by_group_id", Clearable: true}, PerformedByUserID: FieldDescriptor{Name: "performed_by_user_id", Label: "PerformedByUserID", Type: "string", MatchKey: true, InputKey: "performed_by_user_id", Clearable: true}, ReviewedBy: FieldDescriptor{Name: "reviewed_by", Label: "ReviewedBy", Type: "string", MatchKey: true, InputKey: "reviewed_by", Clearable: true}, ReviewedByGroupID: FieldDescriptor{Name: "reviewed_by_group_id", Label: "ReviewedByGroupID", Type: "string", MatchKey: true, InputKey: "reviewed_by_group_id", Clearable: true}, ReviewedByIdentityHolderID: FieldDescriptor{Name: "reviewed_by_identity_holder_id", Label: "ReviewedByIdentityHolderID", Type: "string", MatchKey: true, InputKey: "reviewed_by_identity_holder_id", Clearable: true}, ReviewedByUserID: FieldDescriptor{Name: "reviewed_by_user_id", Label: "ReviewedByUserID", Type: "string", MatchKey: true, InputKey: "reviewed_by_user_id", Clearable: true}, ScanDate: FieldDescriptor{Name: "scan_date", Label: "ScanDate", Type: "models.DateTime", InputKey: "scan_date", Clearable: true}, ScanType: FieldDescriptor{Name: "scan_type", Label: "ScanType", Type: "enums.ScanType", InputKey: "scan_type"}, ScopeID: FieldDescriptor{Name: "scope_id", Label: "ScopeID", Type: "string", MatchKey: true, InputKey: "scope_id", Clearable: true}, ScopeName: FieldDescriptor{Name: "scope_name", Label: "ScopeName", Type: "string", MatchKey: true, InputKey: "scope_name", Clearable: true, CaseInsensitive: true}, Status: FieldDescriptor{Name: "status", Label: "Status", Type: "enums.ScanStatus", InputKey: "status"}, SystemInternalID: FieldDescriptor{Name: "system_internal_id", Label: "SystemInternalID", Type: "string", MatchKey: true, InputKey: "system_internal_id", Clearable: true}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, Target: FieldDescriptor{Name: "target", Label: "Target", Type: "string", MatchKey: true, InputKey: "target"}, }
ScanFields indexes the provider-mappable fields of Scan
var SubcontrolFields = struct { // Aliases is the aliases field Aliases FieldDescriptor // AssessmentMethods is the assessment_methods field AssessmentMethods FieldDescriptor // AssessmentObjectives is the assessment_objectives field AssessmentObjectives FieldDescriptor // AuditorReferenceID is the auditor_reference_id field AuditorReferenceID FieldDescriptor // Category is the category field Category FieldDescriptor // CategoryID is the category_id field CategoryID FieldDescriptor // ControlID is the control_id field ControlID FieldDescriptor // ControlOwnerID is the control_owner_id field ControlOwnerID FieldDescriptor // ControlQuestions is the control_questions field ControlQuestions FieldDescriptor // DelegateID is the delegate_id field DelegateID FieldDescriptor // Description is the description field Description FieldDescriptor // DescriptionJSON is the description_json field DescriptionJSON FieldDescriptor // EvidenceRequests is the evidence_requests field EvidenceRequests FieldDescriptor // ExampleEvidence is the example_evidence field ExampleEvidence FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // ExternalUUID is the external_uuid field ExternalUUID FieldDescriptor // ImplementationDescription is the implementation_description field ImplementationDescription FieldDescriptor // ImplementationGuidance is the implementation_guidance field ImplementationGuidance FieldDescriptor // ImplementationStatus is the implementation_status field ImplementationStatus FieldDescriptor // InternalNotes is the internal_notes field InternalNotes FieldDescriptor // MappedCategories is the mapped_categories field MappedCategories FieldDescriptor // PublicRepresentation is the public_representation field PublicRepresentation FieldDescriptor // RefCode is the ref_code field RefCode FieldDescriptor // ReferenceFrameworkRevision is the reference_framework_revision field ReferenceFrameworkRevision FieldDescriptor // ReferenceID is the reference_id field ReferenceID FieldDescriptor // References is the references field References FieldDescriptor // ResponsiblePartyID is the responsible_party_id field ResponsiblePartyID FieldDescriptor // Source is the source field Source FieldDescriptor // SourceName is the source_name field SourceName FieldDescriptor // Status is the status field Status FieldDescriptor // Subcategory is the subcategory field Subcategory FieldDescriptor // SubcontrolKindID is the subcontrol_kind_id field SubcontrolKindID FieldDescriptor // SubcontrolKindName is the subcontrol_kind_name field SubcontrolKindName FieldDescriptor // SystemInternalID is the system_internal_id field SystemInternalID FieldDescriptor // Tags is the tags field Tags FieldDescriptor // TestingProcedures is the testing_procedures field TestingProcedures FieldDescriptor // Title is the title field Title FieldDescriptor }{ Aliases: FieldDescriptor{Name: "aliases", Label: "Aliases", Type: "[]string", InputKey: "aliases", Clearable: true}, AssessmentMethods: FieldDescriptor{Name: "assessment_methods", Label: "AssessmentMethods", Type: "[]models.AssessmentMethod", InputKey: "assessment_methods", Clearable: true}, AssessmentObjectives: FieldDescriptor{Name: "assessment_objectives", Label: "AssessmentObjectives", Type: "[]models.AssessmentObjective", InputKey: "assessment_objectives", Clearable: true}, AuditorReferenceID: FieldDescriptor{Name: "auditor_reference_id", Label: "AuditorReferenceID", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "auditor_reference_id", Clearable: true}, Category: FieldDescriptor{Name: "category", Label: "Category", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "category", Clearable: true}, CategoryID: FieldDescriptor{Name: "category_id", Label: "CategoryID", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "category_id", Clearable: true}, ControlID: FieldDescriptor{Name: "control_id", Label: "ControlID", Type: "string", MatchKey: true, InputKey: "control_id"}, ControlOwnerID: FieldDescriptor{Name: "control_owner_id", Label: "ControlOwnerID", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "control_owner_id", Clearable: true}, ControlQuestions: FieldDescriptor{Name: "control_questions", Label: "ControlQuestions", Type: "[]string", InputKey: "control_questions", Clearable: true}, DelegateID: FieldDescriptor{Name: "delegate_id", Label: "DelegateID", Type: "string", MatchKey: true, InputKey: "delegate_id", Clearable: true}, Description: FieldDescriptor{Name: "description", Label: "Description", Type: "string", MatchKey: true, InputKey: "description", Clearable: true}, DescriptionJSON: FieldDescriptor{Name: "description_json", Label: "DescriptionJSON", Type: "[]interface {}", InputKey: "description_json", Clearable: true}, EvidenceRequests: FieldDescriptor{Name: "evidence_requests", Label: "EvidenceRequests", Type: "[]models.EvidenceRequests", InputKey: "evidence_requests", Clearable: true}, ExampleEvidence: FieldDescriptor{Name: "example_evidence", Label: "ExampleEvidence", Type: "[]models.ExampleEvidence", InputKey: "example_evidence", Clearable: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, ExternalUUID: FieldDescriptor{Name: "external_uuid", Label: "ExternalUUID", Type: "string", MatchKey: true, InputKey: "external_uuid", Clearable: true}, ImplementationDescription: FieldDescriptor{Name: "implementation_description", Label: "ImplementationDescription", Type: "string", MatchKey: true, InputKey: "implementation_description", Clearable: true}, ImplementationGuidance: FieldDescriptor{Name: "implementation_guidance", Label: "ImplementationGuidance", Type: "[]models.ImplementationGuidance", InputKey: "implementation_guidance", Clearable: true}, ImplementationStatus: FieldDescriptor{Name: "implementation_status", Label: "ImplementationStatus", Type: "enums.ControlImplementationStatus", InputKey: "implementation_status", Clearable: true}, InternalNotes: FieldDescriptor{Name: "internal_notes", Label: "InternalNotes", Type: "string", MatchKey: true, InputKey: "internal_notes", Clearable: true}, MappedCategories: FieldDescriptor{Name: "mapped_categories", Label: "MappedCategories", Type: "[]string", InputKey: "mapped_categories", Clearable: true}, PublicRepresentation: FieldDescriptor{Name: "public_representation", Label: "PublicRepresentation", Type: "string", MatchKey: true, InputKey: "public_representation", Clearable: true}, RefCode: FieldDescriptor{Name: "ref_code", Label: "RefCode", Type: "string", MatchKey: true, InputKey: "ref_code"}, ReferenceFrameworkRevision: FieldDescriptor{Name: "reference_framework_revision", Label: "ReferenceFrameworkRevision", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "reference_framework_revision", Clearable: true}, ReferenceID: FieldDescriptor{Name: "reference_id", Label: "ReferenceID", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "reference_id", Clearable: true}, References: FieldDescriptor{Name: "references", Label: "References", Type: "[]models.Reference", InputKey: "references", Clearable: true}, ResponsiblePartyID: FieldDescriptor{Name: "responsible_party_id", Label: "ResponsiblePartyID", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "responsible_party_id", Clearable: true}, Source: FieldDescriptor{Name: "source", Label: "Source", Type: "enums.ControlSource", InputKey: "source", Clearable: true}, SourceName: FieldDescriptor{Name: "source_name", Label: "SourceName", Type: "string", MatchKey: true, InputKey: "source_name", Clearable: true}, Status: FieldDescriptor{Name: "status", Label: "Status", Type: "enums.ControlStatus", WorkflowEligible: true, InputKey: "status", Clearable: true, WebhookPayload: true}, Subcategory: FieldDescriptor{Name: "subcategory", Label: "Subcategory", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "subcategory", Clearable: true}, SubcontrolKindID: FieldDescriptor{Name: "subcontrol_kind_id", Label: "SubcontrolKindID", Type: "string", MatchKey: true, InputKey: "subcontrol_kind_id", Clearable: true}, SubcontrolKindName: FieldDescriptor{Name: "subcontrol_kind_name", Label: "SubcontrolKindName", Type: "string", MatchKey: true, InputKey: "subcontrol_kind_name", Clearable: true, CaseInsensitive: true}, SystemInternalID: FieldDescriptor{Name: "system_internal_id", Label: "SystemInternalID", Type: "string", MatchKey: true, InputKey: "system_internal_id", Clearable: true}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, TestingProcedures: FieldDescriptor{Name: "testing_procedures", Label: "TestingProcedures", Type: "[]models.TestingProcedures", InputKey: "testing_procedures", Clearable: true}, Title: FieldDescriptor{Name: "title", Label: "Title", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "title", DisplayKey: true, Clearable: true, WebhookPayload: true}, }
SubcontrolFields indexes the provider-mappable fields of Subcontrol
var SystemDetailFields = struct { // AuthorizationBoundary is the authorization_boundary field AuthorizationBoundary FieldDescriptor // Description is the description field Description FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // LastReviewed is the last_reviewed field LastReviewed FieldDescriptor // OscalMetadataJSON is the oscal_metadata_json field OscalMetadataJSON FieldDescriptor // RevisionHistory is the revision_history field RevisionHistory FieldDescriptor // SensitivityLevel is the sensitivity_level field SensitivityLevel FieldDescriptor // SystemName is the system_name field SystemName FieldDescriptor // Tags is the tags field Tags FieldDescriptor // Version is the version field Version FieldDescriptor }{ AuthorizationBoundary: FieldDescriptor{Name: "authorization_boundary", Label: "AuthorizationBoundary", Type: "string", MatchKey: true, InputKey: "authorization_boundary", Clearable: true}, Description: FieldDescriptor{Name: "description", Label: "Description", Type: "string", MatchKey: true, InputKey: "description", Clearable: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, LastReviewed: FieldDescriptor{Name: "last_reviewed", Label: "LastReviewed", Type: "models.DateTime", InputKey: "last_reviewed", Clearable: true}, OscalMetadataJSON: FieldDescriptor{Name: "oscal_metadata_json", Label: "OscalMetadataJSON", Type: "map[string]interface {}", InputKey: "oscal_metadata_json", Clearable: true}, RevisionHistory: FieldDescriptor{Name: "revision_history", Label: "RevisionHistory", Type: "[]interface {}", InputKey: "revision_history", Clearable: true}, SensitivityLevel: FieldDescriptor{Name: "sensitivity_level", Label: "SensitivityLevel", Type: "enums.SystemSensitivityLevel", InputKey: "sensitivity_level", Clearable: true}, SystemName: FieldDescriptor{Name: "system_name", Label: "SystemName", Type: "string", MatchKey: true, InputKey: "system_name"}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, Version: FieldDescriptor{Name: "version", Label: "Version", Type: "string", MatchKey: true, InputKey: "version", Clearable: true}, }
SystemDetailFields indexes the provider-mappable fields of SystemDetail
var TagDefinitionFields = struct { // Aliases is the aliases field Aliases FieldDescriptor // Color is the color field Color FieldDescriptor // Description is the description field Description FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // InternalNotes is the internal_notes field InternalNotes FieldDescriptor // Name is the name field Name FieldDescriptor // SystemInternalID is the system_internal_id field SystemInternalID FieldDescriptor }{ Aliases: FieldDescriptor{Name: "aliases", Label: "Aliases", Type: "[]string", InputKey: "aliases", Clearable: true}, Color: FieldDescriptor{Name: "color", Label: "Color", Type: "string", MatchKey: true, InputKey: "color", Clearable: true}, Description: FieldDescriptor{Name: "description", Label: "Description", Type: "string", MatchKey: true, InputKey: "description", Clearable: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, InternalNotes: FieldDescriptor{Name: "internal_notes", Label: "InternalNotes", Type: "string", MatchKey: true, InputKey: "internal_notes", Clearable: true}, Name: FieldDescriptor{Name: "name", Label: "Name", Type: "string", MatchKey: true, InputKey: "name"}, SystemInternalID: FieldDescriptor{Name: "system_internal_id", Label: "SystemInternalID", Type: "string", MatchKey: true, InputKey: "system_internal_id", Clearable: true}, }
TagDefinitionFields indexes the provider-mappable fields of TagDefinition
var TaskFields = struct { // AssigneeID is the assignee_id field AssigneeID FieldDescriptor // AssignerID is the assigner_id field AssignerID FieldDescriptor // Completed is the completed field Completed FieldDescriptor // Details is the details field Details FieldDescriptor // DetailsJSON is the details_json field DetailsJSON FieldDescriptor // Due is the due field Due FieldDescriptor // EnvironmentID is the environment_id field EnvironmentID FieldDescriptor // EnvironmentName is the environment_name field EnvironmentName FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // ExternalReferenceURL is the external_reference_url field ExternalReferenceURL FieldDescriptor // ExternalUUID is the external_uuid field ExternalUUID FieldDescriptor // IsSuggested is the is_suggested field IsSuggested FieldDescriptor // IsTemplate is the is_template field IsTemplate FieldDescriptor // Metadata is the metadata field Metadata FieldDescriptor // ParentTaskID is the parent_task_id field ParentTaskID FieldDescriptor // Priority is the priority field Priority FieldDescriptor // ScopeID is the scope_id field ScopeID FieldDescriptor // ScopeName is the scope_name field ScopeName FieldDescriptor // Source is the source field Source FieldDescriptor // SourceKey is the source_key field SourceKey FieldDescriptor // Status is the status field Status FieldDescriptor // SystemGenerated is the system_generated field SystemGenerated FieldDescriptor // Tags is the tags field Tags FieldDescriptor // TaskKindID is the task_kind_id field TaskKindID FieldDescriptor // TaskKindName is the task_kind_name field TaskKindName FieldDescriptor // Title is the title field Title FieldDescriptor }{ AssigneeID: FieldDescriptor{Name: "assignee_id", Label: "AssigneeID", Type: "string", MatchKey: true, InputKey: "assignee_id", Clearable: true}, AssignerID: FieldDescriptor{Name: "assigner_id", Label: "AssignerID", Type: "string", MatchKey: true, InputKey: "assigner_id", Clearable: true}, Completed: FieldDescriptor{Name: "completed", Label: "Completed", Type: "models.DateTime", WorkflowEligible: true, InputKey: "completed", Clearable: true}, Details: FieldDescriptor{Name: "details", Label: "Details", Type: "string", MatchKey: true, InputKey: "details", Clearable: true}, DetailsJSON: FieldDescriptor{Name: "details_json", Label: "DetailsJSON", Type: "[]interface {}", InputKey: "details_json", Clearable: true}, Due: FieldDescriptor{Name: "due", Label: "Due", Type: "models.DateTime", WorkflowEligible: true, InputKey: "due", Clearable: true}, EnvironmentID: FieldDescriptor{Name: "environment_id", Label: "EnvironmentID", Type: "string", MatchKey: true, InputKey: "environment_id", Clearable: true}, EnvironmentName: FieldDescriptor{Name: "environment_name", Label: "EnvironmentName", Type: "string", MatchKey: true, InputKey: "environment_name", Clearable: true, CaseInsensitive: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, ExternalReferenceURL: FieldDescriptor{Name: "external_reference_url", Label: "ExternalReferenceURL", Type: "[]string", InputKey: "external_reference_url", Clearable: true}, ExternalUUID: FieldDescriptor{Name: "external_uuid", Label: "ExternalUUID", Type: "string", MatchKey: true, InputKey: "external_uuid", Clearable: true}, IsSuggested: FieldDescriptor{Name: "is_suggested", Label: "IsSuggested", Type: "bool", InputKey: "is_suggested"}, IsTemplate: FieldDescriptor{Name: "is_template", Label: "IsTemplate", Type: "bool", InputKey: "is_template"}, Metadata: FieldDescriptor{Name: "metadata", Label: "Metadata", Type: "map[string]interface {}", InputKey: "metadata", Clearable: true}, ParentTaskID: FieldDescriptor{Name: "parent_task_id", Label: "ParentTaskID", Type: "string", MatchKey: true, InputKey: "parent_task_id", Clearable: true}, Priority: FieldDescriptor{Name: "priority", Label: "Priority", Type: "int", InputKey: "priority"}, ScopeID: FieldDescriptor{Name: "scope_id", Label: "ScopeID", Type: "string", MatchKey: true, InputKey: "scope_id", Clearable: true}, ScopeName: FieldDescriptor{Name: "scope_name", Label: "ScopeName", Type: "string", MatchKey: true, InputKey: "scope_name", Clearable: true, CaseInsensitive: true}, Source: FieldDescriptor{Name: "source", Label: "Source", Type: "string", MatchKey: true, InputKey: "source", Clearable: true}, SourceKey: FieldDescriptor{Name: "source_key", Label: "SourceKey", Type: "string", MatchKey: true, InputKey: "source_key", Clearable: true}, Status: FieldDescriptor{Name: "status", Label: "Status", Type: "enums.TaskStatus", WorkflowEligible: true, InputKey: "status"}, SystemGenerated: FieldDescriptor{Name: "system_generated", Label: "SystemGenerated", Type: "bool", WorkflowEligible: true, InputKey: "system_generated"}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, TaskKindID: FieldDescriptor{Name: "task_kind_id", Label: "TaskKindID", Type: "string", MatchKey: true, InputKey: "task_kind_id", Clearable: true}, TaskKindName: FieldDescriptor{Name: "task_kind_name", Label: "TaskKindName", Type: "string", MatchKey: true, InputKey: "task_kind_name", Clearable: true, CaseInsensitive: true}, Title: FieldDescriptor{Name: "title", Label: "Title", Type: "string", MatchKey: true, InputKey: "title", DisplayKey: true}, }
TaskFields indexes the provider-mappable fields of Task
var TemplateFields = struct { // Description is the description field Description FieldDescriptor // EnvironmentID is the environment_id field EnvironmentID FieldDescriptor // EnvironmentName is the environment_name field EnvironmentName FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // InternalNotes is the internal_notes field InternalNotes FieldDescriptor // Jsonconfig is the jsonconfig field Jsonconfig FieldDescriptor // Kind is the kind field Kind FieldDescriptor // Name is the name field Name FieldDescriptor // ScopeID is the scope_id field ScopeID FieldDescriptor // ScopeName is the scope_name field ScopeName FieldDescriptor // SystemInternalID is the system_internal_id field SystemInternalID FieldDescriptor // Tags is the tags field Tags FieldDescriptor // TemplateType is the template_type field TemplateType FieldDescriptor // TransformConfiguration is the transform_configuration field TransformConfiguration FieldDescriptor // TrustCenterID is the trust_center_id field TrustCenterID FieldDescriptor // Uischema is the uischema field Uischema FieldDescriptor }{ Description: FieldDescriptor{Name: "description", Label: "Description", Type: "string", MatchKey: true, InputKey: "description", Clearable: true}, EnvironmentID: FieldDescriptor{Name: "environment_id", Label: "EnvironmentID", Type: "string", MatchKey: true, InputKey: "environment_id", Clearable: true}, EnvironmentName: FieldDescriptor{Name: "environment_name", Label: "EnvironmentName", Type: "string", MatchKey: true, InputKey: "environment_name", Clearable: true, CaseInsensitive: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true, Clearable: true}, InternalNotes: FieldDescriptor{Name: "internal_notes", Label: "InternalNotes", Type: "string", MatchKey: true, InputKey: "internal_notes", Clearable: true}, Jsonconfig: FieldDescriptor{Name: "jsonconfig", Label: "Jsonconfig", Type: "map[string]interface {}", InputKey: "jsonconfig"}, Kind: FieldDescriptor{Name: "kind", Label: "Kind", Type: "enums.TemplateKind", InputKey: "kind", Clearable: true}, Name: FieldDescriptor{Name: "name", Label: "Name", Type: "string", MatchKey: true, InputKey: "name"}, ScopeID: FieldDescriptor{Name: "scope_id", Label: "ScopeID", Type: "string", MatchKey: true, InputKey: "scope_id", Clearable: true}, ScopeName: FieldDescriptor{Name: "scope_name", Label: "ScopeName", Type: "string", MatchKey: true, InputKey: "scope_name", Clearable: true, CaseInsensitive: true}, SystemInternalID: FieldDescriptor{Name: "system_internal_id", Label: "SystemInternalID", Type: "string", MatchKey: true, InputKey: "system_internal_id", Clearable: true}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, TemplateType: FieldDescriptor{Name: "template_type", Label: "TemplateType", Type: "enums.DocumentType", InputKey: "template_type"}, TransformConfiguration: FieldDescriptor{Name: "transform_configuration", Label: "TransformConfiguration", Type: "models.TemplateProjectionConfig", InputKey: "transform_configuration", Clearable: true}, TrustCenterID: FieldDescriptor{Name: "trust_center_id", Label: "TrustCenterID", Type: "string", MatchKey: true, InputKey: "trust_center_id", Clearable: true}, Uischema: FieldDescriptor{Name: "uischema", Label: "Uischema", Type: "map[string]interface {}", InputKey: "uischema", Clearable: true}, }
TemplateFields indexes the provider-mappable fields of Template
var VulnerabilityFields = struct { // AssignedTo is the assigned_to field AssignedTo FieldDescriptor // AssignedToGroupID is the assigned_to_group_id field AssignedToGroupID FieldDescriptor // AssignedToIdentityHolderID is the assigned_to_identity_holder_id field AssignedToIdentityHolderID FieldDescriptor // AssignedToUserID is the assigned_to_user_id field AssignedToUserID FieldDescriptor // AutoDismissedAt is the auto_dismissed_at field AutoDismissedAt FieldDescriptor // Blocking is the blocking field Blocking FieldDescriptor // Category is the category field Category FieldDescriptor // CveID is the cve_id field CveID FieldDescriptor // CweIds is the cwe_ids field CweIds FieldDescriptor // DependencyScope is the dependency_scope field DependencyScope FieldDescriptor // Description is the description field Description FieldDescriptor // DiscoveredAt is the discovered_at field DiscoveredAt FieldDescriptor // DismissedAt is the dismissed_at field DismissedAt FieldDescriptor // DismissedComment is the dismissed_comment field DismissedComment FieldDescriptor // DismissedReason is the dismissed_reason field DismissedReason FieldDescriptor // DisplayName is the display_name field DisplayName FieldDescriptor // EnvironmentID is the environment_id field EnvironmentID FieldDescriptor // EnvironmentName is the environment_name field EnvironmentName FieldDescriptor // Exploitability is the exploitability field Exploitability FieldDescriptor // ExternalID is the external_id field ExternalID FieldDescriptor // ExternalOwnerID is the external_owner_id field ExternalOwnerID FieldDescriptor // ExternalURI is the external_uri field ExternalURI FieldDescriptor // FirstPatchedVersion is the first_patched_version field FirstPatchedVersion FieldDescriptor // FixAvailable is the fix_available field FixAvailable FieldDescriptor // FixedAt is the fixed_at field FixedAt FieldDescriptor // Impact is the impact field Impact FieldDescriptor // Impacts is the impacts field Impacts FieldDescriptor // InternalNotes is the internal_notes field InternalNotes FieldDescriptor // InternalOwner is the internal_owner field InternalOwner FieldDescriptor // InternalOwnerGroupID is the internal_owner_group_id field InternalOwnerGroupID FieldDescriptor // InternalOwnerIdentityHolderID is the internal_owner_identity_holder_id field InternalOwnerIdentityHolderID FieldDescriptor // InternalOwnerUserID is the internal_owner_user_id field InternalOwnerUserID FieldDescriptor // ManifestPath is the manifest_path field ManifestPath FieldDescriptor // Metadata is the metadata field Metadata FieldDescriptor // Open is the open field Open FieldDescriptor // PackageEcosystem is the package_ecosystem field PackageEcosystem FieldDescriptor // PackageName is the package_name field PackageName FieldDescriptor // Priority is the priority field Priority FieldDescriptor // Production is the production field Production FieldDescriptor // Public is the public field Public FieldDescriptor // PublishedAt is the published_at field PublishedAt FieldDescriptor // RawPayload is the raw_payload field RawPayload FieldDescriptor // References is the references field References FieldDescriptor // RemediationSLA is the remediation_sla field RemediationSLA FieldDescriptor // ReviewedBy is the reviewed_by field ReviewedBy FieldDescriptor // ReviewedByGroupID is the reviewed_by_group_id field ReviewedByGroupID FieldDescriptor // ReviewedByIdentityHolderID is the reviewed_by_identity_holder_id field ReviewedByIdentityHolderID FieldDescriptor // ReviewedByUserID is the reviewed_by_user_id field ReviewedByUserID FieldDescriptor // ScopeID is the scope_id field ScopeID FieldDescriptor // ScopeName is the scope_name field ScopeName FieldDescriptor // Score is the score field Score FieldDescriptor // Severity is the severity field Severity FieldDescriptor // Source is the source field Source FieldDescriptor // SourceUpdatedAt is the source_updated_at field SourceUpdatedAt FieldDescriptor // Summary is the summary field Summary FieldDescriptor // SystemInternalID is the system_internal_id field SystemInternalID FieldDescriptor // Tags is the tags field Tags FieldDescriptor // Validated is the validated field Validated FieldDescriptor // Vector is the vector field Vector FieldDescriptor // VulnerabilityStatusID is the vulnerability_status_id field VulnerabilityStatusID FieldDescriptor // VulnerabilityStatusName is the vulnerability_status_name field VulnerabilityStatusName FieldDescriptor // VulnerableVersionRange is the vulnerable_version_range field VulnerableVersionRange FieldDescriptor }{ AssignedTo: FieldDescriptor{Name: "assigned_to", Label: "AssignedTo", Type: "string", MatchKey: true, InputKey: "assigned_to", Clearable: true}, AssignedToGroupID: FieldDescriptor{Name: "assigned_to_group_id", Label: "AssignedToGroupID", Type: "string", MatchKey: true, InputKey: "assigned_to_group_id", Clearable: true}, AssignedToIdentityHolderID: FieldDescriptor{Name: "assigned_to_identity_holder_id", Label: "AssignedToIdentityHolderID", Type: "string", MatchKey: true, InputKey: "assigned_to_identity_holder_id", Clearable: true}, AssignedToUserID: FieldDescriptor{Name: "assigned_to_user_id", Label: "AssignedToUserID", Type: "string", MatchKey: true, InputKey: "assigned_to_user_id", Clearable: true}, AutoDismissedAt: FieldDescriptor{Name: "auto_dismissed_at", Label: "AutoDismissedAt", Type: "models.DateTime", InputKey: "auto_dismissed_at", Clearable: true}, Blocking: FieldDescriptor{Name: "blocking", Label: "Blocking", Type: "bool", WorkflowEligible: true, InputKey: "blocking", Clearable: true}, Category: FieldDescriptor{Name: "category", Label: "Category", Type: "string", MatchKey: true, InputKey: "category", Clearable: true}, CveID: FieldDescriptor{Name: "cve_id", Label: "CveID", Type: "string", MatchKey: true, InputKey: "cve_id", Clearable: true}, CweIds: FieldDescriptor{Name: "cwe_ids", Label: "CweIds", Type: "[]string", InputKey: "cwe_ids", Clearable: true}, DependencyScope: FieldDescriptor{Name: "dependency_scope", Label: "DependencyScope", Type: "string", MatchKey: true, InputKey: "dependency_scope", Clearable: true}, Description: FieldDescriptor{Name: "description", Label: "Description", Type: "string", MatchKey: true, InputKey: "description", Clearable: true}, DiscoveredAt: FieldDescriptor{Name: "discovered_at", Label: "DiscoveredAt", Type: "models.DateTime", WorkflowEligible: true, InputKey: "discovered_at", Clearable: true}, DismissedAt: FieldDescriptor{Name: "dismissed_at", Label: "DismissedAt", Type: "models.DateTime", WorkflowEligible: true, InputKey: "dismissed_at", Clearable: true}, DismissedComment: FieldDescriptor{Name: "dismissed_comment", Label: "DismissedComment", Type: "string", MatchKey: true, InputKey: "dismissed_comment", Clearable: true}, DismissedReason: FieldDescriptor{Name: "dismissed_reason", Label: "DismissedReason", Type: "string", MatchKey: true, InputKey: "dismissed_reason", Clearable: true}, DisplayName: FieldDescriptor{Name: "display_name", Label: "DisplayName", Type: "string", MatchKey: true, InputKey: "display_name", Clearable: true}, EnvironmentID: FieldDescriptor{Name: "environment_id", Label: "EnvironmentID", Type: "string", MatchKey: true, InputKey: "environment_id", Clearable: true}, EnvironmentName: FieldDescriptor{Name: "environment_name", Label: "EnvironmentName", Type: "string", MatchKey: true, InputKey: "environment_name", Clearable: true, CaseInsensitive: true}, Exploitability: FieldDescriptor{Name: "exploitability", Label: "Exploitability", Type: "float64", InputKey: "exploitability", Clearable: true}, ExternalID: FieldDescriptor{Name: "external_id", Label: "ExternalID", Type: "string", MatchKey: true, InputKey: "external_id", LookupKey: true}, ExternalOwnerID: FieldDescriptor{Name: "external_owner_id", Label: "ExternalOwnerID", Type: "string", MatchKey: true, InputKey: "external_owner_id", Clearable: true}, ExternalURI: FieldDescriptor{Name: "external_uri", Label: "ExternalURI", Type: "string", MatchKey: true, InputKey: "external_uri", Clearable: true}, FirstPatchedVersion: FieldDescriptor{Name: "first_patched_version", Label: "FirstPatchedVersion", Type: "string", MatchKey: true, InputKey: "first_patched_version", Clearable: true}, FixAvailable: FieldDescriptor{Name: "fix_available", Label: "FixAvailable", Type: "bool", WorkflowEligible: true, InputKey: "fix_available", Clearable: true}, FixedAt: FieldDescriptor{Name: "fixed_at", Label: "FixedAt", Type: "models.DateTime", WorkflowEligible: true, InputKey: "fixed_at", Clearable: true}, Impact: FieldDescriptor{Name: "impact", Label: "Impact", Type: "float64", InputKey: "impact", Clearable: true}, Impacts: FieldDescriptor{Name: "impacts", Label: "Impacts", Type: "[]string", InputKey: "impacts", Clearable: true}, InternalNotes: FieldDescriptor{Name: "internal_notes", Label: "InternalNotes", Type: "string", MatchKey: true, InputKey: "internal_notes", Clearable: true}, InternalOwner: FieldDescriptor{Name: "internal_owner", Label: "InternalOwner", Type: "string", MatchKey: true, InputKey: "internal_owner", Clearable: true}, InternalOwnerGroupID: FieldDescriptor{Name: "internal_owner_group_id", Label: "InternalOwnerGroupID", Type: "string", MatchKey: true, InputKey: "internal_owner_group_id", Clearable: true}, InternalOwnerIdentityHolderID: FieldDescriptor{Name: "internal_owner_identity_holder_id", Label: "InternalOwnerIdentityHolderID", Type: "string", MatchKey: true, InputKey: "internal_owner_identity_holder_id", Clearable: true}, InternalOwnerUserID: FieldDescriptor{Name: "internal_owner_user_id", Label: "InternalOwnerUserID", Type: "string", MatchKey: true, InputKey: "internal_owner_user_id", Clearable: true}, ManifestPath: FieldDescriptor{Name: "manifest_path", Label: "ManifestPath", Type: "string", MatchKey: true, InputKey: "manifest_path", Clearable: true}, Metadata: FieldDescriptor{Name: "metadata", Label: "Metadata", Type: "map[string]interface {}", InputKey: "metadata", Clearable: true, Volatile: true}, Open: FieldDescriptor{Name: "open", Label: "Open", Type: "bool", WorkflowEligible: true, InputKey: "open", Clearable: true}, PackageEcosystem: FieldDescriptor{Name: "package_ecosystem", Label: "PackageEcosystem", Type: "string", MatchKey: true, InputKey: "package_ecosystem", Clearable: true}, PackageName: FieldDescriptor{Name: "package_name", Label: "PackageName", Type: "string", MatchKey: true, InputKey: "package_name", Clearable: true}, Priority: FieldDescriptor{Name: "priority", Label: "Priority", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "priority", Clearable: true}, Production: FieldDescriptor{Name: "production", Label: "Production", Type: "bool", WorkflowEligible: true, InputKey: "production", Clearable: true}, Public: FieldDescriptor{Name: "public", Label: "Public", Type: "bool", WorkflowEligible: true, InputKey: "public", Clearable: true}, PublishedAt: FieldDescriptor{Name: "published_at", Label: "PublishedAt", Type: "models.DateTime", InputKey: "published_at", Clearable: true}, RawPayload: FieldDescriptor{Name: "raw_payload", Label: "RawPayload", Type: "map[string]interface {}", InputKey: "raw_payload", Clearable: true, Volatile: true}, References: FieldDescriptor{Name: "references", Label: "References", Type: "[]string", InputKey: "references", Clearable: true}, RemediationSLA: FieldDescriptor{Name: "remediation_sla", Label: "RemediationSLA", Type: "int", WorkflowEligible: true, InputKey: "remediation_sla", Clearable: true}, ReviewedBy: FieldDescriptor{Name: "reviewed_by", Label: "ReviewedBy", Type: "string", MatchKey: true, InputKey: "reviewed_by", Clearable: true}, ReviewedByGroupID: FieldDescriptor{Name: "reviewed_by_group_id", Label: "ReviewedByGroupID", Type: "string", MatchKey: true, InputKey: "reviewed_by_group_id", Clearable: true}, ReviewedByIdentityHolderID: FieldDescriptor{Name: "reviewed_by_identity_holder_id", Label: "ReviewedByIdentityHolderID", Type: "string", MatchKey: true, InputKey: "reviewed_by_identity_holder_id", Clearable: true}, ReviewedByUserID: FieldDescriptor{Name: "reviewed_by_user_id", Label: "ReviewedByUserID", Type: "string", MatchKey: true, InputKey: "reviewed_by_user_id", Clearable: true}, ScopeID: FieldDescriptor{Name: "scope_id", Label: "ScopeID", Type: "string", MatchKey: true, InputKey: "scope_id", Clearable: true}, ScopeName: FieldDescriptor{Name: "scope_name", Label: "ScopeName", Type: "string", MatchKey: true, InputKey: "scope_name", Clearable: true, CaseInsensitive: true}, Score: FieldDescriptor{Name: "score", Label: "Score", Type: "float64", WorkflowEligible: true, InputKey: "score", Clearable: true}, Severity: FieldDescriptor{Name: "severity", Label: "Severity", Type: "string", WorkflowEligible: true, MatchKey: true, InputKey: "severity", Clearable: true}, Source: FieldDescriptor{Name: "source", Label: "Source", Type: "string", MatchKey: true, InputKey: "source", Clearable: true}, SourceUpdatedAt: FieldDescriptor{Name: "source_updated_at", Label: "SourceUpdatedAt", Type: "models.DateTime", InputKey: "source_updated_at", Clearable: true, Volatile: true}, Summary: FieldDescriptor{Name: "summary", Label: "Summary", Type: "string", MatchKey: true, InputKey: "summary", Clearable: true}, SystemInternalID: FieldDescriptor{Name: "system_internal_id", Label: "SystemInternalID", Type: "string", MatchKey: true, InputKey: "system_internal_id", Clearable: true}, Tags: FieldDescriptor{Name: "tags", Label: "Tags", Type: "[]string", InputKey: "tags", Clearable: true}, Validated: FieldDescriptor{Name: "validated", Label: "Validated", Type: "bool", WorkflowEligible: true, InputKey: "validated", Clearable: true}, Vector: FieldDescriptor{Name: "vector", Label: "Vector", Type: "string", MatchKey: true, InputKey: "vector", Clearable: true}, VulnerabilityStatusID: FieldDescriptor{Name: "vulnerability_status_id", Label: "VulnerabilityStatusID", Type: "string", MatchKey: true, InputKey: "vulnerability_status_id", Clearable: true}, VulnerabilityStatusName: FieldDescriptor{Name: "vulnerability_status_name", Label: "VulnerabilityStatusName", Type: "string", MatchKey: true, InputKey: "vulnerability_status_name", Clearable: true, CaseInsensitive: true}, VulnerableVersionRange: FieldDescriptor{Name: "vulnerable_version_range", Label: "VulnerableVersionRange", Type: "string", MatchKey: true, InputKey: "vulnerable_version_range", Clearable: true}, }
VulnerabilityFields indexes the provider-mappable fields of Vulnerability
Functions ¶
func ApprovalListeners ¶
func ApprovalListeners(concern MutationConcern, caller func(*auth.Caller, MutationPayload) *auth.Caller, content NotificationContent, statusValues []string, skip ...*Schema) []gala.Registration
ApprovalListeners returns one declarative approval listener per approval-annotated schema, gated on the schema's status field matching any of the trigger values; the caller owns the notification content, trigger vocabulary, and capability hook
func CatalogListeners ¶
func CatalogListeners() []gala.Registration
CatalogListeners refreshes adopted rows when a visible catalog row's source-managed fields change
func ConsoleLanding ¶
ConsoleLanding returns the annotation-declared console landing path for a schema.
func ConsoleObjectPath ¶
ConsoleObjectPath returns the annotation-declared console path for an object.
func CreateNotifications ¶
func CreateNotifications(ctx context.Context, client *generated.Client, recipients []string, input *generated.CreateNotificationInput) error
CreateNotifications creates one notification per recipient from the given input, normalizing the object type; it is the single creation funnel for declarative and bespoke notifications
func EmissionVetoed ¶
EmissionVetoed reports whether mutation event emission is vetoed
func EmitMutation ¶
func EmitMutation(ctx context.Context, runtimes []*gala.Gala, payload MutationPayload)
EmitMutation fans a mutation payload out to every interested concern topic on each runtime, detaching cancellation for best-effort dispatch; per-topic failures are logged and do not abort the fan-out
func EncodeLookupKey ¶
func EncodeLookupKey(alternative LookupAlternative, keys LookupValues) string
EncodeLookupKey renders a lookup alternative's key values into the lookup cache key
func FieldValue ¶
func FieldValue(row json.RawMessage, field string) string
FieldValue returns the trimmed string value of one field from a marshaled entity row
func ForSchemas ¶
func ForSchemas(schemas []*Schema, base MutationListener) []gala.Registration
ForSchemas stamps one listener declaration across schemas
func GroupMemberUserIDs ¶
func GroupMemberUserIDs(ctx context.Context, client *generated.Client, groupID string) ([]string, error)
GroupMemberUserIDs returns the user ids of all members of the given group
func InjectCreateLinks ¶
func InjectCreateLinks(ctx context.Context, client *generated.Client, ownerID string, schema *Schema, payload json.RawMessage, links []LinkSpec) (json.RawMessage, error)
InjectCreateLinks resolves each link's target entities via selectTargets and writes the matched ids into the create-input payload under the edge's create-input key, so the source object is created with its edges already set in the same mutation rather than linked in a post-create step. A unique edge sets the scalar <edge>ID create field; a to-many edge sets the <edge>IDs list. Links resolving to no targets are skipped, leaving the create input unchanged for that edge. The target schema is taken authoritatively from the edge, so callers only supply the edge name and match criteria. Both the integration ingest engine and the workflow CREATE_OBJECT action use this, so a workflow definition can set edges identically to an ingest mapping
func InterestedInMutation ¶
InterestedInMutation reports whether any runtime has an interested listener on any of the schema's concern topics
func LoadEntity ¶
func LoadEntity[T any](ctx context.Context, entityID string, load func(context.Context, string) (T, error)) (T, bool, error)
LoadEntity loads a listener's target row via the provided getter, treating a missing row as a skipped event: the entity was deleted between mutation and delivery, so there is nothing left to process. Any other load error is returned for the queue to retry
func MentionListeners ¶
func MentionListeners(concern MutationConcern, caller func(*auth.Caller, MutationPayload) *auth.Caller, content NotificationContent, skip ...*Schema) []gala.Registration
MentionListeners returns one declarative mention listener per mention-annotated schema, excluding the skip schemas; the caller owns the notification content and capability hook
func MentionTexts ¶
func MentionTexts(payload MutationPayload, spec MentionSpec) (string, string)
MentionTexts resolves the new and pre-mutation rich text scanned for mentions, preferring each JSON candidate over its plain-text fallback only when it is valid slate text
func MentionedUsers ¶
func MentionedUsers(ctx context.Context, client *generated.Client, oldText, newText, objectType, objectID, objectName string) ([]string, error)
MentionedUsers resolves the user ids newly mentioned between the old and new rich text
func MutationConcernTopics ¶
MutationConcernTopics returns the concern topic names a schema mutation fans out to
func MutationTopic ¶
func MutationTopic(concern MutationConcern, schemaType string) gala.Topic[MutationPayload]
MutationTopic returns the typed mutation topic for a concern + schema type pair
func MutationTopicName ¶
func MutationTopicName(concern MutationConcern, schemaType string) gala.TopicName
MutationTopicName returns the mutation topic name for a concern + schema type pair
func NormalizeStrings ¶
NormalizeStrings trims, deduplicates, and drops empty string values
func ParseEnum ¶
func ParseEnum[T ~string](raw any, parser EnumParser[T], invalid ...T) (T, bool)
ParseEnum parses enum-like values through the provided enum parser. Optional invalid values can be provided to force known sentinel values to be treated as parse failures
func PrefetchLinkTargets ¶
func PrefetchLinkTargets(ctx context.Context, client *generated.Client, ownerID string, schema *Schema, payloads []json.RawMessage, links []LinkSpec) (context.Context, error)
PrefetchLinkTargets caches key-matched link target rows for a batch of payloads on the returned context
func RecipientsFromField ¶
func RecipientsFromField(fieldName string) func(Invocation, MutationPayload, json.RawMessage) ([]string, error)
RecipientsFromField resolves a single recipient from the payload's proposed value for the field, falling back to the loaded row; an empty value skips emission
func RegisterIngestListeners ¶
func RegisterIngestListeners(runtime *gala.Gala, resolveIntegration IngestIntegrationResolver) error
RegisterIngestListeners attaches every generated schema-ingest consumer.
func RequireDep ¶
func RequireDep[D any](handle func(Invocation, MutationPayload, D) error) func(Invocation, MutationPayload) error
RequireDep resolves one listener dependency before invoking handle, gating the event when the dependency is not wired
func StampProvenance ¶
func StampProvenance(payload json.RawMessage, schema *Schema, integration *generated.Integration, definitionID, runID string) json.RawMessage
StampProvenance writes the schema's trusted integration-derived provenance columns and ownership edges onto an ingest payload from the writing installation, overriding anything the mapping emitted for them; it is the sole writer of provenance columns for both the synchronous and the durable ingest paths, so a queued record persists with the same provenance a batched one does; a nil installation stamps only the run id and the definition id, which is how runtime ingest writes system-owned rows
func ValueAsString ¶
ValueAsString converts arbitrary values into non-empty strings
func VetoEmission ¶
VetoEmission suppresses mutation event emission for the current mutation
func WithActiveIntegrations ¶
WithActiveIntegrations installs a ctx-carried set of integration ids known to be active
func WithEmissionVeto ¶
WithEmissionVeto installs a shared emission veto holder when none is present, so every emission hook on the chain reads the same suppression decision
func WithEmissionVetoed ¶
WithEmissionVetoed suppresses mutation event emission for every mutation under ctx; the fresh holder shadows any outer one so the veto never leaks to sibling contexts
Types ¶
type ActionPlanProjection ¶
type ActionPlanProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
ActionPlanKindID string `json:"action_plan_kind_id,omitempty"`
ActionPlanKindName string `json:"action_plan_kind_name,omitempty"`
ApprovalRequired bool `json:"approval_required,omitempty"`
ApproverID string `json:"approver_id,omitempty"`
Blocked bool `json:"blocked,omitempty"`
BlockerReason string `json:"blocker_reason,omitempty"`
CompletedAt time.Time `json:"completed_at,omitempty"`
ControlSuggestions []string `json:"control_suggestions,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
DelegateID string `json:"delegate_id,omitempty"`
Description string `json:"description,omitempty"`
Details string `json:"details,omitempty"`
DetailsJSON []interface{} `json:"details_json,omitempty"`
DismissedControlSuggestions []string `json:"dismissed_control_suggestions,omitempty"`
DismissedImprovementSuggestions []string `json:"dismissed_improvement_suggestions,omitempty"`
DismissedTagSuggestions []string `json:"dismissed_tag_suggestions,omitempty"`
DueDate time.Time `json:"due_date,omitempty"`
ExternalContents string `json:"external_contents,omitempty"`
ExternalFileID string `json:"external_file_id,omitempty"`
ExternalID string `json:"external_id,omitempty"`
FileID string `json:"file_id,omitempty"`
ImprovementSuggestions []string `json:"improvement_suggestions,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
InternalOwner string `json:"internal_owner,omitempty"`
InternalOwnerGroupID string `json:"internal_owner_group_id,omitempty"`
InternalOwnerIdentityHolderID string `json:"internal_owner_identity_holder_id,omitempty"`
InternalOwnerUserID string `json:"internal_owner_user_id,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
ManagementMode enums.DocumentManagementMode `json:"management_mode,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
Name string `json:"name,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
Priority enums.Priority `json:"priority,omitempty"`
RawPayload map[string]interface{} `json:"raw_payload,omitempty"`
RequiresApproval bool `json:"requires_approval,omitempty"`
ReviewDue time.Time `json:"review_due,omitempty"`
ReviewFrequency enums.Frequency `json:"review_frequency,omitempty"`
Revision string `json:"revision,omitempty"`
Source string `json:"source,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
Status enums.DocumentStatus `json:"status,omitempty"`
Summary string `json:"summary,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
TagSuggestions []string `json:"tag_suggestions,omitempty"`
Tags []string `json:"tags,omitempty"`
Title string `json:"title,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
URL string `json:"url,omitempty"`
WorkflowEligibleMarker bool `json:"workflow_eligible_marker,omitempty"`
}
ActionPlanProjection is the flat, CEL- and jsonschema-facing view of a ActionPlan: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.ActionPlan whose edge graph cannot be reflected
type ApprovalSpec ¶
type ApprovalSpec struct {
Schema string `json:"schema"`
StatusField string `json:"statusField"`
ApproverField string `json:"approverField"`
}
ApprovalSpec describes the approval-flow fields on a schema.
func ApprovalSpecFor ¶
func ApprovalSpecFor(schemaType string) (ApprovalSpec, bool)
ApprovalSpecFor returns the annotation-declared approval fields for a schema.
type AssessmentPolicyProjection ¶
type AssessmentPolicyProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
AssessmentID string `json:"assessment_id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
ExternalID string `json:"external_id,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
InternalPolicyID string `json:"internal_policy_id,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
PolicyRevision string `json:"policy_revision,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
}
AssessmentPolicyProjection is the flat, CEL- and jsonschema-facing view of a AssessmentPolicy: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.AssessmentPolicy whose edge graph cannot be reflected
type AssessmentProjection ¶
type AssessmentProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
AssessmentType enums.AssessmentType `json:"assessment_type,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
ExternalID string `json:"external_id,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
Jsonconfig map[string]interface{} `json:"jsonconfig,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
Name string `json:"name,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
ResponseDueDuration int64 `json:"response_due_duration,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
Tags []string `json:"tags,omitempty"`
TemplateID string `json:"template_id,omitempty"`
Uischema map[string]interface{} `json:"uischema,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
WorkflowEligibleMarker bool `json:"workflow_eligible_marker,omitempty"`
}
AssessmentProjection is the flat, CEL- and jsonschema-facing view of a Assessment: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Assessment whose edge graph cannot be reflected
type AssessmentResponseProjection ¶
type AssessmentResponseProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
AssessmentID string `json:"assessment_id,omitempty"`
AssignedAt time.Time `json:"assigned_at,omitempty"`
CampaignID string `json:"campaign_id,omitempty"`
CompletedAt time.Time `json:"completed_at,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
DisplayName string `json:"display_name,omitempty"`
DocumentDataID string `json:"document_data_id,omitempty"`
DueDate time.Time `json:"due_date,omitempty"`
Email string `json:"email,omitempty"`
EmailClickCount int `json:"email_click_count,omitempty"`
EmailClickedAt time.Time `json:"email_clicked_at,omitempty"`
EmailDeliveredAt time.Time `json:"email_delivered_at,omitempty"`
EmailMetadata map[string]interface{} `json:"email_metadata,omitempty"`
EmailOpenCount int `json:"email_open_count,omitempty"`
EmailOpenedAt time.Time `json:"email_opened_at,omitempty"`
EntityID string `json:"entity_id,omitempty"`
IdentityHolderID string `json:"identity_holder_id,omitempty"`
IsDraft bool `json:"is_draft,omitempty"`
IsTest bool `json:"is_test,omitempty"`
LastEmailEventAt time.Time `json:"last_email_event_at,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
SendAttempts int `json:"send_attempts,omitempty"`
StartedAt time.Time `json:"started_at,omitempty"`
Status enums.AssessmentResponseStatus `json:"status,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
WorkflowEligibleMarker bool `json:"workflow_eligible_marker,omitempty"`
}
AssessmentResponseProjection is the flat, CEL- and jsonschema-facing view of a AssessmentResponse: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.AssessmentResponse whose edge graph cannot be reflected
type AssetProjection ¶
type AssetProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
AccessModelID string `json:"access_model_id,omitempty"`
AccessModelName string `json:"access_model_name,omitempty"`
AssetDataClassificationID string `json:"asset_data_classification_id,omitempty"`
AssetDataClassificationName string `json:"asset_data_classification_name,omitempty"`
AssetSubtypeID string `json:"asset_subtype_id,omitempty"`
AssetSubtypeName string `json:"asset_subtype_name,omitempty"`
AssetType enums.AssetType `json:"asset_type,omitempty"`
Categories []string `json:"categories,omitempty"`
ContainsPii bool `json:"contains_pii,omitempty"`
CostCenter string `json:"cost_center,omitempty"`
Cpe string `json:"cpe,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
CriticalityID string `json:"criticality_id,omitempty"`
CriticalityName string `json:"criticality_name,omitempty"`
Description string `json:"description,omitempty"`
DisplayName string `json:"display_name,omitempty"`
EncryptionStatusID string `json:"encryption_status_id,omitempty"`
EncryptionStatusName string `json:"encryption_status_name,omitempty"`
EnvironmentID string `json:"environment_id,omitempty"`
EnvironmentName string `json:"environment_name,omitempty"`
EstimatedMonthlyCost float64 `json:"estimated_monthly_cost,omitempty"`
ExternalID string `json:"external_id,omitempty"`
Identifier string `json:"identifier,omitempty"`
IntegrationID string `json:"integration_id,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
InternalOwner string `json:"internal_owner,omitempty"`
InternalOwnerGroupID string `json:"internal_owner_group_id,omitempty"`
InternalOwnerIdentityHolderID string `json:"internal_owner_identity_holder_id,omitempty"`
InternalOwnerUserID string `json:"internal_owner_user_id,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
Name string `json:"name,omitempty"`
ObservedAt models.DateTime `json:"observed_at,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
PhysicalLocation string `json:"physical_location,omitempty"`
PurchaseDate models.DateTime `json:"purchase_date,omitempty"`
Region string `json:"region,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
ScopeName string `json:"scope_name,omitempty"`
SecurityTierID string `json:"security_tier_id,omitempty"`
SecurityTierName string `json:"security_tier_name,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceIdentifier string `json:"source_identifier,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
SourcePlatformID string `json:"source_platform_id,omitempty"`
SourceType enums.SourceType `json:"source_type,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
Tags []string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
Website string `json:"website,omitempty"`
}
AssetProjection is the flat, CEL- and jsonschema-facing view of a Asset: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Asset whose edge graph cannot be reflected
type CampaignProjection ¶
type CampaignProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
AssessmentID string `json:"assessment_id,omitempty"`
CampaignType enums.CampaignType `json:"campaign_type,omitempty"`
CompletedAt models.DateTime `json:"completed_at,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Description string `json:"description,omitempty"`
DisplayID string `json:"display_id,omitempty"`
DueDate models.DateTime `json:"due_date,omitempty"`
EmailBrandingID string `json:"email_branding_id,omitempty"`
EmailTemplateID string `json:"email_template_id,omitempty"`
EntityID string `json:"entity_id,omitempty"`
ExternalID string `json:"external_id,omitempty"`
IntegrationID string `json:"integration_id,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
InternalOwner string `json:"internal_owner,omitempty"`
InternalOwnerGroupID string `json:"internal_owner_group_id,omitempty"`
InternalOwnerIdentityHolderID string `json:"internal_owner_identity_holder_id,omitempty"`
InternalOwnerUserID string `json:"internal_owner_user_id,omitempty"`
IsActive bool `json:"is_active,omitempty"`
IsRecurring bool `json:"is_recurring,omitempty"`
LastResentAt models.DateTime `json:"last_resent_at,omitempty"`
LastRunAt models.DateTime `json:"last_run_at,omitempty"`
LaunchedAt models.DateTime `json:"launched_at,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
Name string `json:"name,omitempty"`
NextRunAt models.DateTime `json:"next_run_at,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
RecipientCount int `json:"recipient_count,omitempty"`
RecurrenceCron models.Cron `json:"recurrence_cron,omitempty"`
RecurrenceEndAt models.DateTime `json:"recurrence_end_at,omitempty"`
RecurrenceFrequency enums.Frequency `json:"recurrence_frequency,omitempty"`
RecurrenceInterval int `json:"recurrence_interval,omitempty"`
RecurrenceTimezone string `json:"recurrence_timezone,omitempty"`
ResendCount int `json:"resend_count,omitempty"`
ScheduledAt models.DateTime `json:"scheduled_at,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
Status enums.CampaignStatus `json:"status,omitempty"`
Tags []string `json:"tags,omitempty"`
TemplateID string `json:"template_id,omitempty"`
TrustCenterID string `json:"trust_center_id,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
WorkflowEligibleMarker bool `json:"workflow_eligible_marker,omitempty"`
}
CampaignProjection is the flat, CEL- and jsonschema-facing view of a Campaign: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Campaign whose edge graph cannot be reflected
type CampaignTargetProjection ¶
type CampaignTargetProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
CampaignID string `json:"campaign_id,omitempty"`
CompletedAt models.DateTime `json:"completed_at,omitempty"`
ContactID string `json:"contact_id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Email string `json:"email,omitempty"`
FullName string `json:"full_name,omitempty"`
GroupID string `json:"group_id,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
SentAt models.DateTime `json:"sent_at,omitempty"`
Status enums.AssessmentResponseStatus `json:"status,omitempty"`
SubscriberID string `json:"subscriber_id,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
UserID string `json:"user_id,omitempty"`
WorkflowEligibleMarker bool `json:"workflow_eligible_marker,omitempty"`
}
CampaignTargetProjection is the flat, CEL- and jsonschema-facing view of a CampaignTarget: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.CampaignTarget whose edge graph cannot be reflected
type CatalogCapability ¶
type CatalogCapability struct {
// PointerField is the snake_case foreign-key field naming the catalog row an adopted row came from
PointerField string
// VisibilityField is the snake_case bool field marking a catalog row as visible to organizations
VisibilityField string
// KeyField is the snake_case field on adopted rows holding the catalog row's lookup key
KeyField string
// Fields lists the snake_case fields copied from the catalog row on adopt and refresh
Fields []string
// contains filtered or unexported fields
}
CatalogCapability describes the catalog pointer, the visibility and key markers, and the fields copied from a catalog row
type ChangeSet ¶
type ChangeSet struct {
// ChangedFields captures updated and cleared fields for the mutation
ChangedFields []string `json:"changed_fields,omitempty"`
// ClearedFields captures fields explicitly cleared by the mutation
ClearedFields []string `json:"cleared_fields,omitempty"`
// ChangedEdges captures changed edge names for catalog-known edges
ChangedEdges []string `json:"changed_edges,omitempty"`
// AddedIDs captures edge IDs added by edge name
AddedIDs map[string][]string `json:"added_ids,omitempty"`
// RemovedIDs captures edge IDs removed by edge name
RemovedIDs map[string][]string `json:"removed_ids,omitempty"`
// ProposedChanges captures field-level proposed values. Its JSON shape is unchanged, while the
// decoded map avoids repeated full-document decoding by every listener gate and handler.
ProposedChanges map[string]any `json:"proposed_changes,omitempty"`
// OldValues captures pre-mutation values for changed fields on single-row updates
OldValues map[string]any `json:"old_values,omitempty"`
}
ChangeSet is the single mutation-delta contract shared by event payloads, workflow trigger context, and approval routing. Field json tags are durable wire format for queued mutation events and must not change
func ChangeSetFromMutation ¶
ChangeSetFromMutation builds the mutation's change set: normalized changed and cleared field lists, proposed field values including explicit clears, and the catalog-known edge deltas flattened to name-keyed ID maps. Consumers filter this canonical set rather than rebuilding mutation state independently
func (ChangeSet) Empty ¶
Empty reports whether the change set carries no field, clear, or catalog edge change
func (ChangeSet) FieldChanged ¶
FieldChanged reports whether the change set indicates the field changed
func (ChangeSet) Filter ¶
Filter returns a capability-specific view without changing the durable ChangeSet shape.
func (ChangeSet) OldStringValue ¶
OldStringValue returns the pre-mutation string value for a field on single-row updates
func (ChangeSet) OldValue ¶
OldValue returns the pre-mutation value for a field on single-row updates
func (ChangeSet) StringSliceValue ¶
StringSliceValue returns a proposed string-slice mutation value for a field
func (ChangeSet) StringValue ¶
StringValue returns the proposed string mutation value for a field
type CheckResultProjection ¶
type CheckResultProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Details string `json:"details,omitempty"`
ExternalURI string `json:"external_uri,omitempty"`
IntegrationID string `json:"integration_id,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
LastObservedAt models.DateTime `json:"last_observed_at,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
ParentExternalID string `json:"parent_external_id,omitempty"`
Source string `json:"source,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
Status enums.CheckStatus `json:"status,omitempty"`
Tags []string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
}
CheckResultProjection is the flat, CEL- and jsonschema-facing view of a CheckResult: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.CheckResult whose edge graph cannot be reflected
type ConsoleRoute ¶
type ConsoleRoute struct {
Base string `json:"base"`
IDParam string `json:"idParam,omitempty"`
Suffix string `json:"suffix,omitempty"`
}
ConsoleRoute describes how console URLs are built for a schema's objects.
type ContactProjection ¶
type ContactProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
Address string `json:"address,omitempty"`
Company string `json:"company,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Email string `json:"email,omitempty"`
ExternalID string `json:"external_id,omitempty"`
FullName string `json:"full_name,omitempty"`
IntegrationID string `json:"integration_id,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
ObservedAt models.DateTime `json:"observed_at,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
PhoneNumber string `json:"phone_number,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
Status enums.UserStatus `json:"status,omitempty"`
Tags []string `json:"tags,omitempty"`
Title string `json:"title,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
}
ContactProjection is the flat, CEL- and jsonschema-facing view of a Contact: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Contact whose edge graph cannot be reflected
type ControlImplementationProjection ¶
type ControlImplementationProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Details string `json:"details,omitempty"`
DetailsJSON []interface{} `json:"details_json,omitempty"`
ExternalID string `json:"external_id,omitempty"`
ImplementationDate time.Time `json:"implementation_date,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
Status enums.DocumentStatus `json:"status,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
Tags []string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
VerificationDate time.Time `json:"verification_date,omitempty"`
Verified bool `json:"verified,omitempty"`
}
ControlImplementationProjection is the flat, CEL- and jsonschema-facing view of a ControlImplementation: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.ControlImplementation whose edge graph cannot be reflected
type ControlObjectiveProjection ¶
type ControlObjectiveProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
Category string `json:"category,omitempty"`
ControlObjectiveType string `json:"control_objective_type,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
DesiredOutcome string `json:"desired_outcome,omitempty"`
DesiredOutcomeJSON []interface{} `json:"desired_outcome_json,omitempty"`
DisplayID string `json:"display_id,omitempty"`
ExternalID string `json:"external_id,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
Name string `json:"name,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
Revision string `json:"revision,omitempty"`
Source enums.ControlSource `json:"source,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
Status enums.ObjectiveStatus `json:"status,omitempty"`
Subcategory string `json:"subcategory,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
Tags []string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
}
ControlObjectiveProjection is the flat, CEL- and jsonschema-facing view of a ControlObjective: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.ControlObjective whose edge graph cannot be reflected
type ControlProjection ¶
type ControlProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
Aliases []string `json:"aliases,omitempty"`
AssessmentMethods []models.AssessmentMethod `json:"assessment_methods,omitempty"`
AssessmentObjectives []models.AssessmentObjective `json:"assessment_objectives,omitempty"`
AuditorReferenceID string `json:"auditor_reference_id,omitempty"`
Category string `json:"category,omitempty"`
CategoryID string `json:"category_id,omitempty"`
ControlKindID string `json:"control_kind_id,omitempty"`
ControlKindName string `json:"control_kind_name,omitempty"`
ControlOwnerID string `json:"control_owner_id,omitempty"`
ControlQuestions []string `json:"control_questions,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
DelegateID string `json:"delegate_id,omitempty"`
Description string `json:"description,omitempty"`
DescriptionJSON []interface{} `json:"description_json,omitempty"`
DisplayID string `json:"display_id,omitempty"`
EnvironmentID string `json:"environment_id,omitempty"`
EnvironmentName string `json:"environment_name,omitempty"`
EvidenceRequests []models.EvidenceRequests `json:"evidence_requests,omitempty"`
ExampleEvidence []models.ExampleEvidence `json:"example_evidence,omitempty"`
ExternalID string `json:"external_id,omitempty"`
ExternalUUID string `json:"external_uuid,omitempty"`
ImplementationDescription string `json:"implementation_description,omitempty"`
ImplementationGuidance []models.ImplementationGuidance `json:"implementation_guidance,omitempty"`
ImplementationStatus enums.ControlImplementationStatus `json:"implementation_status,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
IsTrustCenterControl bool `json:"is_trust_center_control,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
MappedCategories []string `json:"mapped_categories,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
PublicRepresentation string `json:"public_representation,omitempty"`
RefCode string `json:"ref_code,omitempty"`
ReferenceFramework string `json:"reference_framework,omitempty"`
ReferenceFrameworkRevision string `json:"reference_framework_revision,omitempty"`
ReferenceID string `json:"reference_id,omitempty"`
References []models.Reference `json:"references,omitempty"`
ResponsiblePartyID string `json:"responsible_party_id,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
ScopeName string `json:"scope_name,omitempty"`
Source enums.ControlSource `json:"source,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
SourceName string `json:"source_name,omitempty"`
StandardID string `json:"standard_id,omitempty"`
Status enums.ControlStatus `json:"status,omitempty"`
Subcategory string `json:"subcategory,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
Tags []string `json:"tags,omitempty"`
TestingProcedures []models.TestingProcedures `json:"testing_procedures,omitempty"`
Title string `json:"title,omitempty"`
TrustCenterVisibility enums.TrustCenterControlVisibility `json:"trust_center_visibility,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
WorkflowEligibleMarker bool `json:"workflow_eligible_marker,omitempty"`
}
ControlProjection is the flat, CEL- and jsonschema-facing view of a Control: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Control whose edge graph cannot be reflected
type CustomTypeEnumProjection ¶
type CustomTypeEnumProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
Color string `json:"color,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Description string `json:"description,omitempty"`
ExternalID string `json:"external_id,omitempty"`
Field string `json:"field,omitempty"`
Icon string `json:"icon,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
Name string `json:"name,omitempty"`
ObjectType string `json:"object_type,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
}
CustomTypeEnumProjection is the flat, CEL- and jsonschema-facing view of a CustomTypeEnum: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.CustomTypeEnum whose edge graph cannot be reflected
type DirectoryAccountProjection ¶
type DirectoryAccountProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
AccountType enums.DirectoryAccountType `json:"account_type,omitempty"`
AddedAt time.Time `json:"added_at,omitempty"`
AvatarLocalFileID string `json:"avatar_local_file_id,omitempty"`
AvatarRemoteURL string `json:"avatar_remote_url,omitempty"`
AvatarUpdatedAt time.Time `json:"avatar_updated_at,omitempty"`
CanonicalEmail string `json:"canonical_email,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Department string `json:"department,omitempty"`
DirectoryName string `json:"directory_name,omitempty"`
DisplayID string `json:"display_id,omitempty"`
DisplayName string `json:"display_name,omitempty"`
EmailAliases []string `json:"email_aliases,omitempty"`
EnvironmentID string `json:"environment_id,omitempty"`
EnvironmentName string `json:"environment_name,omitempty"`
ExternalID string `json:"external_id,omitempty"`
FamilyName string `json:"family_name,omitempty"`
GivenName string `json:"given_name,omitempty"`
IdentityHolderID string `json:"identity_holder_id,omitempty"`
IntegrationID string `json:"integration_id,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
JobTitle string `json:"job_title,omitempty"`
LastSeenIP string `json:"last_seen_ip,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
MfaState enums.DirectoryAccountMFAState `json:"mfa_state,omitempty"`
ObservedAt time.Time `json:"observed_at,omitempty"`
OrganizationUnit string `json:"organization_unit,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
PhoneNumber string `json:"phone_number,omitempty"`
PlatformID string `json:"platform_id,omitempty"`
PrimarySource bool `json:"primary_source,omitempty"`
Profile map[string]interface{} `json:"profile,omitempty"`
RawProfileFileID string `json:"raw_profile_file_id,omitempty"`
RemovedAt time.Time `json:"removed_at,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
ScopeName string `json:"scope_name,omitempty"`
SecondaryKey string `json:"secondary_key,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
SourceVersion string `json:"source_version,omitempty"`
Status enums.DirectoryAccountStatus `json:"status,omitempty"`
Tags []string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
}
DirectoryAccountProjection is the flat, CEL- and jsonschema-facing view of a DirectoryAccount: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.DirectoryAccount whose edge graph cannot be reflected
type DirectoryGroupProjection ¶
type DirectoryGroupProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
AddedAt time.Time `json:"added_at,omitempty"`
Classification enums.DirectoryGroupClassification `json:"classification,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Description string `json:"description,omitempty"`
DirectoryName string `json:"directory_name,omitempty"`
DisplayID string `json:"display_id,omitempty"`
DisplayName string `json:"display_name,omitempty"`
Email string `json:"email,omitempty"`
EnvironmentID string `json:"environment_id,omitempty"`
EnvironmentName string `json:"environment_name,omitempty"`
ExternalID string `json:"external_id,omitempty"`
ExternalSharingAllowed bool `json:"external_sharing_allowed,omitempty"`
IntegrationID string `json:"integration_id,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
MemberCount int `json:"member_count,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
ObservedAt time.Time `json:"observed_at,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
PlatformID string `json:"platform_id,omitempty"`
Profile map[string]interface{} `json:"profile,omitempty"`
RawProfileFileID string `json:"raw_profile_file_id,omitempty"`
RemovedAt time.Time `json:"removed_at,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
ScopeName string `json:"scope_name,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
SourceVersion string `json:"source_version,omitempty"`
Status enums.DirectoryGroupStatus `json:"status,omitempty"`
Tags []string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
}
DirectoryGroupProjection is the flat, CEL- and jsonschema-facing view of a DirectoryGroup: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.DirectoryGroup whose edge graph cannot be reflected
type DirectoryMembershipProjection ¶
type DirectoryMembershipProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
AddedAt time.Time `json:"added_at,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
DirectoryAccountID string `json:"directory_account_id,omitempty"`
DirectoryGroupID string `json:"directory_group_id,omitempty"`
DirectoryName string `json:"directory_name,omitempty"`
DisplayID string `json:"display_id,omitempty"`
EnvironmentID string `json:"environment_id,omitempty"`
EnvironmentName string `json:"environment_name,omitempty"`
IntegrationID string `json:"integration_id,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
ObservedAt time.Time `json:"observed_at,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
PlatformID string `json:"platform_id,omitempty"`
RemovedAt time.Time `json:"removed_at,omitempty"`
Role enums.DirectoryMembershipRole `json:"role,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
ScopeName string `json:"scope_name,omitempty"`
Source string `json:"source,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
}
DirectoryMembershipProjection is the flat, CEL- and jsonschema-facing view of a DirectoryMembership: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.DirectoryMembership whose edge graph cannot be reflected
type DiscussionProjection ¶
type DiscussionProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
ExternalID string `json:"external_id,omitempty"`
IsResolved bool `json:"is_resolved,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
}
DiscussionProjection is the flat, CEL- and jsonschema-facing view of a Discussion: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Discussion whose edge graph cannot be reflected
type DocumentDataProjection ¶
type DocumentDataProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Data map[string]interface{} `json:"data,omitempty"`
EnvironmentID string `json:"environment_id,omitempty"`
EnvironmentName string `json:"environment_name,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
ScopeName string `json:"scope_name,omitempty"`
Tags []string `json:"tags,omitempty"`
TemplateID string `json:"template_id,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
}
DocumentDataProjection is the flat, CEL- and jsonschema-facing view of a DocumentData: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.DocumentData whose edge graph cannot be reflected
type EdgeDescriptor ¶
type EdgeDescriptor struct {
// Name is the edge name (e.g., "controls")
Name string `json:"name"`
// Target is the target schema's registry entry
Target *Schema `json:"-"`
// TargetType is the PascalCase target schema name, surfaced for the cross-link target dropdown
TargetType string `json:"target,omitempty"`
// Label is the human-readable label (PascalCase of the edge name)
Label string `json:"label,omitempty"`
// Unique reports whether this side references a single target (sets <edge>ID rather than <edge>IDs)
Unique bool `json:"unique,omitempty"`
// Field is the foreign-key storage column on this schema's table for unique owning edges
// (e.g. "control_id"); empty when the foreign key lives on the target table
Field string `json:"field,omitempty"`
// CreateField is the create-input JSON key used to set this edge at create time, matching the
// input's snake_case json tag (e.g. "control_ids")
CreateField string `json:"createField,omitempty"`
// AddField is the update-input key that adds targets to a to-many edge (e.g. "add_control_ids");
// empty for unique or immutable edges
AddField string `json:"addField,omitempty"`
// Through reports whether the edge goes through a join entity (edge schema). Through edges
// are linked by creating join entity rows — one per target, each with its own generated id —
// because batch edge adds cannot produce per-row entity ids
Through bool `json:"through,omitempty"`
// LinkThrough creates the join entity rows binding the source to each target, skipping pairs
// that already exist; nil for plain edges
LinkThrough func(ctx context.Context, client *generated.Client, sourceID string, targetIDs []string) error `json:"-"`
// WorkflowEligible reports whether the edge may drive workflow conditions and triggers
WorkflowEligible bool `json:"workflowEligible,omitempty"`
}
EdgeDescriptor describes an edge on a schema. It is the single edge-capability record shared by create-time link injection, the workflow object-ref catalog, and the integration cross-link inventory
type EmailTemplateProjection ¶
type EmailTemplateProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
Active bool `json:"active,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Defaults map[string]interface{} `json:"defaults,omitempty"`
Description string `json:"description,omitempty"`
ExternalID string `json:"external_id,omitempty"`
Format enums.NotificationTemplateFormat `json:"format,omitempty"`
IntegrationID string `json:"integration_id,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
Key string `json:"key,omitempty"`
Locale string `json:"locale,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
Name string `json:"name,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
Revision string `json:"revision,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
TemplateContext enums.TemplateContext `json:"template_context,omitempty"`
TrustCenterID string `json:"trust_center_id,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
Version int `json:"version,omitempty"`
WorkflowDefinitionID string `json:"workflow_definition_id,omitempty"`
WorkflowInstanceID string `json:"workflow_instance_id,omitempty"`
}
EmailTemplateProjection is the flat, CEL- and jsonschema-facing view of a EmailTemplate: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.EmailTemplate whose edge graph cannot be reflected
type EntityProjection ¶
type EntityProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
Aliases []string `json:"aliases,omitempty"`
AnnualSpend float64 `json:"annual_spend,omitempty"`
ApprovedForUse bool `json:"approved_for_use,omitempty"`
AutoRenews bool `json:"auto_renews,omitempty"`
BillingModel string `json:"billing_model,omitempty"`
CatalogID string `json:"catalog_id,omitempty"`
CatalogKey string `json:"catalog_key,omitempty"`
ContractEndDate models.DateTime `json:"contract_end_date,omitempty"`
ContractRenewalAt models.DateTime `json:"contract_renewal_at,omitempty"`
ContractStartDate models.DateTime `json:"contract_start_date,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Description string `json:"description,omitempty"`
DisplayName string `json:"display_name,omitempty"`
Domains []string `json:"domains,omitempty"`
EntityRelationshipStateID string `json:"entity_relationship_state_id,omitempty"`
EntityRelationshipStateName string `json:"entity_relationship_state_name,omitempty"`
EntitySecurityQuestionnaireStatusID string `json:"entity_security_questionnaire_status_id,omitempty"`
EntitySecurityQuestionnaireStatusName string `json:"entity_security_questionnaire_status_name,omitempty"`
EntitySourceTypeID string `json:"entity_source_type_id,omitempty"`
EntitySourceTypeName string `json:"entity_source_type_name,omitempty"`
EntityTypeID string `json:"entity_type_id,omitempty"`
EnvironmentID string `json:"environment_id,omitempty"`
EnvironmentName string `json:"environment_name,omitempty"`
ExternalID string `json:"external_id,omitempty"`
ExternallyVisible bool `json:"externally_visible,omitempty"`
HasSoc2 bool `json:"has_soc2,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
InternalOwner string `json:"internal_owner,omitempty"`
InternalOwnerGroupID string `json:"internal_owner_group_id,omitempty"`
InternalOwnerIdentityHolderID string `json:"internal_owner_identity_holder_id,omitempty"`
InternalOwnerUserID string `json:"internal_owner_user_id,omitempty"`
LastReviewedAt models.DateTime `json:"last_reviewed_at,omitempty"`
LinkedAssetIds []string `json:"linked_asset_ids,omitempty"`
Links []string `json:"links,omitempty"`
LogoFileID string `json:"logo_file_id,omitempty"`
LogoRemoteURL string `json:"logo_remote_url,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
MfaEnforced bool `json:"mfa_enforced,omitempty"`
MfaSupported bool `json:"mfa_supported,omitempty"`
Name string `json:"name,omitempty"`
NextReviewAt models.DateTime `json:"next_review_at,omitempty"`
ObservedAt models.DateTime `json:"observed_at,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
ProvidedServices []string `json:"provided_services,omitempty"`
RawIngestPayload map[string]interface{} `json:"raw_ingest_payload,omitempty"`
RenewalRisk string `json:"renewal_risk,omitempty"`
ReviewFrequency enums.Frequency `json:"review_frequency,omitempty"`
ReviewedBy string `json:"reviewed_by,omitempty"`
ReviewedByGroupID string `json:"reviewed_by_group_id,omitempty"`
ReviewedByIdentityHolderID string `json:"reviewed_by_identity_holder_id,omitempty"`
ReviewedByUserID string `json:"reviewed_by_user_id,omitempty"`
RiskRating string `json:"risk_rating,omitempty"`
RiskScore int `json:"risk_score,omitempty"`
RiskScoreCoverage int `json:"risk_score_coverage,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
ScopeName string `json:"scope_name,omitempty"`
Soc2PeriodEnd models.DateTime `json:"soc2_period_end,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
SpendCurrency string `json:"spend_currency,omitempty"`
SSOEnforced bool `json:"sso_enforced,omitempty"`
Status enums.EntityStatus `json:"status,omitempty"`
StatusPageURL string `json:"status_page_url,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
Tags []string `json:"tags,omitempty"`
TerminationNoticeDays int `json:"termination_notice_days,omitempty"`
Tier enums.VendorTier `json:"tier,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
VendorMetadata map[string]interface{} `json:"vendor_metadata,omitempty"`
}
EntityProjection is the flat, CEL- and jsonschema-facing view of a Entity: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Entity whose edge graph cannot be reflected
type EntityTypeProjection ¶
type EntityTypeProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
Name string `json:"name,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
Tags []string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
}
EntityTypeProjection is the flat, CEL- and jsonschema-facing view of a EntityType: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.EntityType whose edge graph cannot be reflected
type EnumParser ¶
EnumParser converts a normalized string into an enum pointer value
type EventProjection ¶
type EventProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
CorrelationID string `json:"correlation_id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
EventID string `json:"event_id,omitempty"`
EventType string `json:"event_type,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
Tags []string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
}
EventProjection is the flat, CEL- and jsonschema-facing view of a Event: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Event whose edge graph cannot be reflected
type EvidenceProjection ¶
type EvidenceProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
AuditorReferenceID string `json:"auditor_reference_id,omitempty"`
CollectionProcedure string `json:"collection_procedure,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
CreationDate models.DateTime `json:"creation_date,omitempty"`
Description string `json:"description,omitempty"`
DisplayID string `json:"display_id,omitempty"`
EnvironmentID string `json:"environment_id,omitempty"`
EnvironmentName string `json:"environment_name,omitempty"`
ExternalID string `json:"external_id,omitempty"`
ExternalUUID string `json:"external_uuid,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
IsAutomated bool `json:"is_automated,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
Name string `json:"name,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
RenewalDate models.DateTime `json:"renewal_date,omitempty"`
ReviewFrequency enums.Frequency `json:"review_frequency,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
ScopeName string `json:"scope_name,omitempty"`
Source string `json:"source,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
Status enums.EvidenceStatus `json:"status,omitempty"`
Tags []string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
URL string `json:"url,omitempty"`
WorkflowEligibleMarker bool `json:"workflow_eligible_marker,omitempty"`
}
EvidenceProjection is the flat, CEL- and jsonschema-facing view of a Evidence: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Evidence whose edge graph cannot be reflected
type FieldDescriptor ¶
type FieldDescriptor struct {
// Name is the schema field name (snake_case)
Name string `json:"name"`
// Label is the human-readable label (PascalCase of the field name)
Label string `json:"label"`
// Type is the ent field type string (e.g. "string", "bool", "time.Time")
Type string `json:"type"`
// WorkflowEligible reports whether the field may drive workflow conditions and triggers
WorkflowEligible bool `json:"workflowEligible,omitempty"`
// MatchKey reports whether the field is a plain-string indexed column usable as a cross-link match key
MatchKey bool `json:"matchKey,omitempty"`
// InputKey is the integration mapping create-input key (lowerCamel); empty for non-mapped fields
InputKey string `json:"inputKey,omitempty"`
// LookupKey reports whether the field is the ingest upsert lookup column for its schema
LookupKey bool `json:"lookupKey,omitempty"`
// DisplayKey reports whether the field is the schema's display-name source
DisplayKey bool `json:"displayKey,omitempty"`
// Clearable reports whether update inputs support explicitly clearing this field
Clearable bool `json:"clearable,omitempty"`
// WebhookPayload reports whether workflow webhook enrichment includes this field
WebhookPayload bool `json:"webhookPayload,omitempty"`
// SystemControlled excludes the field from provider mappings
SystemControlled bool `json:"systemControlled,omitempty"`
// SourceManaged reports whether the upstream source owns the value and overwrites it on refresh or reconcile
SourceManaged bool `json:"sourceManaged,omitempty"`
// Volatile excludes the field from triggering an ingest change
Volatile bool `json:"volatile,omitempty"`
// CaseInsensitive compares the field case-insensitively in ingest change detection
CaseInsensitive bool `json:"caseInsensitive,omitempty"`
// TaskRules are suggested-task rules declared on this field via entx.FieldTaskRule
TaskRules []TaskRuleDescriptor `json:"taskRules,omitempty"`
}
FieldDescriptor describes one field on a schema. It is the single field-capability record shared by the workflow builder (condition/trigger fields) and the integration cross-link config (match fields), replacing the separate workflow-field and key-field lists
func (FieldDescriptor) Equal ¶
func (d FieldDescriptor) Equal(old, proposed any) bool
Equal compares typed mutation values using the field's existing type information
func (FieldDescriptor) Expr ¶
func (d FieldDescriptor) Expr(expr string) MappingEntry
Expr binds a CEL expression to the field for integration mapping registration
type FieldMatch ¶
type FieldMatch struct {
// Field is the snake_case mutation field the predicate reads
Field string
// In is the set of accepted stringified values
In []string
// Negate inverts the membership test
Negate bool
}
FieldMatch is one declarative proposed-value predicate on a mutation listener: the mutation's proposed value for Field must stringify to a member of In (or a non-member when Negate is set) for the listener to run
type FieldTaskRule ¶
type FieldTaskRule struct {
// Field is the snake_case field name the rule was declared on; empty for schema-level rules
Field string
// Rule is the task rule descriptor itself
Rule TaskRuleDescriptor
}
FieldTaskRule pairs one task rule with the field it was declared on. Field is empty for schema-level rules (entx.SchemaTaskRule), which have no field to evaluate and always fire
type FileProjection ¶
type FileProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
CategoryID string `json:"category_id,omitempty"`
CategoryName string `json:"category_name,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
DetectedContentType string `json:"detected_content_type,omitempty"`
DetectedMimeType string `json:"detected_mime_type,omitempty"`
EnvironmentID string `json:"environment_id,omitempty"`
EnvironmentName string `json:"environment_name,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
LastAccessedAt time.Time `json:"last_accessed_at,omitempty"`
Md5Hash string `json:"md5_hash,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
Name string `json:"name,omitempty"`
PersistedFileSize int64 `json:"persisted_file_size,omitempty"`
ProvidedFileExtension string `json:"provided_file_extension,omitempty"`
ProvidedFileName string `json:"provided_file_name,omitempty"`
ProvidedFileSize int64 `json:"provided_file_size,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
ScopeName string `json:"scope_name,omitempty"`
StoragePath string `json:"storage_path,omitempty"`
StorageProvider string `json:"storage_provider,omitempty"`
StorageRegion string `json:"storage_region,omitempty"`
StorageScheme string `json:"storage_scheme,omitempty"`
StorageVolume string `json:"storage_volume,omitempty"`
StoreKey string `json:"store_key,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
Tags []string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
URI string `json:"uri,omitempty"`
}
FileProjection is the flat, CEL- and jsonschema-facing view of a File: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.File whose edge graph cannot be reflected
type FindingControlProjection ¶
type FindingControlProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
ControlID string `json:"control_id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
DiscoveredAt models.DateTime `json:"discovered_at,omitempty"`
ExternalControlID string `json:"external_control_id,omitempty"`
ExternalStandard string `json:"external_standard,omitempty"`
ExternalStandardVersion string `json:"external_standard_version,omitempty"`
FindingID string `json:"finding_id,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
Source string `json:"source,omitempty"`
StandardID string `json:"standard_id,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
}
FindingControlProjection is the flat, CEL- and jsonschema-facing view of a FindingControl: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.FindingControl whose edge graph cannot be reflected
type FindingProjection ¶
type FindingProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
AssessmentID string `json:"assessment_id,omitempty"`
AssignedTo string `json:"assigned_to,omitempty"`
AssignedToGroupID string `json:"assigned_to_group_id,omitempty"`
AssignedToIdentityHolderID string `json:"assigned_to_identity_holder_id,omitempty"`
AssignedToUserID string `json:"assigned_to_user_id,omitempty"`
BlocksProduction bool `json:"blocks_production,omitempty"`
Categories []string `json:"categories,omitempty"`
Category string `json:"category,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Description string `json:"description,omitempty"`
DisplayID string `json:"display_id,omitempty"`
DisplayName string `json:"display_name,omitempty"`
EnvironmentID string `json:"environment_id,omitempty"`
EnvironmentName string `json:"environment_name,omitempty"`
EventTime models.DateTime `json:"event_time,omitempty"`
Exploitability float64 `json:"exploitability,omitempty"`
ExternalID string `json:"external_id,omitempty"`
ExternalOwnerID string `json:"external_owner_id,omitempty"`
ExternalURI string `json:"external_uri,omitempty"`
FindingClass string `json:"finding_class,omitempty"`
FindingStatusID string `json:"finding_status_id,omitempty"`
FindingStatusName string `json:"finding_status_name,omitempty"`
Impact float64 `json:"impact,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
InternalOwner string `json:"internal_owner,omitempty"`
InternalOwnerGroupID string `json:"internal_owner_group_id,omitempty"`
InternalOwnerIdentityHolderID string `json:"internal_owner_identity_holder_id,omitempty"`
InternalOwnerUserID string `json:"internal_owner_user_id,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
NumericSeverity float64 `json:"numeric_severity,omitempty"`
Open bool `json:"open,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
Priority string `json:"priority,omitempty"`
Production bool `json:"production,omitempty"`
Public bool `json:"public,omitempty"`
RawPayload map[string]interface{} `json:"raw_payload,omitempty"`
Recommendation string `json:"recommendation,omitempty"`
RecommendedActions string `json:"recommended_actions,omitempty"`
References []string `json:"references,omitempty"`
RemediationSLA int `json:"remediation_sla,omitempty"`
ReportedAt models.DateTime `json:"reported_at,omitempty"`
ResourceName string `json:"resource_name,omitempty"`
ReviewedBy string `json:"reviewed_by,omitempty"`
ReviewedByGroupID string `json:"reviewed_by_group_id,omitempty"`
ReviewedByIdentityHolderID string `json:"reviewed_by_identity_holder_id,omitempty"`
ReviewedByUserID string `json:"reviewed_by_user_id,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
ScopeName string `json:"scope_name,omitempty"`
Score float64 `json:"score,omitempty"`
SecurityLevel enums.SecurityLevel `json:"security_level,omitempty"`
Severity string `json:"severity,omitempty"`
Source string `json:"source,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
SourceUpdatedAt models.DateTime `json:"source_updated_at,omitempty"`
State string `json:"state,omitempty"`
StepsToReproduce []string `json:"steps_to_reproduce,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
Tags []string `json:"tags,omitempty"`
TargetDetails map[string]interface{} `json:"target_details,omitempty"`
Targets []string `json:"targets,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
Validated bool `json:"validated,omitempty"`
Vector string `json:"vector,omitempty"`
WorkflowEligibleMarker bool `json:"workflow_eligible_marker,omitempty"`
}
FindingProjection is the flat, CEL- and jsonschema-facing view of a Finding: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Finding whose edge graph cannot be reflected
type GroupMembershipProjection ¶
type GroupMembershipProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
GroupID string `json:"group_id,omitempty"`
Role enums.Role `json:"role,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
UserID string `json:"user_id,omitempty"`
}
GroupMembershipProjection is the flat, CEL- and jsonschema-facing view of a GroupMembership: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.GroupMembership whose edge graph cannot be reflected
type GroupProjection ¶
type GroupProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
AvatarLocalFileID string `json:"avatar_local_file_id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Description string `json:"description,omitempty"`
DisplayID string `json:"display_id,omitempty"`
DisplayName string `json:"display_name,omitempty"`
ExternalID string `json:"external_id,omitempty"`
GravatarLogoURL string `json:"gravatar_logo_url,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
IsManaged bool `json:"is_managed,omitempty"`
LogoURL string `json:"logo_url,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
Name string `json:"name,omitempty"`
OscalContactUuids []string `json:"oscal_contact_uuids,omitempty"`
OscalPartyUUID string `json:"oscal_party_uuid,omitempty"`
OscalRole string `json:"oscal_role,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
ScimActive bool `json:"scim_active,omitempty"`
ScimDisplayName string `json:"scim_display_name,omitempty"`
ScimExternalID string `json:"scim_external_id,omitempty"`
ScimGroupMailing string `json:"scim_group_mailing,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
Tags []string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
}
GroupProjection is the flat, CEL- and jsonschema-facing view of a Group: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Group whose edge graph cannot be reflected
type GroupSettingProjection ¶
type GroupSettingProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
GroupID string `json:"group_id,omitempty"`
JoinPolicy enums.JoinPolicy `json:"join_policy,omitempty"`
SyncToGithub bool `json:"sync_to_github,omitempty"`
SyncToSlack bool `json:"sync_to_slack,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
Visibility enums.Visibility `json:"visibility,omitempty"`
}
GroupSettingProjection is the flat, CEL- and jsonschema-facing view of a GroupSetting: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.GroupSetting whose edge graph cannot be reflected
type IdentityHolderProjection ¶
type IdentityHolderProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
AlternateEmail string `json:"alternate_email,omitempty"`
AvatarRemoteURL string `json:"avatar_remote_url,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Department string `json:"department,omitempty"`
DisplayID string `json:"display_id,omitempty"`
Email string `json:"email,omitempty"`
EmailAliases []string `json:"email_aliases,omitempty"`
EmployerEntityID string `json:"employer_entity_id,omitempty"`
EndDate models.DateTime `json:"end_date,omitempty"`
EnvironmentID string `json:"environment_id,omitempty"`
EnvironmentName string `json:"environment_name,omitempty"`
ExternalID string `json:"external_id,omitempty"`
ExternalReferenceID string `json:"external_reference_id,omitempty"`
ExternalUserID string `json:"external_user_id,omitempty"`
FullName string `json:"full_name,omitempty"`
IdentityHolderType enums.IdentityHolderType `json:"identity_holder_type,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
InternalOwner string `json:"internal_owner,omitempty"`
InternalOwnerGroupID string `json:"internal_owner_group_id,omitempty"`
InternalOwnerIdentityHolderID string `json:"internal_owner_identity_holder_id,omitempty"`
InternalOwnerUserID string `json:"internal_owner_user_id,omitempty"`
IsActive bool `json:"is_active,omitempty"`
IsOpenlaneUser bool `json:"is_openlane_user,omitempty"`
Location string `json:"location,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
PhoneNumber string `json:"phone_number,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
ScopeName string `json:"scope_name,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
StartDate models.DateTime `json:"start_date,omitempty"`
Status enums.UserStatus `json:"status,omitempty"`
Tags []string `json:"tags,omitempty"`
Team string `json:"team,omitempty"`
Title string `json:"title,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
UserID string `json:"user_id,omitempty"`
WorkflowEligibleMarker bool `json:"workflow_eligible_marker,omitempty"`
}
IdentityHolderProjection is the flat, CEL- and jsonschema-facing view of a IdentityHolder: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.IdentityHolder whose edge graph cannot be reflected
type IngestCapability ¶
type IngestCapability struct {
Topic gala.Topic[IngestRequest]
// contains filtered or unexported fields
}
IngestCapability is the schema's single asynchronous ingest control surface.
type IngestIntegrationResolver ¶
type IngestIntegrationResolver func(context.Context, *generated.Client, gala.OperationContext) (*generated.Integration, error)
IngestIntegrationResolver loads the integration referenced by the durable operation context. The application owns terminal-error classification for integrations removed while work is queued.
type IngestPersist ¶
type IngestPersist func(context.Context, *generated.Client, *generated.Integration, json.RawMessage) (id string, changed bool, managed bool, err error)
IngestPersist is the type-erased persistence operation bound to a schema at startup.
type IngestRequest ¶
type IngestRequest struct {
OperationContext gala.OperationContext `json:"operationContext"`
Input json.RawMessage `json:"input"`
ThroughEdgeIDs map[string][]string `json:"throughEdgeIds,omitempty"`
Defaults map[string]any `json:"defaults,omitempty"`
Links []LinkSpec `json:"links,omitempty"`
// RunID is the integration run the record belongs to
RunID string `json:"runId,omitempty"`
}
IngestRequest is the durable schema-ingest command. Defaults are resolved through the schema field catalog, so operation-specific values do not become fields on the ingest machinery.
type IntegrationProjection ¶
type IntegrationProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
CampaignEmail bool `json:"campaign_email,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
DefinitionID string `json:"definition_id,omitempty"`
DefinitionSlug string `json:"definition_slug,omitempty"`
DefinitionVersion string `json:"definition_version,omitempty"`
Description string `json:"description,omitempty"`
EnvironmentID string `json:"environment_id,omitempty"`
EnvironmentName string `json:"environment_name,omitempty"`
ExpiresAt time.Time `json:"expires_at,omitempty"`
Family string `json:"family,omitempty"`
Health models.IntegrationHealth `json:"health,omitempty"`
IntegrationType string `json:"integration_type,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
Kind string `json:"kind,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
Name string `json:"name,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
PlatformID string `json:"platform_id,omitempty"`
PrimaryDirectory bool `json:"primary_directory,omitempty"`
ProviderMetadataSnapshot map[string]interface{} `json:"provider_metadata_snapshot,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
ScopeName string `json:"scope_name,omitempty"`
Status enums.IntegrationStatus `json:"status,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
Tags []string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
}
IntegrationProjection is the flat, CEL- and jsonschema-facing view of a Integration: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Integration whose edge graph cannot be reflected
type IntegrationRunProjection ¶
type IntegrationRunProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
DurationMs int `json:"duration_ms,omitempty"`
Error string `json:"error,omitempty"`
FinishedAt time.Time `json:"finished_at,omitempty"`
IntegrationID string `json:"integration_id,omitempty"`
Metrics map[string]interface{} `json:"metrics,omitempty"`
OperationConfig map[string]interface{} `json:"operation_config,omitempty"`
OperationKind enums.IntegrationOperationKind `json:"operation_kind,omitempty"`
OperationName string `json:"operation_name,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
RunType enums.IntegrationRunType `json:"run_type,omitempty"`
StartedAt time.Time `json:"started_at,omitempty"`
Status enums.IntegrationRunStatus `json:"status,omitempty"`
Summary string `json:"summary,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
}
IntegrationRunProjection is the flat, CEL- and jsonschema-facing view of a IntegrationRun: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.IntegrationRun whose edge graph cannot be reflected
type InternalPolicyProjection ¶
type InternalPolicyProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
ApprovalRequired bool `json:"approval_required,omitempty"`
ApproverID string `json:"approver_id,omitempty"`
ControlSuggestions []string `json:"control_suggestions,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
DelegateID string `json:"delegate_id,omitempty"`
Details string `json:"details,omitempty"`
DetailsJSON []interface{} `json:"details_json,omitempty"`
DismissedControlSuggestions []string `json:"dismissed_control_suggestions,omitempty"`
DismissedImprovementSuggestions []string `json:"dismissed_improvement_suggestions,omitempty"`
DismissedTagSuggestions []string `json:"dismissed_tag_suggestions,omitempty"`
DisplayID string `json:"display_id,omitempty"`
EnvironmentID string `json:"environment_id,omitempty"`
EnvironmentName string `json:"environment_name,omitempty"`
ExternalContents string `json:"external_contents,omitempty"`
ExternalFileID string `json:"external_file_id,omitempty"`
ExternalID string `json:"external_id,omitempty"`
ExternalUUID string `json:"external_uuid,omitempty"`
FileID string `json:"file_id,omitempty"`
ImprovementSuggestions []string `json:"improvement_suggestions,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
InternalPolicyKindID string `json:"internal_policy_kind_id,omitempty"`
InternalPolicyKindName string `json:"internal_policy_kind_name,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
ManagementMode enums.DocumentManagementMode `json:"management_mode,omitempty"`
Name string `json:"name,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
ReviewDue time.Time `json:"review_due,omitempty"`
ReviewFrequency enums.Frequency `json:"review_frequency,omitempty"`
Revision string `json:"revision,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
ScopeName string `json:"scope_name,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
Status enums.DocumentStatus `json:"status,omitempty"`
Summary string `json:"summary,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
TagSuggestions []string `json:"tag_suggestions,omitempty"`
Tags []string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
URL string `json:"url,omitempty"`
WorkflowEligibleMarker bool `json:"workflow_eligible_marker,omitempty"`
}
InternalPolicyProjection is the flat, CEL- and jsonschema-facing view of a InternalPolicy: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.InternalPolicy whose edge graph cannot be reflected
type InviteProjection ¶
type InviteProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Expires time.Time `json:"expires,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
OwnershipTransfer bool `json:"ownership_transfer,omitempty"`
Recipient string `json:"recipient,omitempty"`
RequestorID string `json:"requestor_id,omitempty"`
Role enums.Role `json:"role,omitempty"`
SendAttempts int `json:"send_attempts,omitempty"`
SSOExempt bool `json:"sso_exempt,omitempty"`
Status enums.InviteStatus `json:"status,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
}
InviteProjection is the flat, CEL- and jsonschema-facing view of a Invite: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Invite whose edge graph cannot be reflected
type Invocation ¶
type Invocation struct {
// Context is the restored event context seeded with the ent client
Context context.Context
// Client is the ent client resolved from the gala injector
Client *generated.Client
// Schema is the entityops schema handle for the mutated type
Schema *Schema
// EntityID is the mutated entity identifier
EntityID string
// Row is the stored entity loaded once after the mutation, populated when the listener
// declares RowMatch or Notify so handlers need not reload it; nil otherwise
Row json.RawMessage
// Caller is the pre-resolved caller for this dispatch, never nil
Caller *auth.Caller
// Envelope is the envelope being processed
Envelope gala.Envelope
// Injector provides typed dependency lookup via samber/do for every subsystem
// registered at wiring
Injector do.Injector
}
Invocation bundles the standard dependencies handed to a mutation listener
type KeyMatch ¶
type KeyMatch struct {
// TargetField is the snake_case field on the target schema to match against
TargetField string `json:"target_field"`
// SourceField is the snake_case scalar field on the source entity whose value must match the target field
SourceField string `json:"source_field,omitempty"`
// SourceList is the snake_case list field on the source entity holding additional candidate values
SourceList string `json:"source_list,omitempty"`
}
KeyMatch describes a structured key-equality match between a target schema field and values taken from the source entity. When set on a TargetSelector it is compiled into an indexed query predicate (target_field IN source values) instead of a row-by-row expression evaluation
type LinkSpec ¶
type LinkSpec struct {
// Edge is the edge name on the source schema to link over
Edge string `json:"edge"`
// Target specifies which entities to link via schema, key match, or expression
Target TargetSelector `json:"target"`
}
LinkSpec describes one edge-linking operation: the named edge to link over and a target selector resolving which entities to link. Resolved through selectTargets and applied by InjectCreateLinks, which sets the edge in the create mutation itself; shared by the integration ingest engine and the workflow CREATE_OBJECT action so both set edges identically at create time
type LookupAlternative ¶
type LookupAlternative struct {
// Fields is the ordered snake_case field names forming this alternative's composite key
Fields []string
}
LookupAlternative is one ordered composite ingest lookup key of snake_case field names
type LookupValues ¶
LookupValues is one row's or payload's values for a lookup alternative keyed by snake_case field name
type MappedControlProjection ¶
type MappedControlProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
Confidence int `json:"confidence,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
ExternalID string `json:"external_id,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
MappingType enums.MappingType `json:"mapping_type,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
Relation string `json:"relation,omitempty"`
Source enums.MappingSource `json:"source,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
Tags []string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
}
MappedControlProjection is the flat, CEL- and jsonschema-facing view of a MappedControl: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.MappedControl whose edge graph cannot be reflected
type MappingEntry ¶
type MappingEntry struct {
// Key is the field's ingest input key
Key string
// Expr is the CEL expression producing the field's value
Expr string
}
MappingEntry is one field-to-expression binding declared by an integration mapping
type MatchCandidate ¶
MatchCandidate is one field and value to match a catalog row on, tried in the order given
type MentionSpec ¶
type MentionSpec struct {
Schema string `json:"schema"`
NameField string `json:"nameField"`
DetailsField string `json:"detailsField"`
DetailsJSONField string `json:"detailsJsonField"`
OwnerField string `json:"ownerField"`
}
MentionSpec describes the rich-text fields scanned for mentions on a schema.
func MentionSpecFor ¶
func MentionSpecFor(schemaType string) (MentionSpec, bool)
MentionSpecFor returns the annotation-declared mention fields for a schema.
type MutationConcern ¶
type MutationConcern string
MutationConcern identifies the eventing concern namespace for mutation topics
const ( // MutationConcernDirect is the default concern for direct mutation listeners MutationConcernDirect MutationConcern = "direct" // MutationConcernWorkflow is the concern for workflow mutation listeners MutationConcernWorkflow MutationConcern = "workflow" // MutationConcernNotification is the concern for notification mutation listeners MutationConcernNotification MutationConcern = "notification" // MutationConcernTaskRule is the concern for task rule listeners, kept off the direct // namespace so suggested tasks are not queued behind slower direct listeners MutationConcernTaskRule MutationConcern = "task_rule" )
type MutationListener ¶
type MutationListener struct {
// Concern selects the mutation topic namespace; empty means the direct concern
Concern MutationConcern
// Schema is the canonical entityops schema whose mutations the listener observes
Schema *Schema
// Operations optionally scopes listener interest to specific mutation operations;
// empty expands to RegularMutationOps, so OpSoftDelete is explicit opt-in
Operations []string
// Priority orders listeners sharing a concern topic, lowest first; listeners on one
// topic run sequentially in a single dispatch
Priority int
// Fields optionally gates update operations on at least one of these fields having
// changed; create and delete operations pass the gate
Fields []string
// Match optionally gates handling on every proposed-value predicate holding
Match []FieldMatch
// RowMatch optionally gates handling on every predicate holding against the stored row
// loaded after the mutation, for fields an update does not propose
RowMatch []FieldMatch
// Caller optionally replaces or augments the restored caller; it receives the restored
// caller (never nil) and its result is set on the context and Invocation.Caller
Caller func(*auth.Caller, MutationPayload) *auth.Caller
// ContextKeys are applied to the context in order before the handler runs
ContextKeys []func(context.Context) context.Context
// Notify declares a declarative notification emitted when the gates pass; exactly one of
// Handle and Notify must be set
Notify *NotifySpec
// Handle is invoked with the standard invocation bundle and the mutation payload
Handle func(Invocation, MutationPayload) error
}
MutationListener declares one mutation listener bound to a schema mutation topic and compiles to a standard gala definition via Definition, so registration is always gala.Register. The listener name composes from the topic and optional label; declarative gating, caller resolution, and context keys compile to their definition fields, and the handler runs behind the standard preamble: restored-client validation and entity-id resolution
func (MutationListener) Attach ¶
func (listener MutationListener) Attach(g *gala.Gala) (gala.ListenerID, error)
Attach compiles the listener to its definition and registers it on the runtime
func (MutationListener) Definition ¶
func (listener MutationListener) Definition() gala.Definition[MutationPayload]
Definition compiles the listener into the standard gala definition, so mutation listeners register through gala.Register like every other listener
func (MutationListener) Name ¶
func (listener MutationListener) Name() string
Name returns the composed listener name: the mutation topic, suffixed with the label when one is set
type MutationPayload ¶
type MutationPayload struct {
// MutationType is the ent schema type that emitted the mutation
MutationType string `json:"mutation_type"`
// Operation is the mutation operation string
Operation string `json:"operation"`
// EntityID is the mutated entity identifier
EntityID string `json:"entity_id"`
ChangeSet
}
MutationPayload is the durable mutation event payload dispatched to gala listeners. Identity field json tags and the embedded ChangeSet tags are wire format for queued jobs
func (MutationPayload) PayloadOperation ¶
func (payload MutationPayload) PayloadOperation() string
PayloadOperation returns the mutation operation for gala listener routing
type NarrativeProjection ¶
type NarrativeProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Description string `json:"description,omitempty"`
Details string `json:"details,omitempty"`
DisplayID string `json:"display_id,omitempty"`
ExternalID string `json:"external_id,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
Name string `json:"name,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
Tags []string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
}
NarrativeProjection is the flat, CEL- and jsonschema-facing view of a Narrative: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Narrative whose edge graph cannot be reflected
type NoteProjection ¶
type NoteProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
DiscussionID string `json:"discussion_id,omitempty"`
DisplayID string `json:"display_id,omitempty"`
IsEdited bool `json:"is_edited,omitempty"`
NoteRef string `json:"note_ref,omitempty"`
NotifiedAt time.Time `json:"notified_at,omitempty"`
NotifySubscribers bool `json:"notify_subscribers,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
Text string `json:"text,omitempty"`
TextJSON []interface{} `json:"text_json,omitempty"`
Title string `json:"title,omitempty"`
TrustCenterID string `json:"trust_center_id,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
}
NoteProjection is the flat, CEL- and jsonschema-facing view of a Note: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Note whose edge graph cannot be reflected
type NotificationContent ¶
type NotificationContent struct {
// Type is the notification audience type
Type enums.NotificationType
// Topic is the notification topic
Topic enums.NotificationTopic
// TitleTemplate is the Go text/template title, matching the ent title_template column
TitleTemplate string
// BodyTemplate is the Go text/template body, matching the ent body_template column
BodyTemplate string
// Data is static base data carried on the notification; string values render as templates
// and empty rendered values are omitted, matching the ent defaults column semantics
Data map[string]any
// Channels are the delivery channels set on emitted notifications, matching the ent channels
// column; when none are specified the notification is delivered in-app only
Channels []enums.Channel
}
NotificationContent is the in-code notification content contract; its fields mirror the notification_template ent schema columns so specs can later hydrate from persisted rows
type NotificationTemplateProjection ¶
type NotificationTemplateProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
Active bool `json:"active,omitempty"`
Blocks map[string]interface{} `json:"blocks,omitempty"`
BodyTemplate string `json:"body_template,omitempty"`
Channel enums.Channel `json:"channel,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Defaults map[string]interface{} `json:"defaults,omitempty"`
Description string `json:"description,omitempty"`
Destinations []string `json:"destinations,omitempty"`
EmailTemplateID string `json:"email_template_id,omitempty"`
Format enums.NotificationTemplateFormat `json:"format,omitempty"`
IntegrationID string `json:"integration_id,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
Jsonconfig map[string]interface{} `json:"jsonconfig,omitempty"`
Key string `json:"key,omitempty"`
Locale string `json:"locale,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
Name string `json:"name,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
Revision string `json:"revision,omitempty"`
SubjectTemplate string `json:"subject_template,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
TemplateContext enums.TemplateContext `json:"template_context,omitempty"`
TitleTemplate string `json:"title_template,omitempty"`
TopicPattern string `json:"topic_pattern,omitempty"`
Uischema map[string]interface{} `json:"uischema,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
Version int `json:"version,omitempty"`
WorkflowDefinitionID string `json:"workflow_definition_id,omitempty"`
}
NotificationTemplateProjection is the flat, CEL- and jsonschema-facing view of a NotificationTemplate: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.NotificationTemplate whose edge graph cannot be reflected
type NotifySpec ¶
type NotifySpec struct {
// Recipients resolves recipient user ids; an empty result skips emission
Recipients func(Invocation, MutationPayload, json.RawMessage) ([]string, error)
// Content is the notification content rendered per emission
Content NotificationContent
}
NotifySpec declares a declarative notification on a mutation listener: recipients resolve from the invocation, payload, and loaded row, and content renders against the notification vars
type OrganizationProjection ¶
type OrganizationProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
AvatarLocalFileID string `json:"avatar_local_file_id,omitempty"`
AvatarRemoteURL string `json:"avatar_remote_url,omitempty"`
AvatarUpdatedAt time.Time `json:"avatar_updated_at,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Description string `json:"description,omitempty"`
DisplayName string `json:"display_name,omitempty"`
Name string `json:"name,omitempty"`
PersonalOrg bool `json:"personal_org,omitempty"`
SlugName string `json:"slug_name,omitempty"`
StripeCustomerID string `json:"stripe_customer_id,omitempty"`
Tags []string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
}
OrganizationProjection is the flat, CEL- and jsonschema-facing view of a Organization: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Organization whose edge graph cannot be reflected
type PlatformProjection ¶
type PlatformProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
AccessModelID string `json:"access_model_id,omitempty"`
AccessModelName string `json:"access_model_name,omitempty"`
BusinessOwner string `json:"business_owner,omitempty"`
BusinessOwnerGroupID string `json:"business_owner_group_id,omitempty"`
BusinessOwnerIdentityHolderID string `json:"business_owner_identity_holder_id,omitempty"`
BusinessOwnerUserID string `json:"business_owner_user_id,omitempty"`
BusinessPurpose string `json:"business_purpose,omitempty"`
ContainsPii bool `json:"contains_pii,omitempty"`
CostCenter string `json:"cost_center,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
CriticalityID string `json:"criticality_id,omitempty"`
CriticalityName string `json:"criticality_name,omitempty"`
DataFlowSummary string `json:"data_flow_summary,omitempty"`
Description string `json:"description,omitempty"`
DisplayID string `json:"display_id,omitempty"`
EncryptionStatusID string `json:"encryption_status_id,omitempty"`
EncryptionStatusName string `json:"encryption_status_name,omitempty"`
EnvironmentID string `json:"environment_id,omitempty"`
EnvironmentName string `json:"environment_name,omitempty"`
EstimatedMonthlyCost float64 `json:"estimated_monthly_cost,omitempty"`
ExternalID string `json:"external_id,omitempty"`
ExternalReferenceID string `json:"external_reference_id,omitempty"`
ExternalUUID string `json:"external_uuid,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
InternalOwner string `json:"internal_owner,omitempty"`
InternalOwnerGroupID string `json:"internal_owner_group_id,omitempty"`
InternalOwnerIdentityHolderID string `json:"internal_owner_identity_holder_id,omitempty"`
InternalOwnerUserID string `json:"internal_owner_user_id,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
Name string `json:"name,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
PhysicalLocation string `json:"physical_location,omitempty"`
PlatformDataClassificationID string `json:"platform_data_classification_id,omitempty"`
PlatformDataClassificationName string `json:"platform_data_classification_name,omitempty"`
PlatformKindID string `json:"platform_kind_id,omitempty"`
PlatformKindName string `json:"platform_kind_name,omitempty"`
PlatformOwnerID string `json:"platform_owner_id,omitempty"`
PurchaseDate models.DateTime `json:"purchase_date,omitempty"`
Region string `json:"region,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
ScopeName string `json:"scope_name,omitempty"`
ScopeStatement string `json:"scope_statement,omitempty"`
SecurityOwner string `json:"security_owner,omitempty"`
SecurityOwnerGroupID string `json:"security_owner_group_id,omitempty"`
SecurityOwnerIdentityHolderID string `json:"security_owner_identity_holder_id,omitempty"`
SecurityOwnerUserID string `json:"security_owner_user_id,omitempty"`
SecurityTierID string `json:"security_tier_id,omitempty"`
SecurityTierName string `json:"security_tier_name,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceIdentifier string `json:"source_identifier,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
SourceType enums.SourceType `json:"source_type,omitempty"`
Status enums.PlatformStatus `json:"status,omitempty"`
Tags []string `json:"tags,omitempty"`
TechnicalOwner string `json:"technical_owner,omitempty"`
TechnicalOwnerGroupID string `json:"technical_owner_group_id,omitempty"`
TechnicalOwnerIdentityHolderID string `json:"technical_owner_identity_holder_id,omitempty"`
TechnicalOwnerUserID string `json:"technical_owner_user_id,omitempty"`
TrustBoundaryDescription string `json:"trust_boundary_description,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
WorkflowEligibleMarker bool `json:"workflow_eligible_marker,omitempty"`
}
PlatformProjection is the flat, CEL- and jsonschema-facing view of a Platform: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Platform whose edge graph cannot be reflected
type ProcedureProjection ¶
type ProcedureProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
ApprovalRequired bool `json:"approval_required,omitempty"`
ApproverID string `json:"approver_id,omitempty"`
ControlSuggestions []string `json:"control_suggestions,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
DelegateID string `json:"delegate_id,omitempty"`
Details string `json:"details,omitempty"`
DetailsJSON []interface{} `json:"details_json,omitempty"`
DismissedControlSuggestions []string `json:"dismissed_control_suggestions,omitempty"`
DismissedImprovementSuggestions []string `json:"dismissed_improvement_suggestions,omitempty"`
DismissedTagSuggestions []string `json:"dismissed_tag_suggestions,omitempty"`
DisplayID string `json:"display_id,omitempty"`
EnvironmentID string `json:"environment_id,omitempty"`
EnvironmentName string `json:"environment_name,omitempty"`
ExternalContents string `json:"external_contents,omitempty"`
ExternalFileID string `json:"external_file_id,omitempty"`
ExternalID string `json:"external_id,omitempty"`
FileID string `json:"file_id,omitempty"`
ImprovementSuggestions []string `json:"improvement_suggestions,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
ManagementMode enums.DocumentManagementMode `json:"management_mode,omitempty"`
Name string `json:"name,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
ProcedureKindID string `json:"procedure_kind_id,omitempty"`
ProcedureKindName string `json:"procedure_kind_name,omitempty"`
ReviewDue time.Time `json:"review_due,omitempty"`
ReviewFrequency enums.Frequency `json:"review_frequency,omitempty"`
Revision string `json:"revision,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
ScopeName string `json:"scope_name,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
Status enums.DocumentStatus `json:"status,omitempty"`
Summary string `json:"summary,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
TagSuggestions []string `json:"tag_suggestions,omitempty"`
Tags []string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
URL string `json:"url,omitempty"`
WorkflowEligibleMarker bool `json:"workflow_eligible_marker,omitempty"`
}
ProcedureProjection is the flat, CEL- and jsonschema-facing view of a Procedure: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Procedure whose edge graph cannot be reflected
type ProgramMembershipProjection ¶
type ProgramMembershipProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
ProgramID string `json:"program_id,omitempty"`
Role enums.Role `json:"role,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
UserID string `json:"user_id,omitempty"`
}
ProgramMembershipProjection is the flat, CEL- and jsonschema-facing view of a ProgramMembership: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.ProgramMembership whose edge graph cannot be reflected
type ProgramProjection ¶
type ProgramProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
AuditFirm string `json:"audit_firm,omitempty"`
Auditor string `json:"auditor,omitempty"`
AuditorEmail string `json:"auditor_email,omitempty"`
AuditorReadComments bool `json:"auditor_read_comments,omitempty"`
AuditorReady bool `json:"auditor_ready,omitempty"`
AuditorWriteComments bool `json:"auditor_write_comments,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Description string `json:"description,omitempty"`
DisplayID string `json:"display_id,omitempty"`
EndDate time.Time `json:"end_date,omitempty"`
ExternalID string `json:"external_id,omitempty"`
ExternalUUID string `json:"external_uuid,omitempty"`
FieldworkEndDate time.Time `json:"fieldwork_end_date,omitempty"`
FieldworkStartDate time.Time `json:"fieldwork_start_date,omitempty"`
FrameworkName string `json:"framework_name,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
Name string `json:"name,omitempty"`
ObservationPeriodEndDate time.Time `json:"observation_period_end_date,omitempty"`
ObservationPeriodStartDate time.Time `json:"observation_period_start_date,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
ProgramKindID string `json:"program_kind_id,omitempty"`
ProgramKindName string `json:"program_kind_name,omitempty"`
ProgramOwnerID string `json:"program_owner_id,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
StartDate time.Time `json:"start_date,omitempty"`
Status enums.ProgramStatus `json:"status,omitempty"`
Tags []string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
}
ProgramProjection is the flat, CEL- and jsonschema-facing view of a Program: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Program whose edge graph cannot be reflected
type RemediationProjection ¶
type RemediationProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
CompletedAt models.DateTime `json:"completed_at,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
DisplayID string `json:"display_id,omitempty"`
DueAt models.DateTime `json:"due_at,omitempty"`
EnvironmentID string `json:"environment_id,omitempty"`
EnvironmentName string `json:"environment_name,omitempty"`
Error string `json:"error,omitempty"`
Explanation string `json:"explanation,omitempty"`
ExternalID string `json:"external_id,omitempty"`
ExternalOwnerID string `json:"external_owner_id,omitempty"`
ExternalURI string `json:"external_uri,omitempty"`
Instructions string `json:"instructions,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
Intent string `json:"intent,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
OwnerReference string `json:"owner_reference,omitempty"`
PrGeneratedAt models.DateTime `json:"pr_generated_at,omitempty"`
PullRequestURI string `json:"pull_request_uri,omitempty"`
RepositoryURI string `json:"repository_uri,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
ScopeName string `json:"scope_name,omitempty"`
Source string `json:"source,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
State string `json:"state,omitempty"`
Status enums.RemediationStatus `json:"status,omitempty"`
Summary string `json:"summary,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
Tags []string `json:"tags,omitempty"`
TicketReference string `json:"ticket_reference,omitempty"`
Title string `json:"title,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
WorkflowEligibleMarker bool `json:"workflow_eligible_marker,omitempty"`
}
RemediationProjection is the flat, CEL- and jsonschema-facing view of a Remediation: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Remediation whose edge graph cannot be reflected
type ReviewProjection ¶
type ReviewProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
Approved bool `json:"approved,omitempty"`
ApprovedAt models.DateTime `json:"approved_at,omitempty"`
Category string `json:"category,omitempty"`
Classification string `json:"classification,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Details string `json:"details,omitempty"`
EnvironmentID string `json:"environment_id,omitempty"`
EnvironmentName string `json:"environment_name,omitempty"`
ExternalID string `json:"external_id,omitempty"`
ExternalOwnerID string `json:"external_owner_id,omitempty"`
ExternalURI string `json:"external_uri,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
RawPayload map[string]interface{} `json:"raw_payload,omitempty"`
ReportedAt models.DateTime `json:"reported_at,omitempty"`
Reporter string `json:"reporter,omitempty"`
ReviewedAt models.DateTime `json:"reviewed_at,omitempty"`
ReviewerID string `json:"reviewer_id,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
ScopeName string `json:"scope_name,omitempty"`
Source string `json:"source,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
State string `json:"state,omitempty"`
Status enums.ReviewStatus `json:"status,omitempty"`
Summary string `json:"summary,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
Tags []string `json:"tags,omitempty"`
Title string `json:"title,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
}
ReviewProjection is the flat, CEL- and jsonschema-facing view of a Review: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Review whose edge graph cannot be reflected
type RiskProjection ¶
type RiskProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
BusinessCosts string `json:"business_costs,omitempty"`
BusinessCostsJSON []interface{} `json:"business_costs_json,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
DelegateGroupID string `json:"delegate_group_id,omitempty"`
DelegateID string `json:"delegate_id,omitempty"`
DelegateIdentityHolderID string `json:"delegate_identity_holder_id,omitempty"`
DelegateName string `json:"delegate_name,omitempty"`
DelegateUserID string `json:"delegate_user_id,omitempty"`
Details string `json:"details,omitempty"`
DetailsJSON []interface{} `json:"details_json,omitempty"`
DisplayID string `json:"display_id,omitempty"`
DueDate models.DateTime `json:"due_date,omitempty"`
EnvironmentID string `json:"environment_id,omitempty"`
EnvironmentName string `json:"environment_name,omitempty"`
ExternalID string `json:"external_id,omitempty"`
ExternalUUID string `json:"external_uuid,omitempty"`
Impact enums.RiskImpact `json:"impact,omitempty"`
IntegrationID string `json:"integration_id,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
LastReviewedAt models.DateTime `json:"last_reviewed_at,omitempty"`
Likelihood enums.RiskLikelihood `json:"likelihood,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
MitigatedAt models.DateTime `json:"mitigated_at,omitempty"`
Mitigation string `json:"mitigation,omitempty"`
MitigationJSON []interface{} `json:"mitigation_json,omitempty"`
Name string `json:"name,omitempty"`
NextReviewDueAt models.DateTime `json:"next_review_due_at,omitempty"`
ObservedAt models.DateTime `json:"observed_at,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
ResidualScore int `json:"residual_score,omitempty"`
ReviewFrequency enums.Frequency `json:"review_frequency,omitempty"`
ReviewRequired bool `json:"review_required,omitempty"`
RiskCategoryID string `json:"risk_category_id,omitempty"`
RiskCategoryName string `json:"risk_category_name,omitempty"`
RiskDecision enums.RiskDecision `json:"risk_decision,omitempty"`
RiskKindID string `json:"risk_kind_id,omitempty"`
RiskKindName string `json:"risk_kind_name,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
ScopeName string `json:"scope_name,omitempty"`
Score int `json:"score,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
StakeholderGroupID string `json:"stakeholder_group_id,omitempty"`
StakeholderID string `json:"stakeholder_id,omitempty"`
StakeholderIdentityHolderID string `json:"stakeholder_identity_holder_id,omitempty"`
StakeholderName string `json:"stakeholder_name,omitempty"`
StakeholderUserID string `json:"stakeholder_user_id,omitempty"`
Status enums.RiskStatus `json:"status,omitempty"`
Tags []string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
WorkflowEligibleMarker bool `json:"workflow_eligible_marker,omitempty"`
}
RiskProjection is the flat, CEL- and jsonschema-facing view of a Risk: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Risk whose edge graph cannot be reflected
type ScanProjection ¶
type ScanProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
AssignedTo string `json:"assigned_to,omitempty"`
AssignedToGroupID string `json:"assigned_to_group_id,omitempty"`
AssignedToIdentityHolderID string `json:"assigned_to_identity_holder_id,omitempty"`
AssignedToUserID string `json:"assigned_to_user_id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
DiscoveredVulnerabilityIds []string `json:"discovered_vulnerability_ids,omitempty"`
EnvironmentID string `json:"environment_id,omitempty"`
EnvironmentName string `json:"environment_name,omitempty"`
ExternalID string `json:"external_id,omitempty"`
GeneratedByPlatformID string `json:"generated_by_platform_id,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
NextScanRunAt models.DateTime `json:"next_scan_run_at,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
PerformedBy string `json:"performed_by,omitempty"`
PerformedByGroupID string `json:"performed_by_group_id,omitempty"`
PerformedByUserID string `json:"performed_by_user_id,omitempty"`
ReviewedBy string `json:"reviewed_by,omitempty"`
ReviewedByGroupID string `json:"reviewed_by_group_id,omitempty"`
ReviewedByIdentityHolderID string `json:"reviewed_by_identity_holder_id,omitempty"`
ReviewedByUserID string `json:"reviewed_by_user_id,omitempty"`
ScanDate models.DateTime `json:"scan_date,omitempty"`
ScanSchedule models.Cron `json:"scan_schedule,omitempty"`
ScanType enums.ScanType `json:"scan_type,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
ScopeName string `json:"scope_name,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
Status enums.ScanStatus `json:"status,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
Tags []string `json:"tags,omitempty"`
Target string `json:"target,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
}
ScanProjection is the flat, CEL- and jsonschema-facing view of a Scan: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Scan whose edge graph cannot be reflected
type Schema ¶
type Schema struct {
SchemaDescriptor
// Create creates a new entity from a JSON input and returns the entity ID; emitted only for
// integration-mapped and catalog schemas, whose ingest upsert and adopt are the sole callers
Create func(ctx context.Context, client *generated.Client, input json.RawMessage) (string, error)
// Update applies a typed update input to an entity by ID; emitted only for integration-mapped
// and workflow-eligible schemas
Update func(ctx context.Context, client *generated.Client, entityID string, input json.RawMessage) error
// Query returns all entities of this schema within an organization as JSON; emitted only for
// integration-mapped schemas and link-rule targets, whose target selection is the sole caller
Query func(ctx context.Context, client *generated.Client, orgID string) ([]json.RawMessage, error)
// QueryByKey returns entities of this schema within an organization whose given snake_case
// field matches any of the provided values, pushing the predicate into the database; emitted
// only for integration-mapped schemas and link-rule targets with match-key columns
QueryByKey func(ctx context.Context, client *generated.Client, orgID string, field string, values []string) ([]json.RawMessage, error)
// OwnerField is the snake_case foreign-key field of the owner edge, empty for schemas without an owner
OwnerField string
// IntegrationFKField is the schema's mutable FK column to Integration, if any
IntegrationFKField string
// IntegrationM2MEdge is the name of the schema's to-many edge to Integration, if any
IntegrationM2MEdge string
// IntegrationRunM2MEdge is the name of the schema's to-many edge to IntegrationRun, if any
IntegrationRunM2MEdge string
// RemovedAtField is the snake_case name of the schema's SnapshotRemoval-annotated field, if any
RemovedAtField string
// RemovedAtEpisodic reports whether removal is a recurring observation rather than a permanent tombstone
RemovedAtEpisodic bool
// Lookup lists the schema's composite ingest lookup alternatives in order
Lookup []LookupAlternative
// InstanceScoped reports whether same-key records from different source instances are distinct rows
InstanceScoped bool
// QueryByLookup returns rows matching one of the given key tuples for a declared lookup alternative
QueryByLookup func(ctx context.Context, client *generated.Client, ownerID string, alternative int, keys []LookupValues) ([]json.RawMessage, error)
// SnapshotScope returns the non-removed rows one installation manages for a definition and instance
SnapshotScope func(ctx context.Context, client *generated.Client, ownerID, definitionID, instanceID, managedBy string) ([]json.RawMessage, error)
// MarkRemoved bulk-marks the given ids removed at the given time under the given integration run
MarkRemoved func(ctx context.Context, client *generated.Client, ids []string, at time.Time, runID string) error
// FillProvenance fills missing provenance on rows linked to the installation and reports rows written
FillProvenance func(ctx context.Context, client *generated.Client, installation *generated.Integration) (int, error)
// Load loads a single entity by ID and returns its JSON representation
Load func(ctx context.Context, client *generated.Client, entityID string) (json.RawMessage, error)
// LoadObject loads the native generated Ent object for consumers that require its interfaces;
// emitted only for workflow-eligible schemas, whose workflow object loading is the sole caller
LoadObject func(ctx context.Context, client *generated.Client, entityID string) (any, error)
// Fields is the unified field catalog for this schema, consumed by the workflow builder and the
// integration cross-link config; workflow-eligible and match-key views are filtered from it
Fields []FieldDescriptor
// AnonymousInputFields are the graphql input field names anonymous callers may set in create and update mutations,
// declared via entx.AnonymousField; empty when anonymous callers may not set any field
AnonymousInputFields []string
// Edges lists every edge to an entityops schema (and workflow group edges) for this schema
Edges []EdgeDescriptor
// TaskRules are schema-level (unconditional) suggested-task rules declared via entx.SchemaTaskRule
TaskRules []TaskRuleDescriptor
// ProjectionType is the reflect.Type of this schema's flat CEL/jsonschema projection struct
// ({Name}Projection); the registerable native-type view of the entity used for typed expressions.
// Projections are emitted only for integration-mapped, workflow-eligible, and link-target
// schemas, the schemas typed expression evaluation can reach; nil otherwise
ProjectionType reflect.Type
// Ingest is present when this schema supports mapped integration ingestion
Ingest *IngestCapability
// Catalog describes how organizations adopt this schema's system-owned rows, nil when unsupported
Catalog *CatalogCapability
// ConsoleRoute is present only when the schema explicitly declares a console route
ConsoleRoute *ConsoleRoute
// MentionSpec is present only when the schema explicitly declares mention scanning
MentionSpec *MentionSpec
// ApprovalSpec is present only when the schema explicitly declares approval fields
ApprovalSpec *ApprovalSpec
}
Schema is the runtime representation of a registered entity schema. It carries the schema identity and its operation closures. Load, Fields, and Edges are universal; the remaining closures are emitted only for schemas whose capabilities can reach them and are nil otherwise
func LookupSchema ¶
LookupSchema resolves a schema by any known name variation (PascalCase, snake_case, camelCase, or lowercase). Returns the schema and whether a match was found.
func TaskRuleEligibleSchemas ¶
func TaskRuleEligibleSchemas() []*Schema
TaskRuleEligibleSchemas returns every registered schema carrying at least one task rule
func WorkflowObjectFromRef ¶
func WorkflowObjectFromRef(ref *generated.WorkflowObjectRef) (*Schema, string, error)
WorkflowObjectFromRef resolves an object-reference row through the canonical edge catalog.
func (*Schema) Adopt ¶
func (s *Schema) Adopt(ctx context.Context, client *generated.Client, catalogID, ownerID string, overlay json.RawMessage) (id string, created bool, err error)
Adopt returns the organization's adopted row for the catalog row, creating it from the catalog fields plus overlay when absent; created reports whether a row was created
func (*Schema) AllTaskRules ¶
func (s *Schema) AllTaskRules() []FieldTaskRule
AllTaskRules returns every task rule registered on this schema, both schema-level and field-level, as a flat list pairing each rule with its source field
func (*Schema) ApplyWorkflowFields ¶
func (s *Schema) ApplyWorkflowFields(ctx context.Context, client *generated.Client, objectID string, updates map[string]any) error
ApplyWorkflowFields validates and applies workflow updates through the schema's existing updater.
func (*Schema) CoerceValue ¶
CoerceValue coerces a raw document value into the Go shape of the named field per its catalog type. Unknown and custom field types pass through unchanged so JSON unmarshalling into the typed create input remains the final arbiter
func (*Schema) DisplayField ¶
func (s *Schema) DisplayField() (FieldDescriptor, bool)
DisplayField returns the schema's display-name field; generation enforces at most one
func (*Schema) DisplayValue ¶
func (s *Schema) DisplayValue(row json.RawMessage) string
DisplayValue returns the display-name value from a loaded row, or empty when the schema declares no display field or the row lacks a value
func (*Schema) EdgeByName ¶
func (s *Schema) EdgeByName(name string) (EdgeDescriptor, bool)
EdgeByName returns the edge with the given name
func (*Schema) EmitIngest ¶
func (s *Schema) EmitIngest(ctx context.Context, runtime *gala.Gala, headers gala.Headers, request IngestRequest) error
EmitIngest queues one durable schema-ingest command.
func (*Schema) EnrichWorkflowPayload ¶
func (s *Schema) EnrichWorkflowPayload(ctx context.Context, client *generated.Client, objectID string, payload map[string]any) error
EnrichWorkflowPayload copies designated object fields into a webhook payload. Schemas without designated payload fields contribute only their object ID, preserving the existing contract.
func (*Schema) FieldByName ¶
func (s *Schema) FieldByName(name string) (FieldDescriptor, bool)
FieldByName returns the field descriptor addressed by a caller-supplied field or input name.
func (*Schema) FilterWorkflowInstances ¶
func (s *Schema) FilterWorkflowInstances(query *generated.WorkflowInstanceQuery, objectID string) (*generated.WorkflowInstanceQuery, error)
FilterWorkflowInstances restricts a workflow instance query to one object.
func (*Schema) FilterWorkflowObjectRefs ¶
func (s *Schema) FilterWorkflowObjectRefs(query *generated.WorkflowObjectRefQuery, objectID string) (*generated.WorkflowObjectRefQuery, error)
FilterWorkflowObjectRefs restricts an object-reference query to one object.
func (*Schema) LoadWorkflowObject ¶
func (s *Schema) LoadWorkflowObject(ctx context.Context, client *generated.Client, objectID string) (generated.Noder, error)
LoadWorkflowObject loads the native Ent node for a workflow-designated schema.
func (*Schema) Match ¶
func (s *Schema) Match(ctx context.Context, client *generated.Client, candidates ...MatchCandidate) (string, bool, error)
Match returns the id of the first visible catalog row matching a candidate in order
func (*Schema) MatchKeyField ¶
MatchKeyField reports whether field is a declared match-key column for this schema
func (*Schema) PersistIngest ¶
func (s *Schema) PersistIngest(ctx context.Context, client *generated.Client, integration *generated.Integration, payload json.RawMessage) (id string, changed bool, managed bool, err error)
PersistIngest prepares and persists one mapped record synchronously through the schema's bound persistence, sharing the preparation the durable ingest consumer applies
func (*Schema) RefreshAdopted ¶
func (s *Schema) RefreshAdopted(ctx context.Context, client *generated.Client, catalogID string) (int, error)
RefreshAdopted re-copies the catalog fields onto every row adopted from the catalog row and returns how many changed
func (*Schema) RelinkAdopted ¶
func (s *Schema) RelinkAdopted(ctx context.Context, client *generated.Client, catalogID string) (int, error)
RelinkAdopted points rows carrying the catalog row's key at it when their pointer is null or stale and returns how many moved
func (*Schema) ResolveInputKey ¶
ResolveInputKey resolves a caller-supplied field name to this schema's canonical create-input key. It accepts the mapping input key, the snake_case field name, or case variants of either; annotation-declared input keys win over raw field names. The returned key matches the create input's snake_case json tags so mapped payloads unmarshal without re-keying
func (*Schema) SetWorkflowInstanceObjectID ¶
func (s *Schema) SetWorkflowInstanceObjectID(builder *generated.WorkflowInstanceCreate, objectID string) error
SetWorkflowInstanceObjectID binds a workflow instance builder to an object using the canonical edge.
func (*Schema) SetWorkflowObjectRefObjectID ¶
func (s *Schema) SetWorkflowObjectRefObjectID(builder *generated.WorkflowObjectRefCreate, objectID string) error
SetWorkflowObjectRefObjectID binds an object-reference builder using the canonical edge.
func (*Schema) SoftDeletes ¶
SoftDeletes reports whether this schema soft-deletes rows via the deleted_at column
func (*Schema) SystemControlledOnly ¶
SystemControlledOnly reports whether the change set touches only system-controlled columns and edges
func (*Schema) TaskRuleEligible ¶
TaskRuleEligible reports whether the schema has any field-level or schema-level task rules
func (*Schema) Upsert ¶
func (s *Schema) Upsert(ctx context.Context, client *generated.Client, ownerID string, payload json.RawMessage) (id string, changed bool, managed bool, err error)
Upsert creates or updates the row matching the payload's lookup key through the ingest capability
func (*Schema) WorkflowChangeSet ¶
WorkflowChangeSet filters the canonical mutation delta to workflow-designated fields and edges.
func (*Schema) WorkflowEdges ¶
func (s *Schema) WorkflowEdges() []EdgeDescriptor
WorkflowEdges returns the workflow-eligible members of the schema's canonical edge catalog.
func (*Schema) WorkflowFields ¶
func (s *Schema) WorkflowFields() []FieldDescriptor
WorkflowFields returns the workflow-eligible members of the schema's canonical field catalog.
type SchemaDescriptor ¶
type SchemaDescriptor struct {
// Name is the PascalCase canonical form
Name string `json:"-"`
// Snake is the snake_case form
Snake string `json:"-"`
// Lower is the lowercase no-separator form used for fuzzy lookup
Lower string `json:"-"`
// WorkflowEligible reports whether this schema participates in workflow operations
WorkflowEligible bool `json:"-"`
}
SchemaDescriptor is the canonical identity for an entity schema
func (SchemaDescriptor) IsZero ¶
func (d SchemaDescriptor) IsZero() bool
IsZero reports whether the descriptor is unset
func (SchemaDescriptor) Label ¶
func (d SchemaDescriptor) Label() string
Label derives the human-readable schema label from the PascalCase name by inserting spaces at word boundaries, keeping acronym runs intact (TrustCenterNDARequest -> "Trust Center NDA Request")
func (SchemaDescriptor) MarshalJSON ¶
func (d SchemaDescriptor) MarshalJSON() ([]byte, error)
MarshalJSON serializes the descriptor as its snake_case form
func (SchemaDescriptor) String ¶
func (d SchemaDescriptor) String() string
String returns the PascalCase canonical name
func (*SchemaDescriptor) UnmarshalJSON ¶
func (d *SchemaDescriptor) UnmarshalJSON(data []byte) error
UnmarshalJSON deserializes a descriptor from any known name variation. An empty string deserializes to the zero descriptor so optional/omitted descriptor fields round-trip cleanly
type SchemaRef ¶
type SchemaRef struct {
// Schema is the schema name
Schema string
// Operation is the operation being performed
Operation string
// EntityID is the entity identifier when available
EntityID string
// Edge is the edge name when available
Edge string
}
SchemaRef carries schema and operation identity for structured log embedding
func (SchemaRef) MarshalZerologObject ¶
MarshalZerologObject implements zerolog.LogObjectMarshaler
type StandardProjection ¶
type StandardProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Description string `json:"description,omitempty"`
Domains []string `json:"domains,omitempty"`
Framework string `json:"framework,omitempty"`
FreeToUse bool `json:"free_to_use,omitempty"`
GoverningBody string `json:"governing_body,omitempty"`
GoverningBodyLogoURL string `json:"governing_body_logo_url,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
IsPublic bool `json:"is_public,omitempty"`
Link string `json:"link,omitempty"`
LogoFileID string `json:"logo_file_id,omitempty"`
Name string `json:"name,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
Revision string `json:"revision,omitempty"`
ShortName string `json:"short_name,omitempty"`
StandardType string `json:"standard_type,omitempty"`
Status enums.StandardStatus `json:"status,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
Tags []string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
Version string `json:"version,omitempty"`
}
StandardProjection is the flat, CEL- and jsonschema-facing view of a Standard: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Standard whose edge graph cannot be reflected
type SubcontrolProjection ¶
type SubcontrolProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
Aliases []string `json:"aliases,omitempty"`
AssessmentMethods []models.AssessmentMethod `json:"assessment_methods,omitempty"`
AssessmentObjectives []models.AssessmentObjective `json:"assessment_objectives,omitempty"`
AuditorReferenceID string `json:"auditor_reference_id,omitempty"`
Category string `json:"category,omitempty"`
CategoryID string `json:"category_id,omitempty"`
ControlID string `json:"control_id,omitempty"`
ControlOwnerID string `json:"control_owner_id,omitempty"`
ControlQuestions []string `json:"control_questions,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
DelegateID string `json:"delegate_id,omitempty"`
Description string `json:"description,omitempty"`
DescriptionJSON []interface{} `json:"description_json,omitempty"`
DisplayID string `json:"display_id,omitempty"`
EvidenceRequests []models.EvidenceRequests `json:"evidence_requests,omitempty"`
ExampleEvidence []models.ExampleEvidence `json:"example_evidence,omitempty"`
ExternalID string `json:"external_id,omitempty"`
ExternalUUID string `json:"external_uuid,omitempty"`
ImplementationDescription string `json:"implementation_description,omitempty"`
ImplementationGuidance []models.ImplementationGuidance `json:"implementation_guidance,omitempty"`
ImplementationStatus enums.ControlImplementationStatus `json:"implementation_status,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
MappedCategories []string `json:"mapped_categories,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
PublicRepresentation string `json:"public_representation,omitempty"`
RefCode string `json:"ref_code,omitempty"`
ReferenceFramework string `json:"reference_framework,omitempty"`
ReferenceFrameworkRevision string `json:"reference_framework_revision,omitempty"`
ReferenceID string `json:"reference_id,omitempty"`
References []models.Reference `json:"references,omitempty"`
ResponsiblePartyID string `json:"responsible_party_id,omitempty"`
Source enums.ControlSource `json:"source,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
SourceName string `json:"source_name,omitempty"`
Status enums.ControlStatus `json:"status,omitempty"`
Subcategory string `json:"subcategory,omitempty"`
SubcontrolKindID string `json:"subcontrol_kind_id,omitempty"`
SubcontrolKindName string `json:"subcontrol_kind_name,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
Tags []string `json:"tags,omitempty"`
TestingProcedures []models.TestingProcedures `json:"testing_procedures,omitempty"`
Title string `json:"title,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
WorkflowEligibleMarker bool `json:"workflow_eligible_marker,omitempty"`
}
SubcontrolProjection is the flat, CEL- and jsonschema-facing view of a Subcontrol: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Subcontrol whose edge graph cannot be reflected
type SubprocessorProjection ¶
type SubprocessorProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Description string `json:"description,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
LogoFileID string `json:"logo_file_id,omitempty"`
LogoRemoteURL string `json:"logo_remote_url,omitempty"`
Name string `json:"name,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
Tags []string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
}
SubprocessorProjection is the flat, CEL- and jsonschema-facing view of a Subprocessor: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Subprocessor whose edge graph cannot be reflected
type SubscriberProjection ¶
type SubscriberProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
Active bool `json:"active,omitempty"`
ContactID string `json:"contact_id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Email string `json:"email,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
PhoneNumber string `json:"phone_number,omitempty"`
SendAttempts int `json:"send_attempts,omitempty"`
Tags []string `json:"tags,omitempty"`
TrustCenterID string `json:"trust_center_id,omitempty"`
Unsubscribed bool `json:"unsubscribed,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
UserID string `json:"user_id,omitempty"`
VerifiedEmail bool `json:"verified_email,omitempty"`
VerifiedPhone bool `json:"verified_phone,omitempty"`
}
SubscriberProjection is the flat, CEL- and jsonschema-facing view of a Subscriber: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Subscriber whose edge graph cannot be reflected
type SystemDetailProjection ¶
type SystemDetailProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
AuthorizationBoundary string `json:"authorization_boundary,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Description string `json:"description,omitempty"`
DisplayID string `json:"display_id,omitempty"`
ExternalID string `json:"external_id,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
LastReviewed models.DateTime `json:"last_reviewed,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
OscalMetadataJSON map[string]interface{} `json:"oscal_metadata_json,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
RevisionHistory []interface{} `json:"revision_history,omitempty"`
SensitivityLevel enums.SystemSensitivityLevel `json:"sensitivity_level,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
SystemName string `json:"system_name,omitempty"`
Tags []string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
Version string `json:"version,omitempty"`
}
SystemDetailProjection is the flat, CEL- and jsonschema-facing view of a SystemDetail: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.SystemDetail whose edge graph cannot be reflected
type TagDefinitionProjection ¶
type TagDefinitionProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
Aliases []string `json:"aliases,omitempty"`
Color string `json:"color,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Description string `json:"description,omitempty"`
ExternalID string `json:"external_id,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
Name string `json:"name,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
Slug string `json:"slug,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
}
TagDefinitionProjection is the flat, CEL- and jsonschema-facing view of a TagDefinition: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.TagDefinition whose edge graph cannot be reflected
type TargetSelector ¶
type TargetSelector struct {
// Schema is the target entity schema
Schema SchemaDescriptor `json:"schema"`
// SourceSchema is the schema of the source entity in SourceContext; when set, selectTargets binds
// "source" as that schema's native projection type so source-aware expressions resolve typed fields
SourceSchema SchemaDescriptor `json:"source_schema,omitempty"`
// KeyMatch, when set, resolves candidates with an indexed key query before any Expression filtering
KeyMatch *KeyMatch `json:"key_match,omitempty"`
// Unique reports whether the edge this selector resolves for sets a single target
Unique bool `json:"unique,omitempty"`
// Expression is a CEL expression evaluated against each candidate entity
Expression string `json:"expression"`
// ExcludeIDs is a list of entity IDs to exclude from the result set
ExcludeIDs []string `json:"exclude_ids,omitempty"`
// SourceContext is optional JSON data for the source entity, exposed as "source" in CEL expressions
SourceContext json.RawMessage `json:"source_context,omitempty"`
}
TargetSelector specifies a set of entities to target via schema and expression
type TaskProjection ¶
type TaskProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
AssigneeID string `json:"assignee_id,omitempty"`
AssignerID string `json:"assigner_id,omitempty"`
Completed models.DateTime `json:"completed,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Details string `json:"details,omitempty"`
DetailsJSON []interface{} `json:"details_json,omitempty"`
DisplayID string `json:"display_id,omitempty"`
Due models.DateTime `json:"due,omitempty"`
EnvironmentID string `json:"environment_id,omitempty"`
EnvironmentName string `json:"environment_name,omitempty"`
ExternalID string `json:"external_id,omitempty"`
ExternalReferenceURL []string `json:"external_reference_url,omitempty"`
ExternalUUID string `json:"external_uuid,omitempty"`
IdempotencyKey string `json:"idempotency_key,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
IsSuggested bool `json:"is_suggested,omitempty"`
IsTemplate bool `json:"is_template,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
ParentTaskID string `json:"parent_task_id,omitempty"`
Priority int `json:"priority,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
ScopeName string `json:"scope_name,omitempty"`
Source string `json:"source,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
SourceKey string `json:"source_key,omitempty"`
Status enums.TaskStatus `json:"status,omitempty"`
SystemGenerated bool `json:"system_generated,omitempty"`
Tags []string `json:"tags,omitempty"`
TaskKindID string `json:"task_kind_id,omitempty"`
TaskKindName string `json:"task_kind_name,omitempty"`
Title string `json:"title,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
WorkflowEligibleMarker bool `json:"workflow_eligible_marker,omitempty"`
}
TaskProjection is the flat, CEL- and jsonschema-facing view of a Task: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Task whose edge graph cannot be reflected
type TaskRuleDescriptor ¶
type TaskRuleDescriptor struct {
// RuleID identifies which task template to render at rule evaluation time
RuleID string `json:"ruleId"`
// Expression is a CEL boolean expression evaluated with the owning field's decoded JSON value
// bound as "value" (e.g. "value.policies.has_existing == true"); empty always fires. Ignored
// when EachElement is set
Expression string `json:"expression,omitempty"`
// EachElement, when set, is a CEL expression resolving to a list within the field's value; the
// rule expands to fire once per element instead of evaluating Expression as a single boolean
EachElement string `json:"eachElement,omitempty"`
// Trigger selects create-and-update (empty) or create-only evaluation; compare against
// entx.TaskRuleOnCreateOnly / entx.TaskRuleOnCreateOrUpdate
Trigger entx.TaskRuleTrigger `json:"trigger,omitempty"`
}
TaskRuleDescriptor describes one suggested-task trigger: a CEL condition plus the RuleID a runtime engine uses to look up the task's template content
type TemplateProjection ¶
type TemplateProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
Description string `json:"description,omitempty"`
EnvironmentID string `json:"environment_id,omitempty"`
EnvironmentName string `json:"environment_name,omitempty"`
ExternalID string `json:"external_id,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
Jsonconfig map[string]interface{} `json:"jsonconfig,omitempty"`
Kind enums.TemplateKind `json:"kind,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
Name string `json:"name,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
ScopeName string `json:"scope_name,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
Tags []string `json:"tags,omitempty"`
TemplateType enums.DocumentType `json:"template_type,omitempty"`
TransformConfiguration models.TemplateProjectionConfig `json:"transform_configuration,omitempty"`
TrustCenterID string `json:"trust_center_id,omitempty"`
Uischema map[string]interface{} `json:"uischema,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
}
TemplateProjection is the flat, CEL- and jsonschema-facing view of a Template: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Template whose edge graph cannot be reflected
type TrustCenterProjection ¶
type TrustCenterProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
CustomDomainID string `json:"custom_domain_id,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
PirschAccessLink string `json:"pirsch_access_link,omitempty"`
PirschDomainID string `json:"pirsch_domain_id,omitempty"`
PirschIdentificationCode string `json:"pirsch_identification_code,omitempty"`
PreviewDomainID string `json:"preview_domain_id,omitempty"`
PreviewStatus enums.TrustCenterPreviewStatus `json:"preview_status,omitempty"`
Slug string `json:"slug,omitempty"`
SubprocessorURL string `json:"subprocessor_url,omitempty"`
Tags []string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
}
TrustCenterProjection is the flat, CEL- and jsonschema-facing view of a TrustCenter: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.TrustCenter whose edge graph cannot be reflected
type UserProjection ¶
type UserProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
AuthProvider enums.AuthProvider `json:"auth_provider,omitempty"`
AvatarLocalFileID string `json:"avatar_local_file_id,omitempty"`
AvatarRemoteURL string `json:"avatar_remote_url,omitempty"`
AvatarUpdatedAt time.Time `json:"avatar_updated_at,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
DisplayID string `json:"display_id,omitempty"`
DisplayName string `json:"display_name,omitempty"`
Email string `json:"email,omitempty"`
FirstName string `json:"first_name,omitempty"`
LastLoginProvider enums.AuthProvider `json:"last_login_provider,omitempty"`
LastName string `json:"last_name,omitempty"`
LastSeen time.Time `json:"last_seen,omitempty"`
Role enums.Role `json:"role,omitempty"`
ScimActive bool `json:"scim_active,omitempty"`
ScimExternalID string `json:"scim_external_id,omitempty"`
ScimLocale string `json:"scim_locale,omitempty"`
ScimPreferredLanguage string `json:"scim_preferred_language,omitempty"`
ScimUsername string `json:"scim_username,omitempty"`
Sub string `json:"sub,omitempty"`
Tags []string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
}
UserProjection is the flat, CEL- and jsonschema-facing view of a User: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.User whose edge graph cannot be reflected
type VendorRiskScoreProjection ¶
type VendorRiskScoreProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
Answer string `json:"answer,omitempty"`
AnswerType enums.VendorScoringAnswerType `json:"answer_type,omitempty"`
AssessmentResponseID string `json:"assessment_response_id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
EntityID string `json:"entity_id,omitempty"`
Impact enums.VendorRiskImpact `json:"impact,omitempty"`
Likelihood enums.VendorRiskLikelihood `json:"likelihood,omitempty"`
Notes string `json:"notes,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
QuestionCategory enums.VendorScoringCategory `json:"question_category,omitempty"`
QuestionDescription string `json:"question_description,omitempty"`
QuestionKey string `json:"question_key,omitempty"`
QuestionName string `json:"question_name,omitempty"`
Score float64 `json:"score,omitempty"`
Tags []string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
VendorScoringConfigID string `json:"vendor_scoring_config_id,omitempty"`
}
VendorRiskScoreProjection is the flat, CEL- and jsonschema-facing view of a VendorRiskScore: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.VendorRiskScore whose edge graph cannot be reflected
type VulnerabilityProjection ¶
type VulnerabilityProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
AssignedTo string `json:"assigned_to,omitempty"`
AssignedToGroupID string `json:"assigned_to_group_id,omitempty"`
AssignedToIdentityHolderID string `json:"assigned_to_identity_holder_id,omitempty"`
AssignedToUserID string `json:"assigned_to_user_id,omitempty"`
AutoDismissedAt models.DateTime `json:"auto_dismissed_at,omitempty"`
Blocking bool `json:"blocking,omitempty"`
Category string `json:"category,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
CveID string `json:"cve_id,omitempty"`
CweIds []string `json:"cwe_ids,omitempty"`
DependencyScope string `json:"dependency_scope,omitempty"`
Description string `json:"description,omitempty"`
DiscoveredAt models.DateTime `json:"discovered_at,omitempty"`
DismissedAt models.DateTime `json:"dismissed_at,omitempty"`
DismissedComment string `json:"dismissed_comment,omitempty"`
DismissedReason string `json:"dismissed_reason,omitempty"`
DisplayID string `json:"display_id,omitempty"`
DisplayName string `json:"display_name,omitempty"`
EnvironmentID string `json:"environment_id,omitempty"`
EnvironmentName string `json:"environment_name,omitempty"`
Exploitability float64 `json:"exploitability,omitempty"`
ExternalID string `json:"external_id,omitempty"`
ExternalOwnerID string `json:"external_owner_id,omitempty"`
ExternalURI string `json:"external_uri,omitempty"`
FirstPatchedVersion string `json:"first_patched_version,omitempty"`
FixAvailable bool `json:"fix_available,omitempty"`
FixedAt models.DateTime `json:"fixed_at,omitempty"`
Impact float64 `json:"impact,omitempty"`
Impacts []string `json:"impacts,omitempty"`
IntegrationRunID string `json:"integration_run_id,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
InternalOwner string `json:"internal_owner,omitempty"`
InternalOwnerGroupID string `json:"internal_owner_group_id,omitempty"`
InternalOwnerIdentityHolderID string `json:"internal_owner_identity_holder_id,omitempty"`
InternalOwnerUserID string `json:"internal_owner_user_id,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
ManifestPath string `json:"manifest_path,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
Open bool `json:"open,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
PackageEcosystem string `json:"package_ecosystem,omitempty"`
PackageName string `json:"package_name,omitempty"`
Priority string `json:"priority,omitempty"`
Production bool `json:"production,omitempty"`
Public bool `json:"public,omitempty"`
PublishedAt models.DateTime `json:"published_at,omitempty"`
RawPayload map[string]interface{} `json:"raw_payload,omitempty"`
References []string `json:"references,omitempty"`
RemediationSLA int `json:"remediation_sla,omitempty"`
ReviewedBy string `json:"reviewed_by,omitempty"`
ReviewedByGroupID string `json:"reviewed_by_group_id,omitempty"`
ReviewedByIdentityHolderID string `json:"reviewed_by_identity_holder_id,omitempty"`
ReviewedByUserID string `json:"reviewed_by_user_id,omitempty"`
ScopeID string `json:"scope_id,omitempty"`
ScopeName string `json:"scope_name,omitempty"`
Score float64 `json:"score,omitempty"`
SecurityLevel enums.SecurityLevel `json:"security_level,omitempty"`
Severity string `json:"severity,omitempty"`
Source string `json:"source,omitempty"`
SourceDefinitionID string `json:"source_definition_id,omitempty"`
SourceDefinitionVersion string `json:"source_definition_version,omitempty"`
SourceInstanceID string `json:"source_instance_id,omitempty"`
SourceUpdatedAt models.DateTime `json:"source_updated_at,omitempty"`
Summary string `json:"summary,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
Tags []string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
Validated bool `json:"validated,omitempty"`
Vector string `json:"vector,omitempty"`
VulnerabilityStatusID string `json:"vulnerability_status_id,omitempty"`
VulnerabilityStatusName string `json:"vulnerability_status_name,omitempty"`
VulnerableVersionRange string `json:"vulnerable_version_range,omitempty"`
WorkflowEligibleMarker bool `json:"workflow_eligible_marker,omitempty"`
}
VulnerabilityProjection is the flat, CEL- and jsonschema-facing view of a Vulnerability: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.Vulnerability whose edge graph cannot be reflected
type WorkflowDefinitionProjection ¶
type WorkflowDefinitionProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
Active bool `json:"active,omitempty"`
CooldownSeconds int `json:"cooldown_seconds,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
DefinitionJSON models.WorkflowDefinitionDocument `json:"definition_json,omitempty"`
Description string `json:"description,omitempty"`
DisplayID string `json:"display_id,omitempty"`
Draft bool `json:"draft,omitempty"`
InternalNotes string `json:"internal_notes,omitempty"`
IsDefault bool `json:"is_default,omitempty"`
Name string `json:"name,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
PublishedAt time.Time `json:"published_at,omitempty"`
Revision int `json:"revision,omitempty"`
SchemaType string `json:"schema_type,omitempty"`
SystemInternalID string `json:"system_internal_id,omitempty"`
SystemOwned bool `json:"system_owned,omitempty"`
Tags []string `json:"tags,omitempty"`
TrackedFields []string `json:"tracked_fields,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
WorkflowKind enums.WorkflowKind `json:"workflow_kind,omitempty"`
}
WorkflowDefinitionProjection is the flat, CEL- and jsonschema-facing view of a WorkflowDefinition: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.WorkflowDefinition whose edge graph cannot be reflected
type WorkflowInstanceProjection ¶
type WorkflowInstanceProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
ActionPlanID string `json:"action_plan_id,omitempty"`
AssessmentID string `json:"assessment_id,omitempty"`
AssessmentResponseID string `json:"assessment_response_id,omitempty"`
CampaignID string `json:"campaign_id,omitempty"`
CampaignTargetID string `json:"campaign_target_id,omitempty"`
Context models.WorkflowInstanceContext `json:"context,omitempty"`
ControlID string `json:"control_id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
CurrentActionIndex int `json:"current_action_index,omitempty"`
DefinitionSnapshot models.WorkflowDefinitionDocument `json:"definition_snapshot,omitempty"`
DisplayID string `json:"display_id,omitempty"`
EvidenceID string `json:"evidence_id,omitempty"`
FindingID string `json:"finding_id,omitempty"`
IdentityHolderID string `json:"identity_holder_id,omitempty"`
IntegrationID string `json:"integration_id,omitempty"`
InternalPolicyID string `json:"internal_policy_id,omitempty"`
LastEvaluatedAt time.Time `json:"last_evaluated_at,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
PlatformID string `json:"platform_id,omitempty"`
ProcedureID string `json:"procedure_id,omitempty"`
RemediationID string `json:"remediation_id,omitempty"`
RiskID string `json:"risk_id,omitempty"`
State enums.WorkflowInstanceState `json:"state,omitempty"`
SubcontrolID string `json:"subcontrol_id,omitempty"`
Tags []string `json:"tags,omitempty"`
TaskID string `json:"task_id,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
VulnerabilityID string `json:"vulnerability_id,omitempty"`
WorkflowDefinitionID string `json:"workflow_definition_id,omitempty"`
WorkflowProposalID string `json:"workflow_proposal_id,omitempty"`
}
WorkflowInstanceProjection is the flat, CEL- and jsonschema-facing view of a WorkflowInstance: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.WorkflowInstance whose edge graph cannot be reflected
type WorkflowObjectRefProjection ¶
type WorkflowObjectRefProjection struct {
// ID is the entity identifier, exposed to expressions as "id"
ID string `json:"id,omitempty"`
ActionPlanID string `json:"action_plan_id,omitempty"`
AssessmentID string `json:"assessment_id,omitempty"`
AssessmentResponseID string `json:"assessment_response_id,omitempty"`
CampaignID string `json:"campaign_id,omitempty"`
CampaignTargetID string `json:"campaign_target_id,omitempty"`
ControlID string `json:"control_id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
DirectoryAccountID string `json:"directory_account_id,omitempty"`
DirectoryGroupID string `json:"directory_group_id,omitempty"`
DirectoryMembershipID string `json:"directory_membership_id,omitempty"`
DisplayID string `json:"display_id,omitempty"`
EvidenceID string `json:"evidence_id,omitempty"`
FindingID string `json:"finding_id,omitempty"`
IdentityHolderID string `json:"identity_holder_id,omitempty"`
InternalPolicyID string `json:"internal_policy_id,omitempty"`
OwnerID string `json:"owner_id,omitempty"`
PlatformID string `json:"platform_id,omitempty"`
ProcedureID string `json:"procedure_id,omitempty"`
RemediationID string `json:"remediation_id,omitempty"`
RiskID string `json:"risk_id,omitempty"`
SubcontrolID string `json:"subcontrol_id,omitempty"`
TaskID string `json:"task_id,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
UpdatedByImpersonator string `json:"updated_by_impersonator,omitempty"`
VulnerabilityID string `json:"vulnerability_id,omitempty"`
WorkflowInstanceID string `json:"workflow_instance_id,omitempty"`
}
WorkflowObjectRefProjection is the flat, CEL- and jsonschema-facing view of a WorkflowObjectRef: its readable scalar fields (id, columns, foreign-key ids) with snake_case json tags matching the field names used in expressions. It deliberately omits edges so it registers as a CEL native type, unlike the full generated.WorkflowObjectRef whose edge graph cannot be reflected