Documentation
¶
Overview ¶
Package mixin contains the mixin package
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HookSystemOwned ¶ added in v0.8.3
HookSystemOwned will automatically set the system_owned field to true if the user is a system admin
Types ¶
type GraphQLAnnotationMixin ¶ added in v0.8.2
GraphQLAnnotationMixin implements the revision pattern for schemas. it will add default annotations to the schema used for most schemas that have full graphql support
func (GraphQLAnnotationMixin) Annotations ¶ added in v0.8.2
func (GraphQLAnnotationMixin) Annotations() []schema.Annotation
Annotations of the AnnotationMixin.
type RevisionMixin ¶ added in v0.7.5
RevisionMixin implements the revision pattern for schemas.
func (RevisionMixin) Fields ¶ added in v0.7.5
func (RevisionMixin) Fields() []ent.Field
Fields of the RevisionMixin.
func (RevisionMixin) Hooks ¶ added in v0.7.5
func (d RevisionMixin) Hooks() []ent.Hook
Hooks of the RevisionMixin.
type SoftDeleteMixin ¶
SoftDeleteMixin implements the soft delete pattern for schemas.
func (SoftDeleteMixin) Fields ¶
func (SoftDeleteMixin) Fields() []ent.Field
Fields of the SoftDeleteMixin.
func (SoftDeleteMixin) Hooks ¶
func (d SoftDeleteMixin) Hooks() []ent.Hook
Hooks of the SoftDeleteMixin.
func (SoftDeleteMixin) Interceptors ¶
func (d SoftDeleteMixin) Interceptors() []ent.Interceptor
Interceptors of the SoftDeleteMixin.
func (SoftDeleteMixin) P ¶
func (d SoftDeleteMixin) P(w interface{ WhereP(...func(*sql.Selector)) })
P adds a storage-level predicate to the queries and mutations.
func (SoftDeleteMixin) SoftDeleteHook ¶
func (d SoftDeleteMixin) SoftDeleteHook(next ent.Mutator) ent.Mutator
SoftDeleteHook will soft delete records, by changing the delete mutation to an update and setting the deleted_at and deleted_by fields, unless the softDeleteSkipKey is set
type SystemOwnedMixin ¶ added in v0.8.3
SystemOwnedMixin implements the revision pattern for schemas.
func (SystemOwnedMixin) Fields ¶ added in v0.8.3
func (SystemOwnedMixin) Fields() []ent.Field
Fields of the SystemOwnedMixin.
func (SystemOwnedMixin) Hooks ¶ added in v0.8.3
func (d SystemOwnedMixin) Hooks() []ent.Hook
Hooks of the SystemOwnedMixin.
type SystemOwnedMutation ¶ added in v0.8.3
type SystemOwnedMutation interface {
SetSystemOwned(bool)
}
SystemOwnedMutation is an interface for interacting with the system_owned field in mutations it will add the system_owned_field and will automatically set the field to true if the user is a system admin
type UnexpectedMutationTypeError ¶
UnexpectedMutationTypeError is returned when an unexpected mutation type is parsed
func (*UnexpectedMutationTypeError) Error ¶
func (e *UnexpectedMutationTypeError) Error() string
Error returns the UnexpectedAuditError in string format
type UserOwnedMutationPolicyMixin ¶
func (UserOwnedMutationPolicyMixin) Policy ¶
func (mixin UserOwnedMutationPolicyMixin) Policy() ent.Policy
Policy sets the policy for updating owned fields by the user
type UserOwnedQueryPolicyMixin ¶
func (UserOwnedQueryPolicyMixin) Policy ¶
func (mixin UserOwnedQueryPolicyMixin) Policy() ent.Policy
Policy sets the policy for querying owned fields by the user