intercept

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: Apache-2.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 EmailVerificationTokenFunc added in v0.2.2

type EmailVerificationTokenFunc func(context.Context, *generated.EmailVerificationTokenQuery) (generated.Value, error)

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

func (EmailVerificationTokenFunc) Query added in v0.2.2

Query calls f(ctx, q).

type EntitlementFunc

type EntitlementFunc func(context.Context, *generated.EntitlementQuery) (generated.Value, error)

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

func (EntitlementFunc) Query

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 generated.Querier) generated.Querier

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

type GroupFunc

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

func (GroupFunc) Query

Query calls f(ctx, q).

type GroupMembershipFunc added in v0.2.4

type GroupMembershipFunc func(context.Context, *generated.GroupMembershipQuery) (generated.Value, error)

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

func (GroupMembershipFunc) Query added in v0.2.4

Query calls f(ctx, q).

type GroupSettingFunc

type GroupSettingFunc func(context.Context, *generated.GroupSettingQuery) (generated.Value, error)

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

func (GroupSettingFunc) Query

Query calls f(ctx, q).

type IntegrationFunc

type IntegrationFunc func(context.Context, *generated.IntegrationQuery) (generated.Value, error)

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

func (IntegrationFunc) Query

Query calls f(ctx, q).

type OauthProviderFunc

type OauthProviderFunc func(context.Context, *generated.OauthProviderQuery) (generated.Value, error)

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

func (OauthProviderFunc) Query

Query calls f(ctx, q).

type OhAuthTooTokenFunc

type OhAuthTooTokenFunc func(context.Context, *generated.OhAuthTooTokenQuery) (generated.Value, error)

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

func (OhAuthTooTokenFunc) Query

Query calls f(ctx, q).

type OrgMembershipFunc added in v0.2.4

type OrgMembershipFunc func(context.Context, *generated.OrgMembershipQuery) (generated.Value, error)

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

func (OrgMembershipFunc) Query added in v0.2.4

Query calls f(ctx, q).

type OrganizationFunc

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

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

func (OrganizationFunc) Query

Query calls f(ctx, q).

type OrganizationSettingFunc

type OrganizationSettingFunc func(context.Context, *generated.OrganizationSettingQuery) (generated.Value, error)

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

func (OrganizationSettingFunc) Query

Query calls f(ctx, q).

type PasswordResetTokenFunc added in v0.2.3

type PasswordResetTokenFunc func(context.Context, *generated.PasswordResetTokenQuery) (generated.Value, error)

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

func (PasswordResetTokenFunc) Query added in v0.2.3

Query calls f(ctx, q).

type PersonalAccessTokenFunc

type PersonalAccessTokenFunc func(context.Context, *generated.PersonalAccessTokenQuery) (generated.Value, error)

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

func (PersonalAccessTokenFunc) 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 generated.Query) (Query, error)

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

type SessionFunc

type SessionFunc func(context.Context, *generated.SessionQuery) (generated.Value, error)

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

func (SessionFunc) Query

Query calls f(ctx, q).

type TraverseEmailVerificationToken added in v0.2.2

type TraverseEmailVerificationToken func(context.Context, *generated.EmailVerificationTokenQuery) error

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

func (TraverseEmailVerificationToken) Intercept added in v0.2.2

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

func (TraverseEmailVerificationToken) Traverse added in v0.2.2

Traverse calls f(ctx, q).

type TraverseEntitlement

type TraverseEntitlement func(context.Context, *generated.EntitlementQuery) error

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

func (TraverseEntitlement) Intercept

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

func (TraverseEntitlement) Traverse

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 generated.Querier) generated.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 generated.Query) error

Traverse calls f(ctx, q).

type TraverseGroup

type TraverseGroup func(context.Context, *generated.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 generated.Querier) generated.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 generated.Query) error

Traverse calls f(ctx, q).

type TraverseGroupMembership added in v0.2.4

type TraverseGroupMembership func(context.Context, *generated.GroupMembershipQuery) error

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

func (TraverseGroupMembership) Intercept added in v0.2.4

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

func (TraverseGroupMembership) Traverse added in v0.2.4

Traverse calls f(ctx, q).

type TraverseGroupSetting

type TraverseGroupSetting func(context.Context, *generated.GroupSettingQuery) error

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

func (TraverseGroupSetting) Intercept

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

func (TraverseGroupSetting) Traverse

Traverse calls f(ctx, q).

type TraverseIntegration

type TraverseIntegration func(context.Context, *generated.IntegrationQuery) error

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

func (TraverseIntegration) Intercept

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

func (TraverseIntegration) Traverse

Traverse calls f(ctx, q).

type TraverseOauthProvider

type TraverseOauthProvider func(context.Context, *generated.OauthProviderQuery) error

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

func (TraverseOauthProvider) Intercept

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

func (TraverseOauthProvider) Traverse

Traverse calls f(ctx, q).

type TraverseOhAuthTooToken

type TraverseOhAuthTooToken func(context.Context, *generated.OhAuthTooTokenQuery) error

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

func (TraverseOhAuthTooToken) Intercept

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

func (TraverseOhAuthTooToken) Traverse

Traverse calls f(ctx, q).

type TraverseOrgMembership added in v0.2.4

type TraverseOrgMembership func(context.Context, *generated.OrgMembershipQuery) error

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

func (TraverseOrgMembership) Intercept added in v0.2.4

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

func (TraverseOrgMembership) Traverse added in v0.2.4

Traverse calls f(ctx, q).

type TraverseOrganization

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

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

func (TraverseOrganization) Intercept

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

func (TraverseOrganization) Traverse

Traverse calls f(ctx, q).

type TraverseOrganizationSetting

type TraverseOrganizationSetting func(context.Context, *generated.OrganizationSettingQuery) error

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

func (TraverseOrganizationSetting) Intercept

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

func (TraverseOrganizationSetting) Traverse

Traverse calls f(ctx, q).

type TraversePasswordResetToken added in v0.2.3

type TraversePasswordResetToken func(context.Context, *generated.PasswordResetTokenQuery) error

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

func (TraversePasswordResetToken) Intercept added in v0.2.3

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

func (TraversePasswordResetToken) Traverse added in v0.2.3

Traverse calls f(ctx, q).

type TraversePersonalAccessToken

type TraversePersonalAccessToken func(context.Context, *generated.PersonalAccessTokenQuery) error

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

func (TraversePersonalAccessToken) Intercept

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

func (TraversePersonalAccessToken) Traverse

Traverse calls f(ctx, q).

type TraverseSession

type TraverseSession func(context.Context, *generated.SessionQuery) error

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

func (TraverseSession) Intercept

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

func (TraverseSession) Traverse

func (f TraverseSession) Traverse(ctx context.Context, q generated.Query) error

Traverse calls f(ctx, q).

type TraverseUser

type TraverseUser func(context.Context, *generated.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 generated.Querier) generated.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 generated.Query) error

Traverse calls f(ctx, q).

type TraverseUserSetting

type TraverseUserSetting func(context.Context, *generated.UserSettingQuery) error

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

func (TraverseUserSetting) Intercept

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

func (TraverseUserSetting) Traverse

Traverse calls f(ctx, q).

type UserFunc

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

func (UserFunc) Query

Query calls f(ctx, q).

type UserSettingFunc

type UserSettingFunc func(context.Context, *generated.UserSettingQuery) (generated.Value, error)

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

func (UserSettingFunc) Query

Query calls f(ctx, q).

Jump to

Keyboard shortcuts

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