intercept

package
v0.0.0-...-52fa7fc Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentFunc

type AgentFunc func(context.Context, *ent.AgentQuery) (ent.Value, error)

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

func (AgentFunc) Query

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

Query calls f(ctx, q).

type BlobberFunc

type BlobberFunc func(context.Context, *ent.BlobberQuery) (ent.Value, error)

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

func (BlobberFunc) Query

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

Query calls f(ctx, q).

type ChatFunc

type ChatFunc func(context.Context, *ent.ChatQuery) (ent.Value, error)

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

func (ChatFunc) Query

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

Query calls f(ctx, q).

type CommandFunc

type CommandFunc func(context.Context, *ent.CommandQuery) (ent.Value, error)

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

func (CommandFunc) Query

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

Query calls f(ctx, q).

type CredentialFunc

type CredentialFunc func(context.Context, *ent.CredentialQuery) (ent.Value, error)

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

func (CredentialFunc) Query

func (f CredentialFunc) 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 ListenerFunc

type ListenerFunc func(context.Context, *ent.ListenerQuery) (ent.Value, error)

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

func (ListenerFunc) Query

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

Query calls f(ctx, q).

type MessageFunc

type MessageFunc func(context.Context, *ent.MessageQuery) (ent.Value, error)

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

func (MessageFunc) Query

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

Query calls f(ctx, q).

type OperatorFunc

type OperatorFunc func(context.Context, *ent.OperatorQuery) (ent.Value, error)

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

func (OperatorFunc) Query

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

Query calls f(ctx, q).

type PkiFunc

type PkiFunc func(context.Context, *ent.PkiQuery) (ent.Value, error)

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

func (PkiFunc) Query

func (f PkiFunc) 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 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 TraverseAgent

type TraverseAgent func(context.Context, *ent.AgentQuery) error

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

func (TraverseAgent) Intercept

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

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

func (TraverseAgent) Traverse

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

Traverse calls f(ctx, q).

type TraverseBlobber

type TraverseBlobber func(context.Context, *ent.BlobberQuery) error

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

func (TraverseBlobber) Intercept

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

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

func (TraverseBlobber) Traverse

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

Traverse calls f(ctx, q).

type TraverseChat

type TraverseChat func(context.Context, *ent.ChatQuery) error

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

func (TraverseChat) Intercept

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

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

func (TraverseChat) Traverse

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

Traverse calls f(ctx, q).

type TraverseCommand

type TraverseCommand func(context.Context, *ent.CommandQuery) error

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

func (TraverseCommand) Intercept

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

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

func (TraverseCommand) Traverse

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

Traverse calls f(ctx, q).

type TraverseCredential

type TraverseCredential func(context.Context, *ent.CredentialQuery) error

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

func (TraverseCredential) Intercept

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

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

func (TraverseCredential) Traverse

func (f TraverseCredential) 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 TraverseListener

type TraverseListener func(context.Context, *ent.ListenerQuery) error

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

func (TraverseListener) Intercept

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

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

func (TraverseListener) Traverse

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

Traverse calls f(ctx, q).

type TraverseMessage

type TraverseMessage func(context.Context, *ent.MessageQuery) error

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

func (TraverseMessage) Intercept

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

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

func (TraverseMessage) Traverse

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

Traverse calls f(ctx, q).

type TraverseOperator

type TraverseOperator func(context.Context, *ent.OperatorQuery) error

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

func (TraverseOperator) Intercept

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

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

func (TraverseOperator) Traverse

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

Traverse calls f(ctx, q).

type TraversePki

type TraversePki func(context.Context, *ent.PkiQuery) error

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

func (TraversePki) Intercept

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

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

func (TraversePki) Traverse

func (f TraversePki) 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).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳