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 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 Rent591HomeDetailBreadcrumbFunc
- type Rent591HomeDetailBrowseFunc
- type Rent591HomeDetailFunc
- type Rent591HomeDetailInfoFunc
- type Rent591HomeDetailNavDataFunc
- type Rent591HomeDetailPositionRoundDataChildrenFunc
- type Rent591HomeDetailPositionRoundDataFunc
- type Rent591HomeDetailPositionRoundFunc
- type Rent591HomeDetailPublishFunc
- type Rent591HomeDetailShareInfoFunc
- type Rent591HomeDetailTagFunc
- type Rent591HomeFunc
- type Rent591HomeSurroundingFunc
- type Rent591HomeTagFunc
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 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 Rent591HomeDetailBreadcrumbFunc ¶
type Rent591HomeDetailBreadcrumbFunc func(context.Context, *ent.Rent591HomeDetailBreadcrumbMutation) (ent.Value, error)
The Rent591HomeDetailBreadcrumbFunc type is an adapter to allow the use of ordinary function as Rent591HomeDetailBreadcrumb mutator.
type Rent591HomeDetailBrowseFunc ¶
type Rent591HomeDetailBrowseFunc func(context.Context, *ent.Rent591HomeDetailBrowseMutation) (ent.Value, error)
The Rent591HomeDetailBrowseFunc type is an adapter to allow the use of ordinary function as Rent591HomeDetailBrowse mutator.
type Rent591HomeDetailFunc ¶
The Rent591HomeDetailFunc type is an adapter to allow the use of ordinary function as Rent591HomeDetail mutator.
type Rent591HomeDetailInfoFunc ¶
type Rent591HomeDetailInfoFunc func(context.Context, *ent.Rent591HomeDetailInfoMutation) (ent.Value, error)
The Rent591HomeDetailInfoFunc type is an adapter to allow the use of ordinary function as Rent591HomeDetailInfo mutator.
type Rent591HomeDetailNavDataFunc ¶
type Rent591HomeDetailNavDataFunc func(context.Context, *ent.Rent591HomeDetailNavDataMutation) (ent.Value, error)
The Rent591HomeDetailNavDataFunc type is an adapter to allow the use of ordinary function as Rent591HomeDetailNavData mutator.
type Rent591HomeDetailPositionRoundDataChildrenFunc ¶
type Rent591HomeDetailPositionRoundDataChildrenFunc func(context.Context, *ent.Rent591HomeDetailPositionRoundDataChildrenMutation) (ent.Value, error)
The Rent591HomeDetailPositionRoundDataChildrenFunc type is an adapter to allow the use of ordinary function as Rent591HomeDetailPositionRoundDataChildren mutator.
type Rent591HomeDetailPositionRoundDataFunc ¶
type Rent591HomeDetailPositionRoundDataFunc func(context.Context, *ent.Rent591HomeDetailPositionRoundDataMutation) (ent.Value, error)
The Rent591HomeDetailPositionRoundDataFunc type is an adapter to allow the use of ordinary function as Rent591HomeDetailPositionRoundData mutator.
type Rent591HomeDetailPositionRoundFunc ¶
type Rent591HomeDetailPositionRoundFunc func(context.Context, *ent.Rent591HomeDetailPositionRoundMutation) (ent.Value, error)
The Rent591HomeDetailPositionRoundFunc type is an adapter to allow the use of ordinary function as Rent591HomeDetailPositionRound mutator.
type Rent591HomeDetailPublishFunc ¶
type Rent591HomeDetailPublishFunc func(context.Context, *ent.Rent591HomeDetailPublishMutation) (ent.Value, error)
The Rent591HomeDetailPublishFunc type is an adapter to allow the use of ordinary function as Rent591HomeDetailPublish mutator.
type Rent591HomeDetailShareInfoFunc ¶
type Rent591HomeDetailShareInfoFunc func(context.Context, *ent.Rent591HomeDetailShareInfoMutation) (ent.Value, error)
The Rent591HomeDetailShareInfoFunc type is an adapter to allow the use of ordinary function as Rent591HomeDetailShareInfo mutator.
type Rent591HomeDetailTagFunc ¶
type Rent591HomeDetailTagFunc func(context.Context, *ent.Rent591HomeDetailTagMutation) (ent.Value, error)
The Rent591HomeDetailTagFunc type is an adapter to allow the use of ordinary function as Rent591HomeDetailTag mutator.
type Rent591HomeFunc ¶
The Rent591HomeFunc type is an adapter to allow the use of ordinary function as Rent591Home mutator.
type Rent591HomeSurroundingFunc ¶
type Rent591HomeSurroundingFunc func(context.Context, *ent.Rent591HomeSurroundingMutation) (ent.Value, error)
The Rent591HomeSurroundingFunc type is an adapter to allow the use of ordinary function as Rent591HomeSurrounding mutator.
type Rent591HomeTagFunc ¶
The Rent591HomeTagFunc type is an adapter to allow the use of ordinary function as Rent591HomeTag mutator.