hooks

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatedByUpdatedByHook

func CreatedByUpdatedByHook(next ent.Mutator) ent.Mutator

CreatedByUpdatedByHook automatically sets created_by and updated_by fields

func EntityMutatePermission

func EntityMutatePermission(next ent.Mutator) ent.Mutator

EntityMutatePermission checks if the current user has permission to perform mutation operations This hook is applied to external API requests (GraphQL/REST) where isInternalOperationContextValue is not set

func EntityReadPermission

func EntityReadPermission() ent.Interceptor

EntityReadPermission creates an interceptor for read operations This interceptor is applied to external API requests (GraphQL/REST) where isInternalOperationContextValue is not set

Types

type QueryWithAdminCreatedBy

type QueryWithAdminCreatedBy interface {
	ent.Query
	WhereAdminCreatedBy(adminUserID string) ent.Query
}

QueryWithAdminCreatedBy is an interface for queries that support owner filtering. The WhereAdminCreatedBy method is generated by the ent template system.

Jump to

Keyboard shortcuts

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