Versions in this module Expand all Collapse all v0 v0.0.1 Dec 30, 2024 Changes in this version + const FieldTenantID + var AnnotationName = "Knockout" + func AuditHook(next ent.Mutator) ent.Mutator + func SkipSoftDelete(parent context.Context) context.Context + func SkipTenantPrivacy(parent context.Context) context.Context + type Annotation struct + Resources []string + TenantField string + func Resources(fields []string) Annotation + func TenantField(field string) Annotation + func (Annotation) Name() string + func (a Annotation) Merge(other schema.Annotation) schema.Annotation + type AuditMixin struct + func (AuditMixin) Hooks() []ent.Hook + func (e AuditMixin) Fields() []ent.Field + type IntID struct + func (id IntID) Fields() []ent.Field + type Mutator interface + Mutate func(ctx context.Context, m ent.Mutation) (ent.Value, error) + type NotifyMixin struct + func (NotifyMixin) Hooks() []ent.Hook + type Query interface + WhereP func(...func(*sql.Selector)) + type SnowFlakeID struct + func (SnowFlakeID) SchemaType() map[string]string + func (id SnowFlakeID) Fields() []ent.Field + type SoftDeleteMixin struct + QueryFunc func(ent.Query) (T, error) + func NewSoftDeleteMixin[T Query, Q Mutator](qf func(ent.Query) (T, error)) SoftDeleteMixin[T, Q] + func (SoftDeleteMixin[T, Q]) Fields() []ent.Field + func (d SoftDeleteMixin[T, Q]) Hooks() []ent.Hook + func (d SoftDeleteMixin[T, Q]) Interceptors() []ent.Interceptor + func (d SoftDeleteMixin[T, Q]) P(w Query) + type TenantMixin struct + func NewTenantMixin[T Query, Q Mutator](app string, newQuery func(ent.Query) (T, error), ...) TenantMixin[T, Q] + func (d TenantMixin[T, Q]) Hooks() []ent.Hook + func (d TenantMixin[T, Q]) Interceptors() []ent.Interceptor + func (d TenantMixin[T, Q]) P(w Query, tid int) + func (d TenantMixin[T, Q]) QueryRulesP(ctx context.Context, w Query) error + type TenantMixinOption func(*TenantMixin[T, Q]) + func WithTenantMixinStorageKey[T Query, Q Mutator](storageKey string) TenantMixinOption[T, Q]