Versions in this module Expand all Collapse all v1 v1.0.1 Apr 12, 2022 Changes in this version + 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 struct + func NewChain(hooks ...ent.Hook) Chain + func (c Chain) Append(hooks ...ent.Hook) Chain + func (c Chain) Extend(chain Chain) Chain + func (c Chain) Hook() ent.Hook + type CommentFunc func(context.Context, *ent.CommentMutation) (ent.Value, error) + func (f CommentFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) + type Condition func(context.Context, ent.Mutation) bool + 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 PostFunc func(context.Context, *ent.PostMutation) (ent.Value, error) + func (f PostFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) + type UserFunc func(context.Context, *ent.UserMutation) (ent.Value, error) + func (f UserFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error)