privacy

package
v0.0.0-...-4d78421 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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 Allowf

func Allowf(format string, a ...any) error

Allowf returns a formatted wrapped Allow decision.

func DecisionContext

func DecisionContext(parent context.Context, decision error) context.Context

DecisionContext creates a new context from the given parent context with a policy decision attach to it.

func DecisionFromContext

func DecisionFromContext(ctx context.Context) (error, bool)

DecisionFromContext retrieves the policy decision from the context.

func Denyf

func Denyf(format string, a ...any) error

Denyf returns a formatted wrapped Deny decision.

func Skipf

func Skipf(format string, a ...any) error

Skipf returns a formatted wrapped Skip decision.

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.

func (AccessorialChargeQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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.

func (AccountingControlQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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.

func (BillingControlQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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.

func (BusinessUnitQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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.

func (ChargeTypeQueryRuleFunc) EvalQuery

func (f ChargeTypeQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error

EvalQuery return f(ctx, q).

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.

func (CommentTypeQueryRuleFunc) EvalQuery

func (f CommentTypeQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error

EvalQuery return f(ctx, q).

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

func (f CommodityMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error

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.

func (CommodityQueryRuleFunc) EvalQuery

func (f CommodityQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error

EvalQuery return f(ctx, q).

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

func (f CustomerMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error

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.

func (CustomerQueryRuleFunc) EvalQuery

func (f CustomerQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error

EvalQuery return f(ctx, q).

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

func (f DelayCodeMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error

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.

func (DelayCodeQueryRuleFunc) EvalQuery

func (f DelayCodeQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error

EvalQuery return f(ctx, q).

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.

func (DispatchControlQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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.

func (DivisionCodeQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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

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.

func (DocumentClassificationQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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.

func (EmailControlQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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.

func (EmailProfileQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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

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.

func (EquipmentManufactuerQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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.

func (EquipmentTypeQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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

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.

func (FeasibilityToolControlQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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.

func (FeatureFlagQueryRuleFunc) EvalQuery

func (f FeatureFlagQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error

EvalQuery return f(ctx, q).

type Filter

type Filter interface {
	// Where applies a filter on the executed query/mutation.
	Where(entql.P)
}

Filter is the interface that wraps the Where function for filtering nodes in queries and mutations.

type FilterFunc

type FilterFunc func(context.Context, Filter) error

The FilterFunc type is an adapter that allows the use of ordinary functions as filters for query and mutation types.

func (FilterFunc) EvalMutation

func (f FilterFunc) EvalMutation(ctx context.Context, m ent.Mutation) error

EvalMutation calls f(ctx, q) if the mutation implements the Filter interface, otherwise it is denied.

func (FilterFunc) EvalQuery

func (f FilterFunc) EvalQuery(ctx context.Context, q ent.Query) error

EvalQuery calls f(ctx, q) if the query 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

func (f FleetCodeMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error

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.

func (FleetCodeQueryRuleFunc) EvalQuery

func (f FleetCodeQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error

EvalQuery return f(ctx, q).

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

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.

func (GeneralLedgerAccountQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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

func (f GoogleApiMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error

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.

func (GoogleApiQueryRuleFunc) EvalQuery

func (f GoogleApiQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error

EvalQuery return f(ctx, q).

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.

func (HazardousMaterialQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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

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.

func (HazardousMaterialSegregationQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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.

func (InvoiceControlQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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.

func (LocationCategoryQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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.

func (LocationCommentQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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.

func (LocationContactQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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

func (f LocationMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error

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.

func (LocationQueryRuleFunc) EvalQuery

func (f LocationQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error

EvalQuery return f(ctx, q).

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

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.

func (OrganizationFeatureFlagQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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.

func (OrganizationQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

type Policy

type Policy = privacy.Policy

Policy groups query and mutation policies.

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.

func (QualifierCodeQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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

type QueryRule = privacy.QueryRule

QueryRule defines the interface deciding whether a query is allowed and optionally modify it.

type QueryRuleFunc

type QueryRuleFunc func(context.Context, ent.Query) error

QueryRuleFunc type is an adapter to allow the use of ordinary functions as query rules.

func (QueryRuleFunc) EvalQuery

func (f QueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error

Eval returns f(ctx, q).

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.

func (ReasonCodeQueryRuleFunc) EvalQuery

func (f ReasonCodeQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error

EvalQuery return f(ctx, q).

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.

func (RevenueCodeQueryRuleFunc) EvalQuery

func (f RevenueCodeQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error

EvalQuery return f(ctx, q).

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.

func (RouteControlQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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.

func (ServiceTypeQueryRuleFunc) EvalQuery

func (f ServiceTypeQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error

EvalQuery return f(ctx, q).

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

func (f SessionMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error

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.

func (SessionQueryRuleFunc) EvalQuery

func (f SessionQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error

EvalQuery return f(ctx, q).

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.

func (ShipmentControlQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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.

func (ShipmentTypeQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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.

func (TableChangeAlertQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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

func (f TagMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error

EvalMutation calls f(ctx, m).

type TagQueryRuleFunc

type TagQueryRuleFunc func(context.Context, *ent.TagQuery) error

The TagQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.

func (TagQueryRuleFunc) EvalQuery

func (f TagQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error

EvalQuery return f(ctx, q).

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

func (f TractorMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error

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.

func (TractorQueryRuleFunc) EvalQuery

func (f TractorQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error

EvalQuery return f(ctx, q).

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

func (f TrailerMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error

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.

func (TrailerQueryRuleFunc) EvalQuery

func (f TrailerQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error

EvalQuery return f(ctx, q).

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

func (f UsStateMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error

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.

func (UsStateQueryRuleFunc) EvalQuery

func (f UsStateQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error

EvalQuery return f(ctx, q).

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.

func (UserFavoriteQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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

func (f UserMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error

EvalMutation calls f(ctx, m).

type UserQueryRuleFunc

type UserQueryRuleFunc func(context.Context, *ent.UserQuery) error

The UserQueryRuleFunc type is an adapter to allow the use of ordinary functions as a query rule.

func (UserQueryRuleFunc) EvalQuery

func (f UserQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error

EvalQuery return f(ctx, q).

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.

func (WorkerCommentQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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.

func (WorkerContactQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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

func (f WorkerMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error

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.

func (WorkerProfileQueryRuleFunc) EvalQuery

EvalQuery return f(ctx, q).

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.

func (WorkerQueryRuleFunc) EvalQuery

func (f WorkerQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error

EvalQuery return f(ctx, q).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL