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 ActionPlanHistoryFunc
- 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 ContactHistoryFunc
- type ControlFunc
- type ControlHistoryFunc
- type ControlObjectiveFunc
- type ControlObjectiveHistoryFunc
- type DocumentDataFunc
- type DocumentDataHistoryFunc
- type EmailVerificationTokenFunc
- type EntitlementFunc
- type EntitlementHistoryFunc
- type EntitlementPlanFeatureFunc
- type EntitlementPlanFeatureHistoryFunc
- type EntitlementPlanFunc
- type EntitlementPlanHistoryFunc
- type EntityFunc
- type EntityHistoryFunc
- type EntityTypeFunc
- type EntityTypeHistoryFunc
- type EventFunc
- type EventHistoryFunc
- type FeatureFunc
- type FeatureHistoryFunc
- type FileFunc
- type FileHistoryFunc
- type GroupFunc
- type GroupHistoryFunc
- type GroupMembershipFunc
- type GroupMembershipHistoryFunc
- type GroupSettingFunc
- type GroupSettingHistoryFunc
- type HushFunc
- type HushHistoryFunc
- type IntegrationFunc
- type IntegrationHistoryFunc
- type InternalPolicyFunc
- type InternalPolicyHistoryFunc
- type InviteFunc
- type NarrativeFunc
- type NarrativeHistoryFunc
- type NoteFunc
- type NoteHistoryFunc
- type OauthProviderFunc
- type OauthProviderHistoryFunc
- type OhAuthTooTokenFunc
- type OrgMembershipFunc
- type OrgMembershipHistoryFunc
- type OrganizationFunc
- type OrganizationHistoryFunc
- type OrganizationSettingFunc
- type OrganizationSettingHistoryFunc
- type PasswordResetTokenFunc
- type PersonalAccessTokenFunc
- type ProcedureFunc
- type ProcedureHistoryFunc
- type RiskFunc
- type RiskHistoryFunc
- type StandardFunc
- type StandardHistoryFunc
- type SubcontrolFunc
- type SubcontrolHistoryFunc
- type SubscriberFunc
- type TFASettingFunc
- type TemplateFunc
- type TemplateHistoryFunc
- type UserFunc
- type UserHistoryFunc
- type UserSettingFunc
- type UserSettingHistoryFunc
- type WebauthnFunc
- type WebhookFunc
- type WebhookHistoryFunc
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 ActionPlanHistoryFunc ¶ added in v0.3.3
type ActionPlanHistoryFunc func(context.Context, *generated.ActionPlanHistoryMutation) (generated.Value, error)
The ActionPlanHistoryFunc type is an adapter to allow the use of ordinary function as ActionPlanHistory 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 ContactHistoryFunc ¶
type ContactHistoryFunc func(context.Context, *generated.ContactHistoryMutation) (generated.Value, error)
The ContactHistoryFunc type is an adapter to allow the use of ordinary function as ContactHistory 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 ControlHistoryFunc ¶ added in v0.3.3
type ControlHistoryFunc func(context.Context, *generated.ControlHistoryMutation) (generated.Value, error)
The ControlHistoryFunc type is an adapter to allow the use of ordinary function as ControlHistory 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 ControlObjectiveHistoryFunc ¶ added in v0.3.3
type ControlObjectiveHistoryFunc func(context.Context, *generated.ControlObjectiveHistoryMutation) (generated.Value, error)
The ControlObjectiveHistoryFunc type is an adapter to allow the use of ordinary function as ControlObjectiveHistory 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 DocumentDataHistoryFunc ¶
type DocumentDataHistoryFunc func(context.Context, *generated.DocumentDataHistoryMutation) (generated.Value, error)
The DocumentDataHistoryFunc type is an adapter to allow the use of ordinary function as DocumentDataHistory 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 EntitlementFunc ¶
The EntitlementFunc type is an adapter to allow the use of ordinary function as Entitlement mutator.
type EntitlementHistoryFunc ¶
type EntitlementHistoryFunc func(context.Context, *generated.EntitlementHistoryMutation) (generated.Value, error)
The EntitlementHistoryFunc type is an adapter to allow the use of ordinary function as EntitlementHistory mutator.
type EntitlementPlanFeatureFunc ¶
type EntitlementPlanFeatureFunc func(context.Context, *generated.EntitlementPlanFeatureMutation) (generated.Value, error)
The EntitlementPlanFeatureFunc type is an adapter to allow the use of ordinary function as EntitlementPlanFeature mutator.
type EntitlementPlanFeatureHistoryFunc ¶
type EntitlementPlanFeatureHistoryFunc func(context.Context, *generated.EntitlementPlanFeatureHistoryMutation) (generated.Value, error)
The EntitlementPlanFeatureHistoryFunc type is an adapter to allow the use of ordinary function as EntitlementPlanFeatureHistory mutator.
type EntitlementPlanFunc ¶
type EntitlementPlanFunc func(context.Context, *generated.EntitlementPlanMutation) (generated.Value, error)
The EntitlementPlanFunc type is an adapter to allow the use of ordinary function as EntitlementPlan mutator.
type EntitlementPlanHistoryFunc ¶
type EntitlementPlanHistoryFunc func(context.Context, *generated.EntitlementPlanHistoryMutation) (generated.Value, error)
The EntitlementPlanHistoryFunc type is an adapter to allow the use of ordinary function as EntitlementPlanHistory mutator.
type EntityFunc ¶
The EntityFunc type is an adapter to allow the use of ordinary function as Entity mutator.
type EntityHistoryFunc ¶
type EntityHistoryFunc func(context.Context, *generated.EntityHistoryMutation) (generated.Value, error)
The EntityHistoryFunc type is an adapter to allow the use of ordinary function as EntityHistory mutator.
type EntityTypeFunc ¶
The EntityTypeFunc type is an adapter to allow the use of ordinary function as EntityType mutator.
type EntityTypeHistoryFunc ¶
type EntityTypeHistoryFunc func(context.Context, *generated.EntityTypeHistoryMutation) (generated.Value, error)
The EntityTypeHistoryFunc type is an adapter to allow the use of ordinary function as EntityTypeHistory mutator.
type EventFunc ¶
The EventFunc type is an adapter to allow the use of ordinary function as Event mutator.
type EventHistoryFunc ¶
type EventHistoryFunc func(context.Context, *generated.EventHistoryMutation) (generated.Value, error)
The EventHistoryFunc type is an adapter to allow the use of ordinary function as EventHistory mutator.
type FeatureFunc ¶
The FeatureFunc type is an adapter to allow the use of ordinary function as Feature mutator.
type FeatureHistoryFunc ¶
type FeatureHistoryFunc func(context.Context, *generated.FeatureHistoryMutation) (generated.Value, error)
The FeatureHistoryFunc type is an adapter to allow the use of ordinary function as FeatureHistory mutator.
type FileFunc ¶
The FileFunc type is an adapter to allow the use of ordinary function as File mutator.
type FileHistoryFunc ¶
The FileHistoryFunc type is an adapter to allow the use of ordinary function as FileHistory mutator.
type GroupFunc ¶
The GroupFunc type is an adapter to allow the use of ordinary function as Group mutator.
type GroupHistoryFunc ¶
type GroupHistoryFunc func(context.Context, *generated.GroupHistoryMutation) (generated.Value, error)
The GroupHistoryFunc type is an adapter to allow the use of ordinary function as GroupHistory 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 GroupMembershipHistoryFunc ¶
type GroupMembershipHistoryFunc func(context.Context, *generated.GroupMembershipHistoryMutation) (generated.Value, error)
The GroupMembershipHistoryFunc type is an adapter to allow the use of ordinary function as GroupMembershipHistory 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 GroupSettingHistoryFunc ¶
type GroupSettingHistoryFunc func(context.Context, *generated.GroupSettingHistoryMutation) (generated.Value, error)
The GroupSettingHistoryFunc type is an adapter to allow the use of ordinary function as GroupSettingHistory mutator.
type HushFunc ¶
The HushFunc type is an adapter to allow the use of ordinary function as Hush mutator.
type HushHistoryFunc ¶
The HushHistoryFunc type is an adapter to allow the use of ordinary function as HushHistory mutator.
type IntegrationFunc ¶
The IntegrationFunc type is an adapter to allow the use of ordinary function as Integration mutator.
type IntegrationHistoryFunc ¶
type IntegrationHistoryFunc func(context.Context, *generated.IntegrationHistoryMutation) (generated.Value, error)
The IntegrationHistoryFunc type is an adapter to allow the use of ordinary function as IntegrationHistory 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 InternalPolicyHistoryFunc ¶ added in v0.3.3
type InternalPolicyHistoryFunc func(context.Context, *generated.InternalPolicyHistoryMutation) (generated.Value, error)
The InternalPolicyHistoryFunc type is an adapter to allow the use of ordinary function as InternalPolicyHistory mutator.
type InviteFunc ¶
The InviteFunc type is an adapter to allow the use of ordinary function as Invite 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 NarrativeHistoryFunc ¶ added in v0.3.3
type NarrativeHistoryFunc func(context.Context, *generated.NarrativeHistoryMutation) (generated.Value, error)
The NarrativeHistoryFunc type is an adapter to allow the use of ordinary function as NarrativeHistory mutator.
type NoteFunc ¶
The NoteFunc type is an adapter to allow the use of ordinary function as Note mutator.
type NoteHistoryFunc ¶
The NoteHistoryFunc type is an adapter to allow the use of ordinary function as NoteHistory mutator.
type OauthProviderFunc ¶
type OauthProviderFunc func(context.Context, *generated.OauthProviderMutation) (generated.Value, error)
The OauthProviderFunc type is an adapter to allow the use of ordinary function as OauthProvider mutator.
type OauthProviderHistoryFunc ¶
type OauthProviderHistoryFunc func(context.Context, *generated.OauthProviderHistoryMutation) (generated.Value, error)
The OauthProviderHistoryFunc type is an adapter to allow the use of ordinary function as OauthProviderHistory mutator.
type OhAuthTooTokenFunc ¶
type OhAuthTooTokenFunc func(context.Context, *generated.OhAuthTooTokenMutation) (generated.Value, error)
The OhAuthTooTokenFunc type is an adapter to allow the use of ordinary function as OhAuthTooToken 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 OrgMembershipHistoryFunc ¶
type OrgMembershipHistoryFunc func(context.Context, *generated.OrgMembershipHistoryMutation) (generated.Value, error)
The OrgMembershipHistoryFunc type is an adapter to allow the use of ordinary function as OrgMembershipHistory 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 OrganizationHistoryFunc ¶
type OrganizationHistoryFunc func(context.Context, *generated.OrganizationHistoryMutation) (generated.Value, error)
The OrganizationHistoryFunc type is an adapter to allow the use of ordinary function as OrganizationHistory 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 OrganizationSettingHistoryFunc ¶
type OrganizationSettingHistoryFunc func(context.Context, *generated.OrganizationSettingHistoryMutation) (generated.Value, error)
The OrganizationSettingHistoryFunc type is an adapter to allow the use of ordinary function as OrganizationSettingHistory 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 ProcedureHistoryFunc ¶ added in v0.3.3
type ProcedureHistoryFunc func(context.Context, *generated.ProcedureHistoryMutation) (generated.Value, error)
The ProcedureHistoryFunc type is an adapter to allow the use of ordinary function as ProcedureHistory 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 RiskHistoryFunc ¶ added in v0.3.3
The RiskHistoryFunc type is an adapter to allow the use of ordinary function as RiskHistory 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 StandardHistoryFunc ¶ added in v0.3.3
type StandardHistoryFunc func(context.Context, *generated.StandardHistoryMutation) (generated.Value, error)
The StandardHistoryFunc type is an adapter to allow the use of ordinary function as StandardHistory 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 SubcontrolHistoryFunc ¶ added in v0.3.3
type SubcontrolHistoryFunc func(context.Context, *generated.SubcontrolHistoryMutation) (generated.Value, error)
The SubcontrolHistoryFunc type is an adapter to allow the use of ordinary function as SubcontrolHistory 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 TemplateFunc ¶
The TemplateFunc type is an adapter to allow the use of ordinary function as Template mutator.
type TemplateHistoryFunc ¶
type TemplateHistoryFunc func(context.Context, *generated.TemplateHistoryMutation) (generated.Value, error)
The TemplateHistoryFunc type is an adapter to allow the use of ordinary function as TemplateHistory mutator.
type UserFunc ¶
The UserFunc type is an adapter to allow the use of ordinary function as User mutator.
type UserHistoryFunc ¶
The UserHistoryFunc type is an adapter to allow the use of ordinary function as UserHistory mutator.
type UserSettingFunc ¶
The UserSettingFunc type is an adapter to allow the use of ordinary function as UserSetting mutator.
type UserSettingHistoryFunc ¶
type UserSettingHistoryFunc func(context.Context, *generated.UserSettingHistoryMutation) (generated.Value, error)
The UserSettingHistoryFunc type is an adapter to allow the use of ordinary function as UserSettingHistory mutator.
type WebauthnFunc ¶
The WebauthnFunc type is an adapter to allow the use of ordinary function as Webauthn mutator.
type WebhookFunc ¶
The WebhookFunc type is an adapter to allow the use of ordinary function as Webhook mutator.
type WebhookHistoryFunc ¶
type WebhookHistoryFunc func(context.Context, *generated.WebhookHistoryMutation) (generated.Value, error)
The WebhookHistoryFunc type is an adapter to allow the use of ordinary function as WebhookHistory mutator.