intercept

package
v0.0.0-...-5feaf8d Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.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 CheckFunc

type CheckFunc func(context.Context, *ent.CheckQuery) (ent.Value, error)

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

func (CheckFunc) Query

func (f CheckFunc) 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 GPTDialogFunc

type GPTDialogFunc func(context.Context, *ent.GPTDialogQuery) (ent.Value, error)

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

func (GPTDialogFunc) Query

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

Query calls f(ctx, q).

type GitCommitFunc

type GitCommitFunc func(context.Context, *ent.GitCommitQuery) (ent.Value, error)

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

func (GitCommitFunc) Query

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

Query calls f(ctx, q).

type LastChannelMessageFunc

type LastChannelMessageFunc func(context.Context, *ent.LastChannelMessageQuery) (ent.Value, error)

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

func (LastChannelMessageFunc) Query

Query calls f(ctx, q).

type OrganizationFunc

type OrganizationFunc func(context.Context, *ent.OrganizationQuery) (ent.Value, error)

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

func (OrganizationFunc) Query

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

Query calls f(ctx, q).

type PRNotificationFunc

type PRNotificationFunc func(context.Context, *ent.PRNotificationQuery) (ent.Value, error)

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

func (PRNotificationFunc) Query

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 RepositoryFunc

type RepositoryFunc func(context.Context, *ent.RepositoryQuery) (ent.Value, error)

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

func (RepositoryFunc) Query

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

Query calls f(ctx, q).

type TelegramChannelStateFunc

type TelegramChannelStateFunc func(context.Context, *ent.TelegramChannelStateQuery) (ent.Value, error)

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

func (TelegramChannelStateFunc) Query

Query calls f(ctx, q).

type TelegramSessionFunc

type TelegramSessionFunc func(context.Context, *ent.TelegramSessionQuery) (ent.Value, error)

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

func (TelegramSessionFunc) Query

Query calls f(ctx, q).

type TelegramUserStateFunc

type TelegramUserStateFunc func(context.Context, *ent.TelegramUserStateQuery) (ent.Value, error)

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

func (TelegramUserStateFunc) Query

Query calls f(ctx, q).

type TraverseCheck

type TraverseCheck func(context.Context, *ent.CheckQuery) error

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

func (TraverseCheck) Intercept

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

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

func (TraverseCheck) Traverse

func (f TraverseCheck) 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 TraverseGPTDialog

type TraverseGPTDialog func(context.Context, *ent.GPTDialogQuery) error

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

func (TraverseGPTDialog) Intercept

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

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

func (TraverseGPTDialog) Traverse

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

Traverse calls f(ctx, q).

type TraverseGitCommit

type TraverseGitCommit func(context.Context, *ent.GitCommitQuery) error

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

func (TraverseGitCommit) Intercept

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

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

func (TraverseGitCommit) Traverse

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

Traverse calls f(ctx, q).

type TraverseLastChannelMessage

type TraverseLastChannelMessage func(context.Context, *ent.LastChannelMessageQuery) error

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

func (TraverseLastChannelMessage) Intercept

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

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

func (TraverseLastChannelMessage) Traverse

Traverse calls f(ctx, q).

type TraverseOrganization

type TraverseOrganization func(context.Context, *ent.OrganizationQuery) error

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

func (TraverseOrganization) Intercept

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

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

func (TraverseOrganization) Traverse

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

Traverse calls f(ctx, q).

type TraversePRNotification

type TraversePRNotification func(context.Context, *ent.PRNotificationQuery) error

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

func (TraversePRNotification) Intercept

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

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

func (TraversePRNotification) Traverse

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

Traverse calls f(ctx, q).

type TraverseRepository

type TraverseRepository func(context.Context, *ent.RepositoryQuery) error

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

func (TraverseRepository) Intercept

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

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

func (TraverseRepository) Traverse

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

Traverse calls f(ctx, q).

type TraverseTelegramChannelState

type TraverseTelegramChannelState func(context.Context, *ent.TelegramChannelStateQuery) error

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

func (TraverseTelegramChannelState) Intercept

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

func (TraverseTelegramChannelState) Traverse

Traverse calls f(ctx, q).

type TraverseTelegramSession

type TraverseTelegramSession func(context.Context, *ent.TelegramSessionQuery) error

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

func (TraverseTelegramSession) Intercept

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

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

func (TraverseTelegramSession) Traverse

Traverse calls f(ctx, q).

type TraverseTelegramUserState

type TraverseTelegramUserState func(context.Context, *ent.TelegramUserStateQuery) error

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

func (TraverseTelegramUserState) Intercept

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

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

func (TraverseTelegramUserState) Traverse

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