Documentation
¶
Index ¶
- func FixedError(err error) ent.Hook
- func If(hk ent.Hook, cond Condition) ent.Hook
- func On(hk ent.Hook, op ent.Op) ent.Hook
- func Reject(op ent.Op) ent.Hook
- func Unless(hk ent.Hook, op ent.Op) ent.Hook
- type ApiTokenFunc
- type AuditEntryFunc
- type AuthAttemptFunc
- type AutomationFunc
- type AutomationRunFunc
- type AutomationVersionFunc
- type BrandKitFunc
- type BroadcastFunc
- type BroadcastRecipientFunc
- 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 ent.Op) Condition
- func Not(cond Condition) Condition
- func Or(first, second Condition, rest ...Condition) Condition
- type ConfirmationFunc
- type ContactFunc
- type ContactTagFunc
- type CustomFieldFunc
- type EmailTemplateFunc
- type ErasureFunc
- type EventFunc
- type HoldFunc
- type InstanceStateFunc
- type IntegrationFunc
- type InvitationFunc
- type JoinDomainFunc
- type MembershipFunc
- type OAuthClientFunc
- type OAuthCodeFunc
- type OAuthRefreshTokenFunc
- type OutboundMessageFunc
- type OutboxMessageFunc
- type OutboxOffsetFunc
- type PasskeyChallengeFunc
- type PasskeyFunc
- type PrivateRelayRangeFunc
- type RecoveryCodeFunc
- type RiverJobFunc
- type RuleFiringFunc
- type RuleFunc
- type RuleTriggerFunc
- type SchemaStateFunc
- type SegmentFunc
- type SendLimiterFunc
- type SendingDomainFunc
- type ServiceCredentialFunc
- type SignupSurveyResponseFunc
- type StaffMemberFunc
- type SuppressionFunc
- type TagFunc
- type TrackingHostChangeFunc
- type UnsubscribeFunc
- type UsageFunc
- type UserFunc
- type UserIdentityFunc
- type VisitorFunc
- type WebhookEndpointFunc
- type WorkspaceFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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, ent.Delete|ent.Create)
Types ¶
type ApiTokenFunc ¶
The ApiTokenFunc type is an adapter to allow the use of ordinary function as ApiToken mutator.
type AuditEntryFunc ¶
The AuditEntryFunc type is an adapter to allow the use of ordinary function as AuditEntry mutator.
type AuthAttemptFunc ¶
The AuthAttemptFunc type is an adapter to allow the use of ordinary function as AuthAttempt mutator.
type AutomationFunc ¶
The AutomationFunc type is an adapter to allow the use of ordinary function as Automation mutator.
type AutomationRunFunc ¶
The AutomationRunFunc type is an adapter to allow the use of ordinary function as AutomationRun mutator.
type AutomationVersionFunc ¶
The AutomationVersionFunc type is an adapter to allow the use of ordinary function as AutomationVersion mutator.
type BrandKitFunc ¶
The BrandKitFunc type is an adapter to allow the use of ordinary function as BrandKit mutator.
type BroadcastFunc ¶
The BroadcastFunc type is an adapter to allow the use of ordinary function as Broadcast mutator.
type BroadcastRecipientFunc ¶
type BroadcastRecipientFunc func(context.Context, *ent.BroadcastRecipientMutation) (ent.Value, error)
The BroadcastRecipientFunc type is an adapter to allow the use of ordinary function as BroadcastRecipient 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 ConfirmationFunc ¶
The ConfirmationFunc type is an adapter to allow the use of ordinary function as Confirmation mutator.
type ContactFunc ¶
The ContactFunc type is an adapter to allow the use of ordinary function as Contact mutator.
type ContactTagFunc ¶
The ContactTagFunc type is an adapter to allow the use of ordinary function as ContactTag mutator.
type CustomFieldFunc ¶
The CustomFieldFunc type is an adapter to allow the use of ordinary function as CustomField mutator.
type EmailTemplateFunc ¶
The EmailTemplateFunc type is an adapter to allow the use of ordinary function as EmailTemplate mutator.
type ErasureFunc ¶
The ErasureFunc type is an adapter to allow the use of ordinary function as Erasure mutator.
type EventFunc ¶
The EventFunc type is an adapter to allow the use of ordinary function as Event mutator.
type HoldFunc ¶
The HoldFunc type is an adapter to allow the use of ordinary function as Hold mutator.
type InstanceStateFunc ¶
The InstanceStateFunc type is an adapter to allow the use of ordinary function as InstanceState mutator.
type IntegrationFunc ¶
The IntegrationFunc type is an adapter to allow the use of ordinary function as Integration mutator.
type InvitationFunc ¶
The InvitationFunc type is an adapter to allow the use of ordinary function as Invitation mutator.
type JoinDomainFunc ¶
The JoinDomainFunc type is an adapter to allow the use of ordinary function as JoinDomain mutator.
type MembershipFunc ¶
The MembershipFunc type is an adapter to allow the use of ordinary function as Membership mutator.
type OAuthClientFunc ¶
The OAuthClientFunc type is an adapter to allow the use of ordinary function as OAuthClient mutator.
type OAuthCodeFunc ¶
The OAuthCodeFunc type is an adapter to allow the use of ordinary function as OAuthCode mutator.
type OAuthRefreshTokenFunc ¶
The OAuthRefreshTokenFunc type is an adapter to allow the use of ordinary function as OAuthRefreshToken mutator.
type OutboundMessageFunc ¶
The OutboundMessageFunc type is an adapter to allow the use of ordinary function as OutboundMessage mutator.
type OutboxMessageFunc ¶
The OutboxMessageFunc type is an adapter to allow the use of ordinary function as OutboxMessage mutator.
type OutboxOffsetFunc ¶
The OutboxOffsetFunc type is an adapter to allow the use of ordinary function as OutboxOffset mutator.
type PasskeyChallengeFunc ¶
The PasskeyChallengeFunc type is an adapter to allow the use of ordinary function as PasskeyChallenge mutator.
type PasskeyFunc ¶
The PasskeyFunc type is an adapter to allow the use of ordinary function as Passkey mutator.
type PrivateRelayRangeFunc ¶
The PrivateRelayRangeFunc type is an adapter to allow the use of ordinary function as PrivateRelayRange mutator.
type RecoveryCodeFunc ¶
The RecoveryCodeFunc type is an adapter to allow the use of ordinary function as RecoveryCode mutator.
type RiverJobFunc ¶
The RiverJobFunc type is an adapter to allow the use of ordinary function as RiverJob mutator.
type RuleFiringFunc ¶
The RuleFiringFunc type is an adapter to allow the use of ordinary function as RuleFiring mutator.
type RuleFunc ¶
The RuleFunc type is an adapter to allow the use of ordinary function as Rule mutator.
type RuleTriggerFunc ¶
The RuleTriggerFunc type is an adapter to allow the use of ordinary function as RuleTrigger mutator.
type SchemaStateFunc ¶
The SchemaStateFunc type is an adapter to allow the use of ordinary function as SchemaState mutator.
type SegmentFunc ¶
The SegmentFunc type is an adapter to allow the use of ordinary function as Segment mutator.
type SendLimiterFunc ¶
The SendLimiterFunc type is an adapter to allow the use of ordinary function as SendLimiter mutator.
type SendingDomainFunc ¶
The SendingDomainFunc type is an adapter to allow the use of ordinary function as SendingDomain mutator.
type ServiceCredentialFunc ¶
The ServiceCredentialFunc type is an adapter to allow the use of ordinary function as ServiceCredential mutator.
type SignupSurveyResponseFunc ¶
type SignupSurveyResponseFunc func(context.Context, *ent.SignupSurveyResponseMutation) (ent.Value, error)
The SignupSurveyResponseFunc type is an adapter to allow the use of ordinary function as SignupSurveyResponse mutator.
type StaffMemberFunc ¶
The StaffMemberFunc type is an adapter to allow the use of ordinary function as StaffMember mutator.
type SuppressionFunc ¶
The SuppressionFunc type is an adapter to allow the use of ordinary function as Suppression mutator.
type TrackingHostChangeFunc ¶
type TrackingHostChangeFunc func(context.Context, *ent.TrackingHostChangeMutation) (ent.Value, error)
The TrackingHostChangeFunc type is an adapter to allow the use of ordinary function as TrackingHostChange mutator.
type UnsubscribeFunc ¶
The UnsubscribeFunc type is an adapter to allow the use of ordinary function as Unsubscribe mutator.
type UsageFunc ¶
The UsageFunc type is an adapter to allow the use of ordinary function as Usage mutator.
type UserFunc ¶
The UserFunc type is an adapter to allow the use of ordinary function as User mutator.
type UserIdentityFunc ¶
The UserIdentityFunc type is an adapter to allow the use of ordinary function as UserIdentity mutator.
type VisitorFunc ¶
The VisitorFunc type is an adapter to allow the use of ordinary function as Visitor mutator.
type WebhookEndpointFunc ¶
The WebhookEndpointFunc type is an adapter to allow the use of ordinary function as WebhookEndpoint mutator.
type WorkspaceFunc ¶
The WorkspaceFunc type is an adapter to allow the use of ordinary function as Workspace mutator.