Versions in this module Expand all Collapse all v0 v0.2.1 Jul 17, 2026 v0.2.0 Jul 17, 2026 Changes in this version + var ErrNilMutation = errors.New("saas/ent: nil mutation") + var ErrNilQuery = errors.New("saas/ent: nil query") + var ErrTenantFieldNotFound = errors.New("saas/ent: tenant field not found") + var ErrTenantFieldUpdate = errors.New("saas/ent: tenant field cannot be updated in tenant context") + var ErrUnsupportedMutation = errors.New("saas/ent: unsupported mutation") + func Apply(ctx context.Context, selector *sql.Selector, config Config) error + func FilterMutation(ctx context.Context, mutation Mutation, config Config) error + func FilterQuery(ctx context.Context, query Query, config Config) error + func Hook(config Config) ent.Hook + type Config struct + IncludeSoftDeleted bool + SoftDeleteField string + TenantField string + type Mutation interface + Field func(string) (ent.Value, bool) + Op func() ent.Op + SetField func(string, ent.Value) error + WhereP func(...SelectorPredicate) + type MutationFilter struct + func NewMutationFilter(config Config) MutationFilter + func (filter MutationFilter) Apply(ctx context.Context, mutation Mutation) error + type Query interface + WhereP func(...SelectorPredicate) + type QueryFilter struct + func NewQueryFilter(config Config) QueryFilter + func (filter QueryFilter) Apply(ctx context.Context, query Query) error + type SelectorPredicate = func(*sql.Selector) + func Predicate(ctx context.Context, config Config) (SelectorPredicate, error) + func TenantPredicate(ctx context.Context) (SelectorPredicate, error)