intercept

package
v4.0.0-...-5b82330 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DavAccountFunc

type DavAccountFunc func(context.Context, *ent.DavAccountQuery) (ent.Value, error)

The DavAccountFunc type is an adapter to allow the use of ordinary function as a Querier.

func (DavAccountFunc) Query

func (f DavAccountFunc) Query(ctx context.Context, q ent.Query) (ent.Value, error)

Query calls f(ctx, q).

type DirectLinkFunc

type DirectLinkFunc func(context.Context, *ent.DirectLinkQuery) (ent.Value, error)

The DirectLinkFunc type is an adapter to allow the use of ordinary function as a Querier.

func (DirectLinkFunc) Query

func (f DirectLinkFunc) Query(ctx context.Context, q ent.Query) (ent.Value, error)

Query calls f(ctx, q).

type EntityFunc

type EntityFunc func(context.Context, *ent.EntityQuery) (ent.Value, error)

The EntityFunc type is an adapter to allow the use of ordinary function as a Querier.

func (EntityFunc) Query

func (f EntityFunc) Query(ctx context.Context, q ent.Query) (ent.Value, error)

Query calls f(ctx, q).

type FileFunc

type FileFunc func(context.Context, *ent.FileQuery) (ent.Value, error)

The FileFunc type is an adapter to allow the use of ordinary function as a Querier.

func (FileFunc) Query

func (f FileFunc) Query(ctx context.Context, q ent.Query) (ent.Value, error)

Query calls f(ctx, q).

type FsEventFunc

type FsEventFunc func(context.Context, *ent.FsEventQuery) (ent.Value, error)

The FsEventFunc type is an adapter to allow the use of ordinary function as a Querier.

func (FsEventFunc) Query

func (f FsEventFunc) Query(ctx context.Context, q ent.Query) (ent.Value, error)

Query calls f(ctx, q).

type Func

type Func func(context.Context, Query) error

The Func type is an adapter that allows ordinary functions to be used as interceptors. Unlike traversal functions, interceptors are skipped during graph traversals. Note that the implementation of Func is different from the one defined in entgo.io/ent.InterceptFunc.

func (Func) Intercept

func (f Func) Intercept(next ent.Querier) ent.Querier

Intercept calls f(ctx, q) and then applied the next Querier.

type GroupFunc

type GroupFunc func(context.Context, *ent.GroupQuery) (ent.Value, error)

The GroupFunc type is an adapter to allow the use of ordinary function as a Querier.

func (GroupFunc) Query

func (f GroupFunc) Query(ctx context.Context, q ent.Query) (ent.Value, error)

Query calls f(ctx, q).

type MetadataFunc

type MetadataFunc func(context.Context, *ent.MetadataQuery) (ent.Value, error)

The MetadataFunc type is an adapter to allow the use of ordinary function as a Querier.

func (MetadataFunc) Query

func (f MetadataFunc) Query(ctx context.Context, q ent.Query) (ent.Value, error)

Query calls f(ctx, q).

type NodeFunc

type NodeFunc func(context.Context, *ent.NodeQuery) (ent.Value, error)

The NodeFunc type is an adapter to allow the use of ordinary function as a Querier.

func (NodeFunc) Query

func (f NodeFunc) Query(ctx context.Context, q ent.Query) (ent.Value, error)

Query calls f(ctx, q).

type OAuthClientFunc

type OAuthClientFunc func(context.Context, *ent.OAuthClientQuery) (ent.Value, error)

The OAuthClientFunc type is an adapter to allow the use of ordinary function as a Querier.

func (OAuthClientFunc) Query

func (f OAuthClientFunc) Query(ctx context.Context, q ent.Query) (ent.Value, error)

Query calls f(ctx, q).

type OAuthGrantFunc

type OAuthGrantFunc func(context.Context, *ent.OAuthGrantQuery) (ent.Value, error)

The OAuthGrantFunc type is an adapter to allow the use of ordinary function as a Querier.

func (OAuthGrantFunc) Query

func (f OAuthGrantFunc) Query(ctx context.Context, q ent.Query) (ent.Value, error)

Query calls f(ctx, q).

type PasskeyFunc

type PasskeyFunc func(context.Context, *ent.PasskeyQuery) (ent.Value, error)

The PasskeyFunc type is an adapter to allow the use of ordinary function as a Querier.

func (PasskeyFunc) Query

func (f PasskeyFunc) Query(ctx context.Context, q ent.Query) (ent.Value, error)

Query calls f(ctx, q).

type Query

type Query interface {
	// Type returns the string representation of the query type.
	Type() string
	// Limit the number of records to be returned by this query.
	Limit(int)
	// Offset to start from.
	Offset(int)
	// Unique configures the query builder to filter duplicate records.
	Unique(bool)
	// Order specifies how the records should be ordered.
	Order(...func(*sql.Selector))
	// WhereP appends storage-level predicates to the query builder. Using this method, users
	// can use type-assertion to append predicates that do not depend on any generated package.
	WhereP(...func(*sql.Selector))
}

The Query interface represents an operation that queries a graph. By using this interface, users can write generic code that manipulates query builders of different types.

func NewQuery

func NewQuery(q ent.Query) (Query, error)

NewQuery returns the generic Query interface for the given typed query.

type SettingFunc

type SettingFunc func(context.Context, *ent.SettingQuery) (ent.Value, error)

The SettingFunc type is an adapter to allow the use of ordinary function as a Querier.

func (SettingFunc) Query

func (f SettingFunc) Query(ctx context.Context, q ent.Query) (ent.Value, error)

Query calls f(ctx, q).

type ShareFunc

type ShareFunc func(context.Context, *ent.ShareQuery) (ent.Value, error)

The ShareFunc type is an adapter to allow the use of ordinary function as a Querier.

func (ShareFunc) Query

func (f ShareFunc) Query(ctx context.Context, q ent.Query) (ent.Value, error)

Query calls f(ctx, q).

type StoragePolicyFunc

type StoragePolicyFunc func(context.Context, *ent.StoragePolicyQuery) (ent.Value, error)

The StoragePolicyFunc type is an adapter to allow the use of ordinary function as a Querier.

func (StoragePolicyFunc) Query

func (f StoragePolicyFunc) Query(ctx context.Context, q ent.Query) (ent.Value, error)

Query calls f(ctx, q).

type TaskFunc

type TaskFunc func(context.Context, *ent.TaskQuery) (ent.Value, error)

The TaskFunc type is an adapter to allow the use of ordinary function as a Querier.

func (TaskFunc) Query

func (f TaskFunc) Query(ctx context.Context, q ent.Query) (ent.Value, error)

Query calls f(ctx, q).

type TraverseDavAccount

type TraverseDavAccount func(context.Context, *ent.DavAccountQuery) error

The TraverseDavAccount type is an adapter to allow the use of ordinary function as Traverser.

func (TraverseDavAccount) Intercept

func (f TraverseDavAccount) Intercept(next ent.Querier) ent.Querier

Intercept is a dummy implementation of Intercept that returns the next Querier in the pipeline.

func (TraverseDavAccount) Traverse

func (f TraverseDavAccount) Traverse(ctx context.Context, q ent.Query) error

Traverse calls f(ctx, q).

type TraverseDirectLink func(context.Context, *ent.DirectLinkQuery) error

The TraverseDirectLink type is an adapter to allow the use of ordinary function as Traverser.

func (TraverseDirectLink) Intercept

func (f TraverseDirectLink) Intercept(next ent.Querier) ent.Querier

Intercept is a dummy implementation of Intercept that returns the next Querier in the pipeline.

func (TraverseDirectLink) Traverse

func (f TraverseDirectLink) Traverse(ctx context.Context, q ent.Query) error

Traverse calls f(ctx, q).

type TraverseEntity

type TraverseEntity func(context.Context, *ent.EntityQuery) error

The TraverseEntity type is an adapter to allow the use of ordinary function as Traverser.

func (TraverseEntity) Intercept

func (f TraverseEntity) Intercept(next ent.Querier) ent.Querier

Intercept is a dummy implementation of Intercept that returns the next Querier in the pipeline.

func (TraverseEntity) Traverse

func (f TraverseEntity) Traverse(ctx context.Context, q ent.Query) error

Traverse calls f(ctx, q).

type TraverseFile

type TraverseFile func(context.Context, *ent.FileQuery) error

The TraverseFile type is an adapter to allow the use of ordinary function as Traverser.

func (TraverseFile) Intercept

func (f TraverseFile) Intercept(next ent.Querier) ent.Querier

Intercept is a dummy implementation of Intercept that returns the next Querier in the pipeline.

func (TraverseFile) Traverse

func (f TraverseFile) Traverse(ctx context.Context, q ent.Query) error

Traverse calls f(ctx, q).

type TraverseFsEvent

type TraverseFsEvent func(context.Context, *ent.FsEventQuery) error

The TraverseFsEvent type is an adapter to allow the use of ordinary function as Traverser.

func (TraverseFsEvent) Intercept

func (f TraverseFsEvent) Intercept(next ent.Querier) ent.Querier

Intercept is a dummy implementation of Intercept that returns the next Querier in the pipeline.

func (TraverseFsEvent) Traverse

func (f TraverseFsEvent) Traverse(ctx context.Context, q ent.Query) error

Traverse calls f(ctx, q).

type TraverseFunc

type TraverseFunc func(context.Context, Query) error

The TraverseFunc type is an adapter to allow the use of ordinary function as Traverser. If f is a function with the appropriate signature, TraverseFunc(f) is a Traverser that calls f.

func (TraverseFunc) Intercept

func (f TraverseFunc) Intercept(next ent.Querier) ent.Querier

Intercept is a dummy implementation of Intercept that returns the next Querier in the pipeline.

func (TraverseFunc) Traverse

func (f TraverseFunc) Traverse(ctx context.Context, q ent.Query) error

Traverse calls f(ctx, q).

type TraverseGroup

type TraverseGroup func(context.Context, *ent.GroupQuery) error

The TraverseGroup type is an adapter to allow the use of ordinary function as Traverser.

func (TraverseGroup) Intercept

func (f TraverseGroup) Intercept(next ent.Querier) ent.Querier

Intercept is a dummy implementation of Intercept that returns the next Querier in the pipeline.

func (TraverseGroup) Traverse

func (f TraverseGroup) Traverse(ctx context.Context, q ent.Query) error

Traverse calls f(ctx, q).

type TraverseMetadata

type TraverseMetadata func(context.Context, *ent.MetadataQuery) error

The TraverseMetadata type is an adapter to allow the use of ordinary function as Traverser.

func (TraverseMetadata) Intercept

func (f TraverseMetadata) Intercept(next ent.Querier) ent.Querier

Intercept is a dummy implementation of Intercept that returns the next Querier in the pipeline.

func (TraverseMetadata) Traverse

func (f TraverseMetadata) Traverse(ctx context.Context, q ent.Query) error

Traverse calls f(ctx, q).

type TraverseNode

type TraverseNode func(context.Context, *ent.NodeQuery) error

The TraverseNode type is an adapter to allow the use of ordinary function as Traverser.

func (TraverseNode) Intercept

func (f TraverseNode) Intercept(next ent.Querier) ent.Querier

Intercept is a dummy implementation of Intercept that returns the next Querier in the pipeline.

func (TraverseNode) Traverse

func (f TraverseNode) Traverse(ctx context.Context, q ent.Query) error

Traverse calls f(ctx, q).

type TraverseOAuthClient

type TraverseOAuthClient func(context.Context, *ent.OAuthClientQuery) error

The TraverseOAuthClient type is an adapter to allow the use of ordinary function as Traverser.

func (TraverseOAuthClient) Intercept

func (f TraverseOAuthClient) Intercept(next ent.Querier) ent.Querier

Intercept is a dummy implementation of Intercept that returns the next Querier in the pipeline.

func (TraverseOAuthClient) Traverse

func (f TraverseOAuthClient) Traverse(ctx context.Context, q ent.Query) error

Traverse calls f(ctx, q).

type TraverseOAuthGrant

type TraverseOAuthGrant func(context.Context, *ent.OAuthGrantQuery) error

The TraverseOAuthGrant type is an adapter to allow the use of ordinary function as Traverser.

func (TraverseOAuthGrant) Intercept

func (f TraverseOAuthGrant) Intercept(next ent.Querier) ent.Querier

Intercept is a dummy implementation of Intercept that returns the next Querier in the pipeline.

func (TraverseOAuthGrant) Traverse

func (f TraverseOAuthGrant) Traverse(ctx context.Context, q ent.Query) error

Traverse calls f(ctx, q).

type TraversePasskey

type TraversePasskey func(context.Context, *ent.PasskeyQuery) error

The TraversePasskey type is an adapter to allow the use of ordinary function as Traverser.

func (TraversePasskey) Intercept

func (f TraversePasskey) Intercept(next ent.Querier) ent.Querier

Intercept is a dummy implementation of Intercept that returns the next Querier in the pipeline.

func (TraversePasskey) Traverse

func (f TraversePasskey) Traverse(ctx context.Context, q ent.Query) error

Traverse calls f(ctx, q).

type TraverseSetting

type TraverseSetting func(context.Context, *ent.SettingQuery) error

The TraverseSetting type is an adapter to allow the use of ordinary function as Traverser.

func (TraverseSetting) Intercept

func (f TraverseSetting) Intercept(next ent.Querier) ent.Querier

Intercept is a dummy implementation of Intercept that returns the next Querier in the pipeline.

func (TraverseSetting) Traverse

func (f TraverseSetting) Traverse(ctx context.Context, q ent.Query) error

Traverse calls f(ctx, q).

type TraverseShare

type TraverseShare func(context.Context, *ent.ShareQuery) error

The TraverseShare type is an adapter to allow the use of ordinary function as Traverser.

func (TraverseShare) Intercept

func (f TraverseShare) Intercept(next ent.Querier) ent.Querier

Intercept is a dummy implementation of Intercept that returns the next Querier in the pipeline.

func (TraverseShare) Traverse

func (f TraverseShare) Traverse(ctx context.Context, q ent.Query) error

Traverse calls f(ctx, q).

type TraverseStoragePolicy

type TraverseStoragePolicy func(context.Context, *ent.StoragePolicyQuery) error

The TraverseStoragePolicy type is an adapter to allow the use of ordinary function as Traverser.

func (TraverseStoragePolicy) Intercept

func (f TraverseStoragePolicy) Intercept(next ent.Querier) ent.Querier

Intercept is a dummy implementation of Intercept that returns the next Querier in the pipeline.

func (TraverseStoragePolicy) Traverse

func (f TraverseStoragePolicy) Traverse(ctx context.Context, q ent.Query) error

Traverse calls f(ctx, q).

type TraverseTask

type TraverseTask func(context.Context, *ent.TaskQuery) error

The TraverseTask type is an adapter to allow the use of ordinary function as Traverser.

func (TraverseTask) Intercept

func (f TraverseTask) Intercept(next ent.Querier) ent.Querier

Intercept is a dummy implementation of Intercept that returns the next Querier in the pipeline.

func (TraverseTask) Traverse

func (f TraverseTask) Traverse(ctx context.Context, q ent.Query) error

Traverse calls f(ctx, q).

type TraverseUser

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

The TraverseUser type is an adapter to allow the use of ordinary function as Traverser.

func (TraverseUser) Intercept

func (f TraverseUser) Intercept(next ent.Querier) ent.Querier

Intercept is a dummy implementation of Intercept that returns the next Querier in the pipeline.

func (TraverseUser) Traverse

func (f TraverseUser) Traverse(ctx context.Context, q ent.Query) error

Traverse calls f(ctx, q).

type UserFunc

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

The UserFunc type is an adapter to allow the use of ordinary function as a Querier.

func (UserFunc) Query

func (f UserFunc) Query(ctx context.Context, q ent.Query) (ent.Value, error)

Query calls f(ctx, q).

Jump to

Keyboard shortcuts

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