Documentation
¶
Index ¶
- func FixedError(err error) generated.Hook
- func If(hk generated.Hook, cond Condition) generated.Hook
- func On(hk generated.Hook, op generated.Op) generated.Hook
- func Reject(op generated.Op) generated.Hook
- func Unless(hk generated.Hook, op generated.Op) generated.Hook
- type APITokenFunc
- type ActionPlanFunc
- type AssessmentFunc
- type AssessmentResponseFunc
- type AssetFunc
- type Chain
- type Condition
- func And(first, second Condition, rest ...Condition) Condition
- func HasAddedFields(field string, fields ...string) Condition
- func HasClearedFields(field string, fields ...string) Condition
- func HasFields(field string, fields ...string) Condition
- func HasOp(op generated.Op) Condition
- func Not(cond Condition) Condition
- func Or(first, second Condition, rest ...Condition) Condition
- type ContactFunc
- type ControlFunc
- type ControlImplementationFunc
- type ControlObjectiveFunc
- type CustomDomainFunc
- type CustomTypeEnumFunc
- type DNSVerificationFunc
- type DirectoryAccountFunc
- type DirectoryGroupFunc
- type DirectoryMembershipFunc
- type DirectorySyncRunFunc
- type DiscussionFunc
- type DocumentDataFunc
- type EmailVerificationTokenFunc
- type EntityFunc
- type EntityTypeFunc
- type EventFunc
- type EvidenceFunc
- type ExportFunc
- type FileDownloadTokenFunc
- type FileFunc
- type FindingControlFunc
- type FindingFunc
- type GroupFunc
- type GroupMembershipFunc
- type GroupSettingFunc
- type HushFunc
- type ImpersonationEventFunc
- type IntegrationFunc
- type InternalPolicyFunc
- type InviteFunc
- type JobResultFunc
- type JobRunnerFunc
- type JobRunnerRegistrationTokenFunc
- type JobRunnerTokenFunc
- type JobTemplateFunc
- type MappableDomainFunc
- type MappedControlFunc
- type NarrativeFunc
- type NoteFunc
- type NotificationFunc
- type OnboardingFunc
- type OrgMembershipFunc
- type OrgModuleFunc
- type OrgPriceFunc
- type OrgProductFunc
- type OrgSubscriptionFunc
- type OrganizationFunc
- type OrganizationSettingFunc
- type PasswordResetTokenFunc
- type PersonalAccessTokenFunc
- type ProcedureFunc
- type ProgramFunc
- type ProgramMembershipFunc
- type RemediationFunc
- type ReviewFunc
- type RiskFunc
- type ScanFunc
- type ScheduledJobFunc
- type ScheduledJobRunFunc
- type StandardFunc
- type SubcontrolFunc
- type SubprocessorFunc
- type SubscriberFunc
- type TFASettingFunc
- type TagDefinitionFunc
- type TaskFunc
- type TemplateFunc
- type TrustCenterComplianceFunc
- type TrustCenterDocFunc
- type TrustCenterFunc
- type TrustCenterSettingFunc
- type TrustCenterSubprocessorFunc
- type TrustCenterWatermarkConfigFunc
- type TrustcenterEntityFunc
- type UserFunc
- type UserSettingFunc
- type VulnerabilityFunc
- type WebauthnFunc
- type WorkflowAssignmentFunc
- type WorkflowAssignmentTargetFunc
- type WorkflowDefinitionFunc
- type WorkflowEventFunc
- type WorkflowInstanceFunc
- type WorkflowObjectRefFunc
- type WorkflowProposalFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FixedError ¶
FixedError is a hook returning a fixed error.
func If ¶
If executes the given hook under condition.
hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
func On ¶
On executes the given hook only for the given operation.
hook.On(Log, generated.Delete|generated.Create)
Types ¶
type APITokenFunc ¶
The APITokenFunc type is an adapter to allow the use of ordinary function as APIToken mutator.
type ActionPlanFunc ¶ added in v0.3.3
The ActionPlanFunc type is an adapter to allow the use of ordinary function as ActionPlan mutator.
type AssessmentFunc ¶ added in v0.42.6
The AssessmentFunc type is an adapter to allow the use of ordinary function as Assessment mutator.
type AssessmentResponseFunc ¶ added in v0.42.6
type AssessmentResponseFunc func(context.Context, *generated.AssessmentResponseMutation) (generated.Value, error)
The AssessmentResponseFunc type is an adapter to allow the use of ordinary function as AssessmentResponse mutator.
type AssetFunc ¶ added in v0.19.0
The AssetFunc type is an adapter to allow the use of ordinary function as Asset mutator.
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
Chain acts as a list of hooks and is effectively immutable. Once created, it will always hold the same set of hooks in the same order.
func (Chain) Append ¶
Append extends a chain, adding the specified hook as the last ones in the mutation flow.
type Condition ¶
Condition is a hook condition function.
func HasAddedFields ¶
HasAddedFields is a condition validating `.AddedField` on fields.
func HasClearedFields ¶
HasClearedFields is a condition validating `.FieldCleared` on fields.
type ContactFunc ¶
The ContactFunc type is an adapter to allow the use of ordinary function as Contact mutator.
type ControlFunc ¶ added in v0.3.3
The ControlFunc type is an adapter to allow the use of ordinary function as Control mutator.
type ControlImplementationFunc ¶ added in v0.7.3
type ControlImplementationFunc func(context.Context, *generated.ControlImplementationMutation) (generated.Value, error)
The ControlImplementationFunc type is an adapter to allow the use of ordinary function as ControlImplementation mutator.
type ControlObjectiveFunc ¶ added in v0.3.3
type ControlObjectiveFunc func(context.Context, *generated.ControlObjectiveMutation) (generated.Value, error)
The ControlObjectiveFunc type is an adapter to allow the use of ordinary function as ControlObjective mutator.
type CustomDomainFunc ¶ added in v0.12.1
type CustomDomainFunc func(context.Context, *generated.CustomDomainMutation) (generated.Value, error)
The CustomDomainFunc type is an adapter to allow the use of ordinary function as CustomDomain mutator.
type CustomTypeEnumFunc ¶ added in v0.43.0
type CustomTypeEnumFunc func(context.Context, *generated.CustomTypeEnumMutation) (generated.Value, error)
The CustomTypeEnumFunc type is an adapter to allow the use of ordinary function as CustomTypeEnum mutator.
type DNSVerificationFunc ¶ added in v0.15.0
type DNSVerificationFunc func(context.Context, *generated.DNSVerificationMutation) (generated.Value, error)
The DNSVerificationFunc type is an adapter to allow the use of ordinary function as DNSVerification mutator.
type DirectoryAccountFunc ¶ added in v0.46.3
type DirectoryAccountFunc func(context.Context, *generated.DirectoryAccountMutation) (generated.Value, error)
The DirectoryAccountFunc type is an adapter to allow the use of ordinary function as DirectoryAccount mutator.
type DirectoryGroupFunc ¶ added in v0.46.3
type DirectoryGroupFunc func(context.Context, *generated.DirectoryGroupMutation) (generated.Value, error)
The DirectoryGroupFunc type is an adapter to allow the use of ordinary function as DirectoryGroup mutator.
type DirectoryMembershipFunc ¶ added in v0.46.3
type DirectoryMembershipFunc func(context.Context, *generated.DirectoryMembershipMutation) (generated.Value, error)
The DirectoryMembershipFunc type is an adapter to allow the use of ordinary function as DirectoryMembership mutator.
type DirectorySyncRunFunc ¶ added in v0.46.3
type DirectorySyncRunFunc func(context.Context, *generated.DirectorySyncRunMutation) (generated.Value, error)
The DirectorySyncRunFunc type is an adapter to allow the use of ordinary function as DirectorySyncRun mutator.
type DiscussionFunc ¶ added in v0.49.3
The DiscussionFunc type is an adapter to allow the use of ordinary function as Discussion mutator.
type DocumentDataFunc ¶
type DocumentDataFunc func(context.Context, *generated.DocumentDataMutation) (generated.Value, error)
The DocumentDataFunc type is an adapter to allow the use of ordinary function as DocumentData mutator.
type EmailVerificationTokenFunc ¶
type EmailVerificationTokenFunc func(context.Context, *generated.EmailVerificationTokenMutation) (generated.Value, error)
The EmailVerificationTokenFunc type is an adapter to allow the use of ordinary function as EmailVerificationToken mutator.
type EntityFunc ¶
The EntityFunc type is an adapter to allow the use of ordinary function as Entity mutator.
type EntityTypeFunc ¶
The EntityTypeFunc type is an adapter to allow the use of ordinary function as EntityType mutator.
type EventFunc ¶
The EventFunc type is an adapter to allow the use of ordinary function as Event mutator.
type EvidenceFunc ¶ added in v0.6.19
The EvidenceFunc type is an adapter to allow the use of ordinary function as Evidence mutator.
type ExportFunc ¶ added in v0.22.3
The ExportFunc type is an adapter to allow the use of ordinary function as Export mutator.
type FileDownloadTokenFunc ¶ added in v0.39.2
type FileDownloadTokenFunc func(context.Context, *generated.FileDownloadTokenMutation) (generated.Value, error)
The FileDownloadTokenFunc type is an adapter to allow the use of ordinary function as FileDownloadToken mutator.
type FileFunc ¶
The FileFunc type is an adapter to allow the use of ordinary function as File mutator.
type FindingControlFunc ¶ added in v0.43.3
type FindingControlFunc func(context.Context, *generated.FindingControlMutation) (generated.Value, error)
The FindingControlFunc type is an adapter to allow the use of ordinary function as FindingControl mutator.
type FindingFunc ¶ added in v0.43.3
The FindingFunc type is an adapter to allow the use of ordinary function as Finding mutator.
type GroupFunc ¶
The GroupFunc type is an adapter to allow the use of ordinary function as Group mutator.
type GroupMembershipFunc ¶
type GroupMembershipFunc func(context.Context, *generated.GroupMembershipMutation) (generated.Value, error)
The GroupMembershipFunc type is an adapter to allow the use of ordinary function as GroupMembership mutator.
type GroupSettingFunc ¶
type GroupSettingFunc func(context.Context, *generated.GroupSettingMutation) (generated.Value, error)
The GroupSettingFunc type is an adapter to allow the use of ordinary function as GroupSetting mutator.
type HushFunc ¶
The HushFunc type is an adapter to allow the use of ordinary function as Hush mutator.
type ImpersonationEventFunc ¶ added in v0.38.1
type ImpersonationEventFunc func(context.Context, *generated.ImpersonationEventMutation) (generated.Value, error)
The ImpersonationEventFunc type is an adapter to allow the use of ordinary function as ImpersonationEvent mutator.
type IntegrationFunc ¶
The IntegrationFunc type is an adapter to allow the use of ordinary function as Integration mutator.
type InternalPolicyFunc ¶ added in v0.3.3
type InternalPolicyFunc func(context.Context, *generated.InternalPolicyMutation) (generated.Value, error)
The InternalPolicyFunc type is an adapter to allow the use of ordinary function as InternalPolicy mutator.
type InviteFunc ¶
The InviteFunc type is an adapter to allow the use of ordinary function as Invite mutator.
type JobResultFunc ¶ added in v0.15.0
The JobResultFunc type is an adapter to allow the use of ordinary function as JobResult mutator.
type JobRunnerFunc ¶ added in v0.14.1
The JobRunnerFunc type is an adapter to allow the use of ordinary function as JobRunner mutator.
type JobRunnerRegistrationTokenFunc ¶ added in v0.14.1
type JobRunnerRegistrationTokenFunc func(context.Context, *generated.JobRunnerRegistrationTokenMutation) (generated.Value, error)
The JobRunnerRegistrationTokenFunc type is an adapter to allow the use of ordinary function as JobRunnerRegistrationToken mutator.
type JobRunnerTokenFunc ¶ added in v0.14.1
type JobRunnerTokenFunc func(context.Context, *generated.JobRunnerTokenMutation) (generated.Value, error)
The JobRunnerTokenFunc type is an adapter to allow the use of ordinary function as JobRunnerToken mutator.
type JobTemplateFunc ¶ added in v0.24.0
The JobTemplateFunc type is an adapter to allow the use of ordinary function as JobTemplate mutator.
type MappableDomainFunc ¶ added in v0.12.1
type MappableDomainFunc func(context.Context, *generated.MappableDomainMutation) (generated.Value, error)
The MappableDomainFunc type is an adapter to allow the use of ordinary function as MappableDomain mutator.
type MappedControlFunc ¶ added in v0.7.3
type MappedControlFunc func(context.Context, *generated.MappedControlMutation) (generated.Value, error)
The MappedControlFunc type is an adapter to allow the use of ordinary function as MappedControl mutator.
type NarrativeFunc ¶ added in v0.3.3
The NarrativeFunc type is an adapter to allow the use of ordinary function as Narrative mutator.
type NoteFunc ¶
The NoteFunc type is an adapter to allow the use of ordinary function as Note mutator.
type NotificationFunc ¶ added in v0.45.13
type NotificationFunc func(context.Context, *generated.NotificationMutation) (generated.Value, error)
The NotificationFunc type is an adapter to allow the use of ordinary function as Notification mutator.
type OnboardingFunc ¶ added in v0.6.24
The OnboardingFunc type is an adapter to allow the use of ordinary function as Onboarding mutator.
type OrgMembershipFunc ¶
type OrgMembershipFunc func(context.Context, *generated.OrgMembershipMutation) (generated.Value, error)
The OrgMembershipFunc type is an adapter to allow the use of ordinary function as OrgMembership mutator.
type OrgModuleFunc ¶ added in v0.18.4
The OrgModuleFunc type is an adapter to allow the use of ordinary function as OrgModule mutator.
type OrgPriceFunc ¶ added in v0.18.4
The OrgPriceFunc type is an adapter to allow the use of ordinary function as OrgPrice mutator.
type OrgProductFunc ¶ added in v0.18.4
The OrgProductFunc type is an adapter to allow the use of ordinary function as OrgProduct mutator.
type OrgSubscriptionFunc ¶ added in v0.5.1
type OrgSubscriptionFunc func(context.Context, *generated.OrgSubscriptionMutation) (generated.Value, error)
The OrgSubscriptionFunc type is an adapter to allow the use of ordinary function as OrgSubscription mutator.
type OrganizationFunc ¶
type OrganizationFunc func(context.Context, *generated.OrganizationMutation) (generated.Value, error)
The OrganizationFunc type is an adapter to allow the use of ordinary function as Organization mutator.
type OrganizationSettingFunc ¶
type OrganizationSettingFunc func(context.Context, *generated.OrganizationSettingMutation) (generated.Value, error)
The OrganizationSettingFunc type is an adapter to allow the use of ordinary function as OrganizationSetting mutator.
type PasswordResetTokenFunc ¶
type PasswordResetTokenFunc func(context.Context, *generated.PasswordResetTokenMutation) (generated.Value, error)
The PasswordResetTokenFunc type is an adapter to allow the use of ordinary function as PasswordResetToken mutator.
type PersonalAccessTokenFunc ¶
type PersonalAccessTokenFunc func(context.Context, *generated.PersonalAccessTokenMutation) (generated.Value, error)
The PersonalAccessTokenFunc type is an adapter to allow the use of ordinary function as PersonalAccessToken mutator.
type ProcedureFunc ¶ added in v0.3.3
The ProcedureFunc type is an adapter to allow the use of ordinary function as Procedure mutator.
type ProgramFunc ¶ added in v0.3.5
The ProgramFunc type is an adapter to allow the use of ordinary function as Program mutator.
type ProgramMembershipFunc ¶ added in v0.3.5
type ProgramMembershipFunc func(context.Context, *generated.ProgramMembershipMutation) (generated.Value, error)
The ProgramMembershipFunc type is an adapter to allow the use of ordinary function as ProgramMembership mutator.
type RemediationFunc ¶ added in v0.43.3
The RemediationFunc type is an adapter to allow the use of ordinary function as Remediation mutator.
type ReviewFunc ¶ added in v0.43.3
The ReviewFunc type is an adapter to allow the use of ordinary function as Review mutator.
type RiskFunc ¶ added in v0.3.3
The RiskFunc type is an adapter to allow the use of ordinary function as Risk mutator.
type ScanFunc ¶ added in v0.19.0
The ScanFunc type is an adapter to allow the use of ordinary function as Scan mutator.
type ScheduledJobFunc ¶ added in v0.15.0
type ScheduledJobFunc func(context.Context, *generated.ScheduledJobMutation) (generated.Value, error)
The ScheduledJobFunc type is an adapter to allow the use of ordinary function as ScheduledJob mutator.
type ScheduledJobRunFunc ¶ added in v0.15.0
type ScheduledJobRunFunc func(context.Context, *generated.ScheduledJobRunMutation) (generated.Value, error)
The ScheduledJobRunFunc type is an adapter to allow the use of ordinary function as ScheduledJobRun mutator.
type StandardFunc ¶ added in v0.3.3
The StandardFunc type is an adapter to allow the use of ordinary function as Standard mutator.
type SubcontrolFunc ¶ added in v0.3.3
The SubcontrolFunc type is an adapter to allow the use of ordinary function as Subcontrol mutator.
type SubprocessorFunc ¶ added in v0.22.2
type SubprocessorFunc func(context.Context, *generated.SubprocessorMutation) (generated.Value, error)
The SubprocessorFunc type is an adapter to allow the use of ordinary function as Subprocessor mutator.
type SubscriberFunc ¶
The SubscriberFunc type is an adapter to allow the use of ordinary function as Subscriber mutator.
type TFASettingFunc ¶
The TFASettingFunc type is an adapter to allow the use of ordinary function as TFASetting mutator.
type TagDefinitionFunc ¶ added in v0.43.0
type TagDefinitionFunc func(context.Context, *generated.TagDefinitionMutation) (generated.Value, error)
The TagDefinitionFunc type is an adapter to allow the use of ordinary function as TagDefinition mutator.
type TaskFunc ¶ added in v0.3.4
The TaskFunc type is an adapter to allow the use of ordinary function as Task mutator.
type TemplateFunc ¶
The TemplateFunc type is an adapter to allow the use of ordinary function as Template mutator.
type TrustCenterComplianceFunc ¶ added in v0.23.1
type TrustCenterComplianceFunc func(context.Context, *generated.TrustCenterComplianceMutation) (generated.Value, error)
The TrustCenterComplianceFunc type is an adapter to allow the use of ordinary function as TrustCenterCompliance mutator.
type TrustCenterDocFunc ¶ added in v0.33.6
type TrustCenterDocFunc func(context.Context, *generated.TrustCenterDocMutation) (generated.Value, error)
The TrustCenterDocFunc type is an adapter to allow the use of ordinary function as TrustCenterDoc mutator.
type TrustCenterFunc ¶ added in v0.19.0
The TrustCenterFunc type is an adapter to allow the use of ordinary function as TrustCenter mutator.
type TrustCenterSettingFunc ¶ added in v0.19.0
type TrustCenterSettingFunc func(context.Context, *generated.TrustCenterSettingMutation) (generated.Value, error)
The TrustCenterSettingFunc type is an adapter to allow the use of ordinary function as TrustCenterSetting mutator.
type TrustCenterSubprocessorFunc ¶ added in v0.22.2
type TrustCenterSubprocessorFunc func(context.Context, *generated.TrustCenterSubprocessorMutation) (generated.Value, error)
The TrustCenterSubprocessorFunc type is an adapter to allow the use of ordinary function as TrustCenterSubprocessor mutator.
type TrustCenterWatermarkConfigFunc ¶ added in v0.34.5
type TrustCenterWatermarkConfigFunc func(context.Context, *generated.TrustCenterWatermarkConfigMutation) (generated.Value, error)
The TrustCenterWatermarkConfigFunc type is an adapter to allow the use of ordinary function as TrustCenterWatermarkConfig mutator.
type TrustcenterEntityFunc ¶ added in v0.47.5
type TrustcenterEntityFunc func(context.Context, *generated.TrustcenterEntityMutation) (generated.Value, error)
The TrustcenterEntityFunc type is an adapter to allow the use of ordinary function as TrustcenterEntity mutator.
type UserFunc ¶
The UserFunc type is an adapter to allow the use of ordinary function as User mutator.
type UserSettingFunc ¶
The UserSettingFunc type is an adapter to allow the use of ordinary function as UserSetting mutator.
type VulnerabilityFunc ¶ added in v0.43.3
type VulnerabilityFunc func(context.Context, *generated.VulnerabilityMutation) (generated.Value, error)
The VulnerabilityFunc type is an adapter to allow the use of ordinary function as Vulnerability mutator.
type WebauthnFunc ¶
The WebauthnFunc type is an adapter to allow the use of ordinary function as Webauthn mutator.
type WorkflowAssignmentFunc ¶ added in v0.46.3
type WorkflowAssignmentFunc func(context.Context, *generated.WorkflowAssignmentMutation) (generated.Value, error)
The WorkflowAssignmentFunc type is an adapter to allow the use of ordinary function as WorkflowAssignment mutator.
type WorkflowAssignmentTargetFunc ¶ added in v0.46.3
type WorkflowAssignmentTargetFunc func(context.Context, *generated.WorkflowAssignmentTargetMutation) (generated.Value, error)
The WorkflowAssignmentTargetFunc type is an adapter to allow the use of ordinary function as WorkflowAssignmentTarget mutator.
type WorkflowDefinitionFunc ¶ added in v0.46.3
type WorkflowDefinitionFunc func(context.Context, *generated.WorkflowDefinitionMutation) (generated.Value, error)
The WorkflowDefinitionFunc type is an adapter to allow the use of ordinary function as WorkflowDefinition mutator.
type WorkflowEventFunc ¶ added in v0.46.3
type WorkflowEventFunc func(context.Context, *generated.WorkflowEventMutation) (generated.Value, error)
The WorkflowEventFunc type is an adapter to allow the use of ordinary function as WorkflowEvent mutator.
type WorkflowInstanceFunc ¶ added in v0.46.3
type WorkflowInstanceFunc func(context.Context, *generated.WorkflowInstanceMutation) (generated.Value, error)
The WorkflowInstanceFunc type is an adapter to allow the use of ordinary function as WorkflowInstance mutator.
type WorkflowObjectRefFunc ¶ added in v0.46.3
type WorkflowObjectRefFunc func(context.Context, *generated.WorkflowObjectRefMutation) (generated.Value, error)
The WorkflowObjectRefFunc type is an adapter to allow the use of ordinary function as WorkflowObjectRef mutator.
type WorkflowProposalFunc ¶ added in v0.52.0
type WorkflowProposalFunc func(context.Context, *generated.WorkflowProposalMutation) (generated.Value, error)
The WorkflowProposalFunc type is an adapter to allow the use of ordinary function as WorkflowProposal mutator.