Documentation
¶
Overview ¶
Package utils is a helper for working with ent policies
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthzClient ¶ added in v0.6.19
AuthzClient returns the authz client from the context if it exists, otherwise it will attempt to get the client from the mutation if it implements the `MutationClient` interface
func AuthzClientFromContext ¶ added in v0.4.1
AuthzClientFromContext returns the authz client from the context if it exists this is useful when you need to get the client from the context directly
func NewMutationPolicyWithoutNil ¶
func NewMutationPolicyWithoutNil(source privacy.MutationPolicy) privacy.MutationPolicy
NewMutationPolicyWithoutNil is creating a new slice of `privacy.MutationPolicy` by removing any `nil` values from the input `source` slice. It iterates over each item in the source slice and appends it to the new slice only if it is not `nil` - the new slice is then returned
Types ¶
type MutationClient ¶ added in v0.6.19
MutationClient is an interface that can be implemented by a mutation to return the ent client