intercept

package
v0.0.0-...-9f34937 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 MsgAlertFunc

type MsgAlertFunc func(context.Context, *ent.MsgAlertQuery) (ent.Value, error)

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

func (MsgAlertFunc) Query

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

Query calls f(ctx, q).

type MsgChannelFunc

type MsgChannelFunc func(context.Context, *ent.MsgChannelQuery) (ent.Value, error)

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

func (MsgChannelFunc) Query

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

Query calls f(ctx, q).

type MsgEventFunc

type MsgEventFunc func(context.Context, *ent.MsgEventQuery) (ent.Value, error)

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

func (MsgEventFunc) Query

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

Query calls f(ctx, q).

type MsgInternalFunc

type MsgInternalFunc func(context.Context, *ent.MsgInternalQuery) (ent.Value, error)

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

func (MsgInternalFunc) Query

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

Query calls f(ctx, q).

type MsgInternalToFunc

type MsgInternalToFunc func(context.Context, *ent.MsgInternalToQuery) (ent.Value, error)

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

func (MsgInternalToFunc) Query

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

Query calls f(ctx, q).

type MsgSubscriberFunc

type MsgSubscriberFunc func(context.Context, *ent.MsgSubscriberQuery) (ent.Value, error)

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

func (MsgSubscriberFunc) Query

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

Query calls f(ctx, q).

type MsgTemplateFunc

type MsgTemplateFunc func(context.Context, *ent.MsgTemplateQuery) (ent.Value, error)

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

func (MsgTemplateFunc) Query

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

Query calls f(ctx, q).

type MsgTypeFunc

type MsgTypeFunc func(context.Context, *ent.MsgTypeQuery) (ent.Value, error)

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

func (MsgTypeFunc) Query

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

Query calls f(ctx, q).

type NlogAlertFunc

type NlogAlertFunc func(context.Context, *ent.NlogAlertQuery) (ent.Value, error)

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

func (NlogAlertFunc) Query

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

Query calls f(ctx, q).

type NlogFunc

type NlogFunc func(context.Context, *ent.NlogQuery) (ent.Value, error)

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

func (NlogFunc) Query

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

Query calls f(ctx, q).

type OrgRoleUserFunc

type OrgRoleUserFunc func(context.Context, *ent.OrgRoleUserQuery) (ent.Value, error)

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

func (OrgRoleUserFunc) Query

func (f OrgRoleUserFunc) 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 SilenceFunc

type SilenceFunc func(context.Context, *ent.SilenceQuery) (ent.Value, error)

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

func (SilenceFunc) Query

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

Query 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 TraverseMsgAlert

type TraverseMsgAlert func(context.Context, *ent.MsgAlertQuery) error

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

func (TraverseMsgAlert) Intercept

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

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

func (TraverseMsgAlert) Traverse

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

Traverse calls f(ctx, q).

type TraverseMsgChannel

type TraverseMsgChannel func(context.Context, *ent.MsgChannelQuery) error

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

func (TraverseMsgChannel) Intercept

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

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

func (TraverseMsgChannel) Traverse

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

Traverse calls f(ctx, q).

type TraverseMsgEvent

type TraverseMsgEvent func(context.Context, *ent.MsgEventQuery) error

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

func (TraverseMsgEvent) Intercept

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

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

func (TraverseMsgEvent) Traverse

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

Traverse calls f(ctx, q).

type TraverseMsgInternal

type TraverseMsgInternal func(context.Context, *ent.MsgInternalQuery) error

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

func (TraverseMsgInternal) Intercept

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

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

func (TraverseMsgInternal) Traverse

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

Traverse calls f(ctx, q).

type TraverseMsgInternalTo

type TraverseMsgInternalTo func(context.Context, *ent.MsgInternalToQuery) error

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

func (TraverseMsgInternalTo) Intercept

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

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

func (TraverseMsgInternalTo) Traverse

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

Traverse calls f(ctx, q).

type TraverseMsgSubscriber

type TraverseMsgSubscriber func(context.Context, *ent.MsgSubscriberQuery) error

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

func (TraverseMsgSubscriber) Intercept

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

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

func (TraverseMsgSubscriber) Traverse

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

Traverse calls f(ctx, q).

type TraverseMsgTemplate

type TraverseMsgTemplate func(context.Context, *ent.MsgTemplateQuery) error

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

func (TraverseMsgTemplate) Intercept

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

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

func (TraverseMsgTemplate) Traverse

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

Traverse calls f(ctx, q).

type TraverseMsgType

type TraverseMsgType func(context.Context, *ent.MsgTypeQuery) error

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

func (TraverseMsgType) Intercept

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

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

func (TraverseMsgType) Traverse

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

Traverse calls f(ctx, q).

type TraverseNlog

type TraverseNlog func(context.Context, *ent.NlogQuery) error

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

func (TraverseNlog) Intercept

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

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

func (TraverseNlog) Traverse

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

Traverse calls f(ctx, q).

type TraverseNlogAlert

type TraverseNlogAlert func(context.Context, *ent.NlogAlertQuery) error

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

func (TraverseNlogAlert) Intercept

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

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

func (TraverseNlogAlert) Traverse

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

Traverse calls f(ctx, q).

type TraverseOrgRoleUser

type TraverseOrgRoleUser func(context.Context, *ent.OrgRoleUserQuery) error

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

func (TraverseOrgRoleUser) Intercept

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

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

func (TraverseOrgRoleUser) Traverse

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

Traverse calls f(ctx, q).

type TraverseSilence

type TraverseSilence func(context.Context, *ent.SilenceQuery) error

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

func (TraverseSilence) Intercept

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

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

func (TraverseSilence) Traverse

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