Versions in this module Expand all Collapse all v0 v0.11.4 Jan 7, 2023 Changes in this version + var Allow = privacy.Allow + var Deny = privacy.Deny + var Skip = privacy.Skip + func Allowf(format string, a ...any) error + func DecisionContext(parent context.Context, decision error) context.Context + func DecisionFromContext(ctx context.Context) (error, bool) + func Denyf(format string, a ...any) error + func Skipf(format string, a ...any) error + type MutationPolicy = privacy.MutationPolicy + type MutationRule = privacy.MutationRule + func DenyMutationOperationRule(op ent.Op) MutationRule + func OnMutationOperation(rule MutationRule, op ent.Op) MutationRule + type MutationRuleFunc func(context.Context, ent.Mutation) error + func (f MutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error + type Policy = privacy.Policy + type QueryMutationRule interface + func AlwaysAllowRule() QueryMutationRule + func AlwaysDenyRule() QueryMutationRule + func ContextQueryMutationRule(eval func(context.Context) error) QueryMutationRule + type QueryPolicy = privacy.QueryPolicy + type QueryRule = privacy.QueryRule + type QueryRuleFunc func(context.Context, ent.Query) error + func (f QueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error + type UserMutationRuleFunc func(context.Context, *ent.UserMutation) error + func (f UserMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error + type UserQueryRuleFunc func(context.Context, *ent.UserQuery) error + func (f UserQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error