Documentation
¶
Index ¶
- Variables
- 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 AccessorialChargeMutationRuleFunc
- type AccessorialChargeQueryRuleFunc
- type AccountingControlMutationRuleFunc
- type AccountingControlQueryRuleFunc
- type BillingControlMutationRuleFunc
- type BillingControlQueryRuleFunc
- type BusinessUnitMutationRuleFunc
- type BusinessUnitQueryRuleFunc
- type ChargeTypeMutationRuleFunc
- type ChargeTypeQueryRuleFunc
- type CommentTypeMutationRuleFunc
- type CommentTypeQueryRuleFunc
- type CommodityMutationRuleFunc
- type CommodityQueryRuleFunc
- type CustomerMutationRuleFunc
- type CustomerQueryRuleFunc
- type DelayCodeMutationRuleFunc
- type DelayCodeQueryRuleFunc
- type DispatchControlMutationRuleFunc
- type DispatchControlQueryRuleFunc
- type DivisionCodeMutationRuleFunc
- type DivisionCodeQueryRuleFunc
- type DocumentClassificationMutationRuleFunc
- type DocumentClassificationQueryRuleFunc
- type EmailControlMutationRuleFunc
- type EmailControlQueryRuleFunc
- type EmailProfileMutationRuleFunc
- type EmailProfileQueryRuleFunc
- type EquipmentManufactuerMutationRuleFunc
- type EquipmentManufactuerQueryRuleFunc
- type EquipmentTypeMutationRuleFunc
- type EquipmentTypeQueryRuleFunc
- type FeasibilityToolControlMutationRuleFunc
- type FeasibilityToolControlQueryRuleFunc
- type FeatureFlagMutationRuleFunc
- type FeatureFlagQueryRuleFunc
- type Filter
- type FilterFunc
- type FleetCodeMutationRuleFunc
- type FleetCodeQueryRuleFunc
- type GeneralLedgerAccountMutationRuleFunc
- type GeneralLedgerAccountQueryRuleFunc
- type GoogleApiMutationRuleFunc
- type GoogleApiQueryRuleFunc
- type HazardousMaterialMutationRuleFunc
- type HazardousMaterialQueryRuleFunc
- type HazardousMaterialSegregationMutationRuleFunc
- type HazardousMaterialSegregationQueryRuleFunc
- type InvoiceControlMutationRuleFunc
- type InvoiceControlQueryRuleFunc
- type LocationCategoryMutationRuleFunc
- type LocationCategoryQueryRuleFunc
- type LocationCommentMutationRuleFunc
- type LocationCommentQueryRuleFunc
- type LocationContactMutationRuleFunc
- type LocationContactQueryRuleFunc
- type LocationMutationRuleFunc
- type LocationQueryRuleFunc
- type MutationPolicy
- type MutationRule
- type MutationRuleFunc
- type OrganizationFeatureFlagMutationRuleFunc
- type OrganizationFeatureFlagQueryRuleFunc
- type OrganizationMutationRuleFunc
- type OrganizationQueryRuleFunc
- type Policy
- type QualifierCodeMutationRuleFunc
- type QualifierCodeQueryRuleFunc
- type QueryMutationRule
- type QueryPolicy
- type QueryRule
- type QueryRuleFunc
- type ReasonCodeMutationRuleFunc
- type ReasonCodeQueryRuleFunc
- type RevenueCodeMutationRuleFunc
- type RevenueCodeQueryRuleFunc
- type RouteControlMutationRuleFunc
- type RouteControlQueryRuleFunc
- type ServiceTypeMutationRuleFunc
- type ServiceTypeQueryRuleFunc
- type SessionMutationRuleFunc
- type SessionQueryRuleFunc
- type ShipmentControlMutationRuleFunc
- type ShipmentControlQueryRuleFunc
- type ShipmentTypeMutationRuleFunc
- type ShipmentTypeQueryRuleFunc
- type TableChangeAlertMutationRuleFunc
- type TableChangeAlertQueryRuleFunc
- type TagMutationRuleFunc
- type TagQueryRuleFunc
- type TractorMutationRuleFunc
- type TractorQueryRuleFunc
- type TrailerMutationRuleFunc
- type TrailerQueryRuleFunc
- type UsStateMutationRuleFunc
- type UsStateQueryRuleFunc
- type UserFavoriteMutationRuleFunc
- type UserFavoriteQueryRuleFunc
- type UserMutationRuleFunc
- type UserQueryRuleFunc
- type WorkerCommentMutationRuleFunc
- type WorkerCommentQueryRuleFunc
- type WorkerContactMutationRuleFunc
- type WorkerContactQueryRuleFunc
- type WorkerMutationRuleFunc
- type WorkerProfileMutationRuleFunc
- type WorkerProfileQueryRuleFunc
- type WorkerQueryRuleFunc
Constants ¶
This section is empty.
Variables ¶
var ( // Allow may be returned by rules to indicate that the policy // evaluation should terminate with allow decision. Allow = privacy.Allow // Deny may be returned by rules to indicate that the policy // evaluation should terminate with deny decision. Deny = privacy.Deny // Skip may be returned by rules to indicate that the policy // evaluation should continue to the next rule. Skip = privacy.Skip )
Functions ¶
func DecisionContext ¶
DecisionContext creates a new context from the given parent context with a policy decision attach to it.
func DecisionFromContext ¶
DecisionFromContext retrieves the policy decision from the context.
Types ¶
type AccessorialChargeMutationRuleFunc ¶
type AccessorialChargeMutationRuleFunc func(context.Context, *ent.AccessorialChargeMutation) error
The AccessorialChargeMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (AccessorialChargeMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type AccessorialChargeQueryRuleFunc ¶
type AccessorialChargeQueryRuleFunc func(context.Context, *ent.AccessorialChargeQuery) error
The AccessorialChargeQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type AccountingControlMutationRuleFunc ¶
type AccountingControlMutationRuleFunc func(context.Context, *ent.AccountingControlMutation) error
The AccountingControlMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (AccountingControlMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type AccountingControlQueryRuleFunc ¶
type AccountingControlQueryRuleFunc func(context.Context, *ent.AccountingControlQuery) error
The AccountingControlQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type BillingControlMutationRuleFunc ¶
type BillingControlMutationRuleFunc func(context.Context, *ent.BillingControlMutation) error
The BillingControlMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (BillingControlMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type BillingControlQueryRuleFunc ¶
type BillingControlQueryRuleFunc func(context.Context, *ent.BillingControlQuery) error
The BillingControlQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type BusinessUnitMutationRuleFunc ¶
type BusinessUnitMutationRuleFunc func(context.Context, *ent.BusinessUnitMutation) error
The BusinessUnitMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (BusinessUnitMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type BusinessUnitQueryRuleFunc ¶
type BusinessUnitQueryRuleFunc func(context.Context, *ent.BusinessUnitQuery) error
The BusinessUnitQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type ChargeTypeMutationRuleFunc ¶
type ChargeTypeMutationRuleFunc func(context.Context, *ent.ChargeTypeMutation) error
The ChargeTypeMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (ChargeTypeMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type ChargeTypeQueryRuleFunc ¶
type ChargeTypeQueryRuleFunc func(context.Context, *ent.ChargeTypeQuery) error
The ChargeTypeQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type CommentTypeMutationRuleFunc ¶
type CommentTypeMutationRuleFunc func(context.Context, *ent.CommentTypeMutation) error
The CommentTypeMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (CommentTypeMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type CommentTypeQueryRuleFunc ¶
type CommentTypeQueryRuleFunc func(context.Context, *ent.CommentTypeQuery) error
The CommentTypeQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type CommodityMutationRuleFunc ¶
type CommodityMutationRuleFunc func(context.Context, *ent.CommodityMutation) error
The CommodityMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (CommodityMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type CommodityQueryRuleFunc ¶
type CommodityQueryRuleFunc func(context.Context, *ent.CommodityQuery) error
The CommodityQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type CustomerMutationRuleFunc ¶
type CustomerMutationRuleFunc func(context.Context, *ent.CustomerMutation) error
The CustomerMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (CustomerMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type CustomerQueryRuleFunc ¶
type CustomerQueryRuleFunc func(context.Context, *ent.CustomerQuery) error
The CustomerQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type DelayCodeMutationRuleFunc ¶
type DelayCodeMutationRuleFunc func(context.Context, *ent.DelayCodeMutation) error
The DelayCodeMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (DelayCodeMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type DelayCodeQueryRuleFunc ¶
type DelayCodeQueryRuleFunc func(context.Context, *ent.DelayCodeQuery) error
The DelayCodeQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type DispatchControlMutationRuleFunc ¶
type DispatchControlMutationRuleFunc func(context.Context, *ent.DispatchControlMutation) error
The DispatchControlMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (DispatchControlMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type DispatchControlQueryRuleFunc ¶
type DispatchControlQueryRuleFunc func(context.Context, *ent.DispatchControlQuery) error
The DispatchControlQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type DivisionCodeMutationRuleFunc ¶
type DivisionCodeMutationRuleFunc func(context.Context, *ent.DivisionCodeMutation) error
The DivisionCodeMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (DivisionCodeMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type DivisionCodeQueryRuleFunc ¶
type DivisionCodeQueryRuleFunc func(context.Context, *ent.DivisionCodeQuery) error
The DivisionCodeQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type DocumentClassificationMutationRuleFunc ¶
type DocumentClassificationMutationRuleFunc func(context.Context, *ent.DocumentClassificationMutation) error
The DocumentClassificationMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (DocumentClassificationMutationRuleFunc) EvalMutation ¶
func (f DocumentClassificationMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error
EvalMutation calls f(ctx, m).
type DocumentClassificationQueryRuleFunc ¶
type DocumentClassificationQueryRuleFunc func(context.Context, *ent.DocumentClassificationQuery) error
The DocumentClassificationQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type EmailControlMutationRuleFunc ¶
type EmailControlMutationRuleFunc func(context.Context, *ent.EmailControlMutation) error
The EmailControlMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (EmailControlMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type EmailControlQueryRuleFunc ¶
type EmailControlQueryRuleFunc func(context.Context, *ent.EmailControlQuery) error
The EmailControlQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type EmailProfileMutationRuleFunc ¶
type EmailProfileMutationRuleFunc func(context.Context, *ent.EmailProfileMutation) error
The EmailProfileMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (EmailProfileMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type EmailProfileQueryRuleFunc ¶
type EmailProfileQueryRuleFunc func(context.Context, *ent.EmailProfileQuery) error
The EmailProfileQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type EquipmentManufactuerMutationRuleFunc ¶
type EquipmentManufactuerMutationRuleFunc func(context.Context, *ent.EquipmentManufactuerMutation) error
The EquipmentManufactuerMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (EquipmentManufactuerMutationRuleFunc) EvalMutation ¶
func (f EquipmentManufactuerMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error
EvalMutation calls f(ctx, m).
type EquipmentManufactuerQueryRuleFunc ¶
type EquipmentManufactuerQueryRuleFunc func(context.Context, *ent.EquipmentManufactuerQuery) error
The EquipmentManufactuerQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type EquipmentTypeMutationRuleFunc ¶
type EquipmentTypeMutationRuleFunc func(context.Context, *ent.EquipmentTypeMutation) error
The EquipmentTypeMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (EquipmentTypeMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type EquipmentTypeQueryRuleFunc ¶
type EquipmentTypeQueryRuleFunc func(context.Context, *ent.EquipmentTypeQuery) error
The EquipmentTypeQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type FeasibilityToolControlMutationRuleFunc ¶
type FeasibilityToolControlMutationRuleFunc func(context.Context, *ent.FeasibilityToolControlMutation) error
The FeasibilityToolControlMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (FeasibilityToolControlMutationRuleFunc) EvalMutation ¶
func (f FeasibilityToolControlMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error
EvalMutation calls f(ctx, m).
type FeasibilityToolControlQueryRuleFunc ¶
type FeasibilityToolControlQueryRuleFunc func(context.Context, *ent.FeasibilityToolControlQuery) error
The FeasibilityToolControlQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type FeatureFlagMutationRuleFunc ¶
type FeatureFlagMutationRuleFunc func(context.Context, *ent.FeatureFlagMutation) error
The FeatureFlagMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (FeatureFlagMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type FeatureFlagQueryRuleFunc ¶
type FeatureFlagQueryRuleFunc func(context.Context, *ent.FeatureFlagQuery) error
The FeatureFlagQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type Filter ¶
Filter is the interface that wraps the Where function for filtering nodes in queries and mutations.
type FilterFunc ¶
The FilterFunc type is an adapter that allows the use of ordinary functions as filters for query and mutation types.
func (FilterFunc) EvalMutation ¶
EvalMutation calls f(ctx, q) if the mutation implements the Filter interface, otherwise it is denied.
type FleetCodeMutationRuleFunc ¶
type FleetCodeMutationRuleFunc func(context.Context, *ent.FleetCodeMutation) error
The FleetCodeMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (FleetCodeMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type FleetCodeQueryRuleFunc ¶
type FleetCodeQueryRuleFunc func(context.Context, *ent.FleetCodeQuery) error
The FleetCodeQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type GeneralLedgerAccountMutationRuleFunc ¶
type GeneralLedgerAccountMutationRuleFunc func(context.Context, *ent.GeneralLedgerAccountMutation) error
The GeneralLedgerAccountMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (GeneralLedgerAccountMutationRuleFunc) EvalMutation ¶
func (f GeneralLedgerAccountMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error
EvalMutation calls f(ctx, m).
type GeneralLedgerAccountQueryRuleFunc ¶
type GeneralLedgerAccountQueryRuleFunc func(context.Context, *ent.GeneralLedgerAccountQuery) error
The GeneralLedgerAccountQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type GoogleApiMutationRuleFunc ¶
type GoogleApiMutationRuleFunc func(context.Context, *ent.GoogleApiMutation) error
The GoogleApiMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (GoogleApiMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type GoogleApiQueryRuleFunc ¶
type GoogleApiQueryRuleFunc func(context.Context, *ent.GoogleApiQuery) error
The GoogleApiQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type HazardousMaterialMutationRuleFunc ¶
type HazardousMaterialMutationRuleFunc func(context.Context, *ent.HazardousMaterialMutation) error
The HazardousMaterialMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (HazardousMaterialMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type HazardousMaterialQueryRuleFunc ¶
type HazardousMaterialQueryRuleFunc func(context.Context, *ent.HazardousMaterialQuery) error
The HazardousMaterialQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type HazardousMaterialSegregationMutationRuleFunc ¶
type HazardousMaterialSegregationMutationRuleFunc func(context.Context, *ent.HazardousMaterialSegregationMutation) error
The HazardousMaterialSegregationMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (HazardousMaterialSegregationMutationRuleFunc) EvalMutation ¶
func (f HazardousMaterialSegregationMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error
EvalMutation calls f(ctx, m).
type HazardousMaterialSegregationQueryRuleFunc ¶
type HazardousMaterialSegregationQueryRuleFunc func(context.Context, *ent.HazardousMaterialSegregationQuery) error
The HazardousMaterialSegregationQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type InvoiceControlMutationRuleFunc ¶
type InvoiceControlMutationRuleFunc func(context.Context, *ent.InvoiceControlMutation) error
The InvoiceControlMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (InvoiceControlMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type InvoiceControlQueryRuleFunc ¶
type InvoiceControlQueryRuleFunc func(context.Context, *ent.InvoiceControlQuery) error
The InvoiceControlQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type LocationCategoryMutationRuleFunc ¶
type LocationCategoryMutationRuleFunc func(context.Context, *ent.LocationCategoryMutation) error
The LocationCategoryMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (LocationCategoryMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type LocationCategoryQueryRuleFunc ¶
type LocationCategoryQueryRuleFunc func(context.Context, *ent.LocationCategoryQuery) error
The LocationCategoryQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type LocationCommentMutationRuleFunc ¶
type LocationCommentMutationRuleFunc func(context.Context, *ent.LocationCommentMutation) error
The LocationCommentMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (LocationCommentMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type LocationCommentQueryRuleFunc ¶
type LocationCommentQueryRuleFunc func(context.Context, *ent.LocationCommentQuery) error
The LocationCommentQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type LocationContactMutationRuleFunc ¶
type LocationContactMutationRuleFunc func(context.Context, *ent.LocationContactMutation) error
The LocationContactMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (LocationContactMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type LocationContactQueryRuleFunc ¶
type LocationContactQueryRuleFunc func(context.Context, *ent.LocationContactQuery) error
The LocationContactQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type LocationMutationRuleFunc ¶
type LocationMutationRuleFunc func(context.Context, *ent.LocationMutation) error
The LocationMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (LocationMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type LocationQueryRuleFunc ¶
type LocationQueryRuleFunc func(context.Context, *ent.LocationQuery) error
The LocationQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type MutationPolicy ¶
type MutationPolicy = privacy.MutationPolicy
MutationPolicy combines multiple mutation rules into a single policy.
type MutationRule ¶
type MutationRule = privacy.MutationRule
MutationRule defines the interface which decides whether a mutation is allowed and optionally modifies it.
func DenyMutationOperationRule ¶
func DenyMutationOperationRule(op ent.Op) MutationRule
DenyMutationOperationRule returns a rule denying specified mutation operation.
func OnMutationOperation ¶
func OnMutationOperation(rule MutationRule, op ent.Op) MutationRule
OnMutationOperation evaluates the given rule only on a given mutation operation.
type MutationRuleFunc ¶
type MutationRuleFunc = privacy.MutationRuleFunc
MutationRuleFunc type is an adapter which allows the use of ordinary functions as mutation rules.
type OrganizationFeatureFlagMutationRuleFunc ¶
type OrganizationFeatureFlagMutationRuleFunc func(context.Context, *ent.OrganizationFeatureFlagMutation) error
The OrganizationFeatureFlagMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (OrganizationFeatureFlagMutationRuleFunc) EvalMutation ¶
func (f OrganizationFeatureFlagMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error
EvalMutation calls f(ctx, m).
type OrganizationFeatureFlagQueryRuleFunc ¶
type OrganizationFeatureFlagQueryRuleFunc func(context.Context, *ent.OrganizationFeatureFlagQuery) error
The OrganizationFeatureFlagQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type OrganizationMutationRuleFunc ¶
type OrganizationMutationRuleFunc func(context.Context, *ent.OrganizationMutation) error
The OrganizationMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (OrganizationMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type OrganizationQueryRuleFunc ¶
type OrganizationQueryRuleFunc func(context.Context, *ent.OrganizationQuery) error
The OrganizationQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type QualifierCodeMutationRuleFunc ¶
type QualifierCodeMutationRuleFunc func(context.Context, *ent.QualifierCodeMutation) error
The QualifierCodeMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (QualifierCodeMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type QualifierCodeQueryRuleFunc ¶
type QualifierCodeQueryRuleFunc func(context.Context, *ent.QualifierCodeQuery) error
The QualifierCodeQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type QueryMutationRule ¶
type QueryMutationRule = privacy.QueryMutationRule
QueryMutationRule is an interface which groups query and mutation rules.
func AlwaysAllowRule ¶
func AlwaysAllowRule() QueryMutationRule
AlwaysAllowRule returns a rule that returns an allow decision.
func AlwaysDenyRule ¶
func AlwaysDenyRule() QueryMutationRule
AlwaysDenyRule returns a rule that returns a deny decision.
func ContextQueryMutationRule ¶
func ContextQueryMutationRule(eval func(context.Context) error) QueryMutationRule
ContextQueryMutationRule creates a query/mutation rule from a context eval func.
type QueryPolicy ¶
type QueryPolicy = privacy.QueryPolicy
QueryPolicy combines multiple query rules into a single policy.
type QueryRule ¶
QueryRule defines the interface deciding whether a query is allowed and optionally modify it.
type QueryRuleFunc ¶
QueryRuleFunc type is an adapter to allow the use of ordinary functions as query rules.
type ReasonCodeMutationRuleFunc ¶
type ReasonCodeMutationRuleFunc func(context.Context, *ent.ReasonCodeMutation) error
The ReasonCodeMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (ReasonCodeMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type ReasonCodeQueryRuleFunc ¶
type ReasonCodeQueryRuleFunc func(context.Context, *ent.ReasonCodeQuery) error
The ReasonCodeQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type RevenueCodeMutationRuleFunc ¶
type RevenueCodeMutationRuleFunc func(context.Context, *ent.RevenueCodeMutation) error
The RevenueCodeMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (RevenueCodeMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type RevenueCodeQueryRuleFunc ¶
type RevenueCodeQueryRuleFunc func(context.Context, *ent.RevenueCodeQuery) error
The RevenueCodeQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type RouteControlMutationRuleFunc ¶
type RouteControlMutationRuleFunc func(context.Context, *ent.RouteControlMutation) error
The RouteControlMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (RouteControlMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type RouteControlQueryRuleFunc ¶
type RouteControlQueryRuleFunc func(context.Context, *ent.RouteControlQuery) error
The RouteControlQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type ServiceTypeMutationRuleFunc ¶
type ServiceTypeMutationRuleFunc func(context.Context, *ent.ServiceTypeMutation) error
The ServiceTypeMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (ServiceTypeMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type ServiceTypeQueryRuleFunc ¶
type ServiceTypeQueryRuleFunc func(context.Context, *ent.ServiceTypeQuery) error
The ServiceTypeQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type SessionMutationRuleFunc ¶
type SessionMutationRuleFunc func(context.Context, *ent.SessionMutation) error
The SessionMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (SessionMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type SessionQueryRuleFunc ¶
type SessionQueryRuleFunc func(context.Context, *ent.SessionQuery) error
The SessionQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type ShipmentControlMutationRuleFunc ¶
type ShipmentControlMutationRuleFunc func(context.Context, *ent.ShipmentControlMutation) error
The ShipmentControlMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (ShipmentControlMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type ShipmentControlQueryRuleFunc ¶
type ShipmentControlQueryRuleFunc func(context.Context, *ent.ShipmentControlQuery) error
The ShipmentControlQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type ShipmentTypeMutationRuleFunc ¶
type ShipmentTypeMutationRuleFunc func(context.Context, *ent.ShipmentTypeMutation) error
The ShipmentTypeMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (ShipmentTypeMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type ShipmentTypeQueryRuleFunc ¶
type ShipmentTypeQueryRuleFunc func(context.Context, *ent.ShipmentTypeQuery) error
The ShipmentTypeQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type TableChangeAlertMutationRuleFunc ¶
type TableChangeAlertMutationRuleFunc func(context.Context, *ent.TableChangeAlertMutation) error
The TableChangeAlertMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (TableChangeAlertMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type TableChangeAlertQueryRuleFunc ¶
type TableChangeAlertQueryRuleFunc func(context.Context, *ent.TableChangeAlertQuery) error
The TableChangeAlertQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type TagMutationRuleFunc ¶
type TagMutationRuleFunc func(context.Context, *ent.TagMutation) error
The TagMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (TagMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type TagQueryRuleFunc ¶
The TagQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type TractorMutationRuleFunc ¶
type TractorMutationRuleFunc func(context.Context, *ent.TractorMutation) error
The TractorMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (TractorMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type TractorQueryRuleFunc ¶
type TractorQueryRuleFunc func(context.Context, *ent.TractorQuery) error
The TractorQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type TrailerMutationRuleFunc ¶
type TrailerMutationRuleFunc func(context.Context, *ent.TrailerMutation) error
The TrailerMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (TrailerMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type TrailerQueryRuleFunc ¶
type TrailerQueryRuleFunc func(context.Context, *ent.TrailerQuery) error
The TrailerQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type UsStateMutationRuleFunc ¶
type UsStateMutationRuleFunc func(context.Context, *ent.UsStateMutation) error
The UsStateMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (UsStateMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type UsStateQueryRuleFunc ¶
type UsStateQueryRuleFunc func(context.Context, *ent.UsStateQuery) error
The UsStateQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type UserFavoriteMutationRuleFunc ¶
type UserFavoriteMutationRuleFunc func(context.Context, *ent.UserFavoriteMutation) error
The UserFavoriteMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (UserFavoriteMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type UserFavoriteQueryRuleFunc ¶
type UserFavoriteQueryRuleFunc func(context.Context, *ent.UserFavoriteQuery) error
The UserFavoriteQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type UserMutationRuleFunc ¶
type UserMutationRuleFunc func(context.Context, *ent.UserMutation) error
The UserMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (UserMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type UserQueryRuleFunc ¶
The UserQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type WorkerCommentMutationRuleFunc ¶
type WorkerCommentMutationRuleFunc func(context.Context, *ent.WorkerCommentMutation) error
The WorkerCommentMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (WorkerCommentMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type WorkerCommentQueryRuleFunc ¶
type WorkerCommentQueryRuleFunc func(context.Context, *ent.WorkerCommentQuery) error
The WorkerCommentQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type WorkerContactMutationRuleFunc ¶
type WorkerContactMutationRuleFunc func(context.Context, *ent.WorkerContactMutation) error
The WorkerContactMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (WorkerContactMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type WorkerContactQueryRuleFunc ¶
type WorkerContactQueryRuleFunc func(context.Context, *ent.WorkerContactQuery) error
The WorkerContactQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type WorkerMutationRuleFunc ¶
type WorkerMutationRuleFunc func(context.Context, *ent.WorkerMutation) error
The WorkerMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (WorkerMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type WorkerProfileMutationRuleFunc ¶
type WorkerProfileMutationRuleFunc func(context.Context, *ent.WorkerProfileMutation) error
The WorkerProfileMutationRuleFunc type is an adapter to allow the use of ordinary functions as a mutation rule.
func (WorkerProfileMutationRuleFunc) EvalMutation ¶
EvalMutation calls f(ctx, m).
type WorkerProfileQueryRuleFunc ¶
type WorkerProfileQueryRuleFunc func(context.Context, *ent.WorkerProfileQuery) error
The WorkerProfileQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.
type WorkerQueryRuleFunc ¶
type WorkerQueryRuleFunc func(context.Context, *ent.WorkerQuery) error
The WorkerQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.