Versions in this module Expand all Collapse all v1 v1.0.0 Jun 29, 2021 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 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 MessageFunc func(context.Context, *ent.MessageMutation) (ent.Value, error) + func (f MessageFunc) 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)