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 APIKeyFunc
- type BeneficialOwnerFunc
- 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 FiatCurrencyFunc
- type IdentityVerificationRequestFunc
- type InstitutionFunc
- type KYBProfileFunc
- type LinkedAddressFunc
- type LockOrderFulfillmentFunc
- type LockPaymentOrderFunc
- type NetworkFunc
- type PaymentOrderFunc
- type PaymentOrderRecipientFunc
- type PaymentWebhookFunc
- type ProviderCurrenciesFunc
- type ProviderOrderTokenFunc
- type ProviderProfileFunc
- type ProviderRatingFunc
- type ProvisionBucketFunc
- type ReceiveAddressFunc
- type SenderOrderTokenFunc
- type SenderProfileFunc
- type TokenFunc
- type TransactionLogFunc
- type UserFunc
- type VerificationTokenFunc
- type WebhookRetryAttemptFunc
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 APIKeyFunc ¶
The APIKeyFunc type is an adapter to allow the use of ordinary function as APIKey mutator.
type BeneficialOwnerFunc ¶
The BeneficialOwnerFunc type is an adapter to allow the use of ordinary function as BeneficialOwner 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 FiatCurrencyFunc ¶
The FiatCurrencyFunc type is an adapter to allow the use of ordinary function as FiatCurrency mutator.
type IdentityVerificationRequestFunc ¶
type IdentityVerificationRequestFunc func(context.Context, *ent.IdentityVerificationRequestMutation) (ent.Value, error)
The IdentityVerificationRequestFunc type is an adapter to allow the use of ordinary function as IdentityVerificationRequest mutator.
type InstitutionFunc ¶
The InstitutionFunc type is an adapter to allow the use of ordinary function as Institution mutator.
type KYBProfileFunc ¶
The KYBProfileFunc type is an adapter to allow the use of ordinary function as KYBProfile mutator.
type LinkedAddressFunc ¶
The LinkedAddressFunc type is an adapter to allow the use of ordinary function as LinkedAddress mutator.
type LockOrderFulfillmentFunc ¶
type LockOrderFulfillmentFunc func(context.Context, *ent.LockOrderFulfillmentMutation) (ent.Value, error)
The LockOrderFulfillmentFunc type is an adapter to allow the use of ordinary function as LockOrderFulfillment mutator.
type LockPaymentOrderFunc ¶
The LockPaymentOrderFunc type is an adapter to allow the use of ordinary function as LockPaymentOrder mutator.
type NetworkFunc ¶
The NetworkFunc type is an adapter to allow the use of ordinary function as Network mutator.
type PaymentOrderFunc ¶
The PaymentOrderFunc type is an adapter to allow the use of ordinary function as PaymentOrder mutator.
type PaymentOrderRecipientFunc ¶
type PaymentOrderRecipientFunc func(context.Context, *ent.PaymentOrderRecipientMutation) (ent.Value, error)
The PaymentOrderRecipientFunc type is an adapter to allow the use of ordinary function as PaymentOrderRecipient mutator.
type PaymentWebhookFunc ¶
The PaymentWebhookFunc type is an adapter to allow the use of ordinary function as PaymentWebhook mutator.
type ProviderCurrenciesFunc ¶ added in v0.0.2
type ProviderCurrenciesFunc func(context.Context, *ent.ProviderCurrenciesMutation) (ent.Value, error)
The ProviderCurrenciesFunc type is an adapter to allow the use of ordinary function as ProviderCurrencies mutator.
type ProviderOrderTokenFunc ¶
type ProviderOrderTokenFunc func(context.Context, *ent.ProviderOrderTokenMutation) (ent.Value, error)
The ProviderOrderTokenFunc type is an adapter to allow the use of ordinary function as ProviderOrderToken mutator.
type ProviderProfileFunc ¶
The ProviderProfileFunc type is an adapter to allow the use of ordinary function as ProviderProfile mutator.
type ProviderRatingFunc ¶
The ProviderRatingFunc type is an adapter to allow the use of ordinary function as ProviderRating mutator.
type ProvisionBucketFunc ¶
The ProvisionBucketFunc type is an adapter to allow the use of ordinary function as ProvisionBucket mutator.
type ReceiveAddressFunc ¶
The ReceiveAddressFunc type is an adapter to allow the use of ordinary function as ReceiveAddress mutator.
type SenderOrderTokenFunc ¶
The SenderOrderTokenFunc type is an adapter to allow the use of ordinary function as SenderOrderToken mutator.
type SenderProfileFunc ¶
The SenderProfileFunc type is an adapter to allow the use of ordinary function as SenderProfile mutator.
type TokenFunc ¶
The TokenFunc type is an adapter to allow the use of ordinary function as Token mutator.
type TransactionLogFunc ¶
The TransactionLogFunc type is an adapter to allow the use of ordinary function as TransactionLog mutator.
type UserFunc ¶
The UserFunc type is an adapter to allow the use of ordinary function as User mutator.
type VerificationTokenFunc ¶
The VerificationTokenFunc type is an adapter to allow the use of ordinary function as VerificationToken mutator.
type WebhookRetryAttemptFunc ¶
type WebhookRetryAttemptFunc func(context.Context, *ent.WebhookRetryAttemptMutation) (ent.Value, error)
The WebhookRetryAttemptFunc type is an adapter to allow the use of ordinary function as WebhookRetryAttempt mutator.