intercept

package
v5.0.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessTokenFunc

type AccessTokenFunc func(context.Context, *ent.AccessTokenQuery) (ent.Value, error)

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

func (AccessTokenFunc) Query

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

Query calls f(ctx, q).

type CacheLockFunc

type CacheLockFunc func(context.Context, *ent.CacheLockQuery) (ent.Value, error)

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

func (CacheLockFunc) Query

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

Query calls f(ctx, q).

type ChangelogFunc

type ChangelogFunc func(context.Context, *ent.ChangelogQuery) (ent.Value, error)

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

func (ChangelogFunc) Query

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

Query calls f(ctx, q).

type DBCacheFunc

type DBCacheFunc func(context.Context, *ent.DBCacheQuery) (ent.Value, error)

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

func (DBCacheFunc) Query

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

Query calls f(ctx, q).

type EventFunc

type EventFunc func(context.Context, *ent.EventQuery) (ent.Value, error)

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

func (EventFunc) Query

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

Query calls f(ctx, q).

type FavoriteFunc

type FavoriteFunc func(context.Context, *ent.FavoriteQuery) (ent.Value, error)

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

func (FavoriteFunc) Query

func (f FavoriteFunc) 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 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 MemberFunc

type MemberFunc func(context.Context, *ent.MemberQuery) (ent.Value, error)

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

func (MemberFunc) Query

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

Query calls f(ctx, q).

type NamespaceFunc

type NamespaceFunc func(context.Context, *ent.NamespaceQuery) (ent.Value, error)

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

func (NamespaceFunc) Query

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

Query calls f(ctx, q).

type ProjectFunc

type ProjectFunc func(context.Context, *ent.ProjectQuery) (ent.Value, error)

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

func (ProjectFunc) Query

func (f ProjectFunc) 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 RepoFunc

type RepoFunc func(context.Context, *ent.RepoQuery) (ent.Value, error)

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

func (RepoFunc) Query

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

Query calls f(ctx, q).

type TraverseAccessToken

type TraverseAccessToken func(context.Context, *ent.AccessTokenQuery) error

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

func (TraverseAccessToken) Intercept

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

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

func (TraverseAccessToken) Traverse

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

Traverse calls f(ctx, q).

type TraverseCacheLock

type TraverseCacheLock func(context.Context, *ent.CacheLockQuery) error

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

func (TraverseCacheLock) Intercept

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

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

func (TraverseCacheLock) Traverse

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

Traverse calls f(ctx, q).

type TraverseChangelog

type TraverseChangelog func(context.Context, *ent.ChangelogQuery) error

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

func (TraverseChangelog) Intercept

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

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

func (TraverseChangelog) Traverse

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

Traverse calls f(ctx, q).

type TraverseDBCache

type TraverseDBCache func(context.Context, *ent.DBCacheQuery) error

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

func (TraverseDBCache) Intercept

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

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

func (TraverseDBCache) Traverse

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

Traverse calls f(ctx, q).

type TraverseEvent

type TraverseEvent func(context.Context, *ent.EventQuery) error

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

func (TraverseEvent) Intercept

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

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

func (TraverseEvent) Traverse

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

Traverse calls f(ctx, q).

type TraverseFavorite

type TraverseFavorite func(context.Context, *ent.FavoriteQuery) error

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

func (TraverseFavorite) Intercept

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

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

func (TraverseFavorite) Traverse

func (f TraverseFavorite) 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 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 TraverseMember

type TraverseMember func(context.Context, *ent.MemberQuery) error

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

func (TraverseMember) Intercept

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

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

func (TraverseMember) Traverse

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

Traverse calls f(ctx, q).

type TraverseNamespace

type TraverseNamespace func(context.Context, *ent.NamespaceQuery) error

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

func (TraverseNamespace) Intercept

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

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

func (TraverseNamespace) Traverse

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

Traverse calls f(ctx, q).

type TraverseProject

type TraverseProject func(context.Context, *ent.ProjectQuery) error

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

func (TraverseProject) Intercept

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

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

func (TraverseProject) Traverse

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

Traverse calls f(ctx, q).

type TraverseRepo

type TraverseRepo func(context.Context, *ent.RepoQuery) error

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

func (TraverseRepo) Intercept

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

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

func (TraverseRepo) Traverse

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

Traverse calls f(ctx, q).

Jump to

Keyboard shortcuts

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