db

package
v0.0.0-...-43a01a0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Operation types.
	OpCreate    = ent.OpCreate
	OpDelete    = ent.OpDelete
	OpDeleteOne = ent.OpDeleteOne
	OpUpdate    = ent.OpUpdate
	OpUpdateOne = ent.OpUpdateOne

	// Node types.
	TypeAuthCode       = "AuthCode"
	TypeAuthRequest    = "AuthRequest"
	TypeConnector      = "Connector"
	TypeDeviceRequest  = "DeviceRequest"
	TypeDeviceToken    = "DeviceToken"
	TypeKeys           = "Keys"
	TypeOAuth2Client   = "OAuth2Client"
	TypeOfflineSession = "OfflineSession"
	TypePassword       = "Password"
	TypeRefreshToken   = "RefreshToken"
)

Variables

This section is empty.

Functions

func IsConstraintError

func IsConstraintError(err error) bool

IsConstraintError returns a boolean indicating whether the error is a constraint failure.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns a boolean indicating whether the error is a not found error.

func IsNotLoaded

func IsNotLoaded(err error) bool

IsNotLoaded returns a boolean indicating whether the error is a not loaded error.

func IsNotSingular

func IsNotSingular(err error) bool

IsNotSingular returns a boolean indicating whether the error is a not singular error.

func IsValidationError

func IsValidationError(err error) bool

IsValidationError returns a boolean indicating whether the error is a validation error.

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

func NewContext(parent context.Context, c *Client) context.Context

NewContext returns a new context with the given Client attached.

func NewTxContext

func NewTxContext(parent context.Context, tx *Tx) context.Context

NewTxContext returns a new context with the given Tx attached.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

AggregateFunc applies an aggregation step on the group-by traversal/selector.

func As

As is a pseudo aggregation function for renaming another other functions with custom names. For example:

GroupBy(field1, field2).
Aggregate(db.As(db.Sum(field1), "sum_field1"), (db.As(db.Sum(field2), "sum_field2")).
Scan(ctx, &v)

func Count

func Count() AggregateFunc

Count applies the "count" aggregation function on each group.

func Max

func Max(field string) AggregateFunc

Max applies the "max" aggregation function on the given field of each group.

func Mean

func Mean(field string) AggregateFunc

Mean applies the "mean" aggregation function on the given field of each group.

func Min

func Min(field string) AggregateFunc

Min applies the "min" aggregation function on the given field of each group.

func Sum

func Sum(field string) AggregateFunc

Sum applies the "sum" aggregation function on the given field of each group.

type AuthCode

type AuthCode struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// ClientID holds the value of the "client_id" field.
	ClientID string `json:"client_id,omitempty"`
	// Scopes holds the value of the "scopes" field.
	Scopes []string `json:"scopes,omitempty"`
	// Nonce holds the value of the "nonce" field.
	Nonce string `json:"nonce,omitempty"`
	// RedirectURI holds the value of the "redirect_uri" field.
	RedirectURI string `json:"redirect_uri,omitempty"`
	// ClaimsUserID holds the value of the "claims_user_id" field.
	ClaimsUserID string `json:"claims_user_id,omitempty"`
	// ClaimsUsername holds the value of the "claims_username" field.
	ClaimsUsername string `json:"claims_username,omitempty"`
	// ClaimsEmail holds the value of the "claims_email" field.
	ClaimsEmail string `json:"claims_email,omitempty"`
	// ClaimsEmailVerified holds the value of the "claims_email_verified" field.
	ClaimsEmailVerified bool `json:"claims_email_verified,omitempty"`
	// ClaimsGroups holds the value of the "claims_groups" field.
	ClaimsGroups []string `json:"claims_groups,omitempty"`
	// ClaimsPreferredUsername holds the value of the "claims_preferred_username" field.
	ClaimsPreferredUsername string `json:"claims_preferred_username,omitempty"`
	// ConnectorID holds the value of the "connector_id" field.
	ConnectorID string `json:"connector_id,omitempty"`
	// ConnectorData holds the value of the "connector_data" field.
	ConnectorData *[]byte `json:"connector_data,omitempty"`
	// Expiry holds the value of the "expiry" field.
	Expiry time.Time `json:"expiry,omitempty"`
	// CodeChallenge holds the value of the "code_challenge" field.
	CodeChallenge string `json:"code_challenge,omitempty"`
	// CodeChallengeMethod holds the value of the "code_challenge_method" field.
	CodeChallengeMethod string `json:"code_challenge_method,omitempty"`
	// contains filtered or unexported fields
}

AuthCode is the model entity for the AuthCode schema.

func (*AuthCode) String

func (ac *AuthCode) String() string

String implements the fmt.Stringer.

func (*AuthCode) Unwrap

func (ac *AuthCode) Unwrap() *AuthCode

Unwrap unwraps the AuthCode entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*AuthCode) Update

func (ac *AuthCode) Update() *AuthCodeUpdateOne

Update returns a builder for updating this AuthCode. Note that you need to call AuthCode.Unwrap() before calling this method if this AuthCode was returned from a transaction, and the transaction was committed or rolled back.

type AuthCodeClient

type AuthCodeClient struct {
	// contains filtered or unexported fields
}

AuthCodeClient is a client for the AuthCode schema.

func NewAuthCodeClient

func NewAuthCodeClient(c config) *AuthCodeClient

NewAuthCodeClient returns a client for the AuthCode from the given config.

func (*AuthCodeClient) Create

func (c *AuthCodeClient) Create() *AuthCodeCreate

Create returns a builder for creating a AuthCode entity.

func (*AuthCodeClient) CreateBulk

func (c *AuthCodeClient) CreateBulk(builders ...*AuthCodeCreate) *AuthCodeCreateBulk

CreateBulk returns a builder for creating a bulk of AuthCode entities.

func (*AuthCodeClient) Delete

func (c *AuthCodeClient) Delete() *AuthCodeDelete

Delete returns a delete builder for AuthCode.

func (*AuthCodeClient) DeleteOne

func (c *AuthCodeClient) DeleteOne(ac *AuthCode) *AuthCodeDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AuthCodeClient) DeleteOneID

func (c *AuthCodeClient) DeleteOneID(id string) *AuthCodeDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*AuthCodeClient) Get

func (c *AuthCodeClient) Get(ctx context.Context, id string) (*AuthCode, error)

Get returns a AuthCode entity by its id.

func (*AuthCodeClient) GetX

func (c *AuthCodeClient) GetX(ctx context.Context, id string) *AuthCode

GetX is like Get, but panics if an error occurs.

func (*AuthCodeClient) Hooks

func (c *AuthCodeClient) Hooks() []Hook

Hooks returns the client hooks.

func (*AuthCodeClient) Intercept

func (c *AuthCodeClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `authcode.Intercept(f(g(h())))`.

func (*AuthCodeClient) Interceptors

func (c *AuthCodeClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*AuthCodeClient) Query

func (c *AuthCodeClient) Query() *AuthCodeQuery

Query returns a query builder for AuthCode.

func (*AuthCodeClient) Update

func (c *AuthCodeClient) Update() *AuthCodeUpdate

Update returns an update builder for AuthCode.

func (*AuthCodeClient) UpdateOne

func (c *AuthCodeClient) UpdateOne(ac *AuthCode) *AuthCodeUpdateOne

UpdateOne returns an update builder for the given entity.

func (*AuthCodeClient) UpdateOneID

func (c *AuthCodeClient) UpdateOneID(id string) *AuthCodeUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AuthCodeClient) Use

func (c *AuthCodeClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `authcode.Hooks(f(g(h())))`.

type AuthCodeCreate

type AuthCodeCreate struct {
	// contains filtered or unexported fields
}

AuthCodeCreate is the builder for creating a AuthCode entity.

func (*AuthCodeCreate) Exec

func (acc *AuthCodeCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AuthCodeCreate) ExecX

func (acc *AuthCodeCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AuthCodeCreate) Mutation

func (acc *AuthCodeCreate) Mutation() *AuthCodeMutation

Mutation returns the AuthCodeMutation object of the builder.

func (*AuthCodeCreate) Save

func (acc *AuthCodeCreate) Save(ctx context.Context) (*AuthCode, error)

Save creates the AuthCode in the database.

func (*AuthCodeCreate) SaveX

func (acc *AuthCodeCreate) SaveX(ctx context.Context) *AuthCode

SaveX calls Save and panics if Save returns an error.

func (*AuthCodeCreate) SetClaimsEmail

func (acc *AuthCodeCreate) SetClaimsEmail(s string) *AuthCodeCreate

SetClaimsEmail sets the "claims_email" field.

func (*AuthCodeCreate) SetClaimsEmailVerified

func (acc *AuthCodeCreate) SetClaimsEmailVerified(b bool) *AuthCodeCreate

SetClaimsEmailVerified sets the "claims_email_verified" field.

func (*AuthCodeCreate) SetClaimsGroups

func (acc *AuthCodeCreate) SetClaimsGroups(s []string) *AuthCodeCreate

SetClaimsGroups sets the "claims_groups" field.

func (*AuthCodeCreate) SetClaimsPreferredUsername

func (acc *AuthCodeCreate) SetClaimsPreferredUsername(s string) *AuthCodeCreate

SetClaimsPreferredUsername sets the "claims_preferred_username" field.

func (*AuthCodeCreate) SetClaimsUserID

func (acc *AuthCodeCreate) SetClaimsUserID(s string) *AuthCodeCreate

SetClaimsUserID sets the "claims_user_id" field.

func (*AuthCodeCreate) SetClaimsUsername

func (acc *AuthCodeCreate) SetClaimsUsername(s string) *AuthCodeCreate

SetClaimsUsername sets the "claims_username" field.

func (*AuthCodeCreate) SetClientID

func (acc *AuthCodeCreate) SetClientID(s string) *AuthCodeCreate

SetClientID sets the "client_id" field.

func (*AuthCodeCreate) SetCodeChallenge

func (acc *AuthCodeCreate) SetCodeChallenge(s string) *AuthCodeCreate

SetCodeChallenge sets the "code_challenge" field.

func (*AuthCodeCreate) SetCodeChallengeMethod

func (acc *AuthCodeCreate) SetCodeChallengeMethod(s string) *AuthCodeCreate

SetCodeChallengeMethod sets the "code_challenge_method" field.

func (*AuthCodeCreate) SetConnectorData

func (acc *AuthCodeCreate) SetConnectorData(b []byte) *AuthCodeCreate

SetConnectorData sets the "connector_data" field.

func (*AuthCodeCreate) SetConnectorID

func (acc *AuthCodeCreate) SetConnectorID(s string) *AuthCodeCreate

SetConnectorID sets the "connector_id" field.

func (*AuthCodeCreate) SetExpiry

func (acc *AuthCodeCreate) SetExpiry(t time.Time) *AuthCodeCreate

SetExpiry sets the "expiry" field.

func (*AuthCodeCreate) SetID

func (acc *AuthCodeCreate) SetID(s string) *AuthCodeCreate

SetID sets the "id" field.

func (*AuthCodeCreate) SetNillableClaimsPreferredUsername

func (acc *AuthCodeCreate) SetNillableClaimsPreferredUsername(s *string) *AuthCodeCreate

SetNillableClaimsPreferredUsername sets the "claims_preferred_username" field if the given value is not nil.

func (*AuthCodeCreate) SetNillableCodeChallenge

func (acc *AuthCodeCreate) SetNillableCodeChallenge(s *string) *AuthCodeCreate

SetNillableCodeChallenge sets the "code_challenge" field if the given value is not nil.

func (*AuthCodeCreate) SetNillableCodeChallengeMethod

func (acc *AuthCodeCreate) SetNillableCodeChallengeMethod(s *string) *AuthCodeCreate

SetNillableCodeChallengeMethod sets the "code_challenge_method" field if the given value is not nil.

func (*AuthCodeCreate) SetNonce

func (acc *AuthCodeCreate) SetNonce(s string) *AuthCodeCreate

SetNonce sets the "nonce" field.

func (*AuthCodeCreate) SetRedirectURI

func (acc *AuthCodeCreate) SetRedirectURI(s string) *AuthCodeCreate

SetRedirectURI sets the "redirect_uri" field.

func (*AuthCodeCreate) SetScopes

func (acc *AuthCodeCreate) SetScopes(s []string) *AuthCodeCreate

SetScopes sets the "scopes" field.

type AuthCodeCreateBulk

type AuthCodeCreateBulk struct {
	// contains filtered or unexported fields
}

AuthCodeCreateBulk is the builder for creating many AuthCode entities in bulk.

func (*AuthCodeCreateBulk) Exec

func (accb *AuthCodeCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AuthCodeCreateBulk) ExecX

func (accb *AuthCodeCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AuthCodeCreateBulk) Save

func (accb *AuthCodeCreateBulk) Save(ctx context.Context) ([]*AuthCode, error)

Save creates the AuthCode entities in the database.

func (*AuthCodeCreateBulk) SaveX

func (accb *AuthCodeCreateBulk) SaveX(ctx context.Context) []*AuthCode

SaveX is like Save, but panics if an error occurs.

type AuthCodeDelete

type AuthCodeDelete struct {
	// contains filtered or unexported fields
}

AuthCodeDelete is the builder for deleting a AuthCode entity.

func (*AuthCodeDelete) Exec

func (acd *AuthCodeDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*AuthCodeDelete) ExecX

func (acd *AuthCodeDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*AuthCodeDelete) Where

func (acd *AuthCodeDelete) Where(ps ...predicate.AuthCode) *AuthCodeDelete

Where appends a list predicates to the AuthCodeDelete builder.

type AuthCodeDeleteOne

type AuthCodeDeleteOne struct {
	// contains filtered or unexported fields
}

AuthCodeDeleteOne is the builder for deleting a single AuthCode entity.

func (*AuthCodeDeleteOne) Exec

func (acdo *AuthCodeDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AuthCodeDeleteOne) ExecX

func (acdo *AuthCodeDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AuthCodeDeleteOne) Where

Where appends a list predicates to the AuthCodeDelete builder.

type AuthCodeGroupBy

type AuthCodeGroupBy struct {
	// contains filtered or unexported fields
}

AuthCodeGroupBy is the group-by builder for AuthCode entities.

func (*AuthCodeGroupBy) Aggregate

func (acgb *AuthCodeGroupBy) Aggregate(fns ...AggregateFunc) *AuthCodeGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*AuthCodeGroupBy) Bool

func (s *AuthCodeGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AuthCodeGroupBy) BoolX

func (s *AuthCodeGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AuthCodeGroupBy) Bools

func (s *AuthCodeGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AuthCodeGroupBy) BoolsX

func (s *AuthCodeGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AuthCodeGroupBy) Float64

func (s *AuthCodeGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AuthCodeGroupBy) Float64X

func (s *AuthCodeGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AuthCodeGroupBy) Float64s

func (s *AuthCodeGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AuthCodeGroupBy) Float64sX

func (s *AuthCodeGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AuthCodeGroupBy) Int

func (s *AuthCodeGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AuthCodeGroupBy) IntX

func (s *AuthCodeGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AuthCodeGroupBy) Ints

func (s *AuthCodeGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AuthCodeGroupBy) IntsX

func (s *AuthCodeGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AuthCodeGroupBy) Scan

func (acgb *AuthCodeGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AuthCodeGroupBy) ScanX

func (s *AuthCodeGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AuthCodeGroupBy) String

func (s *AuthCodeGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AuthCodeGroupBy) StringX

func (s *AuthCodeGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AuthCodeGroupBy) Strings

func (s *AuthCodeGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AuthCodeGroupBy) StringsX

func (s *AuthCodeGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AuthCodeMutation

type AuthCodeMutation struct {
	// contains filtered or unexported fields
}

AuthCodeMutation represents an operation that mutates the AuthCode nodes in the graph.

func (*AuthCodeMutation) AddField

func (m *AuthCodeMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AuthCodeMutation) AddedEdges

func (m *AuthCodeMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*AuthCodeMutation) AddedField

func (m *AuthCodeMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AuthCodeMutation) AddedFields

func (m *AuthCodeMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*AuthCodeMutation) AddedIDs

func (m *AuthCodeMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*AuthCodeMutation) AppendClaimsGroups

func (m *AuthCodeMutation) AppendClaimsGroups(s []string)

AppendClaimsGroups adds s to the "claims_groups" field.

func (*AuthCodeMutation) AppendScopes

func (m *AuthCodeMutation) AppendScopes(s []string)

AppendScopes adds s to the "scopes" field.

func (*AuthCodeMutation) AppendedClaimsGroups

func (m *AuthCodeMutation) AppendedClaimsGroups() ([]string, bool)

AppendedClaimsGroups returns the list of values that were appended to the "claims_groups" field in this mutation.

func (*AuthCodeMutation) AppendedScopes

func (m *AuthCodeMutation) AppendedScopes() ([]string, bool)

AppendedScopes returns the list of values that were appended to the "scopes" field in this mutation.

func (*AuthCodeMutation) ClaimsEmail

func (m *AuthCodeMutation) ClaimsEmail() (r string, exists bool)

ClaimsEmail returns the value of the "claims_email" field in the mutation.

func (*AuthCodeMutation) ClaimsEmailVerified

func (m *AuthCodeMutation) ClaimsEmailVerified() (r bool, exists bool)

ClaimsEmailVerified returns the value of the "claims_email_verified" field in the mutation.

func (*AuthCodeMutation) ClaimsGroups

func (m *AuthCodeMutation) ClaimsGroups() (r []string, exists bool)

ClaimsGroups returns the value of the "claims_groups" field in the mutation.

func (*AuthCodeMutation) ClaimsGroupsCleared

func (m *AuthCodeMutation) ClaimsGroupsCleared() bool

ClaimsGroupsCleared returns if the "claims_groups" field was cleared in this mutation.

func (*AuthCodeMutation) ClaimsPreferredUsername

func (m *AuthCodeMutation) ClaimsPreferredUsername() (r string, exists bool)

ClaimsPreferredUsername returns the value of the "claims_preferred_username" field in the mutation.

func (*AuthCodeMutation) ClaimsUserID

func (m *AuthCodeMutation) ClaimsUserID() (r string, exists bool)

ClaimsUserID returns the value of the "claims_user_id" field in the mutation.

func (*AuthCodeMutation) ClaimsUsername

func (m *AuthCodeMutation) ClaimsUsername() (r string, exists bool)

ClaimsUsername returns the value of the "claims_username" field in the mutation.

func (*AuthCodeMutation) ClearClaimsGroups

func (m *AuthCodeMutation) ClearClaimsGroups()

ClearClaimsGroups clears the value of the "claims_groups" field.

func (*AuthCodeMutation) ClearConnectorData

func (m *AuthCodeMutation) ClearConnectorData()

ClearConnectorData clears the value of the "connector_data" field.

func (*AuthCodeMutation) ClearEdge

func (m *AuthCodeMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*AuthCodeMutation) ClearField

func (m *AuthCodeMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*AuthCodeMutation) ClearScopes

func (m *AuthCodeMutation) ClearScopes()

ClearScopes clears the value of the "scopes" field.

func (*AuthCodeMutation) ClearedEdges

func (m *AuthCodeMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*AuthCodeMutation) ClearedFields

func (m *AuthCodeMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (AuthCodeMutation) Client

func (m AuthCodeMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*AuthCodeMutation) ClientID

func (m *AuthCodeMutation) ClientID() (r string, exists bool)

ClientID returns the value of the "client_id" field in the mutation.

func (*AuthCodeMutation) CodeChallenge

func (m *AuthCodeMutation) CodeChallenge() (r string, exists bool)

CodeChallenge returns the value of the "code_challenge" field in the mutation.

func (*AuthCodeMutation) CodeChallengeMethod

func (m *AuthCodeMutation) CodeChallengeMethod() (r string, exists bool)

CodeChallengeMethod returns the value of the "code_challenge_method" field in the mutation.

func (*AuthCodeMutation) ConnectorData

func (m *AuthCodeMutation) ConnectorData() (r []byte, exists bool)

ConnectorData returns the value of the "connector_data" field in the mutation.

func (*AuthCodeMutation) ConnectorDataCleared

func (m *AuthCodeMutation) ConnectorDataCleared() bool

ConnectorDataCleared returns if the "connector_data" field was cleared in this mutation.

func (*AuthCodeMutation) ConnectorID

func (m *AuthCodeMutation) ConnectorID() (r string, exists bool)

ConnectorID returns the value of the "connector_id" field in the mutation.

func (*AuthCodeMutation) EdgeCleared

func (m *AuthCodeMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*AuthCodeMutation) Expiry

func (m *AuthCodeMutation) Expiry() (r time.Time, exists bool)

Expiry returns the value of the "expiry" field in the mutation.

func (*AuthCodeMutation) Field

func (m *AuthCodeMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AuthCodeMutation) FieldCleared

func (m *AuthCodeMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*AuthCodeMutation) Fields

func (m *AuthCodeMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*AuthCodeMutation) ID

func (m *AuthCodeMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*AuthCodeMutation) IDs

func (m *AuthCodeMutation) IDs(ctx context.Context) ([]string, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*AuthCodeMutation) Nonce

func (m *AuthCodeMutation) Nonce() (r string, exists bool)

Nonce returns the value of the "nonce" field in the mutation.

func (*AuthCodeMutation) OldClaimsEmail

func (m *AuthCodeMutation) OldClaimsEmail(ctx context.Context) (v string, err error)

OldClaimsEmail returns the old "claims_email" field's value of the AuthCode entity. If the AuthCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthCodeMutation) OldClaimsEmailVerified

func (m *AuthCodeMutation) OldClaimsEmailVerified(ctx context.Context) (v bool, err error)

OldClaimsEmailVerified returns the old "claims_email_verified" field's value of the AuthCode entity. If the AuthCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthCodeMutation) OldClaimsGroups

func (m *AuthCodeMutation) OldClaimsGroups(ctx context.Context) (v []string, err error)

OldClaimsGroups returns the old "claims_groups" field's value of the AuthCode entity. If the AuthCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthCodeMutation) OldClaimsPreferredUsername

func (m *AuthCodeMutation) OldClaimsPreferredUsername(ctx context.Context) (v string, err error)

OldClaimsPreferredUsername returns the old "claims_preferred_username" field's value of the AuthCode entity. If the AuthCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthCodeMutation) OldClaimsUserID

func (m *AuthCodeMutation) OldClaimsUserID(ctx context.Context) (v string, err error)

OldClaimsUserID returns the old "claims_user_id" field's value of the AuthCode entity. If the AuthCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthCodeMutation) OldClaimsUsername

func (m *AuthCodeMutation) OldClaimsUsername(ctx context.Context) (v string, err error)

OldClaimsUsername returns the old "claims_username" field's value of the AuthCode entity. If the AuthCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthCodeMutation) OldClientID

func (m *AuthCodeMutation) OldClientID(ctx context.Context) (v string, err error)

OldClientID returns the old "client_id" field's value of the AuthCode entity. If the AuthCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthCodeMutation) OldCodeChallenge

func (m *AuthCodeMutation) OldCodeChallenge(ctx context.Context) (v string, err error)

OldCodeChallenge returns the old "code_challenge" field's value of the AuthCode entity. If the AuthCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthCodeMutation) OldCodeChallengeMethod

func (m *AuthCodeMutation) OldCodeChallengeMethod(ctx context.Context) (v string, err error)

OldCodeChallengeMethod returns the old "code_challenge_method" field's value of the AuthCode entity. If the AuthCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthCodeMutation) OldConnectorData

func (m *AuthCodeMutation) OldConnectorData(ctx context.Context) (v *[]byte, err error)

OldConnectorData returns the old "connector_data" field's value of the AuthCode entity. If the AuthCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthCodeMutation) OldConnectorID

func (m *AuthCodeMutation) OldConnectorID(ctx context.Context) (v string, err error)

OldConnectorID returns the old "connector_id" field's value of the AuthCode entity. If the AuthCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthCodeMutation) OldExpiry

func (m *AuthCodeMutation) OldExpiry(ctx context.Context) (v time.Time, err error)

OldExpiry returns the old "expiry" field's value of the AuthCode entity. If the AuthCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthCodeMutation) OldField

func (m *AuthCodeMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*AuthCodeMutation) OldNonce

func (m *AuthCodeMutation) OldNonce(ctx context.Context) (v string, err error)

OldNonce returns the old "nonce" field's value of the AuthCode entity. If the AuthCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthCodeMutation) OldRedirectURI

func (m *AuthCodeMutation) OldRedirectURI(ctx context.Context) (v string, err error)

OldRedirectURI returns the old "redirect_uri" field's value of the AuthCode entity. If the AuthCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthCodeMutation) OldScopes

func (m *AuthCodeMutation) OldScopes(ctx context.Context) (v []string, err error)

OldScopes returns the old "scopes" field's value of the AuthCode entity. If the AuthCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthCodeMutation) Op

func (m *AuthCodeMutation) Op() Op

Op returns the operation name.

func (*AuthCodeMutation) RedirectURI

func (m *AuthCodeMutation) RedirectURI() (r string, exists bool)

RedirectURI returns the value of the "redirect_uri" field in the mutation.

func (*AuthCodeMutation) RemovedEdges

func (m *AuthCodeMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*AuthCodeMutation) RemovedIDs

func (m *AuthCodeMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*AuthCodeMutation) ResetClaimsEmail

func (m *AuthCodeMutation) ResetClaimsEmail()

ResetClaimsEmail resets all changes to the "claims_email" field.

func (*AuthCodeMutation) ResetClaimsEmailVerified

func (m *AuthCodeMutation) ResetClaimsEmailVerified()

ResetClaimsEmailVerified resets all changes to the "claims_email_verified" field.

func (*AuthCodeMutation) ResetClaimsGroups

func (m *AuthCodeMutation) ResetClaimsGroups()

ResetClaimsGroups resets all changes to the "claims_groups" field.

func (*AuthCodeMutation) ResetClaimsPreferredUsername

func (m *AuthCodeMutation) ResetClaimsPreferredUsername()

ResetClaimsPreferredUsername resets all changes to the "claims_preferred_username" field.

func (*AuthCodeMutation) ResetClaimsUserID

func (m *AuthCodeMutation) ResetClaimsUserID()

ResetClaimsUserID resets all changes to the "claims_user_id" field.

func (*AuthCodeMutation) ResetClaimsUsername

func (m *AuthCodeMutation) ResetClaimsUsername()

ResetClaimsUsername resets all changes to the "claims_username" field.

func (*AuthCodeMutation) ResetClientID

func (m *AuthCodeMutation) ResetClientID()

ResetClientID resets all changes to the "client_id" field.

func (*AuthCodeMutation) ResetCodeChallenge

func (m *AuthCodeMutation) ResetCodeChallenge()

ResetCodeChallenge resets all changes to the "code_challenge" field.

func (*AuthCodeMutation) ResetCodeChallengeMethod

func (m *AuthCodeMutation) ResetCodeChallengeMethod()

ResetCodeChallengeMethod resets all changes to the "code_challenge_method" field.

func (*AuthCodeMutation) ResetConnectorData

func (m *AuthCodeMutation) ResetConnectorData()

ResetConnectorData resets all changes to the "connector_data" field.

func (*AuthCodeMutation) ResetConnectorID

func (m *AuthCodeMutation) ResetConnectorID()

ResetConnectorID resets all changes to the "connector_id" field.

func (*AuthCodeMutation) ResetEdge

func (m *AuthCodeMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*AuthCodeMutation) ResetExpiry

func (m *AuthCodeMutation) ResetExpiry()

ResetExpiry resets all changes to the "expiry" field.

func (*AuthCodeMutation) ResetField

func (m *AuthCodeMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*AuthCodeMutation) ResetNonce

func (m *AuthCodeMutation) ResetNonce()

ResetNonce resets all changes to the "nonce" field.

func (*AuthCodeMutation) ResetRedirectURI

func (m *AuthCodeMutation) ResetRedirectURI()

ResetRedirectURI resets all changes to the "redirect_uri" field.

func (*AuthCodeMutation) ResetScopes

func (m *AuthCodeMutation) ResetScopes()

ResetScopes resets all changes to the "scopes" field.

func (*AuthCodeMutation) Scopes

func (m *AuthCodeMutation) Scopes() (r []string, exists bool)

Scopes returns the value of the "scopes" field in the mutation.

func (*AuthCodeMutation) ScopesCleared

func (m *AuthCodeMutation) ScopesCleared() bool

ScopesCleared returns if the "scopes" field was cleared in this mutation.

func (*AuthCodeMutation) SetClaimsEmail

func (m *AuthCodeMutation) SetClaimsEmail(s string)

SetClaimsEmail sets the "claims_email" field.

func (*AuthCodeMutation) SetClaimsEmailVerified

func (m *AuthCodeMutation) SetClaimsEmailVerified(b bool)

SetClaimsEmailVerified sets the "claims_email_verified" field.

func (*AuthCodeMutation) SetClaimsGroups

func (m *AuthCodeMutation) SetClaimsGroups(s []string)

SetClaimsGroups sets the "claims_groups" field.

func (*AuthCodeMutation) SetClaimsPreferredUsername

func (m *AuthCodeMutation) SetClaimsPreferredUsername(s string)

SetClaimsPreferredUsername sets the "claims_preferred_username" field.

func (*AuthCodeMutation) SetClaimsUserID

func (m *AuthCodeMutation) SetClaimsUserID(s string)

SetClaimsUserID sets the "claims_user_id" field.

func (*AuthCodeMutation) SetClaimsUsername

func (m *AuthCodeMutation) SetClaimsUsername(s string)

SetClaimsUsername sets the "claims_username" field.

func (*AuthCodeMutation) SetClientID

func (m *AuthCodeMutation) SetClientID(s string)

SetClientID sets the "client_id" field.

func (*AuthCodeMutation) SetCodeChallenge

func (m *AuthCodeMutation) SetCodeChallenge(s string)

SetCodeChallenge sets the "code_challenge" field.

func (*AuthCodeMutation) SetCodeChallengeMethod

func (m *AuthCodeMutation) SetCodeChallengeMethod(s string)

SetCodeChallengeMethod sets the "code_challenge_method" field.

func (*AuthCodeMutation) SetConnectorData

func (m *AuthCodeMutation) SetConnectorData(b []byte)

SetConnectorData sets the "connector_data" field.

func (*AuthCodeMutation) SetConnectorID

func (m *AuthCodeMutation) SetConnectorID(s string)

SetConnectorID sets the "connector_id" field.

func (*AuthCodeMutation) SetExpiry

func (m *AuthCodeMutation) SetExpiry(t time.Time)

SetExpiry sets the "expiry" field.

func (*AuthCodeMutation) SetField

func (m *AuthCodeMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AuthCodeMutation) SetID

func (m *AuthCodeMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of AuthCode entities.

func (*AuthCodeMutation) SetNonce

func (m *AuthCodeMutation) SetNonce(s string)

SetNonce sets the "nonce" field.

func (*AuthCodeMutation) SetOp

func (m *AuthCodeMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AuthCodeMutation) SetRedirectURI

func (m *AuthCodeMutation) SetRedirectURI(s string)

SetRedirectURI sets the "redirect_uri" field.

func (*AuthCodeMutation) SetScopes

func (m *AuthCodeMutation) SetScopes(s []string)

SetScopes sets the "scopes" field.

func (AuthCodeMutation) Tx

func (m AuthCodeMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*AuthCodeMutation) Type

func (m *AuthCodeMutation) Type() string

Type returns the node type of this mutation (AuthCode).

func (*AuthCodeMutation) Where

func (m *AuthCodeMutation) Where(ps ...predicate.AuthCode)

Where appends a list predicates to the AuthCodeMutation builder.

func (*AuthCodeMutation) WhereP

func (m *AuthCodeMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the AuthCodeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type AuthCodeQuery

type AuthCodeQuery struct {
	// contains filtered or unexported fields
}

AuthCodeQuery is the builder for querying AuthCode entities.

func (*AuthCodeQuery) Aggregate

func (acq *AuthCodeQuery) Aggregate(fns ...AggregateFunc) *AuthCodeSelect

Aggregate returns a AuthCodeSelect configured with the given aggregations.

func (*AuthCodeQuery) All

func (acq *AuthCodeQuery) All(ctx context.Context) ([]*AuthCode, error)

All executes the query and returns a list of AuthCodes.

func (*AuthCodeQuery) AllX

func (acq *AuthCodeQuery) AllX(ctx context.Context) []*AuthCode

AllX is like All, but panics if an error occurs.

func (*AuthCodeQuery) Clone

func (acq *AuthCodeQuery) Clone() *AuthCodeQuery

Clone returns a duplicate of the AuthCodeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*AuthCodeQuery) Count

func (acq *AuthCodeQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AuthCodeQuery) CountX

func (acq *AuthCodeQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*AuthCodeQuery) Exist

func (acq *AuthCodeQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*AuthCodeQuery) ExistX

func (acq *AuthCodeQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*AuthCodeQuery) First

func (acq *AuthCodeQuery) First(ctx context.Context) (*AuthCode, error)

First returns the first AuthCode entity from the query. Returns a *NotFoundError when no AuthCode was found.

func (*AuthCodeQuery) FirstID

func (acq *AuthCodeQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first AuthCode ID from the query. Returns a *NotFoundError when no AuthCode ID was found.

func (*AuthCodeQuery) FirstIDX

func (acq *AuthCodeQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*AuthCodeQuery) FirstX

func (acq *AuthCodeQuery) FirstX(ctx context.Context) *AuthCode

FirstX is like First, but panics if an error occurs.

func (*AuthCodeQuery) GroupBy

func (acq *AuthCodeQuery) GroupBy(field string, fields ...string) *AuthCodeGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	ClientID string `json:"client_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.AuthCode.Query().
	GroupBy(authcode.FieldClientID).
	Aggregate(db.Count()).
	Scan(ctx, &v)

func (*AuthCodeQuery) IDs

func (acq *AuthCodeQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of AuthCode IDs.

func (*AuthCodeQuery) IDsX

func (acq *AuthCodeQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*AuthCodeQuery) Limit

func (acq *AuthCodeQuery) Limit(limit int) *AuthCodeQuery

Limit the number of records to be returned by this query.

func (*AuthCodeQuery) Offset

func (acq *AuthCodeQuery) Offset(offset int) *AuthCodeQuery

Offset to start from.

func (*AuthCodeQuery) Only

func (acq *AuthCodeQuery) Only(ctx context.Context) (*AuthCode, error)

Only returns a single AuthCode entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AuthCode entity is found. Returns a *NotFoundError when no AuthCode entities are found.

func (*AuthCodeQuery) OnlyID

func (acq *AuthCodeQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only AuthCode ID in the query. Returns a *NotSingularError when more than one AuthCode ID is found. Returns a *NotFoundError when no entities are found.

func (*AuthCodeQuery) OnlyIDX

func (acq *AuthCodeQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*AuthCodeQuery) OnlyX

func (acq *AuthCodeQuery) OnlyX(ctx context.Context) *AuthCode

OnlyX is like Only, but panics if an error occurs.

func (*AuthCodeQuery) Order

func (acq *AuthCodeQuery) Order(o ...OrderFunc) *AuthCodeQuery

Order specifies how the records should be ordered.

func (*AuthCodeQuery) Select

func (acq *AuthCodeQuery) Select(fields ...string) *AuthCodeSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	ClientID string `json:"client_id,omitempty"`
}

client.AuthCode.Query().
	Select(authcode.FieldClientID).
	Scan(ctx, &v)

func (*AuthCodeQuery) Unique

func (acq *AuthCodeQuery) Unique(unique bool) *AuthCodeQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*AuthCodeQuery) Where

func (acq *AuthCodeQuery) Where(ps ...predicate.AuthCode) *AuthCodeQuery

Where adds a new predicate for the AuthCodeQuery builder.

type AuthCodeSelect

type AuthCodeSelect struct {
	*AuthCodeQuery
	// contains filtered or unexported fields
}

AuthCodeSelect is the builder for selecting fields of AuthCode entities.

func (*AuthCodeSelect) Aggregate

func (acs *AuthCodeSelect) Aggregate(fns ...AggregateFunc) *AuthCodeSelect

Aggregate adds the given aggregation functions to the selector query.

func (*AuthCodeSelect) Bool

func (s *AuthCodeSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AuthCodeSelect) BoolX

func (s *AuthCodeSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AuthCodeSelect) Bools

func (s *AuthCodeSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AuthCodeSelect) BoolsX

func (s *AuthCodeSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AuthCodeSelect) Float64

func (s *AuthCodeSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AuthCodeSelect) Float64X

func (s *AuthCodeSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AuthCodeSelect) Float64s

func (s *AuthCodeSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AuthCodeSelect) Float64sX

func (s *AuthCodeSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AuthCodeSelect) Int

func (s *AuthCodeSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AuthCodeSelect) IntX

func (s *AuthCodeSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AuthCodeSelect) Ints

func (s *AuthCodeSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AuthCodeSelect) IntsX

func (s *AuthCodeSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AuthCodeSelect) Scan

func (acs *AuthCodeSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AuthCodeSelect) ScanX

func (s *AuthCodeSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AuthCodeSelect) String

func (s *AuthCodeSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AuthCodeSelect) StringX

func (s *AuthCodeSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AuthCodeSelect) Strings

func (s *AuthCodeSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AuthCodeSelect) StringsX

func (s *AuthCodeSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AuthCodeUpdate

type AuthCodeUpdate struct {
	// contains filtered or unexported fields
}

AuthCodeUpdate is the builder for updating AuthCode entities.

func (*AuthCodeUpdate) AppendClaimsGroups

func (acu *AuthCodeUpdate) AppendClaimsGroups(s []string) *AuthCodeUpdate

AppendClaimsGroups appends s to the "claims_groups" field.

func (*AuthCodeUpdate) AppendScopes

func (acu *AuthCodeUpdate) AppendScopes(s []string) *AuthCodeUpdate

AppendScopes appends s to the "scopes" field.

func (*AuthCodeUpdate) ClearClaimsGroups

func (acu *AuthCodeUpdate) ClearClaimsGroups() *AuthCodeUpdate

ClearClaimsGroups clears the value of the "claims_groups" field.

func (*AuthCodeUpdate) ClearConnectorData

func (acu *AuthCodeUpdate) ClearConnectorData() *AuthCodeUpdate

ClearConnectorData clears the value of the "connector_data" field.

func (*AuthCodeUpdate) ClearScopes

func (acu *AuthCodeUpdate) ClearScopes() *AuthCodeUpdate

ClearScopes clears the value of the "scopes" field.

func (*AuthCodeUpdate) Exec

func (acu *AuthCodeUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AuthCodeUpdate) ExecX

func (acu *AuthCodeUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AuthCodeUpdate) Mutation

func (acu *AuthCodeUpdate) Mutation() *AuthCodeMutation

Mutation returns the AuthCodeMutation object of the builder.

func (*AuthCodeUpdate) Save

func (acu *AuthCodeUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*AuthCodeUpdate) SaveX

func (acu *AuthCodeUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*AuthCodeUpdate) SetClaimsEmail

func (acu *AuthCodeUpdate) SetClaimsEmail(s string) *AuthCodeUpdate

SetClaimsEmail sets the "claims_email" field.

func (*AuthCodeUpdate) SetClaimsEmailVerified

func (acu *AuthCodeUpdate) SetClaimsEmailVerified(b bool) *AuthCodeUpdate

SetClaimsEmailVerified sets the "claims_email_verified" field.

func (*AuthCodeUpdate) SetClaimsGroups

func (acu *AuthCodeUpdate) SetClaimsGroups(s []string) *AuthCodeUpdate

SetClaimsGroups sets the "claims_groups" field.

func (*AuthCodeUpdate) SetClaimsPreferredUsername

func (acu *AuthCodeUpdate) SetClaimsPreferredUsername(s string) *AuthCodeUpdate

SetClaimsPreferredUsername sets the "claims_preferred_username" field.

func (*AuthCodeUpdate) SetClaimsUserID

func (acu *AuthCodeUpdate) SetClaimsUserID(s string) *AuthCodeUpdate

SetClaimsUserID sets the "claims_user_id" field.

func (*AuthCodeUpdate) SetClaimsUsername

func (acu *AuthCodeUpdate) SetClaimsUsername(s string) *AuthCodeUpdate

SetClaimsUsername sets the "claims_username" field.

func (*AuthCodeUpdate) SetClientID

func (acu *AuthCodeUpdate) SetClientID(s string) *AuthCodeUpdate

SetClientID sets the "client_id" field.

func (*AuthCodeUpdate) SetCodeChallenge

func (acu *AuthCodeUpdate) SetCodeChallenge(s string) *AuthCodeUpdate

SetCodeChallenge sets the "code_challenge" field.

func (*AuthCodeUpdate) SetCodeChallengeMethod

func (acu *AuthCodeUpdate) SetCodeChallengeMethod(s string) *AuthCodeUpdate

SetCodeChallengeMethod sets the "code_challenge_method" field.

func (*AuthCodeUpdate) SetConnectorData

func (acu *AuthCodeUpdate) SetConnectorData(b []byte) *AuthCodeUpdate

SetConnectorData sets the "connector_data" field.

func (*AuthCodeUpdate) SetConnectorID

func (acu *AuthCodeUpdate) SetConnectorID(s string) *AuthCodeUpdate

SetConnectorID sets the "connector_id" field.

func (*AuthCodeUpdate) SetExpiry

func (acu *AuthCodeUpdate) SetExpiry(t time.Time) *AuthCodeUpdate

SetExpiry sets the "expiry" field.

func (*AuthCodeUpdate) SetNillableClaimsPreferredUsername

func (acu *AuthCodeUpdate) SetNillableClaimsPreferredUsername(s *string) *AuthCodeUpdate

SetNillableClaimsPreferredUsername sets the "claims_preferred_username" field if the given value is not nil.

func (*AuthCodeUpdate) SetNillableCodeChallenge

func (acu *AuthCodeUpdate) SetNillableCodeChallenge(s *string) *AuthCodeUpdate

SetNillableCodeChallenge sets the "code_challenge" field if the given value is not nil.

func (*AuthCodeUpdate) SetNillableCodeChallengeMethod

func (acu *AuthCodeUpdate) SetNillableCodeChallengeMethod(s *string) *AuthCodeUpdate

SetNillableCodeChallengeMethod sets the "code_challenge_method" field if the given value is not nil.

func (*AuthCodeUpdate) SetNonce

func (acu *AuthCodeUpdate) SetNonce(s string) *AuthCodeUpdate

SetNonce sets the "nonce" field.

func (*AuthCodeUpdate) SetRedirectURI

func (acu *AuthCodeUpdate) SetRedirectURI(s string) *AuthCodeUpdate

SetRedirectURI sets the "redirect_uri" field.

func (*AuthCodeUpdate) SetScopes

func (acu *AuthCodeUpdate) SetScopes(s []string) *AuthCodeUpdate

SetScopes sets the "scopes" field.

func (*AuthCodeUpdate) Where

func (acu *AuthCodeUpdate) Where(ps ...predicate.AuthCode) *AuthCodeUpdate

Where appends a list predicates to the AuthCodeUpdate builder.

type AuthCodeUpdateOne

type AuthCodeUpdateOne struct {
	// contains filtered or unexported fields
}

AuthCodeUpdateOne is the builder for updating a single AuthCode entity.

func (*AuthCodeUpdateOne) AppendClaimsGroups

func (acuo *AuthCodeUpdateOne) AppendClaimsGroups(s []string) *AuthCodeUpdateOne

AppendClaimsGroups appends s to the "claims_groups" field.

func (*AuthCodeUpdateOne) AppendScopes

func (acuo *AuthCodeUpdateOne) AppendScopes(s []string) *AuthCodeUpdateOne

AppendScopes appends s to the "scopes" field.

func (*AuthCodeUpdateOne) ClearClaimsGroups

func (acuo *AuthCodeUpdateOne) ClearClaimsGroups() *AuthCodeUpdateOne

ClearClaimsGroups clears the value of the "claims_groups" field.

func (*AuthCodeUpdateOne) ClearConnectorData

func (acuo *AuthCodeUpdateOne) ClearConnectorData() *AuthCodeUpdateOne

ClearConnectorData clears the value of the "connector_data" field.

func (*AuthCodeUpdateOne) ClearScopes

func (acuo *AuthCodeUpdateOne) ClearScopes() *AuthCodeUpdateOne

ClearScopes clears the value of the "scopes" field.

func (*AuthCodeUpdateOne) Exec

func (acuo *AuthCodeUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AuthCodeUpdateOne) ExecX

func (acuo *AuthCodeUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AuthCodeUpdateOne) Mutation

func (acuo *AuthCodeUpdateOne) Mutation() *AuthCodeMutation

Mutation returns the AuthCodeMutation object of the builder.

func (*AuthCodeUpdateOne) Save

func (acuo *AuthCodeUpdateOne) Save(ctx context.Context) (*AuthCode, error)

Save executes the query and returns the updated AuthCode entity.

func (*AuthCodeUpdateOne) SaveX

func (acuo *AuthCodeUpdateOne) SaveX(ctx context.Context) *AuthCode

SaveX is like Save, but panics if an error occurs.

func (*AuthCodeUpdateOne) Select

func (acuo *AuthCodeUpdateOne) Select(field string, fields ...string) *AuthCodeUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*AuthCodeUpdateOne) SetClaimsEmail

func (acuo *AuthCodeUpdateOne) SetClaimsEmail(s string) *AuthCodeUpdateOne

SetClaimsEmail sets the "claims_email" field.

func (*AuthCodeUpdateOne) SetClaimsEmailVerified

func (acuo *AuthCodeUpdateOne) SetClaimsEmailVerified(b bool) *AuthCodeUpdateOne

SetClaimsEmailVerified sets the "claims_email_verified" field.

func (*AuthCodeUpdateOne) SetClaimsGroups

func (acuo *AuthCodeUpdateOne) SetClaimsGroups(s []string) *AuthCodeUpdateOne

SetClaimsGroups sets the "claims_groups" field.

func (*AuthCodeUpdateOne) SetClaimsPreferredUsername

func (acuo *AuthCodeUpdateOne) SetClaimsPreferredUsername(s string) *AuthCodeUpdateOne

SetClaimsPreferredUsername sets the "claims_preferred_username" field.

func (*AuthCodeUpdateOne) SetClaimsUserID

func (acuo *AuthCodeUpdateOne) SetClaimsUserID(s string) *AuthCodeUpdateOne

SetClaimsUserID sets the "claims_user_id" field.

func (*AuthCodeUpdateOne) SetClaimsUsername

func (acuo *AuthCodeUpdateOne) SetClaimsUsername(s string) *AuthCodeUpdateOne

SetClaimsUsername sets the "claims_username" field.

func (*AuthCodeUpdateOne) SetClientID

func (acuo *AuthCodeUpdateOne) SetClientID(s string) *AuthCodeUpdateOne

SetClientID sets the "client_id" field.

func (*AuthCodeUpdateOne) SetCodeChallenge

func (acuo *AuthCodeUpdateOne) SetCodeChallenge(s string) *AuthCodeUpdateOne

SetCodeChallenge sets the "code_challenge" field.

func (*AuthCodeUpdateOne) SetCodeChallengeMethod

func (acuo *AuthCodeUpdateOne) SetCodeChallengeMethod(s string) *AuthCodeUpdateOne

SetCodeChallengeMethod sets the "code_challenge_method" field.

func (*AuthCodeUpdateOne) SetConnectorData

func (acuo *AuthCodeUpdateOne) SetConnectorData(b []byte) *AuthCodeUpdateOne

SetConnectorData sets the "connector_data" field.

func (*AuthCodeUpdateOne) SetConnectorID

func (acuo *AuthCodeUpdateOne) SetConnectorID(s string) *AuthCodeUpdateOne

SetConnectorID sets the "connector_id" field.

func (*AuthCodeUpdateOne) SetExpiry

func (acuo *AuthCodeUpdateOne) SetExpiry(t time.Time) *AuthCodeUpdateOne

SetExpiry sets the "expiry" field.

func (*AuthCodeUpdateOne) SetNillableClaimsPreferredUsername

func (acuo *AuthCodeUpdateOne) SetNillableClaimsPreferredUsername(s *string) *AuthCodeUpdateOne

SetNillableClaimsPreferredUsername sets the "claims_preferred_username" field if the given value is not nil.

func (*AuthCodeUpdateOne) SetNillableCodeChallenge

func (acuo *AuthCodeUpdateOne) SetNillableCodeChallenge(s *string) *AuthCodeUpdateOne

SetNillableCodeChallenge sets the "code_challenge" field if the given value is not nil.

func (*AuthCodeUpdateOne) SetNillableCodeChallengeMethod

func (acuo *AuthCodeUpdateOne) SetNillableCodeChallengeMethod(s *string) *AuthCodeUpdateOne

SetNillableCodeChallengeMethod sets the "code_challenge_method" field if the given value is not nil.

func (*AuthCodeUpdateOne) SetNonce

func (acuo *AuthCodeUpdateOne) SetNonce(s string) *AuthCodeUpdateOne

SetNonce sets the "nonce" field.

func (*AuthCodeUpdateOne) SetRedirectURI

func (acuo *AuthCodeUpdateOne) SetRedirectURI(s string) *AuthCodeUpdateOne

SetRedirectURI sets the "redirect_uri" field.

func (*AuthCodeUpdateOne) SetScopes

func (acuo *AuthCodeUpdateOne) SetScopes(s []string) *AuthCodeUpdateOne

SetScopes sets the "scopes" field.

func (*AuthCodeUpdateOne) Where

Where appends a list predicates to the AuthCodeUpdate builder.

type AuthCodes

type AuthCodes []*AuthCode

AuthCodes is a parsable slice of AuthCode.

type AuthRequest

type AuthRequest struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// ClientID holds the value of the "client_id" field.
	ClientID string `json:"client_id,omitempty"`
	// Scopes holds the value of the "scopes" field.
	Scopes []string `json:"scopes,omitempty"`
	// ResponseTypes holds the value of the "response_types" field.
	ResponseTypes []string `json:"response_types,omitempty"`
	// RedirectURI holds the value of the "redirect_uri" field.
	RedirectURI string `json:"redirect_uri,omitempty"`
	// Nonce holds the value of the "nonce" field.
	Nonce string `json:"nonce,omitempty"`
	// State holds the value of the "state" field.
	State string `json:"state,omitempty"`
	// ForceApprovalPrompt holds the value of the "force_approval_prompt" field.
	ForceApprovalPrompt bool `json:"force_approval_prompt,omitempty"`
	// LoggedIn holds the value of the "logged_in" field.
	LoggedIn bool `json:"logged_in,omitempty"`
	// ClaimsUserID holds the value of the "claims_user_id" field.
	ClaimsUserID string `json:"claims_user_id,omitempty"`
	// ClaimsUsername holds the value of the "claims_username" field.
	ClaimsUsername string `json:"claims_username,omitempty"`
	// ClaimsEmail holds the value of the "claims_email" field.
	ClaimsEmail string `json:"claims_email,omitempty"`
	// ClaimsEmailVerified holds the value of the "claims_email_verified" field.
	ClaimsEmailVerified bool `json:"claims_email_verified,omitempty"`
	// ClaimsGroups holds the value of the "claims_groups" field.
	ClaimsGroups []string `json:"claims_groups,omitempty"`
	// ClaimsPreferredUsername holds the value of the "claims_preferred_username" field.
	ClaimsPreferredUsername string `json:"claims_preferred_username,omitempty"`
	// ConnectorID holds the value of the "connector_id" field.
	ConnectorID string `json:"connector_id,omitempty"`
	// ConnectorData holds the value of the "connector_data" field.
	ConnectorData *[]byte `json:"connector_data,omitempty"`
	// Expiry holds the value of the "expiry" field.
	Expiry time.Time `json:"expiry,omitempty"`
	// CodeChallenge holds the value of the "code_challenge" field.
	CodeChallenge string `json:"code_challenge,omitempty"`
	// CodeChallengeMethod holds the value of the "code_challenge_method" field.
	CodeChallengeMethod string `json:"code_challenge_method,omitempty"`
	// HmacKey holds the value of the "hmac_key" field.
	HmacKey []byte `json:"hmac_key,omitempty"`
	// contains filtered or unexported fields
}

AuthRequest is the model entity for the AuthRequest schema.

func (*AuthRequest) String

func (ar *AuthRequest) String() string

String implements the fmt.Stringer.

func (*AuthRequest) Unwrap

func (ar *AuthRequest) Unwrap() *AuthRequest

Unwrap unwraps the AuthRequest entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*AuthRequest) Update

func (ar *AuthRequest) Update() *AuthRequestUpdateOne

Update returns a builder for updating this AuthRequest. Note that you need to call AuthRequest.Unwrap() before calling this method if this AuthRequest was returned from a transaction, and the transaction was committed or rolled back.

type AuthRequestClient

type AuthRequestClient struct {
	// contains filtered or unexported fields
}

AuthRequestClient is a client for the AuthRequest schema.

func NewAuthRequestClient

func NewAuthRequestClient(c config) *AuthRequestClient

NewAuthRequestClient returns a client for the AuthRequest from the given config.

func (*AuthRequestClient) Create

func (c *AuthRequestClient) Create() *AuthRequestCreate

Create returns a builder for creating a AuthRequest entity.

func (*AuthRequestClient) CreateBulk

func (c *AuthRequestClient) CreateBulk(builders ...*AuthRequestCreate) *AuthRequestCreateBulk

CreateBulk returns a builder for creating a bulk of AuthRequest entities.

func (*AuthRequestClient) Delete

func (c *AuthRequestClient) Delete() *AuthRequestDelete

Delete returns a delete builder for AuthRequest.

func (*AuthRequestClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AuthRequestClient) DeleteOneID

func (c *AuthRequestClient) DeleteOneID(id string) *AuthRequestDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*AuthRequestClient) Get

Get returns a AuthRequest entity by its id.

func (*AuthRequestClient) GetX

GetX is like Get, but panics if an error occurs.

func (*AuthRequestClient) Hooks

func (c *AuthRequestClient) Hooks() []Hook

Hooks returns the client hooks.

func (*AuthRequestClient) Intercept

func (c *AuthRequestClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `authrequest.Intercept(f(g(h())))`.

func (*AuthRequestClient) Interceptors

func (c *AuthRequestClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*AuthRequestClient) Query

func (c *AuthRequestClient) Query() *AuthRequestQuery

Query returns a query builder for AuthRequest.

func (*AuthRequestClient) Update

func (c *AuthRequestClient) Update() *AuthRequestUpdate

Update returns an update builder for AuthRequest.

func (*AuthRequestClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*AuthRequestClient) UpdateOneID

func (c *AuthRequestClient) UpdateOneID(id string) *AuthRequestUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AuthRequestClient) Use

func (c *AuthRequestClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `authrequest.Hooks(f(g(h())))`.

type AuthRequestCreate

type AuthRequestCreate struct {
	// contains filtered or unexported fields
}

AuthRequestCreate is the builder for creating a AuthRequest entity.

func (*AuthRequestCreate) Exec

func (arc *AuthRequestCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AuthRequestCreate) ExecX

func (arc *AuthRequestCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AuthRequestCreate) Mutation

func (arc *AuthRequestCreate) Mutation() *AuthRequestMutation

Mutation returns the AuthRequestMutation object of the builder.

func (*AuthRequestCreate) Save

func (arc *AuthRequestCreate) Save(ctx context.Context) (*AuthRequest, error)

Save creates the AuthRequest in the database.

func (*AuthRequestCreate) SaveX

func (arc *AuthRequestCreate) SaveX(ctx context.Context) *AuthRequest

SaveX calls Save and panics if Save returns an error.

func (*AuthRequestCreate) SetClaimsEmail

func (arc *AuthRequestCreate) SetClaimsEmail(s string) *AuthRequestCreate

SetClaimsEmail sets the "claims_email" field.

func (*AuthRequestCreate) SetClaimsEmailVerified

func (arc *AuthRequestCreate) SetClaimsEmailVerified(b bool) *AuthRequestCreate

SetClaimsEmailVerified sets the "claims_email_verified" field.

func (*AuthRequestCreate) SetClaimsGroups

func (arc *AuthRequestCreate) SetClaimsGroups(s []string) *AuthRequestCreate

SetClaimsGroups sets the "claims_groups" field.

func (*AuthRequestCreate) SetClaimsPreferredUsername

func (arc *AuthRequestCreate) SetClaimsPreferredUsername(s string) *AuthRequestCreate

SetClaimsPreferredUsername sets the "claims_preferred_username" field.

func (*AuthRequestCreate) SetClaimsUserID

func (arc *AuthRequestCreate) SetClaimsUserID(s string) *AuthRequestCreate

SetClaimsUserID sets the "claims_user_id" field.

func (*AuthRequestCreate) SetClaimsUsername

func (arc *AuthRequestCreate) SetClaimsUsername(s string) *AuthRequestCreate

SetClaimsUsername sets the "claims_username" field.

func (*AuthRequestCreate) SetClientID

func (arc *AuthRequestCreate) SetClientID(s string) *AuthRequestCreate

SetClientID sets the "client_id" field.

func (*AuthRequestCreate) SetCodeChallenge

func (arc *AuthRequestCreate) SetCodeChallenge(s string) *AuthRequestCreate

SetCodeChallenge sets the "code_challenge" field.

func (*AuthRequestCreate) SetCodeChallengeMethod

func (arc *AuthRequestCreate) SetCodeChallengeMethod(s string) *AuthRequestCreate

SetCodeChallengeMethod sets the "code_challenge_method" field.

func (*AuthRequestCreate) SetConnectorData

func (arc *AuthRequestCreate) SetConnectorData(b []byte) *AuthRequestCreate

SetConnectorData sets the "connector_data" field.

func (*AuthRequestCreate) SetConnectorID

func (arc *AuthRequestCreate) SetConnectorID(s string) *AuthRequestCreate

SetConnectorID sets the "connector_id" field.

func (*AuthRequestCreate) SetExpiry

func (arc *AuthRequestCreate) SetExpiry(t time.Time) *AuthRequestCreate

SetExpiry sets the "expiry" field.

func (*AuthRequestCreate) SetForceApprovalPrompt

func (arc *AuthRequestCreate) SetForceApprovalPrompt(b bool) *AuthRequestCreate

SetForceApprovalPrompt sets the "force_approval_prompt" field.

func (*AuthRequestCreate) SetHmacKey

func (arc *AuthRequestCreate) SetHmacKey(b []byte) *AuthRequestCreate

SetHmacKey sets the "hmac_key" field.

func (*AuthRequestCreate) SetID

SetID sets the "id" field.

func (*AuthRequestCreate) SetLoggedIn

func (arc *AuthRequestCreate) SetLoggedIn(b bool) *AuthRequestCreate

SetLoggedIn sets the "logged_in" field.

func (*AuthRequestCreate) SetNillableClaimsPreferredUsername

func (arc *AuthRequestCreate) SetNillableClaimsPreferredUsername(s *string) *AuthRequestCreate

SetNillableClaimsPreferredUsername sets the "claims_preferred_username" field if the given value is not nil.

func (*AuthRequestCreate) SetNillableCodeChallenge

func (arc *AuthRequestCreate) SetNillableCodeChallenge(s *string) *AuthRequestCreate

SetNillableCodeChallenge sets the "code_challenge" field if the given value is not nil.

func (*AuthRequestCreate) SetNillableCodeChallengeMethod

func (arc *AuthRequestCreate) SetNillableCodeChallengeMethod(s *string) *AuthRequestCreate

SetNillableCodeChallengeMethod sets the "code_challenge_method" field if the given value is not nil.

func (*AuthRequestCreate) SetNonce

func (arc *AuthRequestCreate) SetNonce(s string) *AuthRequestCreate

SetNonce sets the "nonce" field.

func (*AuthRequestCreate) SetRedirectURI

func (arc *AuthRequestCreate) SetRedirectURI(s string) *AuthRequestCreate

SetRedirectURI sets the "redirect_uri" field.

func (*AuthRequestCreate) SetResponseTypes

func (arc *AuthRequestCreate) SetResponseTypes(s []string) *AuthRequestCreate

SetResponseTypes sets the "response_types" field.

func (*AuthRequestCreate) SetScopes

func (arc *AuthRequestCreate) SetScopes(s []string) *AuthRequestCreate

SetScopes sets the "scopes" field.

func (*AuthRequestCreate) SetState

func (arc *AuthRequestCreate) SetState(s string) *AuthRequestCreate

SetState sets the "state" field.

type AuthRequestCreateBulk

type AuthRequestCreateBulk struct {
	// contains filtered or unexported fields
}

AuthRequestCreateBulk is the builder for creating many AuthRequest entities in bulk.

func (*AuthRequestCreateBulk) Exec

func (arcb *AuthRequestCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AuthRequestCreateBulk) ExecX

func (arcb *AuthRequestCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AuthRequestCreateBulk) Save

func (arcb *AuthRequestCreateBulk) Save(ctx context.Context) ([]*AuthRequest, error)

Save creates the AuthRequest entities in the database.

func (*AuthRequestCreateBulk) SaveX

func (arcb *AuthRequestCreateBulk) SaveX(ctx context.Context) []*AuthRequest

SaveX is like Save, but panics if an error occurs.

type AuthRequestDelete

type AuthRequestDelete struct {
	// contains filtered or unexported fields
}

AuthRequestDelete is the builder for deleting a AuthRequest entity.

func (*AuthRequestDelete) Exec

func (ard *AuthRequestDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*AuthRequestDelete) ExecX

func (ard *AuthRequestDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*AuthRequestDelete) Where

Where appends a list predicates to the AuthRequestDelete builder.

type AuthRequestDeleteOne

type AuthRequestDeleteOne struct {
	// contains filtered or unexported fields
}

AuthRequestDeleteOne is the builder for deleting a single AuthRequest entity.

func (*AuthRequestDeleteOne) Exec

func (ardo *AuthRequestDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AuthRequestDeleteOne) ExecX

func (ardo *AuthRequestDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AuthRequestDeleteOne) Where

Where appends a list predicates to the AuthRequestDelete builder.

type AuthRequestGroupBy

type AuthRequestGroupBy struct {
	// contains filtered or unexported fields
}

AuthRequestGroupBy is the group-by builder for AuthRequest entities.

func (*AuthRequestGroupBy) Aggregate

func (argb *AuthRequestGroupBy) Aggregate(fns ...AggregateFunc) *AuthRequestGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*AuthRequestGroupBy) Bool

func (s *AuthRequestGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AuthRequestGroupBy) BoolX

func (s *AuthRequestGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AuthRequestGroupBy) Bools

func (s *AuthRequestGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AuthRequestGroupBy) BoolsX

func (s *AuthRequestGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AuthRequestGroupBy) Float64

func (s *AuthRequestGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AuthRequestGroupBy) Float64X

func (s *AuthRequestGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AuthRequestGroupBy) Float64s

func (s *AuthRequestGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AuthRequestGroupBy) Float64sX

func (s *AuthRequestGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AuthRequestGroupBy) Int

func (s *AuthRequestGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AuthRequestGroupBy) IntX

func (s *AuthRequestGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AuthRequestGroupBy) Ints

func (s *AuthRequestGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AuthRequestGroupBy) IntsX

func (s *AuthRequestGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AuthRequestGroupBy) Scan

func (argb *AuthRequestGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AuthRequestGroupBy) ScanX

func (s *AuthRequestGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AuthRequestGroupBy) String

func (s *AuthRequestGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AuthRequestGroupBy) StringX

func (s *AuthRequestGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AuthRequestGroupBy) Strings

func (s *AuthRequestGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AuthRequestGroupBy) StringsX

func (s *AuthRequestGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AuthRequestMutation

type AuthRequestMutation struct {
	// contains filtered or unexported fields
}

AuthRequestMutation represents an operation that mutates the AuthRequest nodes in the graph.

func (*AuthRequestMutation) AddField

func (m *AuthRequestMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AuthRequestMutation) AddedEdges

func (m *AuthRequestMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*AuthRequestMutation) AddedField

func (m *AuthRequestMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AuthRequestMutation) AddedFields

func (m *AuthRequestMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*AuthRequestMutation) AddedIDs

func (m *AuthRequestMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*AuthRequestMutation) AppendClaimsGroups

func (m *AuthRequestMutation) AppendClaimsGroups(s []string)

AppendClaimsGroups adds s to the "claims_groups" field.

func (*AuthRequestMutation) AppendResponseTypes

func (m *AuthRequestMutation) AppendResponseTypes(s []string)

AppendResponseTypes adds s to the "response_types" field.

func (*AuthRequestMutation) AppendScopes

func (m *AuthRequestMutation) AppendScopes(s []string)

AppendScopes adds s to the "scopes" field.

func (*AuthRequestMutation) AppendedClaimsGroups

func (m *AuthRequestMutation) AppendedClaimsGroups() ([]string, bool)

AppendedClaimsGroups returns the list of values that were appended to the "claims_groups" field in this mutation.

func (*AuthRequestMutation) AppendedResponseTypes

func (m *AuthRequestMutation) AppendedResponseTypes() ([]string, bool)

AppendedResponseTypes returns the list of values that were appended to the "response_types" field in this mutation.

func (*AuthRequestMutation) AppendedScopes

func (m *AuthRequestMutation) AppendedScopes() ([]string, bool)

AppendedScopes returns the list of values that were appended to the "scopes" field in this mutation.

func (*AuthRequestMutation) ClaimsEmail

func (m *AuthRequestMutation) ClaimsEmail() (r string, exists bool)

ClaimsEmail returns the value of the "claims_email" field in the mutation.

func (*AuthRequestMutation) ClaimsEmailVerified

func (m *AuthRequestMutation) ClaimsEmailVerified() (r bool, exists bool)

ClaimsEmailVerified returns the value of the "claims_email_verified" field in the mutation.

func (*AuthRequestMutation) ClaimsGroups

func (m *AuthRequestMutation) ClaimsGroups() (r []string, exists bool)

ClaimsGroups returns the value of the "claims_groups" field in the mutation.

func (*AuthRequestMutation) ClaimsGroupsCleared

func (m *AuthRequestMutation) ClaimsGroupsCleared() bool

ClaimsGroupsCleared returns if the "claims_groups" field was cleared in this mutation.

func (*AuthRequestMutation) ClaimsPreferredUsername

func (m *AuthRequestMutation) ClaimsPreferredUsername() (r string, exists bool)

ClaimsPreferredUsername returns the value of the "claims_preferred_username" field in the mutation.

func (*AuthRequestMutation) ClaimsUserID

func (m *AuthRequestMutation) ClaimsUserID() (r string, exists bool)

ClaimsUserID returns the value of the "claims_user_id" field in the mutation.

func (*AuthRequestMutation) ClaimsUsername

func (m *AuthRequestMutation) ClaimsUsername() (r string, exists bool)

ClaimsUsername returns the value of the "claims_username" field in the mutation.

func (*AuthRequestMutation) ClearClaimsGroups

func (m *AuthRequestMutation) ClearClaimsGroups()

ClearClaimsGroups clears the value of the "claims_groups" field.

func (*AuthRequestMutation) ClearConnectorData

func (m *AuthRequestMutation) ClearConnectorData()

ClearConnectorData clears the value of the "connector_data" field.

func (*AuthRequestMutation) ClearEdge

func (m *AuthRequestMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*AuthRequestMutation) ClearField

func (m *AuthRequestMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*AuthRequestMutation) ClearResponseTypes

func (m *AuthRequestMutation) ClearResponseTypes()

ClearResponseTypes clears the value of the "response_types" field.

func (*AuthRequestMutation) ClearScopes

func (m *AuthRequestMutation) ClearScopes()

ClearScopes clears the value of the "scopes" field.

func (*AuthRequestMutation) ClearedEdges

func (m *AuthRequestMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*AuthRequestMutation) ClearedFields

func (m *AuthRequestMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (AuthRequestMutation) Client

func (m AuthRequestMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*AuthRequestMutation) ClientID

func (m *AuthRequestMutation) ClientID() (r string, exists bool)

ClientID returns the value of the "client_id" field in the mutation.

func (*AuthRequestMutation) CodeChallenge

func (m *AuthRequestMutation) CodeChallenge() (r string, exists bool)

CodeChallenge returns the value of the "code_challenge" field in the mutation.

func (*AuthRequestMutation) CodeChallengeMethod

func (m *AuthRequestMutation) CodeChallengeMethod() (r string, exists bool)

CodeChallengeMethod returns the value of the "code_challenge_method" field in the mutation.

func (*AuthRequestMutation) ConnectorData

func (m *AuthRequestMutation) ConnectorData() (r []byte, exists bool)

ConnectorData returns the value of the "connector_data" field in the mutation.

func (*AuthRequestMutation) ConnectorDataCleared

func (m *AuthRequestMutation) ConnectorDataCleared() bool

ConnectorDataCleared returns if the "connector_data" field was cleared in this mutation.

func (*AuthRequestMutation) ConnectorID

func (m *AuthRequestMutation) ConnectorID() (r string, exists bool)

ConnectorID returns the value of the "connector_id" field in the mutation.

func (*AuthRequestMutation) EdgeCleared

func (m *AuthRequestMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*AuthRequestMutation) Expiry

func (m *AuthRequestMutation) Expiry() (r time.Time, exists bool)

Expiry returns the value of the "expiry" field in the mutation.

func (*AuthRequestMutation) Field

func (m *AuthRequestMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AuthRequestMutation) FieldCleared

func (m *AuthRequestMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*AuthRequestMutation) Fields

func (m *AuthRequestMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*AuthRequestMutation) ForceApprovalPrompt

func (m *AuthRequestMutation) ForceApprovalPrompt() (r bool, exists bool)

ForceApprovalPrompt returns the value of the "force_approval_prompt" field in the mutation.

func (*AuthRequestMutation) HmacKey

func (m *AuthRequestMutation) HmacKey() (r []byte, exists bool)

HmacKey returns the value of the "hmac_key" field in the mutation.

func (*AuthRequestMutation) ID

func (m *AuthRequestMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*AuthRequestMutation) IDs

func (m *AuthRequestMutation) IDs(ctx context.Context) ([]string, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*AuthRequestMutation) LoggedIn

func (m *AuthRequestMutation) LoggedIn() (r bool, exists bool)

LoggedIn returns the value of the "logged_in" field in the mutation.

func (*AuthRequestMutation) Nonce

func (m *AuthRequestMutation) Nonce() (r string, exists bool)

Nonce returns the value of the "nonce" field in the mutation.

func (*AuthRequestMutation) OldClaimsEmail

func (m *AuthRequestMutation) OldClaimsEmail(ctx context.Context) (v string, err error)

OldClaimsEmail returns the old "claims_email" field's value of the AuthRequest entity. If the AuthRequest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthRequestMutation) OldClaimsEmailVerified

func (m *AuthRequestMutation) OldClaimsEmailVerified(ctx context.Context) (v bool, err error)

OldClaimsEmailVerified returns the old "claims_email_verified" field's value of the AuthRequest entity. If the AuthRequest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthRequestMutation) OldClaimsGroups

func (m *AuthRequestMutation) OldClaimsGroups(ctx context.Context) (v []string, err error)

OldClaimsGroups returns the old "claims_groups" field's value of the AuthRequest entity. If the AuthRequest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthRequestMutation) OldClaimsPreferredUsername

func (m *AuthRequestMutation) OldClaimsPreferredUsername(ctx context.Context) (v string, err error)

OldClaimsPreferredUsername returns the old "claims_preferred_username" field's value of the AuthRequest entity. If the AuthRequest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthRequestMutation) OldClaimsUserID

func (m *AuthRequestMutation) OldClaimsUserID(ctx context.Context) (v string, err error)

OldClaimsUserID returns the old "claims_user_id" field's value of the AuthRequest entity. If the AuthRequest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthRequestMutation) OldClaimsUsername

func (m *AuthRequestMutation) OldClaimsUsername(ctx context.Context) (v string, err error)

OldClaimsUsername returns the old "claims_username" field's value of the AuthRequest entity. If the AuthRequest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthRequestMutation) OldClientID

func (m *AuthRequestMutation) OldClientID(ctx context.Context) (v string, err error)

OldClientID returns the old "client_id" field's value of the AuthRequest entity. If the AuthRequest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthRequestMutation) OldCodeChallenge

func (m *AuthRequestMutation) OldCodeChallenge(ctx context.Context) (v string, err error)

OldCodeChallenge returns the old "code_challenge" field's value of the AuthRequest entity. If the AuthRequest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthRequestMutation) OldCodeChallengeMethod

func (m *AuthRequestMutation) OldCodeChallengeMethod(ctx context.Context) (v string, err error)

OldCodeChallengeMethod returns the old "code_challenge_method" field's value of the AuthRequest entity. If the AuthRequest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthRequestMutation) OldConnectorData

func (m *AuthRequestMutation) OldConnectorData(ctx context.Context) (v *[]byte, err error)

OldConnectorData returns the old "connector_data" field's value of the AuthRequest entity. If the AuthRequest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthRequestMutation) OldConnectorID

func (m *AuthRequestMutation) OldConnectorID(ctx context.Context) (v string, err error)

OldConnectorID returns the old "connector_id" field's value of the AuthRequest entity. If the AuthRequest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthRequestMutation) OldExpiry

func (m *AuthRequestMutation) OldExpiry(ctx context.Context) (v time.Time, err error)

OldExpiry returns the old "expiry" field's value of the AuthRequest entity. If the AuthRequest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthRequestMutation) OldField

func (m *AuthRequestMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*AuthRequestMutation) OldForceApprovalPrompt

func (m *AuthRequestMutation) OldForceApprovalPrompt(ctx context.Context) (v bool, err error)

OldForceApprovalPrompt returns the old "force_approval_prompt" field's value of the AuthRequest entity. If the AuthRequest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthRequestMutation) OldHmacKey

func (m *AuthRequestMutation) OldHmacKey(ctx context.Context) (v []byte, err error)

OldHmacKey returns the old "hmac_key" field's value of the AuthRequest entity. If the AuthRequest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthRequestMutation) OldLoggedIn

func (m *AuthRequestMutation) OldLoggedIn(ctx context.Context) (v bool, err error)

OldLoggedIn returns the old "logged_in" field's value of the AuthRequest entity. If the AuthRequest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthRequestMutation) OldNonce

func (m *AuthRequestMutation) OldNonce(ctx context.Context) (v string, err error)

OldNonce returns the old "nonce" field's value of the AuthRequest entity. If the AuthRequest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthRequestMutation) OldRedirectURI

func (m *AuthRequestMutation) OldRedirectURI(ctx context.Context) (v string, err error)

OldRedirectURI returns the old "redirect_uri" field's value of the AuthRequest entity. If the AuthRequest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthRequestMutation) OldResponseTypes

func (m *AuthRequestMutation) OldResponseTypes(ctx context.Context) (v []string, err error)

OldResponseTypes returns the old "response_types" field's value of the AuthRequest entity. If the AuthRequest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthRequestMutation) OldScopes

func (m *AuthRequestMutation) OldScopes(ctx context.Context) (v []string, err error)

OldScopes returns the old "scopes" field's value of the AuthRequest entity. If the AuthRequest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthRequestMutation) OldState

func (m *AuthRequestMutation) OldState(ctx context.Context) (v string, err error)

OldState returns the old "state" field's value of the AuthRequest entity. If the AuthRequest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AuthRequestMutation) Op

func (m *AuthRequestMutation) Op() Op

Op returns the operation name.

func (*AuthRequestMutation) RedirectURI

func (m *AuthRequestMutation) RedirectURI() (r string, exists bool)

RedirectURI returns the value of the "redirect_uri" field in the mutation.

func (*AuthRequestMutation) RemovedEdges

func (m *AuthRequestMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*AuthRequestMutation) RemovedIDs

func (m *AuthRequestMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*AuthRequestMutation) ResetClaimsEmail

func (m *AuthRequestMutation) ResetClaimsEmail()

ResetClaimsEmail resets all changes to the "claims_email" field.

func (*AuthRequestMutation) ResetClaimsEmailVerified

func (m *AuthRequestMutation) ResetClaimsEmailVerified()

ResetClaimsEmailVerified resets all changes to the "claims_email_verified" field.

func (*AuthRequestMutation) ResetClaimsGroups

func (m *AuthRequestMutation) ResetClaimsGroups()

ResetClaimsGroups resets all changes to the "claims_groups" field.

func (*AuthRequestMutation) ResetClaimsPreferredUsername

func (m *AuthRequestMutation) ResetClaimsPreferredUsername()

ResetClaimsPreferredUsername resets all changes to the "claims_preferred_username" field.

func (*AuthRequestMutation) ResetClaimsUserID

func (m *AuthRequestMutation) ResetClaimsUserID()

ResetClaimsUserID resets all changes to the "claims_user_id" field.

func (*AuthRequestMutation) ResetClaimsUsername

func (m *AuthRequestMutation) ResetClaimsUsername()

ResetClaimsUsername resets all changes to the "claims_username" field.

func (*AuthRequestMutation) ResetClientID

func (m *AuthRequestMutation) ResetClientID()

ResetClientID resets all changes to the "client_id" field.

func (*AuthRequestMutation) ResetCodeChallenge

func (m *AuthRequestMutation) ResetCodeChallenge()

ResetCodeChallenge resets all changes to the "code_challenge" field.

func (*AuthRequestMutation) ResetCodeChallengeMethod

func (m *AuthRequestMutation) ResetCodeChallengeMethod()

ResetCodeChallengeMethod resets all changes to the "code_challenge_method" field.

func (*AuthRequestMutation) ResetConnectorData

func (m *AuthRequestMutation) ResetConnectorData()

ResetConnectorData resets all changes to the "connector_data" field.

func (*AuthRequestMutation) ResetConnectorID

func (m *AuthRequestMutation) ResetConnectorID()

ResetConnectorID resets all changes to the "connector_id" field.

func (*AuthRequestMutation) ResetEdge

func (m *AuthRequestMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*AuthRequestMutation) ResetExpiry

func (m *AuthRequestMutation) ResetExpiry()

ResetExpiry resets all changes to the "expiry" field.

func (*AuthRequestMutation) ResetField

func (m *AuthRequestMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*AuthRequestMutation) ResetForceApprovalPrompt

func (m *AuthRequestMutation) ResetForceApprovalPrompt()

ResetForceApprovalPrompt resets all changes to the "force_approval_prompt" field.

func (*AuthRequestMutation) ResetHmacKey

func (m *AuthRequestMutation) ResetHmacKey()

ResetHmacKey resets all changes to the "hmac_key" field.

func (*AuthRequestMutation) ResetLoggedIn

func (m *AuthRequestMutation) ResetLoggedIn()

ResetLoggedIn resets all changes to the "logged_in" field.

func (*AuthRequestMutation) ResetNonce

func (m *AuthRequestMutation) ResetNonce()

ResetNonce resets all changes to the "nonce" field.

func (*AuthRequestMutation) ResetRedirectURI

func (m *AuthRequestMutation) ResetRedirectURI()

ResetRedirectURI resets all changes to the "redirect_uri" field.

func (*AuthRequestMutation) ResetResponseTypes

func (m *AuthRequestMutation) ResetResponseTypes()

ResetResponseTypes resets all changes to the "response_types" field.

func (*AuthRequestMutation) ResetScopes

func (m *AuthRequestMutation) ResetScopes()

ResetScopes resets all changes to the "scopes" field.

func (*AuthRequestMutation) ResetState

func (m *AuthRequestMutation) ResetState()

ResetState resets all changes to the "state" field.

func (*AuthRequestMutation) ResponseTypes

func (m *AuthRequestMutation) ResponseTypes() (r []string, exists bool)

ResponseTypes returns the value of the "response_types" field in the mutation.

func (*AuthRequestMutation) ResponseTypesCleared

func (m *AuthRequestMutation) ResponseTypesCleared() bool

ResponseTypesCleared returns if the "response_types" field was cleared in this mutation.

func (*AuthRequestMutation) Scopes

func (m *AuthRequestMutation) Scopes() (r []string, exists bool)

Scopes returns the value of the "scopes" field in the mutation.

func (*AuthRequestMutation) ScopesCleared

func (m *AuthRequestMutation) ScopesCleared() bool

ScopesCleared returns if the "scopes" field was cleared in this mutation.

func (*AuthRequestMutation) SetClaimsEmail

func (m *AuthRequestMutation) SetClaimsEmail(s string)

SetClaimsEmail sets the "claims_email" field.

func (*AuthRequestMutation) SetClaimsEmailVerified

func (m *AuthRequestMutation) SetClaimsEmailVerified(b bool)

SetClaimsEmailVerified sets the "claims_email_verified" field.

func (*AuthRequestMutation) SetClaimsGroups

func (m *AuthRequestMutation) SetClaimsGroups(s []string)

SetClaimsGroups sets the "claims_groups" field.

func (*AuthRequestMutation) SetClaimsPreferredUsername

func (m *AuthRequestMutation) SetClaimsPreferredUsername(s string)

SetClaimsPreferredUsername sets the "claims_preferred_username" field.

func (*AuthRequestMutation) SetClaimsUserID

func (m *AuthRequestMutation) SetClaimsUserID(s string)

SetClaimsUserID sets the "claims_user_id" field.

func (*AuthRequestMutation) SetClaimsUsername

func (m *AuthRequestMutation) SetClaimsUsername(s string)

SetClaimsUsername sets the "claims_username" field.

func (*AuthRequestMutation) SetClientID

func (m *AuthRequestMutation) SetClientID(s string)

SetClientID sets the "client_id" field.

func (*AuthRequestMutation) SetCodeChallenge

func (m *AuthRequestMutation) SetCodeChallenge(s string)

SetCodeChallenge sets the "code_challenge" field.

func (*AuthRequestMutation) SetCodeChallengeMethod

func (m *AuthRequestMutation) SetCodeChallengeMethod(s string)

SetCodeChallengeMethod sets the "code_challenge_method" field.

func (*AuthRequestMutation) SetConnectorData

func (m *AuthRequestMutation) SetConnectorData(b []byte)

SetConnectorData sets the "connector_data" field.

func (*AuthRequestMutation) SetConnectorID

func (m *AuthRequestMutation) SetConnectorID(s string)

SetConnectorID sets the "connector_id" field.

func (*AuthRequestMutation) SetExpiry

func (m *AuthRequestMutation) SetExpiry(t time.Time)

SetExpiry sets the "expiry" field.

func (*AuthRequestMutation) SetField

func (m *AuthRequestMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AuthRequestMutation) SetForceApprovalPrompt

func (m *AuthRequestMutation) SetForceApprovalPrompt(b bool)

SetForceApprovalPrompt sets the "force_approval_prompt" field.

func (*AuthRequestMutation) SetHmacKey

func (m *AuthRequestMutation) SetHmacKey(b []byte)

SetHmacKey sets the "hmac_key" field.

func (*AuthRequestMutation) SetID

func (m *AuthRequestMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of AuthRequest entities.

func (*AuthRequestMutation) SetLoggedIn

func (m *AuthRequestMutation) SetLoggedIn(b bool)

SetLoggedIn sets the "logged_in" field.

func (*AuthRequestMutation) SetNonce

func (m *AuthRequestMutation) SetNonce(s string)

SetNonce sets the "nonce" field.

func (*AuthRequestMutation) SetOp

func (m *AuthRequestMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AuthRequestMutation) SetRedirectURI

func (m *AuthRequestMutation) SetRedirectURI(s string)

SetRedirectURI sets the "redirect_uri" field.

func (*AuthRequestMutation) SetResponseTypes

func (m *AuthRequestMutation) SetResponseTypes(s []string)

SetResponseTypes sets the "response_types" field.

func (*AuthRequestMutation) SetScopes

func (m *AuthRequestMutation) SetScopes(s []string)

SetScopes sets the "scopes" field.

func (*AuthRequestMutation) SetState

func (m *AuthRequestMutation) SetState(s string)

SetState sets the "state" field.

func (*AuthRequestMutation) State

func (m *AuthRequestMutation) State() (r string, exists bool)

State returns the value of the "state" field in the mutation.

func (AuthRequestMutation) Tx

func (m AuthRequestMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*AuthRequestMutation) Type

func (m *AuthRequestMutation) Type() string

Type returns the node type of this mutation (AuthRequest).

func (*AuthRequestMutation) Where

func (m *AuthRequestMutation) Where(ps ...predicate.AuthRequest)

Where appends a list predicates to the AuthRequestMutation builder.

func (*AuthRequestMutation) WhereP

func (m *AuthRequestMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the AuthRequestMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type AuthRequestQuery

type AuthRequestQuery struct {
	// contains filtered or unexported fields
}

AuthRequestQuery is the builder for querying AuthRequest entities.

func (*AuthRequestQuery) Aggregate

func (arq *AuthRequestQuery) Aggregate(fns ...AggregateFunc) *AuthRequestSelect

Aggregate returns a AuthRequestSelect configured with the given aggregations.

func (*AuthRequestQuery) All

func (arq *AuthRequestQuery) All(ctx context.Context) ([]*AuthRequest, error)

All executes the query and returns a list of AuthRequests.

func (*AuthRequestQuery) AllX

func (arq *AuthRequestQuery) AllX(ctx context.Context) []*AuthRequest

AllX is like All, but panics if an error occurs.

func (*AuthRequestQuery) Clone

func (arq *AuthRequestQuery) Clone() *AuthRequestQuery

Clone returns a duplicate of the AuthRequestQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*AuthRequestQuery) Count

func (arq *AuthRequestQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AuthRequestQuery) CountX

func (arq *AuthRequestQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*AuthRequestQuery) Exist

func (arq *AuthRequestQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*AuthRequestQuery) ExistX

func (arq *AuthRequestQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*AuthRequestQuery) First

func (arq *AuthRequestQuery) First(ctx context.Context) (*AuthRequest, error)

First returns the first AuthRequest entity from the query. Returns a *NotFoundError when no AuthRequest was found.

func (*AuthRequestQuery) FirstID

func (arq *AuthRequestQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first AuthRequest ID from the query. Returns a *NotFoundError when no AuthRequest ID was found.

func (*AuthRequestQuery) FirstIDX

func (arq *AuthRequestQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*AuthRequestQuery) FirstX

func (arq *AuthRequestQuery) FirstX(ctx context.Context) *AuthRequest

FirstX is like First, but panics if an error occurs.

func (*AuthRequestQuery) GroupBy

func (arq *AuthRequestQuery) GroupBy(field string, fields ...string) *AuthRequestGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	ClientID string `json:"client_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.AuthRequest.Query().
	GroupBy(authrequest.FieldClientID).
	Aggregate(db.Count()).
	Scan(ctx, &v)

func (*AuthRequestQuery) IDs

func (arq *AuthRequestQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of AuthRequest IDs.

func (*AuthRequestQuery) IDsX

func (arq *AuthRequestQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*AuthRequestQuery) Limit

func (arq *AuthRequestQuery) Limit(limit int) *AuthRequestQuery

Limit the number of records to be returned by this query.

func (*AuthRequestQuery) Offset

func (arq *AuthRequestQuery) Offset(offset int) *AuthRequestQuery

Offset to start from.

func (*AuthRequestQuery) Only

func (arq *AuthRequestQuery) Only(ctx context.Context) (*AuthRequest, error)

Only returns a single AuthRequest entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AuthRequest entity is found. Returns a *NotFoundError when no AuthRequest entities are found.

func (*AuthRequestQuery) OnlyID

func (arq *AuthRequestQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only AuthRequest ID in the query. Returns a *NotSingularError when more than one AuthRequest ID is found. Returns a *NotFoundError when no entities are found.

func (*AuthRequestQuery) OnlyIDX

func (arq *AuthRequestQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*AuthRequestQuery) OnlyX

func (arq *AuthRequestQuery) OnlyX(ctx context.Context) *AuthRequest

OnlyX is like Only, but panics if an error occurs.

func (*AuthRequestQuery) Order

func (arq *AuthRequestQuery) Order(o ...OrderFunc) *AuthRequestQuery

Order specifies how the records should be ordered.

func (*AuthRequestQuery) Select

func (arq *AuthRequestQuery) Select(fields ...string) *AuthRequestSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	ClientID string `json:"client_id,omitempty"`
}

client.AuthRequest.Query().
	Select(authrequest.FieldClientID).
	Scan(ctx, &v)

func (*AuthRequestQuery) Unique

func (arq *AuthRequestQuery) Unique(unique bool) *AuthRequestQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*AuthRequestQuery) Where

Where adds a new predicate for the AuthRequestQuery builder.

type AuthRequestSelect

type AuthRequestSelect struct {
	*AuthRequestQuery
	// contains filtered or unexported fields
}

AuthRequestSelect is the builder for selecting fields of AuthRequest entities.

func (*AuthRequestSelect) Aggregate

func (ars *AuthRequestSelect) Aggregate(fns ...AggregateFunc) *AuthRequestSelect

Aggregate adds the given aggregation functions to the selector query.

func (*AuthRequestSelect) Bool

func (s *AuthRequestSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AuthRequestSelect) BoolX

func (s *AuthRequestSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AuthRequestSelect) Bools

func (s *AuthRequestSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AuthRequestSelect) BoolsX

func (s *AuthRequestSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AuthRequestSelect) Float64

func (s *AuthRequestSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AuthRequestSelect) Float64X

func (s *AuthRequestSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AuthRequestSelect) Float64s

func (s *AuthRequestSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AuthRequestSelect) Float64sX

func (s *AuthRequestSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AuthRequestSelect) Int

func (s *AuthRequestSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AuthRequestSelect) IntX

func (s *AuthRequestSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AuthRequestSelect) Ints

func (s *AuthRequestSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AuthRequestSelect) IntsX

func (s *AuthRequestSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AuthRequestSelect) Scan

func (ars *AuthRequestSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AuthRequestSelect) ScanX

func (s *AuthRequestSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AuthRequestSelect) String

func (s *AuthRequestSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AuthRequestSelect) StringX

func (s *AuthRequestSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AuthRequestSelect) Strings

func (s *AuthRequestSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AuthRequestSelect) StringsX

func (s *AuthRequestSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AuthRequestUpdate

type AuthRequestUpdate struct {
	// contains filtered or unexported fields
}

AuthRequestUpdate is the builder for updating AuthRequest entities.

func (*AuthRequestUpdate) AppendClaimsGroups

func (aru *AuthRequestUpdate) AppendClaimsGroups(s []string) *AuthRequestUpdate

AppendClaimsGroups appends s to the "claims_groups" field.

func (*AuthRequestUpdate) AppendResponseTypes

func (aru *AuthRequestUpdate) AppendResponseTypes(s []string) *AuthRequestUpdate

AppendResponseTypes appends s to the "response_types" field.

func (*AuthRequestUpdate) AppendScopes

func (aru *AuthRequestUpdate) AppendScopes(s []string) *AuthRequestUpdate

AppendScopes appends s to the "scopes" field.

func (*AuthRequestUpdate) ClearClaimsGroups

func (aru *AuthRequestUpdate) ClearClaimsGroups() *AuthRequestUpdate

ClearClaimsGroups clears the value of the "claims_groups" field.

func (*AuthRequestUpdate) ClearConnectorData

func (aru *AuthRequestUpdate) ClearConnectorData() *AuthRequestUpdate

ClearConnectorData clears the value of the "connector_data" field.

func (*AuthRequestUpdate) ClearResponseTypes

func (aru *AuthRequestUpdate) ClearResponseTypes() *AuthRequestUpdate

ClearResponseTypes clears the value of the "response_types" field.

func (*AuthRequestUpdate) ClearScopes

func (aru *AuthRequestUpdate) ClearScopes() *AuthRequestUpdate

ClearScopes clears the value of the "scopes" field.

func (*AuthRequestUpdate) Exec

func (aru *AuthRequestUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AuthRequestUpdate) ExecX

func (aru *AuthRequestUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AuthRequestUpdate) Mutation

func (aru *AuthRequestUpdate) Mutation() *AuthRequestMutation

Mutation returns the AuthRequestMutation object of the builder.

func (*AuthRequestUpdate) Save

func (aru *AuthRequestUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*AuthRequestUpdate) SaveX

func (aru *AuthRequestUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*AuthRequestUpdate) SetClaimsEmail

func (aru *AuthRequestUpdate) SetClaimsEmail(s string) *AuthRequestUpdate

SetClaimsEmail sets the "claims_email" field.

func (*AuthRequestUpdate) SetClaimsEmailVerified

func (aru *AuthRequestUpdate) SetClaimsEmailVerified(b bool) *AuthRequestUpdate

SetClaimsEmailVerified sets the "claims_email_verified" field.

func (*AuthRequestUpdate) SetClaimsGroups

func (aru *AuthRequestUpdate) SetClaimsGroups(s []string) *AuthRequestUpdate

SetClaimsGroups sets the "claims_groups" field.

func (*AuthRequestUpdate) SetClaimsPreferredUsername

func (aru *AuthRequestUpdate) SetClaimsPreferredUsername(s string) *AuthRequestUpdate

SetClaimsPreferredUsername sets the "claims_preferred_username" field.

func (*AuthRequestUpdate) SetClaimsUserID

func (aru *AuthRequestUpdate) SetClaimsUserID(s string) *AuthRequestUpdate

SetClaimsUserID sets the "claims_user_id" field.

func (*AuthRequestUpdate) SetClaimsUsername

func (aru *AuthRequestUpdate) SetClaimsUsername(s string) *AuthRequestUpdate

SetClaimsUsername sets the "claims_username" field.

func (*AuthRequestUpdate) SetClientID

func (aru *AuthRequestUpdate) SetClientID(s string) *AuthRequestUpdate

SetClientID sets the "client_id" field.

func (*AuthRequestUpdate) SetCodeChallenge

func (aru *AuthRequestUpdate) SetCodeChallenge(s string) *AuthRequestUpdate

SetCodeChallenge sets the "code_challenge" field.

func (*AuthRequestUpdate) SetCodeChallengeMethod

func (aru *AuthRequestUpdate) SetCodeChallengeMethod(s string) *AuthRequestUpdate

SetCodeChallengeMethod sets the "code_challenge_method" field.

func (*AuthRequestUpdate) SetConnectorData

func (aru *AuthRequestUpdate) SetConnectorData(b []byte) *AuthRequestUpdate

SetConnectorData sets the "connector_data" field.

func (*AuthRequestUpdate) SetConnectorID

func (aru *AuthRequestUpdate) SetConnectorID(s string) *AuthRequestUpdate

SetConnectorID sets the "connector_id" field.

func (*AuthRequestUpdate) SetExpiry

func (aru *AuthRequestUpdate) SetExpiry(t time.Time) *AuthRequestUpdate

SetExpiry sets the "expiry" field.

func (*AuthRequestUpdate) SetForceApprovalPrompt

func (aru *AuthRequestUpdate) SetForceApprovalPrompt(b bool) *AuthRequestUpdate

SetForceApprovalPrompt sets the "force_approval_prompt" field.

func (*AuthRequestUpdate) SetHmacKey

func (aru *AuthRequestUpdate) SetHmacKey(b []byte) *AuthRequestUpdate

SetHmacKey sets the "hmac_key" field.

func (*AuthRequestUpdate) SetLoggedIn

func (aru *AuthRequestUpdate) SetLoggedIn(b bool) *AuthRequestUpdate

SetLoggedIn sets the "logged_in" field.

func (*AuthRequestUpdate) SetNillableClaimsPreferredUsername

func (aru *AuthRequestUpdate) SetNillableClaimsPreferredUsername(s *string) *AuthRequestUpdate

SetNillableClaimsPreferredUsername sets the "claims_preferred_username" field if the given value is not nil.

func (*AuthRequestUpdate) SetNillableCodeChallenge

func (aru *AuthRequestUpdate) SetNillableCodeChallenge(s *string) *AuthRequestUpdate

SetNillableCodeChallenge sets the "code_challenge" field if the given value is not nil.

func (*AuthRequestUpdate) SetNillableCodeChallengeMethod

func (aru *AuthRequestUpdate) SetNillableCodeChallengeMethod(s *string) *AuthRequestUpdate

SetNillableCodeChallengeMethod sets the "code_challenge_method" field if the given value is not nil.

func (*AuthRequestUpdate) SetNonce

func (aru *AuthRequestUpdate) SetNonce(s string) *AuthRequestUpdate

SetNonce sets the "nonce" field.

func (*AuthRequestUpdate) SetRedirectURI

func (aru *AuthRequestUpdate) SetRedirectURI(s string) *AuthRequestUpdate

SetRedirectURI sets the "redirect_uri" field.

func (*AuthRequestUpdate) SetResponseTypes

func (aru *AuthRequestUpdate) SetResponseTypes(s []string) *AuthRequestUpdate

SetResponseTypes sets the "response_types" field.

func (*AuthRequestUpdate) SetScopes

func (aru *AuthRequestUpdate) SetScopes(s []string) *AuthRequestUpdate

SetScopes sets the "scopes" field.

func (*AuthRequestUpdate) SetState

func (aru *AuthRequestUpdate) SetState(s string) *AuthRequestUpdate

SetState sets the "state" field.

func (*AuthRequestUpdate) Where

Where appends a list predicates to the AuthRequestUpdate builder.

type AuthRequestUpdateOne

type AuthRequestUpdateOne struct {
	// contains filtered or unexported fields
}

AuthRequestUpdateOne is the builder for updating a single AuthRequest entity.

func (*AuthRequestUpdateOne) AppendClaimsGroups

func (aruo *AuthRequestUpdateOne) AppendClaimsGroups(s []string) *AuthRequestUpdateOne

AppendClaimsGroups appends s to the "claims_groups" field.

func (*AuthRequestUpdateOne) AppendResponseTypes

func (aruo *AuthRequestUpdateOne) AppendResponseTypes(s []string) *AuthRequestUpdateOne

AppendResponseTypes appends s to the "response_types" field.

func (*AuthRequestUpdateOne) AppendScopes

func (aruo *AuthRequestUpdateOne) AppendScopes(s []string) *AuthRequestUpdateOne

AppendScopes appends s to the "scopes" field.

func (*AuthRequestUpdateOne) ClearClaimsGroups

func (aruo *AuthRequestUpdateOne) ClearClaimsGroups() *AuthRequestUpdateOne

ClearClaimsGroups clears the value of the "claims_groups" field.

func (*AuthRequestUpdateOne) ClearConnectorData

func (aruo *AuthRequestUpdateOne) ClearConnectorData() *AuthRequestUpdateOne

ClearConnectorData clears the value of the "connector_data" field.

func (*AuthRequestUpdateOne) ClearResponseTypes

func (aruo *AuthRequestUpdateOne) ClearResponseTypes() *AuthRequestUpdateOne

ClearResponseTypes clears the value of the "response_types" field.

func (*AuthRequestUpdateOne) ClearScopes

func (aruo *AuthRequestUpdateOne) ClearScopes() *AuthRequestUpdateOne

ClearScopes clears the value of the "scopes" field.

func (*AuthRequestUpdateOne) Exec

func (aruo *AuthRequestUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AuthRequestUpdateOne) ExecX

func (aruo *AuthRequestUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AuthRequestUpdateOne) Mutation

func (aruo *AuthRequestUpdateOne) Mutation() *AuthRequestMutation

Mutation returns the AuthRequestMutation object of the builder.

func (*AuthRequestUpdateOne) Save

Save executes the query and returns the updated AuthRequest entity.

func (*AuthRequestUpdateOne) SaveX

func (aruo *AuthRequestUpdateOne) SaveX(ctx context.Context) *AuthRequest

SaveX is like Save, but panics if an error occurs.

func (*AuthRequestUpdateOne) Select

func (aruo *AuthRequestUpdateOne) Select(field string, fields ...string) *AuthRequestUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*AuthRequestUpdateOne) SetClaimsEmail

func (aruo *AuthRequestUpdateOne) SetClaimsEmail(s string) *AuthRequestUpdateOne

SetClaimsEmail sets the "claims_email" field.

func (*AuthRequestUpdateOne) SetClaimsEmailVerified

func (aruo *AuthRequestUpdateOne) SetClaimsEmailVerified(b bool) *AuthRequestUpdateOne

SetClaimsEmailVerified sets the "claims_email_verified" field.

func (*AuthRequestUpdateOne) SetClaimsGroups

func (aruo *AuthRequestUpdateOne) SetClaimsGroups(s []string) *AuthRequestUpdateOne

SetClaimsGroups sets the "claims_groups" field.

func (*AuthRequestUpdateOne) SetClaimsPreferredUsername

func (aruo *AuthRequestUpdateOne) SetClaimsPreferredUsername(s string) *AuthRequestUpdateOne

SetClaimsPreferredUsername sets the "claims_preferred_username" field.

func (*AuthRequestUpdateOne) SetClaimsUserID

func (aruo *AuthRequestUpdateOne) SetClaimsUserID(s string) *AuthRequestUpdateOne

SetClaimsUserID sets the "claims_user_id" field.

func (*AuthRequestUpdateOne) SetClaimsUsername

func (aruo *AuthRequestUpdateOne) SetClaimsUsername(s string) *AuthRequestUpdateOne

SetClaimsUsername sets the "claims_username" field.

func (*AuthRequestUpdateOne) SetClientID

func (aruo *AuthRequestUpdateOne) SetClientID(s string) *AuthRequestUpdateOne

SetClientID sets the "client_id" field.

func (*AuthRequestUpdateOne) SetCodeChallenge

func (aruo *AuthRequestUpdateOne) SetCodeChallenge(s string) *AuthRequestUpdateOne

SetCodeChallenge sets the "code_challenge" field.

func (*AuthRequestUpdateOne) SetCodeChallengeMethod

func (aruo *AuthRequestUpdateOne) SetCodeChallengeMethod(s string) *AuthRequestUpdateOne

SetCodeChallengeMethod sets the "code_challenge_method" field.

func (*AuthRequestUpdateOne) SetConnectorData

func (aruo *AuthRequestUpdateOne) SetConnectorData(b []byte) *AuthRequestUpdateOne

SetConnectorData sets the "connector_data" field.

func (*AuthRequestUpdateOne) SetConnectorID

func (aruo *AuthRequestUpdateOne) SetConnectorID(s string) *AuthRequestUpdateOne

SetConnectorID sets the "connector_id" field.

func (*AuthRequestUpdateOne) SetExpiry

func (aruo *AuthRequestUpdateOne) SetExpiry(t time.Time) *AuthRequestUpdateOne

SetExpiry sets the "expiry" field.

func (*AuthRequestUpdateOne) SetForceApprovalPrompt

func (aruo *AuthRequestUpdateOne) SetForceApprovalPrompt(b bool) *AuthRequestUpdateOne

SetForceApprovalPrompt sets the "force_approval_prompt" field.

func (*AuthRequestUpdateOne) SetHmacKey

func (aruo *AuthRequestUpdateOne) SetHmacKey(b []byte) *AuthRequestUpdateOne

SetHmacKey sets the "hmac_key" field.

func (*AuthRequestUpdateOne) SetLoggedIn

func (aruo *AuthRequestUpdateOne) SetLoggedIn(b bool) *AuthRequestUpdateOne

SetLoggedIn sets the "logged_in" field.

func (*AuthRequestUpdateOne) SetNillableClaimsPreferredUsername

func (aruo *AuthRequestUpdateOne) SetNillableClaimsPreferredUsername(s *string) *AuthRequestUpdateOne

SetNillableClaimsPreferredUsername sets the "claims_preferred_username" field if the given value is not nil.

func (*AuthRequestUpdateOne) SetNillableCodeChallenge

func (aruo *AuthRequestUpdateOne) SetNillableCodeChallenge(s *string) *AuthRequestUpdateOne

SetNillableCodeChallenge sets the "code_challenge" field if the given value is not nil.

func (*AuthRequestUpdateOne) SetNillableCodeChallengeMethod

func (aruo *AuthRequestUpdateOne) SetNillableCodeChallengeMethod(s *string) *AuthRequestUpdateOne

SetNillableCodeChallengeMethod sets the "code_challenge_method" field if the given value is not nil.

func (*AuthRequestUpdateOne) SetNonce

SetNonce sets the "nonce" field.

func (*AuthRequestUpdateOne) SetRedirectURI

func (aruo *AuthRequestUpdateOne) SetRedirectURI(s string) *AuthRequestUpdateOne

SetRedirectURI sets the "redirect_uri" field.

func (*AuthRequestUpdateOne) SetResponseTypes

func (aruo *AuthRequestUpdateOne) SetResponseTypes(s []string) *AuthRequestUpdateOne

SetResponseTypes sets the "response_types" field.

func (*AuthRequestUpdateOne) SetScopes

func (aruo *AuthRequestUpdateOne) SetScopes(s []string) *AuthRequestUpdateOne

SetScopes sets the "scopes" field.

func (*AuthRequestUpdateOne) SetState

SetState sets the "state" field.

func (*AuthRequestUpdateOne) Where

Where appends a list predicates to the AuthRequestUpdate builder.

type AuthRequests

type AuthRequests []*AuthRequest

AuthRequests is a parsable slice of AuthRequest.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// AuthCode is the client for interacting with the AuthCode builders.
	AuthCode *AuthCodeClient
	// AuthRequest is the client for interacting with the AuthRequest builders.
	AuthRequest *AuthRequestClient
	// Connector is the client for interacting with the Connector builders.
	Connector *ConnectorClient
	// DeviceRequest is the client for interacting with the DeviceRequest builders.
	DeviceRequest *DeviceRequestClient
	// DeviceToken is the client for interacting with the DeviceToken builders.
	DeviceToken *DeviceTokenClient
	// Keys is the client for interacting with the Keys builders.
	Keys *KeysClient
	// OAuth2Client is the client for interacting with the OAuth2Client builders.
	OAuth2Client *OAuth2ClientClient
	// OfflineSession is the client for interacting with the OfflineSession builders.
	OfflineSession *OfflineSessionClient
	// Password is the client for interacting with the Password builders.
	Password *PasswordClient
	// RefreshToken is the client for interacting with the RefreshToken builders.
	RefreshToken *RefreshTokenClient
	// contains filtered or unexported fields
}

Client is the client that holds all ent builders.

func FromContext

func FromContext(ctx context.Context) *Client

FromContext returns a Client stored inside a context, or nil if there isn't one.

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client configured with the given options.

func Open

func Open(driverName, dataSourceName string, options ...Option) (*Client, error)

Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.

func (*Client) BeginTx

func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)

BeginTx returns a transactional client with specified options.

func (*Client) Close

func (c *Client) Close() error

Close closes the database connection and prevents new queries from starting.

func (*Client) Debug

func (c *Client) Debug() *Client

Debug returns a new debug-client. It's used to get verbose logging on specific operations.

client.Debug().
	AuthCode.
	Query().
	Count(ctx)

func (*Client) Intercept

func (c *Client) Intercept(interceptors ...Interceptor)

Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.

func (*Client) Mutate

func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)

Mutate implements the ent.Mutator interface.

func (*Client) Tx

func (c *Client) Tx(ctx context.Context) (*Tx, error)

Tx returns a new transactional client. The provided context is used until the transaction is committed or rolled back.

func (*Client) Use

func (c *Client) Use(hooks ...Hook)

Use adds the mutation hooks to all the entity clients. In order to add hooks to a specific client, call: `client.Node.Use(...)`.

type CommitFunc

type CommitFunc func(context.Context, *Tx) error

The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.

func (CommitFunc) Commit

func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:

hook := func(next ent.Committer) ent.Committer {
	return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Commit(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Committer

type Committer interface {
	Commit(context.Context, *Tx) error
}

Committer is the interface that wraps the Commit method.

type Connector

type Connector struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Type holds the value of the "type" field.
	Type string `json:"type,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// ResourceVersion holds the value of the "resource_version" field.
	ResourceVersion string `json:"resource_version,omitempty"`
	// Config holds the value of the "config" field.
	Config []byte `json:"config,omitempty"`
	// contains filtered or unexported fields
}

Connector is the model entity for the Connector schema.

func (*Connector) String

func (c *Connector) String() string

String implements the fmt.Stringer.

func (*Connector) Unwrap

func (c *Connector) Unwrap() *Connector

Unwrap unwraps the Connector entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Connector) Update

func (c *Connector) Update() *ConnectorUpdateOne

Update returns a builder for updating this Connector. Note that you need to call Connector.Unwrap() before calling this method if this Connector was returned from a transaction, and the transaction was committed or rolled back.

type ConnectorClient

type ConnectorClient struct {
	// contains filtered or unexported fields
}

ConnectorClient is a client for the Connector schema.

func NewConnectorClient

func NewConnectorClient(c config) *ConnectorClient

NewConnectorClient returns a client for the Connector from the given config.

func (*ConnectorClient) Create

func (c *ConnectorClient) Create() *ConnectorCreate

Create returns a builder for creating a Connector entity.

func (*ConnectorClient) CreateBulk

func (c *ConnectorClient) CreateBulk(builders ...*ConnectorCreate) *ConnectorCreateBulk

CreateBulk returns a builder for creating a bulk of Connector entities.

func (*ConnectorClient) Delete

func (c *ConnectorClient) Delete() *ConnectorDelete

Delete returns a delete builder for Connector.

func (*ConnectorClient) DeleteOne

func (c *ConnectorClient) DeleteOne(co *Connector) *ConnectorDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ConnectorClient) DeleteOneID

func (c *ConnectorClient) DeleteOneID(id string) *ConnectorDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ConnectorClient) Get

func (c *ConnectorClient) Get(ctx context.Context, id string) (*Connector, error)

Get returns a Connector entity by its id.

func (*ConnectorClient) GetX

func (c *ConnectorClient) GetX(ctx context.Context, id string) *Connector

GetX is like Get, but panics if an error occurs.

func (*ConnectorClient) Hooks

func (c *ConnectorClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ConnectorClient) Intercept

func (c *ConnectorClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `connector.Intercept(f(g(h())))`.

func (*ConnectorClient) Interceptors

func (c *ConnectorClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ConnectorClient) Query

func (c *ConnectorClient) Query() *ConnectorQuery

Query returns a query builder for Connector.

func (*ConnectorClient) Update

func (c *ConnectorClient) Update() *ConnectorUpdate

Update returns an update builder for Connector.

func (*ConnectorClient) UpdateOne

func (c *ConnectorClient) UpdateOne(co *Connector) *ConnectorUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ConnectorClient) UpdateOneID

func (c *ConnectorClient) UpdateOneID(id string) *ConnectorUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ConnectorClient) Use

func (c *ConnectorClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `connector.Hooks(f(g(h())))`.

type ConnectorCreate

type ConnectorCreate struct {
	// contains filtered or unexported fields
}

ConnectorCreate is the builder for creating a Connector entity.

func (*ConnectorCreate) Exec

func (cc *ConnectorCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ConnectorCreate) ExecX

func (cc *ConnectorCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ConnectorCreate) Mutation

func (cc *ConnectorCreate) Mutation() *ConnectorMutation

Mutation returns the ConnectorMutation object of the builder.

func (*ConnectorCreate) Save

func (cc *ConnectorCreate) Save(ctx context.Context) (*Connector, error)

Save creates the Connector in the database.

func (*ConnectorCreate) SaveX

func (cc *ConnectorCreate) SaveX(ctx context.Context) *Connector

SaveX calls Save and panics if Save returns an error.

func (*ConnectorCreate) SetConfig

func (cc *ConnectorCreate) SetConfig(b []byte) *ConnectorCreate

SetConfig sets the "config" field.

func (*ConnectorCreate) SetID

func (cc *ConnectorCreate) SetID(s string) *ConnectorCreate

SetID sets the "id" field.

func (*ConnectorCreate) SetName

func (cc *ConnectorCreate) SetName(s string) *ConnectorCreate

SetName sets the "name" field.

func (*ConnectorCreate) SetResourceVersion

func (cc *ConnectorCreate) SetResourceVersion(s string) *ConnectorCreate

SetResourceVersion sets the "resource_version" field.

func (*ConnectorCreate) SetType

func (cc *ConnectorCreate) SetType(s string) *ConnectorCreate

SetType sets the "type" field.

type ConnectorCreateBulk

type ConnectorCreateBulk struct {
	// contains filtered or unexported fields
}

ConnectorCreateBulk is the builder for creating many Connector entities in bulk.

func (*ConnectorCreateBulk) Exec

func (ccb *ConnectorCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ConnectorCreateBulk) ExecX

func (ccb *ConnectorCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ConnectorCreateBulk) Save

func (ccb *ConnectorCreateBulk) Save(ctx context.Context) ([]*Connector, error)

Save creates the Connector entities in the database.

func (*ConnectorCreateBulk) SaveX

func (ccb *ConnectorCreateBulk) SaveX(ctx context.Context) []*Connector

SaveX is like Save, but panics if an error occurs.

type ConnectorDelete

type ConnectorDelete struct {
	// contains filtered or unexported fields
}

ConnectorDelete is the builder for deleting a Connector entity.

func (*ConnectorDelete) Exec

func (cd *ConnectorDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ConnectorDelete) ExecX

func (cd *ConnectorDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ConnectorDelete) Where

Where appends a list predicates to the ConnectorDelete builder.

type ConnectorDeleteOne

type ConnectorDeleteOne struct {
	// contains filtered or unexported fields
}

ConnectorDeleteOne is the builder for deleting a single Connector entity.

func (*ConnectorDeleteOne) Exec

func (cdo *ConnectorDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ConnectorDeleteOne) ExecX

func (cdo *ConnectorDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ConnectorDeleteOne) Where

Where appends a list predicates to the ConnectorDelete builder.

type ConnectorGroupBy

type ConnectorGroupBy struct {
	// contains filtered or unexported fields
}

ConnectorGroupBy is the group-by builder for Connector entities.

func (*ConnectorGroupBy) Aggregate

func (cgb *ConnectorGroupBy) Aggregate(fns ...AggregateFunc) *ConnectorGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ConnectorGroupBy) Bool

func (s *ConnectorGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ConnectorGroupBy) BoolX

func (s *ConnectorGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ConnectorGroupBy) Bools

func (s *ConnectorGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ConnectorGroupBy) BoolsX

func (s *ConnectorGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ConnectorGroupBy) Float64

func (s *ConnectorGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ConnectorGroupBy) Float64X

func (s *ConnectorGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ConnectorGroupBy) Float64s

func (s *ConnectorGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ConnectorGroupBy) Float64sX

func (s *ConnectorGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ConnectorGroupBy) Int

func (s *ConnectorGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ConnectorGroupBy) IntX

func (s *ConnectorGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ConnectorGroupBy) Ints

func (s *ConnectorGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ConnectorGroupBy) IntsX

func (s *ConnectorGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ConnectorGroupBy) Scan

func (cgb *ConnectorGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ConnectorGroupBy) ScanX

func (s *ConnectorGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ConnectorGroupBy) String

func (s *ConnectorGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ConnectorGroupBy) StringX

func (s *ConnectorGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ConnectorGroupBy) Strings

func (s *ConnectorGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ConnectorGroupBy) StringsX

func (s *ConnectorGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ConnectorMutation

type ConnectorMutation struct {
	// contains filtered or unexported fields
}

ConnectorMutation represents an operation that mutates the Connector nodes in the graph.

func (*ConnectorMutation) AddField

func (m *ConnectorMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ConnectorMutation) AddedEdges

func (m *ConnectorMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ConnectorMutation) AddedField

func (m *ConnectorMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ConnectorMutation) AddedFields

func (m *ConnectorMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ConnectorMutation) AddedIDs

func (m *ConnectorMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ConnectorMutation) ClearEdge

func (m *ConnectorMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*ConnectorMutation) ClearField

func (m *ConnectorMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*ConnectorMutation) ClearedEdges

func (m *ConnectorMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ConnectorMutation) ClearedFields

func (m *ConnectorMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ConnectorMutation) Client

func (m ConnectorMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*ConnectorMutation) Config

func (m *ConnectorMutation) Config() (r []byte, exists bool)

Config returns the value of the "config" field in the mutation.

func (*ConnectorMutation) EdgeCleared

func (m *ConnectorMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ConnectorMutation) Field

func (m *ConnectorMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ConnectorMutation) FieldCleared

func (m *ConnectorMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ConnectorMutation) Fields

func (m *ConnectorMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*ConnectorMutation) GetType

func (m *ConnectorMutation) GetType() (r string, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*ConnectorMutation) ID

func (m *ConnectorMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*ConnectorMutation) IDs

func (m *ConnectorMutation) IDs(ctx context.Context) ([]string, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*ConnectorMutation) Name

func (m *ConnectorMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*ConnectorMutation) OldConfig

func (m *ConnectorMutation) OldConfig(ctx context.Context) (v []byte, err error)

OldConfig returns the old "config" field's value of the Connector entity. If the Connector object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ConnectorMutation) OldField

func (m *ConnectorMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*ConnectorMutation) OldName

func (m *ConnectorMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Connector entity. If the Connector object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ConnectorMutation) OldResourceVersion

func (m *ConnectorMutation) OldResourceVersion(ctx context.Context) (v string, err error)

OldResourceVersion returns the old "resource_version" field's value of the Connector entity. If the Connector object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ConnectorMutation) OldType

func (m *ConnectorMutation) OldType(ctx context.Context) (v string, err error)

OldType returns the old "type" field's value of the Connector entity. If the Connector object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ConnectorMutation) Op

func (m *ConnectorMutation) Op() Op

Op returns the operation name.

func (*ConnectorMutation) RemovedEdges

func (m *ConnectorMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ConnectorMutation) RemovedIDs

func (m *ConnectorMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*ConnectorMutation) ResetConfig

func (m *ConnectorMutation) ResetConfig()

ResetConfig resets all changes to the "config" field.

func (*ConnectorMutation) ResetEdge

func (m *ConnectorMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*ConnectorMutation) ResetField

func (m *ConnectorMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*ConnectorMutation) ResetName

func (m *ConnectorMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ConnectorMutation) ResetResourceVersion

func (m *ConnectorMutation) ResetResourceVersion()

ResetResourceVersion resets all changes to the "resource_version" field.

func (*ConnectorMutation) ResetType

func (m *ConnectorMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*ConnectorMutation) ResourceVersion

func (m *ConnectorMutation) ResourceVersion() (r string, exists bool)

ResourceVersion returns the value of the "resource_version" field in the mutation.

func (*ConnectorMutation) SetConfig

func (m *ConnectorMutation) SetConfig(b []byte)

SetConfig sets the "config" field.

func (*ConnectorMutation) SetField

func (m *ConnectorMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ConnectorMutation) SetID

func (m *ConnectorMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Connector entities.

func (*ConnectorMutation) SetName

func (m *ConnectorMutation) SetName(s string)

SetName sets the "name" field.

func (*ConnectorMutation) SetOp

func (m *ConnectorMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ConnectorMutation) SetResourceVersion

func (m *ConnectorMutation) SetResourceVersion(s string)

SetResourceVersion sets the "resource_version" field.

func (*ConnectorMutation) SetType

func (m *ConnectorMutation) SetType(s string)

SetType sets the "type" field.

func (ConnectorMutation) Tx

func (m ConnectorMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ConnectorMutation) Type

func (m *ConnectorMutation) Type() string

Type returns the node type of this mutation (Connector).

func (*ConnectorMutation) Where

func (m *ConnectorMutation) Where(ps ...predicate.Connector)

Where appends a list predicates to the ConnectorMutation builder.

func (*ConnectorMutation) WhereP

func (m *ConnectorMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ConnectorMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ConnectorQuery

type ConnectorQuery struct {
	// contains filtered or unexported fields
}

ConnectorQuery is the builder for querying Connector entities.

func (*ConnectorQuery) Aggregate

func (cq *ConnectorQuery) Aggregate(fns ...AggregateFunc) *ConnectorSelect

Aggregate returns a ConnectorSelect configured with the given aggregations.

func (*ConnectorQuery) All

func (cq *ConnectorQuery) All(ctx context.Context) ([]*Connector, error)

All executes the query and returns a list of Connectors.

func (*ConnectorQuery) AllX

func (cq *ConnectorQuery) AllX(ctx context.Context) []*Connector

AllX is like All, but panics if an error occurs.

func (*ConnectorQuery) Clone

func (cq *ConnectorQuery) Clone() *ConnectorQuery

Clone returns a duplicate of the ConnectorQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ConnectorQuery) Count

func (cq *ConnectorQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ConnectorQuery) CountX

func (cq *ConnectorQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ConnectorQuery) Exist

func (cq *ConnectorQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ConnectorQuery) ExistX

func (cq *ConnectorQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ConnectorQuery) First

func (cq *ConnectorQuery) First(ctx context.Context) (*Connector, error)

First returns the first Connector entity from the query. Returns a *NotFoundError when no Connector was found.

func (*ConnectorQuery) FirstID

func (cq *ConnectorQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first Connector ID from the query. Returns a *NotFoundError when no Connector ID was found.

func (*ConnectorQuery) FirstIDX

func (cq *ConnectorQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*ConnectorQuery) FirstX

func (cq *ConnectorQuery) FirstX(ctx context.Context) *Connector

FirstX is like First, but panics if an error occurs.

func (*ConnectorQuery) GroupBy

func (cq *ConnectorQuery) GroupBy(field string, fields ...string) *ConnectorGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Type string `json:"type,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Connector.Query().
	GroupBy(connector.FieldType).
	Aggregate(db.Count()).
	Scan(ctx, &v)

func (*ConnectorQuery) IDs

func (cq *ConnectorQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of Connector IDs.

func (*ConnectorQuery) IDsX

func (cq *ConnectorQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*ConnectorQuery) Limit

func (cq *ConnectorQuery) Limit(limit int) *ConnectorQuery

Limit the number of records to be returned by this query.

func (*ConnectorQuery) Offset

func (cq *ConnectorQuery) Offset(offset int) *ConnectorQuery

Offset to start from.

func (*ConnectorQuery) Only

func (cq *ConnectorQuery) Only(ctx context.Context) (*Connector, error)

Only returns a single Connector entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Connector entity is found. Returns a *NotFoundError when no Connector entities are found.

func (*ConnectorQuery) OnlyID

func (cq *ConnectorQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only Connector ID in the query. Returns a *NotSingularError when more than one Connector ID is found. Returns a *NotFoundError when no entities are found.

func (*ConnectorQuery) OnlyIDX

func (cq *ConnectorQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ConnectorQuery) OnlyX

func (cq *ConnectorQuery) OnlyX(ctx context.Context) *Connector

OnlyX is like Only, but panics if an error occurs.

func (*ConnectorQuery) Order

func (cq *ConnectorQuery) Order(o ...OrderFunc) *ConnectorQuery

Order specifies how the records should be ordered.

func (*ConnectorQuery) Select

func (cq *ConnectorQuery) Select(fields ...string) *ConnectorSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Type string `json:"type,omitempty"`
}

client.Connector.Query().
	Select(connector.FieldType).
	Scan(ctx, &v)

func (*ConnectorQuery) Unique

func (cq *ConnectorQuery) Unique(unique bool) *ConnectorQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*ConnectorQuery) Where

Where adds a new predicate for the ConnectorQuery builder.

type ConnectorSelect

type ConnectorSelect struct {
	*ConnectorQuery
	// contains filtered or unexported fields
}

ConnectorSelect is the builder for selecting fields of Connector entities.

func (*ConnectorSelect) Aggregate

func (cs *ConnectorSelect) Aggregate(fns ...AggregateFunc) *ConnectorSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ConnectorSelect) Bool

func (s *ConnectorSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ConnectorSelect) BoolX

func (s *ConnectorSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ConnectorSelect) Bools

func (s *ConnectorSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ConnectorSelect) BoolsX

func (s *ConnectorSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ConnectorSelect) Float64

func (s *ConnectorSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ConnectorSelect) Float64X

func (s *ConnectorSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ConnectorSelect) Float64s

func (s *ConnectorSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ConnectorSelect) Float64sX

func (s *ConnectorSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ConnectorSelect) Int

func (s *ConnectorSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ConnectorSelect) IntX

func (s *ConnectorSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ConnectorSelect) Ints

func (s *ConnectorSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ConnectorSelect) IntsX

func (s *ConnectorSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ConnectorSelect) Scan

func (cs *ConnectorSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ConnectorSelect) ScanX

func (s *ConnectorSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ConnectorSelect) String

func (s *ConnectorSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ConnectorSelect) StringX

func (s *ConnectorSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ConnectorSelect) Strings

func (s *ConnectorSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ConnectorSelect) StringsX

func (s *ConnectorSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ConnectorUpdate

type ConnectorUpdate struct {
	// contains filtered or unexported fields
}

ConnectorUpdate is the builder for updating Connector entities.

func (*ConnectorUpdate) Exec

func (cu *ConnectorUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ConnectorUpdate) ExecX

func (cu *ConnectorUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ConnectorUpdate) Mutation

func (cu *ConnectorUpdate) Mutation() *ConnectorMutation

Mutation returns the ConnectorMutation object of the builder.

func (*ConnectorUpdate) Save

func (cu *ConnectorUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ConnectorUpdate) SaveX

func (cu *ConnectorUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ConnectorUpdate) SetConfig

func (cu *ConnectorUpdate) SetConfig(b []byte) *ConnectorUpdate

SetConfig sets the "config" field.

func (*ConnectorUpdate) SetName

func (cu *ConnectorUpdate) SetName(s string) *ConnectorUpdate

SetName sets the "name" field.

func (*ConnectorUpdate) SetResourceVersion

func (cu *ConnectorUpdate) SetResourceVersion(s string) *ConnectorUpdate

SetResourceVersion sets the "resource_version" field.

func (*ConnectorUpdate) SetType

func (cu *ConnectorUpdate) SetType(s string) *ConnectorUpdate

SetType sets the "type" field.

func (*ConnectorUpdate) Where

Where appends a list predicates to the ConnectorUpdate builder.

type ConnectorUpdateOne

type ConnectorUpdateOne struct {
	// contains filtered or unexported fields
}

ConnectorUpdateOne is the builder for updating a single Connector entity.

func (*ConnectorUpdateOne) Exec

func (cuo *ConnectorUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ConnectorUpdateOne) ExecX

func (cuo *ConnectorUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ConnectorUpdateOne) Mutation

func (cuo *ConnectorUpdateOne) Mutation() *ConnectorMutation

Mutation returns the ConnectorMutation object of the builder.

func (*ConnectorUpdateOne) Save

func (cuo *ConnectorUpdateOne) Save(ctx context.Context) (*Connector, error)

Save executes the query and returns the updated Connector entity.

func (*ConnectorUpdateOne) SaveX

func (cuo *ConnectorUpdateOne) SaveX(ctx context.Context) *Connector

SaveX is like Save, but panics if an error occurs.

func (*ConnectorUpdateOne) Select

func (cuo *ConnectorUpdateOne) Select(field string, fields ...string) *ConnectorUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ConnectorUpdateOne) SetConfig

func (cuo *ConnectorUpdateOne) SetConfig(b []byte) *ConnectorUpdateOne

SetConfig sets the "config" field.

func (*ConnectorUpdateOne) SetName

func (cuo *ConnectorUpdateOne) SetName(s string) *ConnectorUpdateOne

SetName sets the "name" field.

func (*ConnectorUpdateOne) SetResourceVersion

func (cuo *ConnectorUpdateOne) SetResourceVersion(s string) *ConnectorUpdateOne

SetResourceVersion sets the "resource_version" field.

func (*ConnectorUpdateOne) SetType

func (cuo *ConnectorUpdateOne) SetType(s string) *ConnectorUpdateOne

SetType sets the "type" field.

func (*ConnectorUpdateOne) Where

Where appends a list predicates to the ConnectorUpdate builder.

type Connectors

type Connectors []*Connector

Connectors is a parsable slice of Connector.

type ConstraintError

type ConstraintError struct {
	// contains filtered or unexported fields
}

ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.

func (ConstraintError) Error

func (e ConstraintError) Error() string

Error implements the error interface.

func (*ConstraintError) Unwrap

func (e *ConstraintError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type DeviceRequest

type DeviceRequest struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// UserCode holds the value of the "user_code" field.
	UserCode string `json:"user_code,omitempty"`
	// DeviceCode holds the value of the "device_code" field.
	DeviceCode string `json:"device_code,omitempty"`
	// ClientID holds the value of the "client_id" field.
	ClientID string `json:"client_id,omitempty"`
	// ClientSecret holds the value of the "client_secret" field.
	ClientSecret string `json:"client_secret,omitempty"`
	// Scopes holds the value of the "scopes" field.
	Scopes []string `json:"scopes,omitempty"`
	// Expiry holds the value of the "expiry" field.
	Expiry time.Time `json:"expiry,omitempty"`
	// contains filtered or unexported fields
}

DeviceRequest is the model entity for the DeviceRequest schema.

func (*DeviceRequest) String

func (dr *DeviceRequest) String() string

String implements the fmt.Stringer.

func (*DeviceRequest) Unwrap

func (dr *DeviceRequest) Unwrap() *DeviceRequest

Unwrap unwraps the DeviceRequest entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*DeviceRequest) Update

func (dr *DeviceRequest) Update() *DeviceRequestUpdateOne

Update returns a builder for updating this DeviceRequest. Note that you need to call DeviceRequest.Unwrap() before calling this method if this DeviceRequest was returned from a transaction, and the transaction was committed or rolled back.

type DeviceRequestClient

type DeviceRequestClient struct {
	// contains filtered or unexported fields
}

DeviceRequestClient is a client for the DeviceRequest schema.

func NewDeviceRequestClient

func NewDeviceRequestClient(c config) *DeviceRequestClient

NewDeviceRequestClient returns a client for the DeviceRequest from the given config.

func (*DeviceRequestClient) Create

Create returns a builder for creating a DeviceRequest entity.

func (*DeviceRequestClient) CreateBulk

CreateBulk returns a builder for creating a bulk of DeviceRequest entities.

func (*DeviceRequestClient) Delete

Delete returns a delete builder for DeviceRequest.

func (*DeviceRequestClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DeviceRequestClient) DeleteOneID

func (c *DeviceRequestClient) DeleteOneID(id int) *DeviceRequestDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*DeviceRequestClient) Get

Get returns a DeviceRequest entity by its id.

func (*DeviceRequestClient) GetX

GetX is like Get, but panics if an error occurs.

func (*DeviceRequestClient) Hooks

func (c *DeviceRequestClient) Hooks() []Hook

Hooks returns the client hooks.

func (*DeviceRequestClient) Intercept

func (c *DeviceRequestClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `devicerequest.Intercept(f(g(h())))`.

func (*DeviceRequestClient) Interceptors

func (c *DeviceRequestClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*DeviceRequestClient) Query

Query returns a query builder for DeviceRequest.

func (*DeviceRequestClient) Update

Update returns an update builder for DeviceRequest.

func (*DeviceRequestClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*DeviceRequestClient) UpdateOneID

func (c *DeviceRequestClient) UpdateOneID(id int) *DeviceRequestUpdateOne

UpdateOneID returns an update builder for the given id.

func (*DeviceRequestClient) Use

func (c *DeviceRequestClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `devicerequest.Hooks(f(g(h())))`.

type DeviceRequestCreate

type DeviceRequestCreate struct {
	// contains filtered or unexported fields
}

DeviceRequestCreate is the builder for creating a DeviceRequest entity.

func (*DeviceRequestCreate) Exec

func (drc *DeviceRequestCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeviceRequestCreate) ExecX

func (drc *DeviceRequestCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceRequestCreate) Mutation

func (drc *DeviceRequestCreate) Mutation() *DeviceRequestMutation

Mutation returns the DeviceRequestMutation object of the builder.

func (*DeviceRequestCreate) Save

Save creates the DeviceRequest in the database.

func (*DeviceRequestCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*DeviceRequestCreate) SetClientID

func (drc *DeviceRequestCreate) SetClientID(s string) *DeviceRequestCreate

SetClientID sets the "client_id" field.

func (*DeviceRequestCreate) SetClientSecret

func (drc *DeviceRequestCreate) SetClientSecret(s string) *DeviceRequestCreate

SetClientSecret sets the "client_secret" field.

func (*DeviceRequestCreate) SetDeviceCode

func (drc *DeviceRequestCreate) SetDeviceCode(s string) *DeviceRequestCreate

SetDeviceCode sets the "device_code" field.

func (*DeviceRequestCreate) SetExpiry

func (drc *DeviceRequestCreate) SetExpiry(t time.Time) *DeviceRequestCreate

SetExpiry sets the "expiry" field.

func (*DeviceRequestCreate) SetScopes

func (drc *DeviceRequestCreate) SetScopes(s []string) *DeviceRequestCreate

SetScopes sets the "scopes" field.

func (*DeviceRequestCreate) SetUserCode

func (drc *DeviceRequestCreate) SetUserCode(s string) *DeviceRequestCreate

SetUserCode sets the "user_code" field.

type DeviceRequestCreateBulk

type DeviceRequestCreateBulk struct {
	// contains filtered or unexported fields
}

DeviceRequestCreateBulk is the builder for creating many DeviceRequest entities in bulk.

func (*DeviceRequestCreateBulk) Exec

func (drcb *DeviceRequestCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*DeviceRequestCreateBulk) ExecX

func (drcb *DeviceRequestCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceRequestCreateBulk) Save

Save creates the DeviceRequest entities in the database.

func (*DeviceRequestCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type DeviceRequestDelete

type DeviceRequestDelete struct {
	// contains filtered or unexported fields
}

DeviceRequestDelete is the builder for deleting a DeviceRequest entity.

func (*DeviceRequestDelete) Exec

func (drd *DeviceRequestDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*DeviceRequestDelete) ExecX

func (drd *DeviceRequestDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*DeviceRequestDelete) Where

Where appends a list predicates to the DeviceRequestDelete builder.

type DeviceRequestDeleteOne

type DeviceRequestDeleteOne struct {
	// contains filtered or unexported fields
}

DeviceRequestDeleteOne is the builder for deleting a single DeviceRequest entity.

func (*DeviceRequestDeleteOne) Exec

func (drdo *DeviceRequestDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*DeviceRequestDeleteOne) ExecX

func (drdo *DeviceRequestDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceRequestDeleteOne) Where

Where appends a list predicates to the DeviceRequestDelete builder.

type DeviceRequestGroupBy

type DeviceRequestGroupBy struct {
	// contains filtered or unexported fields
}

DeviceRequestGroupBy is the group-by builder for DeviceRequest entities.

func (*DeviceRequestGroupBy) Aggregate

func (drgb *DeviceRequestGroupBy) Aggregate(fns ...AggregateFunc) *DeviceRequestGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*DeviceRequestGroupBy) Bool

func (s *DeviceRequestGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DeviceRequestGroupBy) BoolX

func (s *DeviceRequestGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DeviceRequestGroupBy) Bools

func (s *DeviceRequestGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DeviceRequestGroupBy) BoolsX

func (s *DeviceRequestGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DeviceRequestGroupBy) Float64

func (s *DeviceRequestGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DeviceRequestGroupBy) Float64X

func (s *DeviceRequestGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DeviceRequestGroupBy) Float64s

func (s *DeviceRequestGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DeviceRequestGroupBy) Float64sX

func (s *DeviceRequestGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeviceRequestGroupBy) Int

func (s *DeviceRequestGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DeviceRequestGroupBy) IntX

func (s *DeviceRequestGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DeviceRequestGroupBy) Ints

func (s *DeviceRequestGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DeviceRequestGroupBy) IntsX

func (s *DeviceRequestGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DeviceRequestGroupBy) Scan

func (drgb *DeviceRequestGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DeviceRequestGroupBy) ScanX

func (s *DeviceRequestGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DeviceRequestGroupBy) String

func (s *DeviceRequestGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DeviceRequestGroupBy) StringX

func (s *DeviceRequestGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DeviceRequestGroupBy) Strings

func (s *DeviceRequestGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DeviceRequestGroupBy) StringsX

func (s *DeviceRequestGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeviceRequestMutation

type DeviceRequestMutation struct {
	// contains filtered or unexported fields
}

DeviceRequestMutation represents an operation that mutates the DeviceRequest nodes in the graph.

func (*DeviceRequestMutation) AddField

func (m *DeviceRequestMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DeviceRequestMutation) AddedEdges

func (m *DeviceRequestMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*DeviceRequestMutation) AddedField

func (m *DeviceRequestMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DeviceRequestMutation) AddedFields

func (m *DeviceRequestMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*DeviceRequestMutation) AddedIDs

func (m *DeviceRequestMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*DeviceRequestMutation) AppendScopes

func (m *DeviceRequestMutation) AppendScopes(s []string)

AppendScopes adds s to the "scopes" field.

func (*DeviceRequestMutation) AppendedScopes

func (m *DeviceRequestMutation) AppendedScopes() ([]string, bool)

AppendedScopes returns the list of values that were appended to the "scopes" field in this mutation.

func (*DeviceRequestMutation) ClearEdge

func (m *DeviceRequestMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*DeviceRequestMutation) ClearField

func (m *DeviceRequestMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*DeviceRequestMutation) ClearScopes

func (m *DeviceRequestMutation) ClearScopes()

ClearScopes clears the value of the "scopes" field.

func (*DeviceRequestMutation) ClearedEdges

func (m *DeviceRequestMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*DeviceRequestMutation) ClearedFields

func (m *DeviceRequestMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (DeviceRequestMutation) Client

func (m DeviceRequestMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*DeviceRequestMutation) ClientID

func (m *DeviceRequestMutation) ClientID() (r string, exists bool)

ClientID returns the value of the "client_id" field in the mutation.

func (*DeviceRequestMutation) ClientSecret

func (m *DeviceRequestMutation) ClientSecret() (r string, exists bool)

ClientSecret returns the value of the "client_secret" field in the mutation.

func (*DeviceRequestMutation) DeviceCode

func (m *DeviceRequestMutation) DeviceCode() (r string, exists bool)

DeviceCode returns the value of the "device_code" field in the mutation.

func (*DeviceRequestMutation) EdgeCleared

func (m *DeviceRequestMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*DeviceRequestMutation) Expiry

func (m *DeviceRequestMutation) Expiry() (r time.Time, exists bool)

Expiry returns the value of the "expiry" field in the mutation.

func (*DeviceRequestMutation) Field

func (m *DeviceRequestMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DeviceRequestMutation) FieldCleared

func (m *DeviceRequestMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*DeviceRequestMutation) Fields

func (m *DeviceRequestMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*DeviceRequestMutation) ID

func (m *DeviceRequestMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*DeviceRequestMutation) IDs

func (m *DeviceRequestMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*DeviceRequestMutation) OldClientID

func (m *DeviceRequestMutation) OldClientID(ctx context.Context) (v string, err error)

OldClientID returns the old "client_id" field's value of the DeviceRequest entity. If the DeviceRequest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceRequestMutation) OldClientSecret

func (m *DeviceRequestMutation) OldClientSecret(ctx context.Context) (v string, err error)

OldClientSecret returns the old "client_secret" field's value of the DeviceRequest entity. If the DeviceRequest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceRequestMutation) OldDeviceCode

func (m *DeviceRequestMutation) OldDeviceCode(ctx context.Context) (v string, err error)

OldDeviceCode returns the old "device_code" field's value of the DeviceRequest entity. If the DeviceRequest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceRequestMutation) OldExpiry

func (m *DeviceRequestMutation) OldExpiry(ctx context.Context) (v time.Time, err error)

OldExpiry returns the old "expiry" field's value of the DeviceRequest entity. If the DeviceRequest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceRequestMutation) OldField

func (m *DeviceRequestMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*DeviceRequestMutation) OldScopes

func (m *DeviceRequestMutation) OldScopes(ctx context.Context) (v []string, err error)

OldScopes returns the old "scopes" field's value of the DeviceRequest entity. If the DeviceRequest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceRequestMutation) OldUserCode

func (m *DeviceRequestMutation) OldUserCode(ctx context.Context) (v string, err error)

OldUserCode returns the old "user_code" field's value of the DeviceRequest entity. If the DeviceRequest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceRequestMutation) Op

func (m *DeviceRequestMutation) Op() Op

Op returns the operation name.

func (*DeviceRequestMutation) RemovedEdges

func (m *DeviceRequestMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*DeviceRequestMutation) RemovedIDs

func (m *DeviceRequestMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*DeviceRequestMutation) ResetClientID

func (m *DeviceRequestMutation) ResetClientID()

ResetClientID resets all changes to the "client_id" field.

func (*DeviceRequestMutation) ResetClientSecret

func (m *DeviceRequestMutation) ResetClientSecret()

ResetClientSecret resets all changes to the "client_secret" field.

func (*DeviceRequestMutation) ResetDeviceCode

func (m *DeviceRequestMutation) ResetDeviceCode()

ResetDeviceCode resets all changes to the "device_code" field.

func (*DeviceRequestMutation) ResetEdge

func (m *DeviceRequestMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*DeviceRequestMutation) ResetExpiry

func (m *DeviceRequestMutation) ResetExpiry()

ResetExpiry resets all changes to the "expiry" field.

func (*DeviceRequestMutation) ResetField

func (m *DeviceRequestMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*DeviceRequestMutation) ResetScopes

func (m *DeviceRequestMutation) ResetScopes()

ResetScopes resets all changes to the "scopes" field.

func (*DeviceRequestMutation) ResetUserCode

func (m *DeviceRequestMutation) ResetUserCode()

ResetUserCode resets all changes to the "user_code" field.

func (*DeviceRequestMutation) Scopes

func (m *DeviceRequestMutation) Scopes() (r []string, exists bool)

Scopes returns the value of the "scopes" field in the mutation.

func (*DeviceRequestMutation) ScopesCleared

func (m *DeviceRequestMutation) ScopesCleared() bool

ScopesCleared returns if the "scopes" field was cleared in this mutation.

func (*DeviceRequestMutation) SetClientID

func (m *DeviceRequestMutation) SetClientID(s string)

SetClientID sets the "client_id" field.

func (*DeviceRequestMutation) SetClientSecret

func (m *DeviceRequestMutation) SetClientSecret(s string)

SetClientSecret sets the "client_secret" field.

func (*DeviceRequestMutation) SetDeviceCode

func (m *DeviceRequestMutation) SetDeviceCode(s string)

SetDeviceCode sets the "device_code" field.

func (*DeviceRequestMutation) SetExpiry

func (m *DeviceRequestMutation) SetExpiry(t time.Time)

SetExpiry sets the "expiry" field.

func (*DeviceRequestMutation) SetField

func (m *DeviceRequestMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DeviceRequestMutation) SetOp

func (m *DeviceRequestMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*DeviceRequestMutation) SetScopes

func (m *DeviceRequestMutation) SetScopes(s []string)

SetScopes sets the "scopes" field.

func (*DeviceRequestMutation) SetUserCode

func (m *DeviceRequestMutation) SetUserCode(s string)

SetUserCode sets the "user_code" field.

func (DeviceRequestMutation) Tx

func (m DeviceRequestMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*DeviceRequestMutation) Type

func (m *DeviceRequestMutation) Type() string

Type returns the node type of this mutation (DeviceRequest).

func (*DeviceRequestMutation) UserCode

func (m *DeviceRequestMutation) UserCode() (r string, exists bool)

UserCode returns the value of the "user_code" field in the mutation.

func (*DeviceRequestMutation) Where

Where appends a list predicates to the DeviceRequestMutation builder.

func (*DeviceRequestMutation) WhereP

func (m *DeviceRequestMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the DeviceRequestMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type DeviceRequestQuery

type DeviceRequestQuery struct {
	// contains filtered or unexported fields
}

DeviceRequestQuery is the builder for querying DeviceRequest entities.

func (*DeviceRequestQuery) Aggregate

func (drq *DeviceRequestQuery) Aggregate(fns ...AggregateFunc) *DeviceRequestSelect

Aggregate returns a DeviceRequestSelect configured with the given aggregations.

func (*DeviceRequestQuery) All

All executes the query and returns a list of DeviceRequests.

func (*DeviceRequestQuery) AllX

func (drq *DeviceRequestQuery) AllX(ctx context.Context) []*DeviceRequest

AllX is like All, but panics if an error occurs.

func (*DeviceRequestQuery) Clone

func (drq *DeviceRequestQuery) Clone() *DeviceRequestQuery

Clone returns a duplicate of the DeviceRequestQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*DeviceRequestQuery) Count

func (drq *DeviceRequestQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DeviceRequestQuery) CountX

func (drq *DeviceRequestQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*DeviceRequestQuery) Exist

func (drq *DeviceRequestQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*DeviceRequestQuery) ExistX

func (drq *DeviceRequestQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*DeviceRequestQuery) First

First returns the first DeviceRequest entity from the query. Returns a *NotFoundError when no DeviceRequest was found.

func (*DeviceRequestQuery) FirstID

func (drq *DeviceRequestQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first DeviceRequest ID from the query. Returns a *NotFoundError when no DeviceRequest ID was found.

func (*DeviceRequestQuery) FirstIDX

func (drq *DeviceRequestQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*DeviceRequestQuery) FirstX

func (drq *DeviceRequestQuery) FirstX(ctx context.Context) *DeviceRequest

FirstX is like First, but panics if an error occurs.

func (*DeviceRequestQuery) GroupBy

func (drq *DeviceRequestQuery) GroupBy(field string, fields ...string) *DeviceRequestGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	UserCode string `json:"user_code,omitempty"`
	Count int `json:"count,omitempty"`
}

client.DeviceRequest.Query().
	GroupBy(devicerequest.FieldUserCode).
	Aggregate(db.Count()).
	Scan(ctx, &v)

func (*DeviceRequestQuery) IDs

func (drq *DeviceRequestQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of DeviceRequest IDs.

func (*DeviceRequestQuery) IDsX

func (drq *DeviceRequestQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*DeviceRequestQuery) Limit

func (drq *DeviceRequestQuery) Limit(limit int) *DeviceRequestQuery

Limit the number of records to be returned by this query.

func (*DeviceRequestQuery) Offset

func (drq *DeviceRequestQuery) Offset(offset int) *DeviceRequestQuery

Offset to start from.

func (*DeviceRequestQuery) Only

Only returns a single DeviceRequest entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DeviceRequest entity is found. Returns a *NotFoundError when no DeviceRequest entities are found.

func (*DeviceRequestQuery) OnlyID

func (drq *DeviceRequestQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only DeviceRequest ID in the query. Returns a *NotSingularError when more than one DeviceRequest ID is found. Returns a *NotFoundError when no entities are found.

func (*DeviceRequestQuery) OnlyIDX

func (drq *DeviceRequestQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*DeviceRequestQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*DeviceRequestQuery) Order

Order specifies how the records should be ordered.

func (*DeviceRequestQuery) Select

func (drq *DeviceRequestQuery) Select(fields ...string) *DeviceRequestSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	UserCode string `json:"user_code,omitempty"`
}

client.DeviceRequest.Query().
	Select(devicerequest.FieldUserCode).
	Scan(ctx, &v)

func (*DeviceRequestQuery) Unique

func (drq *DeviceRequestQuery) Unique(unique bool) *DeviceRequestQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*DeviceRequestQuery) Where

Where adds a new predicate for the DeviceRequestQuery builder.

type DeviceRequestSelect

type DeviceRequestSelect struct {
	*DeviceRequestQuery
	// contains filtered or unexported fields
}

DeviceRequestSelect is the builder for selecting fields of DeviceRequest entities.

func (*DeviceRequestSelect) Aggregate

func (drs *DeviceRequestSelect) Aggregate(fns ...AggregateFunc) *DeviceRequestSelect

Aggregate adds the given aggregation functions to the selector query.

func (*DeviceRequestSelect) Bool

func (s *DeviceRequestSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DeviceRequestSelect) BoolX

func (s *DeviceRequestSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DeviceRequestSelect) Bools

func (s *DeviceRequestSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DeviceRequestSelect) BoolsX

func (s *DeviceRequestSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DeviceRequestSelect) Float64

func (s *DeviceRequestSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DeviceRequestSelect) Float64X

func (s *DeviceRequestSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DeviceRequestSelect) Float64s

func (s *DeviceRequestSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DeviceRequestSelect) Float64sX

func (s *DeviceRequestSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeviceRequestSelect) Int

func (s *DeviceRequestSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DeviceRequestSelect) IntX

func (s *DeviceRequestSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DeviceRequestSelect) Ints

func (s *DeviceRequestSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DeviceRequestSelect) IntsX

func (s *DeviceRequestSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DeviceRequestSelect) Scan

func (drs *DeviceRequestSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DeviceRequestSelect) ScanX

func (s *DeviceRequestSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DeviceRequestSelect) String

func (s *DeviceRequestSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DeviceRequestSelect) StringX

func (s *DeviceRequestSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DeviceRequestSelect) Strings

func (s *DeviceRequestSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DeviceRequestSelect) StringsX

func (s *DeviceRequestSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeviceRequestUpdate

type DeviceRequestUpdate struct {
	// contains filtered or unexported fields
}

DeviceRequestUpdate is the builder for updating DeviceRequest entities.

func (*DeviceRequestUpdate) AppendScopes

func (dru *DeviceRequestUpdate) AppendScopes(s []string) *DeviceRequestUpdate

AppendScopes appends s to the "scopes" field.

func (*DeviceRequestUpdate) ClearScopes

func (dru *DeviceRequestUpdate) ClearScopes() *DeviceRequestUpdate

ClearScopes clears the value of the "scopes" field.

func (*DeviceRequestUpdate) Exec

func (dru *DeviceRequestUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeviceRequestUpdate) ExecX

func (dru *DeviceRequestUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceRequestUpdate) Mutation

func (dru *DeviceRequestUpdate) Mutation() *DeviceRequestMutation

Mutation returns the DeviceRequestMutation object of the builder.

func (*DeviceRequestUpdate) Save

func (dru *DeviceRequestUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*DeviceRequestUpdate) SaveX

func (dru *DeviceRequestUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*DeviceRequestUpdate) SetClientID

func (dru *DeviceRequestUpdate) SetClientID(s string) *DeviceRequestUpdate

SetClientID sets the "client_id" field.

func (*DeviceRequestUpdate) SetClientSecret

func (dru *DeviceRequestUpdate) SetClientSecret(s string) *DeviceRequestUpdate

SetClientSecret sets the "client_secret" field.

func (*DeviceRequestUpdate) SetDeviceCode

func (dru *DeviceRequestUpdate) SetDeviceCode(s string) *DeviceRequestUpdate

SetDeviceCode sets the "device_code" field.

func (*DeviceRequestUpdate) SetExpiry

func (dru *DeviceRequestUpdate) SetExpiry(t time.Time) *DeviceRequestUpdate

SetExpiry sets the "expiry" field.

func (*DeviceRequestUpdate) SetScopes

func (dru *DeviceRequestUpdate) SetScopes(s []string) *DeviceRequestUpdate

SetScopes sets the "scopes" field.

func (*DeviceRequestUpdate) SetUserCode

func (dru *DeviceRequestUpdate) SetUserCode(s string) *DeviceRequestUpdate

SetUserCode sets the "user_code" field.

func (*DeviceRequestUpdate) Where

Where appends a list predicates to the DeviceRequestUpdate builder.

type DeviceRequestUpdateOne

type DeviceRequestUpdateOne struct {
	// contains filtered or unexported fields
}

DeviceRequestUpdateOne is the builder for updating a single DeviceRequest entity.

func (*DeviceRequestUpdateOne) AppendScopes

func (druo *DeviceRequestUpdateOne) AppendScopes(s []string) *DeviceRequestUpdateOne

AppendScopes appends s to the "scopes" field.

func (*DeviceRequestUpdateOne) ClearScopes

func (druo *DeviceRequestUpdateOne) ClearScopes() *DeviceRequestUpdateOne

ClearScopes clears the value of the "scopes" field.

func (*DeviceRequestUpdateOne) Exec

func (druo *DeviceRequestUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*DeviceRequestUpdateOne) ExecX

func (druo *DeviceRequestUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceRequestUpdateOne) Mutation

Mutation returns the DeviceRequestMutation object of the builder.

func (*DeviceRequestUpdateOne) Save

Save executes the query and returns the updated DeviceRequest entity.

func (*DeviceRequestUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*DeviceRequestUpdateOne) Select

func (druo *DeviceRequestUpdateOne) Select(field string, fields ...string) *DeviceRequestUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*DeviceRequestUpdateOne) SetClientID

SetClientID sets the "client_id" field.

func (*DeviceRequestUpdateOne) SetClientSecret

func (druo *DeviceRequestUpdateOne) SetClientSecret(s string) *DeviceRequestUpdateOne

SetClientSecret sets the "client_secret" field.

func (*DeviceRequestUpdateOne) SetDeviceCode

func (druo *DeviceRequestUpdateOne) SetDeviceCode(s string) *DeviceRequestUpdateOne

SetDeviceCode sets the "device_code" field.

func (*DeviceRequestUpdateOne) SetExpiry

SetExpiry sets the "expiry" field.

func (*DeviceRequestUpdateOne) SetScopes

SetScopes sets the "scopes" field.

func (*DeviceRequestUpdateOne) SetUserCode

SetUserCode sets the "user_code" field.

func (*DeviceRequestUpdateOne) Where

Where appends a list predicates to the DeviceRequestUpdate builder.

type DeviceRequests

type DeviceRequests []*DeviceRequest

DeviceRequests is a parsable slice of DeviceRequest.

type DeviceToken

type DeviceToken struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// DeviceCode holds the value of the "device_code" field.
	DeviceCode string `json:"device_code,omitempty"`
	// Status holds the value of the "status" field.
	Status string `json:"status,omitempty"`
	// Token holds the value of the "token" field.
	Token *[]byte `json:"token,omitempty"`
	// Expiry holds the value of the "expiry" field.
	Expiry time.Time `json:"expiry,omitempty"`
	// LastRequest holds the value of the "last_request" field.
	LastRequest time.Time `json:"last_request,omitempty"`
	// PollInterval holds the value of the "poll_interval" field.
	PollInterval int `json:"poll_interval,omitempty"`
	// CodeChallenge holds the value of the "code_challenge" field.
	CodeChallenge string `json:"code_challenge,omitempty"`
	// CodeChallengeMethod holds the value of the "code_challenge_method" field.
	CodeChallengeMethod string `json:"code_challenge_method,omitempty"`
	// contains filtered or unexported fields
}

DeviceToken is the model entity for the DeviceToken schema.

func (*DeviceToken) String

func (dt *DeviceToken) String() string

String implements the fmt.Stringer.

func (*DeviceToken) Unwrap

func (dt *DeviceToken) Unwrap() *DeviceToken

Unwrap unwraps the DeviceToken entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*DeviceToken) Update

func (dt *DeviceToken) Update() *DeviceTokenUpdateOne

Update returns a builder for updating this DeviceToken. Note that you need to call DeviceToken.Unwrap() before calling this method if this DeviceToken was returned from a transaction, and the transaction was committed or rolled back.

type DeviceTokenClient

type DeviceTokenClient struct {
	// contains filtered or unexported fields
}

DeviceTokenClient is a client for the DeviceToken schema.

func NewDeviceTokenClient

func NewDeviceTokenClient(c config) *DeviceTokenClient

NewDeviceTokenClient returns a client for the DeviceToken from the given config.

func (*DeviceTokenClient) Create

func (c *DeviceTokenClient) Create() *DeviceTokenCreate

Create returns a builder for creating a DeviceToken entity.

func (*DeviceTokenClient) CreateBulk

func (c *DeviceTokenClient) CreateBulk(builders ...*DeviceTokenCreate) *DeviceTokenCreateBulk

CreateBulk returns a builder for creating a bulk of DeviceToken entities.

func (*DeviceTokenClient) Delete

func (c *DeviceTokenClient) Delete() *DeviceTokenDelete

Delete returns a delete builder for DeviceToken.

func (*DeviceTokenClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DeviceTokenClient) DeleteOneID

func (c *DeviceTokenClient) DeleteOneID(id int) *DeviceTokenDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*DeviceTokenClient) Get

func (c *DeviceTokenClient) Get(ctx context.Context, id int) (*DeviceToken, error)

Get returns a DeviceToken entity by its id.

func (*DeviceTokenClient) GetX

func (c *DeviceTokenClient) GetX(ctx context.Context, id int) *DeviceToken

GetX is like Get, but panics if an error occurs.

func (*DeviceTokenClient) Hooks

func (c *DeviceTokenClient) Hooks() []Hook

Hooks returns the client hooks.

func (*DeviceTokenClient) Intercept

func (c *DeviceTokenClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `devicetoken.Intercept(f(g(h())))`.

func (*DeviceTokenClient) Interceptors

func (c *DeviceTokenClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*DeviceTokenClient) Query

func (c *DeviceTokenClient) Query() *DeviceTokenQuery

Query returns a query builder for DeviceToken.

func (*DeviceTokenClient) Update

func (c *DeviceTokenClient) Update() *DeviceTokenUpdate

Update returns an update builder for DeviceToken.

func (*DeviceTokenClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*DeviceTokenClient) UpdateOneID

func (c *DeviceTokenClient) UpdateOneID(id int) *DeviceTokenUpdateOne

UpdateOneID returns an update builder for the given id.

func (*DeviceTokenClient) Use

func (c *DeviceTokenClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `devicetoken.Hooks(f(g(h())))`.

type DeviceTokenCreate

type DeviceTokenCreate struct {
	// contains filtered or unexported fields
}

DeviceTokenCreate is the builder for creating a DeviceToken entity.

func (*DeviceTokenCreate) Exec

func (dtc *DeviceTokenCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeviceTokenCreate) ExecX

func (dtc *DeviceTokenCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceTokenCreate) Mutation

func (dtc *DeviceTokenCreate) Mutation() *DeviceTokenMutation

Mutation returns the DeviceTokenMutation object of the builder.

func (*DeviceTokenCreate) Save

func (dtc *DeviceTokenCreate) Save(ctx context.Context) (*DeviceToken, error)

Save creates the DeviceToken in the database.

func (*DeviceTokenCreate) SaveX

func (dtc *DeviceTokenCreate) SaveX(ctx context.Context) *DeviceToken

SaveX calls Save and panics if Save returns an error.

func (*DeviceTokenCreate) SetCodeChallenge

func (dtc *DeviceTokenCreate) SetCodeChallenge(s string) *DeviceTokenCreate

SetCodeChallenge sets the "code_challenge" field.

func (*DeviceTokenCreate) SetCodeChallengeMethod

func (dtc *DeviceTokenCreate) SetCodeChallengeMethod(s string) *DeviceTokenCreate

SetCodeChallengeMethod sets the "code_challenge_method" field.

func (*DeviceTokenCreate) SetDeviceCode

func (dtc *DeviceTokenCreate) SetDeviceCode(s string) *DeviceTokenCreate

SetDeviceCode sets the "device_code" field.

func (*DeviceTokenCreate) SetExpiry

func (dtc *DeviceTokenCreate) SetExpiry(t time.Time) *DeviceTokenCreate

SetExpiry sets the "expiry" field.

func (*DeviceTokenCreate) SetLastRequest

func (dtc *DeviceTokenCreate) SetLastRequest(t time.Time) *DeviceTokenCreate

SetLastRequest sets the "last_request" field.

func (*DeviceTokenCreate) SetNillableCodeChallenge

func (dtc *DeviceTokenCreate) SetNillableCodeChallenge(s *string) *DeviceTokenCreate

SetNillableCodeChallenge sets the "code_challenge" field if the given value is not nil.

func (*DeviceTokenCreate) SetNillableCodeChallengeMethod

func (dtc *DeviceTokenCreate) SetNillableCodeChallengeMethod(s *string) *DeviceTokenCreate

SetNillableCodeChallengeMethod sets the "code_challenge_method" field if the given value is not nil.

func (*DeviceTokenCreate) SetPollInterval

func (dtc *DeviceTokenCreate) SetPollInterval(i int) *DeviceTokenCreate

SetPollInterval sets the "poll_interval" field.

func (*DeviceTokenCreate) SetStatus

func (dtc *DeviceTokenCreate) SetStatus(s string) *DeviceTokenCreate

SetStatus sets the "status" field.

func (*DeviceTokenCreate) SetToken

func (dtc *DeviceTokenCreate) SetToken(b []byte) *DeviceTokenCreate

SetToken sets the "token" field.

type DeviceTokenCreateBulk

type DeviceTokenCreateBulk struct {
	// contains filtered or unexported fields
}

DeviceTokenCreateBulk is the builder for creating many DeviceToken entities in bulk.

func (*DeviceTokenCreateBulk) Exec

func (dtcb *DeviceTokenCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*DeviceTokenCreateBulk) ExecX

func (dtcb *DeviceTokenCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceTokenCreateBulk) Save

func (dtcb *DeviceTokenCreateBulk) Save(ctx context.Context) ([]*DeviceToken, error)

Save creates the DeviceToken entities in the database.

func (*DeviceTokenCreateBulk) SaveX

func (dtcb *DeviceTokenCreateBulk) SaveX(ctx context.Context) []*DeviceToken

SaveX is like Save, but panics if an error occurs.

type DeviceTokenDelete

type DeviceTokenDelete struct {
	// contains filtered or unexported fields
}

DeviceTokenDelete is the builder for deleting a DeviceToken entity.

func (*DeviceTokenDelete) Exec

func (dtd *DeviceTokenDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*DeviceTokenDelete) ExecX

func (dtd *DeviceTokenDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*DeviceTokenDelete) Where

Where appends a list predicates to the DeviceTokenDelete builder.

type DeviceTokenDeleteOne

type DeviceTokenDeleteOne struct {
	// contains filtered or unexported fields
}

DeviceTokenDeleteOne is the builder for deleting a single DeviceToken entity.

func (*DeviceTokenDeleteOne) Exec

func (dtdo *DeviceTokenDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*DeviceTokenDeleteOne) ExecX

func (dtdo *DeviceTokenDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceTokenDeleteOne) Where

Where appends a list predicates to the DeviceTokenDelete builder.

type DeviceTokenGroupBy

type DeviceTokenGroupBy struct {
	// contains filtered or unexported fields
}

DeviceTokenGroupBy is the group-by builder for DeviceToken entities.

func (*DeviceTokenGroupBy) Aggregate

func (dtgb *DeviceTokenGroupBy) Aggregate(fns ...AggregateFunc) *DeviceTokenGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*DeviceTokenGroupBy) Bool

func (s *DeviceTokenGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DeviceTokenGroupBy) BoolX

func (s *DeviceTokenGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DeviceTokenGroupBy) Bools

func (s *DeviceTokenGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DeviceTokenGroupBy) BoolsX

func (s *DeviceTokenGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DeviceTokenGroupBy) Float64

func (s *DeviceTokenGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DeviceTokenGroupBy) Float64X

func (s *DeviceTokenGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DeviceTokenGroupBy) Float64s

func (s *DeviceTokenGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DeviceTokenGroupBy) Float64sX

func (s *DeviceTokenGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeviceTokenGroupBy) Int

func (s *DeviceTokenGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DeviceTokenGroupBy) IntX

func (s *DeviceTokenGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DeviceTokenGroupBy) Ints

func (s *DeviceTokenGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DeviceTokenGroupBy) IntsX

func (s *DeviceTokenGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DeviceTokenGroupBy) Scan

func (dtgb *DeviceTokenGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DeviceTokenGroupBy) ScanX

func (s *DeviceTokenGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DeviceTokenGroupBy) String

func (s *DeviceTokenGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DeviceTokenGroupBy) StringX

func (s *DeviceTokenGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DeviceTokenGroupBy) Strings

func (s *DeviceTokenGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DeviceTokenGroupBy) StringsX

func (s *DeviceTokenGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeviceTokenMutation

type DeviceTokenMutation struct {
	// contains filtered or unexported fields
}

DeviceTokenMutation represents an operation that mutates the DeviceToken nodes in the graph.

func (*DeviceTokenMutation) AddField

func (m *DeviceTokenMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DeviceTokenMutation) AddPollInterval

func (m *DeviceTokenMutation) AddPollInterval(i int)

AddPollInterval adds i to the "poll_interval" field.

func (*DeviceTokenMutation) AddedEdges

func (m *DeviceTokenMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*DeviceTokenMutation) AddedField

func (m *DeviceTokenMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DeviceTokenMutation) AddedFields

func (m *DeviceTokenMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*DeviceTokenMutation) AddedIDs

func (m *DeviceTokenMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*DeviceTokenMutation) AddedPollInterval

func (m *DeviceTokenMutation) AddedPollInterval() (r int, exists bool)

AddedPollInterval returns the value that was added to the "poll_interval" field in this mutation.

func (*DeviceTokenMutation) ClearEdge

func (m *DeviceTokenMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*DeviceTokenMutation) ClearField

func (m *DeviceTokenMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*DeviceTokenMutation) ClearToken

func (m *DeviceTokenMutation) ClearToken()

ClearToken clears the value of the "token" field.

func (*DeviceTokenMutation) ClearedEdges

func (m *DeviceTokenMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*DeviceTokenMutation) ClearedFields

func (m *DeviceTokenMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (DeviceTokenMutation) Client

func (m DeviceTokenMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*DeviceTokenMutation) CodeChallenge

func (m *DeviceTokenMutation) CodeChallenge() (r string, exists bool)

CodeChallenge returns the value of the "code_challenge" field in the mutation.

func (*DeviceTokenMutation) CodeChallengeMethod

func (m *DeviceTokenMutation) CodeChallengeMethod() (r string, exists bool)

CodeChallengeMethod returns the value of the "code_challenge_method" field in the mutation.

func (*DeviceTokenMutation) DeviceCode

func (m *DeviceTokenMutation) DeviceCode() (r string, exists bool)

DeviceCode returns the value of the "device_code" field in the mutation.

func (*DeviceTokenMutation) EdgeCleared

func (m *DeviceTokenMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*DeviceTokenMutation) Expiry

func (m *DeviceTokenMutation) Expiry() (r time.Time, exists bool)

Expiry returns the value of the "expiry" field in the mutation.

func (*DeviceTokenMutation) Field

func (m *DeviceTokenMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DeviceTokenMutation) FieldCleared

func (m *DeviceTokenMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*DeviceTokenMutation) Fields

func (m *DeviceTokenMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*DeviceTokenMutation) ID

func (m *DeviceTokenMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*DeviceTokenMutation) IDs

func (m *DeviceTokenMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*DeviceTokenMutation) LastRequest

func (m *DeviceTokenMutation) LastRequest() (r time.Time, exists bool)

LastRequest returns the value of the "last_request" field in the mutation.

func (*DeviceTokenMutation) OldCodeChallenge

func (m *DeviceTokenMutation) OldCodeChallenge(ctx context.Context) (v string, err error)

OldCodeChallenge returns the old "code_challenge" field's value of the DeviceToken entity. If the DeviceToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceTokenMutation) OldCodeChallengeMethod

func (m *DeviceTokenMutation) OldCodeChallengeMethod(ctx context.Context) (v string, err error)

OldCodeChallengeMethod returns the old "code_challenge_method" field's value of the DeviceToken entity. If the DeviceToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceTokenMutation) OldDeviceCode

func (m *DeviceTokenMutation) OldDeviceCode(ctx context.Context) (v string, err error)

OldDeviceCode returns the old "device_code" field's value of the DeviceToken entity. If the DeviceToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceTokenMutation) OldExpiry

func (m *DeviceTokenMutation) OldExpiry(ctx context.Context) (v time.Time, err error)

OldExpiry returns the old "expiry" field's value of the DeviceToken entity. If the DeviceToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceTokenMutation) OldField

func (m *DeviceTokenMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*DeviceTokenMutation) OldLastRequest

func (m *DeviceTokenMutation) OldLastRequest(ctx context.Context) (v time.Time, err error)

OldLastRequest returns the old "last_request" field's value of the DeviceToken entity. If the DeviceToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceTokenMutation) OldPollInterval

func (m *DeviceTokenMutation) OldPollInterval(ctx context.Context) (v int, err error)

OldPollInterval returns the old "poll_interval" field's value of the DeviceToken entity. If the DeviceToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceTokenMutation) OldStatus

func (m *DeviceTokenMutation) OldStatus(ctx context.Context) (v string, err error)

OldStatus returns the old "status" field's value of the DeviceToken entity. If the DeviceToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceTokenMutation) OldToken

func (m *DeviceTokenMutation) OldToken(ctx context.Context) (v *[]byte, err error)

OldToken returns the old "token" field's value of the DeviceToken entity. If the DeviceToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceTokenMutation) Op

func (m *DeviceTokenMutation) Op() Op

Op returns the operation name.

func (*DeviceTokenMutation) PollInterval

func (m *DeviceTokenMutation) PollInterval() (r int, exists bool)

PollInterval returns the value of the "poll_interval" field in the mutation.

func (*DeviceTokenMutation) RemovedEdges

func (m *DeviceTokenMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*DeviceTokenMutation) RemovedIDs

func (m *DeviceTokenMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*DeviceTokenMutation) ResetCodeChallenge

func (m *DeviceTokenMutation) ResetCodeChallenge()

ResetCodeChallenge resets all changes to the "code_challenge" field.

func (*DeviceTokenMutation) ResetCodeChallengeMethod

func (m *DeviceTokenMutation) ResetCodeChallengeMethod()

ResetCodeChallengeMethod resets all changes to the "code_challenge_method" field.

func (*DeviceTokenMutation) ResetDeviceCode

func (m *DeviceTokenMutation) ResetDeviceCode()

ResetDeviceCode resets all changes to the "device_code" field.

func (*DeviceTokenMutation) ResetEdge

func (m *DeviceTokenMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*DeviceTokenMutation) ResetExpiry

func (m *DeviceTokenMutation) ResetExpiry()

ResetExpiry resets all changes to the "expiry" field.

func (*DeviceTokenMutation) ResetField

func (m *DeviceTokenMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*DeviceTokenMutation) ResetLastRequest

func (m *DeviceTokenMutation) ResetLastRequest()

ResetLastRequest resets all changes to the "last_request" field.

func (*DeviceTokenMutation) ResetPollInterval

func (m *DeviceTokenMutation) ResetPollInterval()

ResetPollInterval resets all changes to the "poll_interval" field.

func (*DeviceTokenMutation) ResetStatus

func (m *DeviceTokenMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*DeviceTokenMutation) ResetToken

func (m *DeviceTokenMutation) ResetToken()

ResetToken resets all changes to the "token" field.

func (*DeviceTokenMutation) SetCodeChallenge

func (m *DeviceTokenMutation) SetCodeChallenge(s string)

SetCodeChallenge sets the "code_challenge" field.

func (*DeviceTokenMutation) SetCodeChallengeMethod

func (m *DeviceTokenMutation) SetCodeChallengeMethod(s string)

SetCodeChallengeMethod sets the "code_challenge_method" field.

func (*DeviceTokenMutation) SetDeviceCode

func (m *DeviceTokenMutation) SetDeviceCode(s string)

SetDeviceCode sets the "device_code" field.

func (*DeviceTokenMutation) SetExpiry

func (m *DeviceTokenMutation) SetExpiry(t time.Time)

SetExpiry sets the "expiry" field.

func (*DeviceTokenMutation) SetField

func (m *DeviceTokenMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DeviceTokenMutation) SetLastRequest

func (m *DeviceTokenMutation) SetLastRequest(t time.Time)

SetLastRequest sets the "last_request" field.

func (*DeviceTokenMutation) SetOp

func (m *DeviceTokenMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*DeviceTokenMutation) SetPollInterval

func (m *DeviceTokenMutation) SetPollInterval(i int)

SetPollInterval sets the "poll_interval" field.

func (*DeviceTokenMutation) SetStatus

func (m *DeviceTokenMutation) SetStatus(s string)

SetStatus sets the "status" field.

func (*DeviceTokenMutation) SetToken

func (m *DeviceTokenMutation) SetToken(b []byte)

SetToken sets the "token" field.

func (*DeviceTokenMutation) Status

func (m *DeviceTokenMutation) Status() (r string, exists bool)

Status returns the value of the "status" field in the mutation.

func (*DeviceTokenMutation) Token

func (m *DeviceTokenMutation) Token() (r []byte, exists bool)

Token returns the value of the "token" field in the mutation.

func (*DeviceTokenMutation) TokenCleared

func (m *DeviceTokenMutation) TokenCleared() bool

TokenCleared returns if the "token" field was cleared in this mutation.

func (DeviceTokenMutation) Tx

func (m DeviceTokenMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*DeviceTokenMutation) Type

func (m *DeviceTokenMutation) Type() string

Type returns the node type of this mutation (DeviceToken).

func (*DeviceTokenMutation) Where

func (m *DeviceTokenMutation) Where(ps ...predicate.DeviceToken)

Where appends a list predicates to the DeviceTokenMutation builder.

func (*DeviceTokenMutation) WhereP

func (m *DeviceTokenMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the DeviceTokenMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type DeviceTokenQuery

type DeviceTokenQuery struct {
	// contains filtered or unexported fields
}

DeviceTokenQuery is the builder for querying DeviceToken entities.

func (*DeviceTokenQuery) Aggregate

func (dtq *DeviceTokenQuery) Aggregate(fns ...AggregateFunc) *DeviceTokenSelect

Aggregate returns a DeviceTokenSelect configured with the given aggregations.

func (*DeviceTokenQuery) All

func (dtq *DeviceTokenQuery) All(ctx context.Context) ([]*DeviceToken, error)

All executes the query and returns a list of DeviceTokens.

func (*DeviceTokenQuery) AllX

func (dtq *DeviceTokenQuery) AllX(ctx context.Context) []*DeviceToken

AllX is like All, but panics if an error occurs.

func (*DeviceTokenQuery) Clone

func (dtq *DeviceTokenQuery) Clone() *DeviceTokenQuery

Clone returns a duplicate of the DeviceTokenQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*DeviceTokenQuery) Count

func (dtq *DeviceTokenQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DeviceTokenQuery) CountX

func (dtq *DeviceTokenQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*DeviceTokenQuery) Exist

func (dtq *DeviceTokenQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*DeviceTokenQuery) ExistX

func (dtq *DeviceTokenQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*DeviceTokenQuery) First

func (dtq *DeviceTokenQuery) First(ctx context.Context) (*DeviceToken, error)

First returns the first DeviceToken entity from the query. Returns a *NotFoundError when no DeviceToken was found.

func (*DeviceTokenQuery) FirstID

func (dtq *DeviceTokenQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first DeviceToken ID from the query. Returns a *NotFoundError when no DeviceToken ID was found.

func (*DeviceTokenQuery) FirstIDX

func (dtq *DeviceTokenQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*DeviceTokenQuery) FirstX

func (dtq *DeviceTokenQuery) FirstX(ctx context.Context) *DeviceToken

FirstX is like First, but panics if an error occurs.

func (*DeviceTokenQuery) GroupBy

func (dtq *DeviceTokenQuery) GroupBy(field string, fields ...string) *DeviceTokenGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	DeviceCode string `json:"device_code,omitempty"`
	Count int `json:"count,omitempty"`
}

client.DeviceToken.Query().
	GroupBy(devicetoken.FieldDeviceCode).
	Aggregate(db.Count()).
	Scan(ctx, &v)

func (*DeviceTokenQuery) IDs

func (dtq *DeviceTokenQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of DeviceToken IDs.

func (*DeviceTokenQuery) IDsX

func (dtq *DeviceTokenQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*DeviceTokenQuery) Limit

func (dtq *DeviceTokenQuery) Limit(limit int) *DeviceTokenQuery

Limit the number of records to be returned by this query.

func (*DeviceTokenQuery) Offset

func (dtq *DeviceTokenQuery) Offset(offset int) *DeviceTokenQuery

Offset to start from.

func (*DeviceTokenQuery) Only

func (dtq *DeviceTokenQuery) Only(ctx context.Context) (*DeviceToken, error)

Only returns a single DeviceToken entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DeviceToken entity is found. Returns a *NotFoundError when no DeviceToken entities are found.

func (*DeviceTokenQuery) OnlyID

func (dtq *DeviceTokenQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only DeviceToken ID in the query. Returns a *NotSingularError when more than one DeviceToken ID is found. Returns a *NotFoundError when no entities are found.

func (*DeviceTokenQuery) OnlyIDX

func (dtq *DeviceTokenQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*DeviceTokenQuery) OnlyX

func (dtq *DeviceTokenQuery) OnlyX(ctx context.Context) *DeviceToken

OnlyX is like Only, but panics if an error occurs.

func (*DeviceTokenQuery) Order

func (dtq *DeviceTokenQuery) Order(o ...OrderFunc) *DeviceTokenQuery

Order specifies how the records should be ordered.

func (*DeviceTokenQuery) Select

func (dtq *DeviceTokenQuery) Select(fields ...string) *DeviceTokenSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	DeviceCode string `json:"device_code,omitempty"`
}

client.DeviceToken.Query().
	Select(devicetoken.FieldDeviceCode).
	Scan(ctx, &v)

func (*DeviceTokenQuery) Unique

func (dtq *DeviceTokenQuery) Unique(unique bool) *DeviceTokenQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*DeviceTokenQuery) Where

Where adds a new predicate for the DeviceTokenQuery builder.

type DeviceTokenSelect

type DeviceTokenSelect struct {
	*DeviceTokenQuery
	// contains filtered or unexported fields
}

DeviceTokenSelect is the builder for selecting fields of DeviceToken entities.

func (*DeviceTokenSelect) Aggregate

func (dts *DeviceTokenSelect) Aggregate(fns ...AggregateFunc) *DeviceTokenSelect

Aggregate adds the given aggregation functions to the selector query.

func (*DeviceTokenSelect) Bool

func (s *DeviceTokenSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DeviceTokenSelect) BoolX

func (s *DeviceTokenSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DeviceTokenSelect) Bools

func (s *DeviceTokenSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DeviceTokenSelect) BoolsX

func (s *DeviceTokenSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DeviceTokenSelect) Float64

func (s *DeviceTokenSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DeviceTokenSelect) Float64X

func (s *DeviceTokenSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DeviceTokenSelect) Float64s

func (s *DeviceTokenSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DeviceTokenSelect) Float64sX

func (s *DeviceTokenSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeviceTokenSelect) Int

func (s *DeviceTokenSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DeviceTokenSelect) IntX

func (s *DeviceTokenSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DeviceTokenSelect) Ints

func (s *DeviceTokenSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DeviceTokenSelect) IntsX

func (s *DeviceTokenSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DeviceTokenSelect) Scan

func (dts *DeviceTokenSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DeviceTokenSelect) ScanX

func (s *DeviceTokenSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DeviceTokenSelect) String

func (s *DeviceTokenSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DeviceTokenSelect) StringX

func (s *DeviceTokenSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DeviceTokenSelect) Strings

func (s *DeviceTokenSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DeviceTokenSelect) StringsX

func (s *DeviceTokenSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeviceTokenUpdate

type DeviceTokenUpdate struct {
	// contains filtered or unexported fields
}

DeviceTokenUpdate is the builder for updating DeviceToken entities.

func (*DeviceTokenUpdate) AddPollInterval

func (dtu *DeviceTokenUpdate) AddPollInterval(i int) *DeviceTokenUpdate

AddPollInterval adds i to the "poll_interval" field.

func (*DeviceTokenUpdate) ClearToken

func (dtu *DeviceTokenUpdate) ClearToken() *DeviceTokenUpdate

ClearToken clears the value of the "token" field.

func (*DeviceTokenUpdate) Exec

func (dtu *DeviceTokenUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeviceTokenUpdate) ExecX

func (dtu *DeviceTokenUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceTokenUpdate) Mutation

func (dtu *DeviceTokenUpdate) Mutation() *DeviceTokenMutation

Mutation returns the DeviceTokenMutation object of the builder.

func (*DeviceTokenUpdate) Save

func (dtu *DeviceTokenUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*DeviceTokenUpdate) SaveX

func (dtu *DeviceTokenUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*DeviceTokenUpdate) SetCodeChallenge

func (dtu *DeviceTokenUpdate) SetCodeChallenge(s string) *DeviceTokenUpdate

SetCodeChallenge sets the "code_challenge" field.

func (*DeviceTokenUpdate) SetCodeChallengeMethod

func (dtu *DeviceTokenUpdate) SetCodeChallengeMethod(s string) *DeviceTokenUpdate

SetCodeChallengeMethod sets the "code_challenge_method" field.

func (*DeviceTokenUpdate) SetDeviceCode

func (dtu *DeviceTokenUpdate) SetDeviceCode(s string) *DeviceTokenUpdate

SetDeviceCode sets the "device_code" field.

func (*DeviceTokenUpdate) SetExpiry

func (dtu *DeviceTokenUpdate) SetExpiry(t time.Time) *DeviceTokenUpdate

SetExpiry sets the "expiry" field.

func (*DeviceTokenUpdate) SetLastRequest

func (dtu *DeviceTokenUpdate) SetLastRequest(t time.Time) *DeviceTokenUpdate

SetLastRequest sets the "last_request" field.

func (*DeviceTokenUpdate) SetNillableCodeChallenge

func (dtu *DeviceTokenUpdate) SetNillableCodeChallenge(s *string) *DeviceTokenUpdate

SetNillableCodeChallenge sets the "code_challenge" field if the given value is not nil.

func (*DeviceTokenUpdate) SetNillableCodeChallengeMethod

func (dtu *DeviceTokenUpdate) SetNillableCodeChallengeMethod(s *string) *DeviceTokenUpdate

SetNillableCodeChallengeMethod sets the "code_challenge_method" field if the given value is not nil.

func (*DeviceTokenUpdate) SetPollInterval

func (dtu *DeviceTokenUpdate) SetPollInterval(i int) *DeviceTokenUpdate

SetPollInterval sets the "poll_interval" field.

func (*DeviceTokenUpdate) SetStatus

func (dtu *DeviceTokenUpdate) SetStatus(s string) *DeviceTokenUpdate

SetStatus sets the "status" field.

func (*DeviceTokenUpdate) SetToken

func (dtu *DeviceTokenUpdate) SetToken(b []byte) *DeviceTokenUpdate

SetToken sets the "token" field.

func (*DeviceTokenUpdate) Where

Where appends a list predicates to the DeviceTokenUpdate builder.

type DeviceTokenUpdateOne

type DeviceTokenUpdateOne struct {
	// contains filtered or unexported fields
}

DeviceTokenUpdateOne is the builder for updating a single DeviceToken entity.

func (*DeviceTokenUpdateOne) AddPollInterval

func (dtuo *DeviceTokenUpdateOne) AddPollInterval(i int) *DeviceTokenUpdateOne

AddPollInterval adds i to the "poll_interval" field.

func (*DeviceTokenUpdateOne) ClearToken

func (dtuo *DeviceTokenUpdateOne) ClearToken() *DeviceTokenUpdateOne

ClearToken clears the value of the "token" field.

func (*DeviceTokenUpdateOne) Exec

func (dtuo *DeviceTokenUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*DeviceTokenUpdateOne) ExecX

func (dtuo *DeviceTokenUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceTokenUpdateOne) Mutation

func (dtuo *DeviceTokenUpdateOne) Mutation() *DeviceTokenMutation

Mutation returns the DeviceTokenMutation object of the builder.

func (*DeviceTokenUpdateOne) Save

Save executes the query and returns the updated DeviceToken entity.

func (*DeviceTokenUpdateOne) SaveX

func (dtuo *DeviceTokenUpdateOne) SaveX(ctx context.Context) *DeviceToken

SaveX is like Save, but panics if an error occurs.

func (*DeviceTokenUpdateOne) Select

func (dtuo *DeviceTokenUpdateOne) Select(field string, fields ...string) *DeviceTokenUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*DeviceTokenUpdateOne) SetCodeChallenge

func (dtuo *DeviceTokenUpdateOne) SetCodeChallenge(s string) *DeviceTokenUpdateOne

SetCodeChallenge sets the "code_challenge" field.

func (*DeviceTokenUpdateOne) SetCodeChallengeMethod

func (dtuo *DeviceTokenUpdateOne) SetCodeChallengeMethod(s string) *DeviceTokenUpdateOne

SetCodeChallengeMethod sets the "code_challenge_method" field.

func (*DeviceTokenUpdateOne) SetDeviceCode

func (dtuo *DeviceTokenUpdateOne) SetDeviceCode(s string) *DeviceTokenUpdateOne

SetDeviceCode sets the "device_code" field.

func (*DeviceTokenUpdateOne) SetExpiry

func (dtuo *DeviceTokenUpdateOne) SetExpiry(t time.Time) *DeviceTokenUpdateOne

SetExpiry sets the "expiry" field.

func (*DeviceTokenUpdateOne) SetLastRequest

func (dtuo *DeviceTokenUpdateOne) SetLastRequest(t time.Time) *DeviceTokenUpdateOne

SetLastRequest sets the "last_request" field.

func (*DeviceTokenUpdateOne) SetNillableCodeChallenge

func (dtuo *DeviceTokenUpdateOne) SetNillableCodeChallenge(s *string) *DeviceTokenUpdateOne

SetNillableCodeChallenge sets the "code_challenge" field if the given value is not nil.

func (*DeviceTokenUpdateOne) SetNillableCodeChallengeMethod

func (dtuo *DeviceTokenUpdateOne) SetNillableCodeChallengeMethod(s *string) *DeviceTokenUpdateOne

SetNillableCodeChallengeMethod sets the "code_challenge_method" field if the given value is not nil.

func (*DeviceTokenUpdateOne) SetPollInterval

func (dtuo *DeviceTokenUpdateOne) SetPollInterval(i int) *DeviceTokenUpdateOne

SetPollInterval sets the "poll_interval" field.

func (*DeviceTokenUpdateOne) SetStatus

func (dtuo *DeviceTokenUpdateOne) SetStatus(s string) *DeviceTokenUpdateOne

SetStatus sets the "status" field.

func (*DeviceTokenUpdateOne) SetToken

func (dtuo *DeviceTokenUpdateOne) SetToken(b []byte) *DeviceTokenUpdateOne

SetToken sets the "token" field.

func (*DeviceTokenUpdateOne) Where

Where appends a list predicates to the DeviceTokenUpdate builder.

type DeviceTokens

type DeviceTokens []*DeviceToken

DeviceTokens is a parsable slice of DeviceToken.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

type InterceptFunc

type InterceptFunc = ent.InterceptFunc

ent aliases to avoid import conflicts in user's code.

type Interceptor

type Interceptor = ent.Interceptor

ent aliases to avoid import conflicts in user's code.

type Keys

type Keys struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// VerificationKeys holds the value of the "verification_keys" field.
	VerificationKeys []storage.VerificationKey `json:"verification_keys,omitempty"`
	// SigningKey holds the value of the "signing_key" field.
	SigningKey jose.JSONWebKey `json:"signing_key,omitempty"`
	// SigningKeyPub holds the value of the "signing_key_pub" field.
	SigningKeyPub jose.JSONWebKey `json:"signing_key_pub,omitempty"`
	// NextRotation holds the value of the "next_rotation" field.
	NextRotation time.Time `json:"next_rotation,omitempty"`
	// contains filtered or unexported fields
}

Keys is the model entity for the Keys schema.

func (*Keys) String

func (k *Keys) String() string

String implements the fmt.Stringer.

func (*Keys) Unwrap

func (k *Keys) Unwrap() *Keys

Unwrap unwraps the Keys entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Keys) Update

func (k *Keys) Update() *KeysUpdateOne

Update returns a builder for updating this Keys. Note that you need to call Keys.Unwrap() before calling this method if this Keys was returned from a transaction, and the transaction was committed or rolled back.

type KeysClient

type KeysClient struct {
	// contains filtered or unexported fields
}

KeysClient is a client for the Keys schema.

func NewKeysClient

func NewKeysClient(c config) *KeysClient

NewKeysClient returns a client for the Keys from the given config.

func (*KeysClient) Create

func (c *KeysClient) Create() *KeysCreate

Create returns a builder for creating a Keys entity.

func (*KeysClient) CreateBulk

func (c *KeysClient) CreateBulk(builders ...*KeysCreate) *KeysCreateBulk

CreateBulk returns a builder for creating a bulk of Keys entities.

func (*KeysClient) Delete

func (c *KeysClient) Delete() *KeysDelete

Delete returns a delete builder for Keys.

func (*KeysClient) DeleteOne

func (c *KeysClient) DeleteOne(k *Keys) *KeysDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*KeysClient) DeleteOneID

func (c *KeysClient) DeleteOneID(id string) *KeysDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*KeysClient) Get

func (c *KeysClient) Get(ctx context.Context, id string) (*Keys, error)

Get returns a Keys entity by its id.

func (*KeysClient) GetX

func (c *KeysClient) GetX(ctx context.Context, id string) *Keys

GetX is like Get, but panics if an error occurs.

func (*KeysClient) Hooks

func (c *KeysClient) Hooks() []Hook

Hooks returns the client hooks.

func (*KeysClient) Intercept

func (c *KeysClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `keys.Intercept(f(g(h())))`.

func (*KeysClient) Interceptors

func (c *KeysClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*KeysClient) Query

func (c *KeysClient) Query() *KeysQuery

Query returns a query builder for Keys.

func (*KeysClient) Update

func (c *KeysClient) Update() *KeysUpdate

Update returns an update builder for Keys.

func (*KeysClient) UpdateOne

func (c *KeysClient) UpdateOne(k *Keys) *KeysUpdateOne

UpdateOne returns an update builder for the given entity.

func (*KeysClient) UpdateOneID

func (c *KeysClient) UpdateOneID(id string) *KeysUpdateOne

UpdateOneID returns an update builder for the given id.

func (*KeysClient) Use

func (c *KeysClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `keys.Hooks(f(g(h())))`.

type KeysCreate

type KeysCreate struct {
	// contains filtered or unexported fields
}

KeysCreate is the builder for creating a Keys entity.

func (*KeysCreate) Exec

func (kc *KeysCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*KeysCreate) ExecX

func (kc *KeysCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*KeysCreate) Mutation

func (kc *KeysCreate) Mutation() *KeysMutation

Mutation returns the KeysMutation object of the builder.

func (*KeysCreate) Save

func (kc *KeysCreate) Save(ctx context.Context) (*Keys, error)

Save creates the Keys in the database.

func (*KeysCreate) SaveX

func (kc *KeysCreate) SaveX(ctx context.Context) *Keys

SaveX calls Save and panics if Save returns an error.

func (*KeysCreate) SetID

func (kc *KeysCreate) SetID(s string) *KeysCreate

SetID sets the "id" field.

func (*KeysCreate) SetNextRotation

func (kc *KeysCreate) SetNextRotation(t time.Time) *KeysCreate

SetNextRotation sets the "next_rotation" field.

func (*KeysCreate) SetSigningKey

func (kc *KeysCreate) SetSigningKey(jwk jose.JSONWebKey) *KeysCreate

SetSigningKey sets the "signing_key" field.

func (*KeysCreate) SetSigningKeyPub

func (kc *KeysCreate) SetSigningKeyPub(jwk jose.JSONWebKey) *KeysCreate

SetSigningKeyPub sets the "signing_key_pub" field.

func (*KeysCreate) SetVerificationKeys

func (kc *KeysCreate) SetVerificationKeys(sk []storage.VerificationKey) *KeysCreate

SetVerificationKeys sets the "verification_keys" field.

type KeysCreateBulk

type KeysCreateBulk struct {
	// contains filtered or unexported fields
}

KeysCreateBulk is the builder for creating many Keys entities in bulk.

func (*KeysCreateBulk) Exec

func (kcb *KeysCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*KeysCreateBulk) ExecX

func (kcb *KeysCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*KeysCreateBulk) Save

func (kcb *KeysCreateBulk) Save(ctx context.Context) ([]*Keys, error)

Save creates the Keys entities in the database.

func (*KeysCreateBulk) SaveX

func (kcb *KeysCreateBulk) SaveX(ctx context.Context) []*Keys

SaveX is like Save, but panics if an error occurs.

type KeysDelete

type KeysDelete struct {
	// contains filtered or unexported fields
}

KeysDelete is the builder for deleting a Keys entity.

func (*KeysDelete) Exec

func (kd *KeysDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*KeysDelete) ExecX

func (kd *KeysDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*KeysDelete) Where

func (kd *KeysDelete) Where(ps ...predicate.Keys) *KeysDelete

Where appends a list predicates to the KeysDelete builder.

type KeysDeleteOne

type KeysDeleteOne struct {
	// contains filtered or unexported fields
}

KeysDeleteOne is the builder for deleting a single Keys entity.

func (*KeysDeleteOne) Exec

func (kdo *KeysDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*KeysDeleteOne) ExecX

func (kdo *KeysDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*KeysDeleteOne) Where

func (kdo *KeysDeleteOne) Where(ps ...predicate.Keys) *KeysDeleteOne

Where appends a list predicates to the KeysDelete builder.

type KeysGroupBy

type KeysGroupBy struct {
	// contains filtered or unexported fields
}

KeysGroupBy is the group-by builder for Keys entities.

func (*KeysGroupBy) Aggregate

func (kgb *KeysGroupBy) Aggregate(fns ...AggregateFunc) *KeysGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*KeysGroupBy) Bool

func (s *KeysGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*KeysGroupBy) BoolX

func (s *KeysGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*KeysGroupBy) Bools

func (s *KeysGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*KeysGroupBy) BoolsX

func (s *KeysGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*KeysGroupBy) Float64

func (s *KeysGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*KeysGroupBy) Float64X

func (s *KeysGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*KeysGroupBy) Float64s

func (s *KeysGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*KeysGroupBy) Float64sX

func (s *KeysGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*KeysGroupBy) Int

func (s *KeysGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*KeysGroupBy) IntX

func (s *KeysGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*KeysGroupBy) Ints

func (s *KeysGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*KeysGroupBy) IntsX

func (s *KeysGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*KeysGroupBy) Scan

func (kgb *KeysGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*KeysGroupBy) ScanX

func (s *KeysGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*KeysGroupBy) String

func (s *KeysGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*KeysGroupBy) StringX

func (s *KeysGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*KeysGroupBy) Strings

func (s *KeysGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*KeysGroupBy) StringsX

func (s *KeysGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type KeysMutation

type KeysMutation struct {
	// contains filtered or unexported fields
}

KeysMutation represents an operation that mutates the Keys nodes in the graph.

func (*KeysMutation) AddField

func (m *KeysMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*KeysMutation) AddedEdges

func (m *KeysMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*KeysMutation) AddedField

func (m *KeysMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*KeysMutation) AddedFields

func (m *KeysMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*KeysMutation) AddedIDs

func (m *KeysMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*KeysMutation) AppendVerificationKeys

func (m *KeysMutation) AppendVerificationKeys(sk []storage.VerificationKey)

AppendVerificationKeys adds sk to the "verification_keys" field.

func (*KeysMutation) AppendedVerificationKeys

func (m *KeysMutation) AppendedVerificationKeys() ([]storage.VerificationKey, bool)

AppendedVerificationKeys returns the list of values that were appended to the "verification_keys" field in this mutation.

func (*KeysMutation) ClearEdge

func (m *KeysMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*KeysMutation) ClearField

func (m *KeysMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*KeysMutation) ClearedEdges

func (m *KeysMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*KeysMutation) ClearedFields

func (m *KeysMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (KeysMutation) Client

func (m KeysMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*KeysMutation) EdgeCleared

func (m *KeysMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*KeysMutation) Field

func (m *KeysMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*KeysMutation) FieldCleared

func (m *KeysMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*KeysMutation) Fields

func (m *KeysMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*KeysMutation) ID

func (m *KeysMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*KeysMutation) IDs

func (m *KeysMutation) IDs(ctx context.Context) ([]string, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*KeysMutation) NextRotation

func (m *KeysMutation) NextRotation() (r time.Time, exists bool)

NextRotation returns the value of the "next_rotation" field in the mutation.

func (*KeysMutation) OldField

func (m *KeysMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*KeysMutation) OldNextRotation

func (m *KeysMutation) OldNextRotation(ctx context.Context) (v time.Time, err error)

OldNextRotation returns the old "next_rotation" field's value of the Keys entity. If the Keys object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*KeysMutation) OldSigningKey

func (m *KeysMutation) OldSigningKey(ctx context.Context) (v jose.JSONWebKey, err error)

OldSigningKey returns the old "signing_key" field's value of the Keys entity. If the Keys object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*KeysMutation) OldSigningKeyPub

func (m *KeysMutation) OldSigningKeyPub(ctx context.Context) (v jose.JSONWebKey, err error)

OldSigningKeyPub returns the old "signing_key_pub" field's value of the Keys entity. If the Keys object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*KeysMutation) OldVerificationKeys

func (m *KeysMutation) OldVerificationKeys(ctx context.Context) (v []storage.VerificationKey, err error)

OldVerificationKeys returns the old "verification_keys" field's value of the Keys entity. If the Keys object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*KeysMutation) Op

func (m *KeysMutation) Op() Op

Op returns the operation name.

func (*KeysMutation) RemovedEdges

func (m *KeysMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*KeysMutation) RemovedIDs

func (m *KeysMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*KeysMutation) ResetEdge

func (m *KeysMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*KeysMutation) ResetField

func (m *KeysMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*KeysMutation) ResetNextRotation

func (m *KeysMutation) ResetNextRotation()

ResetNextRotation resets all changes to the "next_rotation" field.

func (*KeysMutation) ResetSigningKey

func (m *KeysMutation) ResetSigningKey()

ResetSigningKey resets all changes to the "signing_key" field.

func (*KeysMutation) ResetSigningKeyPub

func (m *KeysMutation) ResetSigningKeyPub()

ResetSigningKeyPub resets all changes to the "signing_key_pub" field.

func (*KeysMutation) ResetVerificationKeys

func (m *KeysMutation) ResetVerificationKeys()

ResetVerificationKeys resets all changes to the "verification_keys" field.

func (*KeysMutation) SetField

func (m *KeysMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*KeysMutation) SetID

func (m *KeysMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Keys entities.

func (*KeysMutation) SetNextRotation

func (m *KeysMutation) SetNextRotation(t time.Time)

SetNextRotation sets the "next_rotation" field.

func (*KeysMutation) SetOp

func (m *KeysMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*KeysMutation) SetSigningKey

func (m *KeysMutation) SetSigningKey(jwk jose.JSONWebKey)

SetSigningKey sets the "signing_key" field.

func (*KeysMutation) SetSigningKeyPub

func (m *KeysMutation) SetSigningKeyPub(jwk jose.JSONWebKey)

SetSigningKeyPub sets the "signing_key_pub" field.

func (*KeysMutation) SetVerificationKeys

func (m *KeysMutation) SetVerificationKeys(sk []storage.VerificationKey)

SetVerificationKeys sets the "verification_keys" field.

func (*KeysMutation) SigningKey

func (m *KeysMutation) SigningKey() (r jose.JSONWebKey, exists bool)

SigningKey returns the value of the "signing_key" field in the mutation.

func (*KeysMutation) SigningKeyPub

func (m *KeysMutation) SigningKeyPub() (r jose.JSONWebKey, exists bool)

SigningKeyPub returns the value of the "signing_key_pub" field in the mutation.

func (KeysMutation) Tx

func (m KeysMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*KeysMutation) Type

func (m *KeysMutation) Type() string

Type returns the node type of this mutation (Keys).

func (*KeysMutation) VerificationKeys

func (m *KeysMutation) VerificationKeys() (r []storage.VerificationKey, exists bool)

VerificationKeys returns the value of the "verification_keys" field in the mutation.

func (*KeysMutation) Where

func (m *KeysMutation) Where(ps ...predicate.Keys)

Where appends a list predicates to the KeysMutation builder.

func (*KeysMutation) WhereP

func (m *KeysMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the KeysMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type KeysQuery

type KeysQuery struct {
	// contains filtered or unexported fields
}

KeysQuery is the builder for querying Keys entities.

func (*KeysQuery) Aggregate

func (kq *KeysQuery) Aggregate(fns ...AggregateFunc) *KeysSelect

Aggregate returns a KeysSelect configured with the given aggregations.

func (*KeysQuery) All

func (kq *KeysQuery) All(ctx context.Context) ([]*Keys, error)

All executes the query and returns a list of KeysSlice.

func (*KeysQuery) AllX

func (kq *KeysQuery) AllX(ctx context.Context) []*Keys

AllX is like All, but panics if an error occurs.

func (*KeysQuery) Clone

func (kq *KeysQuery) Clone() *KeysQuery

Clone returns a duplicate of the KeysQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*KeysQuery) Count

func (kq *KeysQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*KeysQuery) CountX

func (kq *KeysQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*KeysQuery) Exist

func (kq *KeysQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*KeysQuery) ExistX

func (kq *KeysQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*KeysQuery) First

func (kq *KeysQuery) First(ctx context.Context) (*Keys, error)

First returns the first Keys entity from the query. Returns a *NotFoundError when no Keys was found.

func (*KeysQuery) FirstID

func (kq *KeysQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first Keys ID from the query. Returns a *NotFoundError when no Keys ID was found.

func (*KeysQuery) FirstIDX

func (kq *KeysQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*KeysQuery) FirstX

func (kq *KeysQuery) FirstX(ctx context.Context) *Keys

FirstX is like First, but panics if an error occurs.

func (*KeysQuery) GroupBy

func (kq *KeysQuery) GroupBy(field string, fields ...string) *KeysGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	VerificationKeys []storage.VerificationKey `json:"verification_keys,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Keys.Query().
	GroupBy(keys.FieldVerificationKeys).
	Aggregate(db.Count()).
	Scan(ctx, &v)

func (*KeysQuery) IDs

func (kq *KeysQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of Keys IDs.

func (*KeysQuery) IDsX

func (kq *KeysQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*KeysQuery) Limit

func (kq *KeysQuery) Limit(limit int) *KeysQuery

Limit the number of records to be returned by this query.

func (*KeysQuery) Offset

func (kq *KeysQuery) Offset(offset int) *KeysQuery

Offset to start from.

func (*KeysQuery) Only

func (kq *KeysQuery) Only(ctx context.Context) (*Keys, error)

Only returns a single Keys entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Keys entity is found. Returns a *NotFoundError when no Keys entities are found.

func (*KeysQuery) OnlyID

func (kq *KeysQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only Keys ID in the query. Returns a *NotSingularError when more than one Keys ID is found. Returns a *NotFoundError when no entities are found.

func (*KeysQuery) OnlyIDX

func (kq *KeysQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*KeysQuery) OnlyX

func (kq *KeysQuery) OnlyX(ctx context.Context) *Keys

OnlyX is like Only, but panics if an error occurs.

func (*KeysQuery) Order

func (kq *KeysQuery) Order(o ...OrderFunc) *KeysQuery

Order specifies how the records should be ordered.

func (*KeysQuery) Select

func (kq *KeysQuery) Select(fields ...string) *KeysSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	VerificationKeys []storage.VerificationKey `json:"verification_keys,omitempty"`
}

client.Keys.Query().
	Select(keys.FieldVerificationKeys).
	Scan(ctx, &v)

func (*KeysQuery) Unique

func (kq *KeysQuery) Unique(unique bool) *KeysQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*KeysQuery) Where

func (kq *KeysQuery) Where(ps ...predicate.Keys) *KeysQuery

Where adds a new predicate for the KeysQuery builder.

type KeysSelect

type KeysSelect struct {
	*KeysQuery
	// contains filtered or unexported fields
}

KeysSelect is the builder for selecting fields of Keys entities.

func (*KeysSelect) Aggregate

func (ks *KeysSelect) Aggregate(fns ...AggregateFunc) *KeysSelect

Aggregate adds the given aggregation functions to the selector query.

func (*KeysSelect) Bool

func (s *KeysSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*KeysSelect) BoolX

func (s *KeysSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*KeysSelect) Bools

func (s *KeysSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*KeysSelect) BoolsX

func (s *KeysSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*KeysSelect) Float64

func (s *KeysSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*KeysSelect) Float64X

func (s *KeysSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*KeysSelect) Float64s

func (s *KeysSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*KeysSelect) Float64sX

func (s *KeysSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*KeysSelect) Int

func (s *KeysSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*KeysSelect) IntX

func (s *KeysSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*KeysSelect) Ints

func (s *KeysSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*KeysSelect) IntsX

func (s *KeysSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*KeysSelect) Scan

func (ks *KeysSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*KeysSelect) ScanX

func (s *KeysSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*KeysSelect) String

func (s *KeysSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*KeysSelect) StringX

func (s *KeysSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*KeysSelect) Strings

func (s *KeysSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*KeysSelect) StringsX

func (s *KeysSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type KeysSlice

type KeysSlice []*Keys

KeysSlice is a parsable slice of Keys.

type KeysUpdate

type KeysUpdate struct {
	// contains filtered or unexported fields
}

KeysUpdate is the builder for updating Keys entities.

func (*KeysUpdate) AppendVerificationKeys

func (ku *KeysUpdate) AppendVerificationKeys(sk []storage.VerificationKey) *KeysUpdate

AppendVerificationKeys appends sk to the "verification_keys" field.

func (*KeysUpdate) Exec

func (ku *KeysUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*KeysUpdate) ExecX

func (ku *KeysUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*KeysUpdate) Mutation

func (ku *KeysUpdate) Mutation() *KeysMutation

Mutation returns the KeysMutation object of the builder.

func (*KeysUpdate) Save

func (ku *KeysUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*KeysUpdate) SaveX

func (ku *KeysUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*KeysUpdate) SetNextRotation

func (ku *KeysUpdate) SetNextRotation(t time.Time) *KeysUpdate

SetNextRotation sets the "next_rotation" field.

func (*KeysUpdate) SetSigningKey

func (ku *KeysUpdate) SetSigningKey(jwk jose.JSONWebKey) *KeysUpdate

SetSigningKey sets the "signing_key" field.

func (*KeysUpdate) SetSigningKeyPub

func (ku *KeysUpdate) SetSigningKeyPub(jwk jose.JSONWebKey) *KeysUpdate

SetSigningKeyPub sets the "signing_key_pub" field.

func (*KeysUpdate) SetVerificationKeys

func (ku *KeysUpdate) SetVerificationKeys(sk []storage.VerificationKey) *KeysUpdate

SetVerificationKeys sets the "verification_keys" field.

func (*KeysUpdate) Where

func (ku *KeysUpdate) Where(ps ...predicate.Keys) *KeysUpdate

Where appends a list predicates to the KeysUpdate builder.

type KeysUpdateOne

type KeysUpdateOne struct {
	// contains filtered or unexported fields
}

KeysUpdateOne is the builder for updating a single Keys entity.

func (*KeysUpdateOne) AppendVerificationKeys

func (kuo *KeysUpdateOne) AppendVerificationKeys(sk []storage.VerificationKey) *KeysUpdateOne

AppendVerificationKeys appends sk to the "verification_keys" field.

func (*KeysUpdateOne) Exec

func (kuo *KeysUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*KeysUpdateOne) ExecX

func (kuo *KeysUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*KeysUpdateOne) Mutation

func (kuo *KeysUpdateOne) Mutation() *KeysMutation

Mutation returns the KeysMutation object of the builder.

func (*KeysUpdateOne) Save

func (kuo *KeysUpdateOne) Save(ctx context.Context) (*Keys, error)

Save executes the query and returns the updated Keys entity.

func (*KeysUpdateOne) SaveX

func (kuo *KeysUpdateOne) SaveX(ctx context.Context) *Keys

SaveX is like Save, but panics if an error occurs.

func (*KeysUpdateOne) Select

func (kuo *KeysUpdateOne) Select(field string, fields ...string) *KeysUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*KeysUpdateOne) SetNextRotation

func (kuo *KeysUpdateOne) SetNextRotation(t time.Time) *KeysUpdateOne

SetNextRotation sets the "next_rotation" field.

func (*KeysUpdateOne) SetSigningKey

func (kuo *KeysUpdateOne) SetSigningKey(jwk jose.JSONWebKey) *KeysUpdateOne

SetSigningKey sets the "signing_key" field.

func (*KeysUpdateOne) SetSigningKeyPub

func (kuo *KeysUpdateOne) SetSigningKeyPub(jwk jose.JSONWebKey) *KeysUpdateOne

SetSigningKeyPub sets the "signing_key_pub" field.

func (*KeysUpdateOne) SetVerificationKeys

func (kuo *KeysUpdateOne) SetVerificationKeys(sk []storage.VerificationKey) *KeysUpdateOne

SetVerificationKeys sets the "verification_keys" field.

func (*KeysUpdateOne) Where

func (kuo *KeysUpdateOne) Where(ps ...predicate.Keys) *KeysUpdateOne

Where appends a list predicates to the KeysUpdate builder.

type MutateFunc

type MutateFunc = ent.MutateFunc

ent aliases to avoid import conflicts in user's code.

type Mutation

type Mutation = ent.Mutation

ent aliases to avoid import conflicts in user's code.

type Mutator

type Mutator = ent.Mutator

ent aliases to avoid import conflicts in user's code.

type NotFoundError

type NotFoundError struct {
	// contains filtered or unexported fields
}

NotFoundError returns when trying to fetch a specific entity and it was not found in the database.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

type NotLoadedError struct {
	// contains filtered or unexported fields
}

NotLoadedError returns when trying to get a node that was not loaded by the query.

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

type NotSingularError struct {
	// contains filtered or unexported fields
}

NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type OAuth2Client

type OAuth2Client struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Secret holds the value of the "secret" field.
	Secret string `json:"secret,omitempty"`
	// RedirectUris holds the value of the "redirect_uris" field.
	RedirectUris []string `json:"redirect_uris,omitempty"`
	// TrustedPeers holds the value of the "trusted_peers" field.
	TrustedPeers []string `json:"trusted_peers,omitempty"`
	// Public holds the value of the "public" field.
	Public bool `json:"public,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// LogoURL holds the value of the "logo_url" field.
	LogoURL string `json:"logo_url,omitempty"`
	// contains filtered or unexported fields
}

OAuth2Client is the model entity for the OAuth2Client schema.

func (*OAuth2Client) String

func (o *OAuth2Client) String() string

String implements the fmt.Stringer.

func (*OAuth2Client) Unwrap

func (o *OAuth2Client) Unwrap() *OAuth2Client

Unwrap unwraps the OAuth2Client entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*OAuth2Client) Update

func (o *OAuth2Client) Update() *OAuth2ClientUpdateOne

Update returns a builder for updating this OAuth2Client. Note that you need to call OAuth2Client.Unwrap() before calling this method if this OAuth2Client was returned from a transaction, and the transaction was committed or rolled back.

type OAuth2ClientClient

type OAuth2ClientClient struct {
	// contains filtered or unexported fields
}

OAuth2ClientClient is a client for the OAuth2Client schema.

func NewOAuth2ClientClient

func NewOAuth2ClientClient(c config) *OAuth2ClientClient

NewOAuth2ClientClient returns a client for the OAuth2Client from the given config.

func (*OAuth2ClientClient) Create

Create returns a builder for creating a OAuth2Client entity.

func (*OAuth2ClientClient) CreateBulk

func (c *OAuth2ClientClient) CreateBulk(builders ...*OAuth2ClientCreate) *OAuth2ClientCreateBulk

CreateBulk returns a builder for creating a bulk of OAuth2Client entities.

func (*OAuth2ClientClient) Delete

Delete returns a delete builder for OAuth2Client.

func (*OAuth2ClientClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OAuth2ClientClient) DeleteOneID

func (c *OAuth2ClientClient) DeleteOneID(id string) *OAuth2ClientDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*OAuth2ClientClient) Get

Get returns a OAuth2Client entity by its id.

func (*OAuth2ClientClient) GetX

GetX is like Get, but panics if an error occurs.

func (*OAuth2ClientClient) Hooks

func (c *OAuth2ClientClient) Hooks() []Hook

Hooks returns the client hooks.

func (*OAuth2ClientClient) Intercept

func (c *OAuth2ClientClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `oauth2client.Intercept(f(g(h())))`.

func (*OAuth2ClientClient) Interceptors

func (c *OAuth2ClientClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*OAuth2ClientClient) Query

Query returns a query builder for OAuth2Client.

func (*OAuth2ClientClient) Update

Update returns an update builder for OAuth2Client.

func (*OAuth2ClientClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*OAuth2ClientClient) UpdateOneID

func (c *OAuth2ClientClient) UpdateOneID(id string) *OAuth2ClientUpdateOne

UpdateOneID returns an update builder for the given id.

func (*OAuth2ClientClient) Use

func (c *OAuth2ClientClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `oauth2client.Hooks(f(g(h())))`.

type OAuth2ClientCreate

type OAuth2ClientCreate struct {
	// contains filtered or unexported fields
}

OAuth2ClientCreate is the builder for creating a OAuth2Client entity.

func (*OAuth2ClientCreate) Exec

func (oc *OAuth2ClientCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OAuth2ClientCreate) ExecX

func (oc *OAuth2ClientCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OAuth2ClientCreate) Mutation

func (oc *OAuth2ClientCreate) Mutation() *OAuth2ClientMutation

Mutation returns the OAuth2ClientMutation object of the builder.

func (*OAuth2ClientCreate) Save

Save creates the OAuth2Client in the database.

func (*OAuth2ClientCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*OAuth2ClientCreate) SetID

SetID sets the "id" field.

func (*OAuth2ClientCreate) SetLogoURL

func (oc *OAuth2ClientCreate) SetLogoURL(s string) *OAuth2ClientCreate

SetLogoURL sets the "logo_url" field.

func (*OAuth2ClientCreate) SetName

SetName sets the "name" field.

func (*OAuth2ClientCreate) SetPublic

func (oc *OAuth2ClientCreate) SetPublic(b bool) *OAuth2ClientCreate

SetPublic sets the "public" field.

func (*OAuth2ClientCreate) SetRedirectUris

func (oc *OAuth2ClientCreate) SetRedirectUris(s []string) *OAuth2ClientCreate

SetRedirectUris sets the "redirect_uris" field.

func (*OAuth2ClientCreate) SetSecret

func (oc *OAuth2ClientCreate) SetSecret(s string) *OAuth2ClientCreate

SetSecret sets the "secret" field.

func (*OAuth2ClientCreate) SetTrustedPeers

func (oc *OAuth2ClientCreate) SetTrustedPeers(s []string) *OAuth2ClientCreate

SetTrustedPeers sets the "trusted_peers" field.

type OAuth2ClientCreateBulk

type OAuth2ClientCreateBulk struct {
	// contains filtered or unexported fields
}

OAuth2ClientCreateBulk is the builder for creating many OAuth2Client entities in bulk.

func (*OAuth2ClientCreateBulk) Exec

Exec executes the query.

func (*OAuth2ClientCreateBulk) ExecX

func (ocb *OAuth2ClientCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OAuth2ClientCreateBulk) Save

Save creates the OAuth2Client entities in the database.

func (*OAuth2ClientCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type OAuth2ClientDelete

type OAuth2ClientDelete struct {
	// contains filtered or unexported fields
}

OAuth2ClientDelete is the builder for deleting a OAuth2Client entity.

func (*OAuth2ClientDelete) Exec

func (od *OAuth2ClientDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*OAuth2ClientDelete) ExecX

func (od *OAuth2ClientDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OAuth2ClientDelete) Where

Where appends a list predicates to the OAuth2ClientDelete builder.

type OAuth2ClientDeleteOne

type OAuth2ClientDeleteOne struct {
	// contains filtered or unexported fields
}

OAuth2ClientDeleteOne is the builder for deleting a single OAuth2Client entity.

func (*OAuth2ClientDeleteOne) Exec

func (odo *OAuth2ClientDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*OAuth2ClientDeleteOne) ExecX

func (odo *OAuth2ClientDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OAuth2ClientDeleteOne) Where

Where appends a list predicates to the OAuth2ClientDelete builder.

type OAuth2ClientGroupBy

type OAuth2ClientGroupBy struct {
	// contains filtered or unexported fields
}

OAuth2ClientGroupBy is the group-by builder for OAuth2Client entities.

func (*OAuth2ClientGroupBy) Aggregate

func (ogb *OAuth2ClientGroupBy) Aggregate(fns ...AggregateFunc) *OAuth2ClientGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*OAuth2ClientGroupBy) Bool

func (s *OAuth2ClientGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OAuth2ClientGroupBy) BoolX

func (s *OAuth2ClientGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OAuth2ClientGroupBy) Bools

func (s *OAuth2ClientGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OAuth2ClientGroupBy) BoolsX

func (s *OAuth2ClientGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OAuth2ClientGroupBy) Float64

func (s *OAuth2ClientGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OAuth2ClientGroupBy) Float64X

func (s *OAuth2ClientGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OAuth2ClientGroupBy) Float64s

func (s *OAuth2ClientGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OAuth2ClientGroupBy) Float64sX

func (s *OAuth2ClientGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OAuth2ClientGroupBy) Int

func (s *OAuth2ClientGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OAuth2ClientGroupBy) IntX

func (s *OAuth2ClientGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OAuth2ClientGroupBy) Ints

func (s *OAuth2ClientGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OAuth2ClientGroupBy) IntsX

func (s *OAuth2ClientGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OAuth2ClientGroupBy) Scan

func (ogb *OAuth2ClientGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OAuth2ClientGroupBy) ScanX

func (s *OAuth2ClientGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OAuth2ClientGroupBy) String

func (s *OAuth2ClientGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OAuth2ClientGroupBy) StringX

func (s *OAuth2ClientGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OAuth2ClientGroupBy) Strings

func (s *OAuth2ClientGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OAuth2ClientGroupBy) StringsX

func (s *OAuth2ClientGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OAuth2ClientMutation

type OAuth2ClientMutation struct {
	// contains filtered or unexported fields
}

OAuth2ClientMutation represents an operation that mutates the OAuth2Client nodes in the graph.

func (*OAuth2ClientMutation) AddField

func (m *OAuth2ClientMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OAuth2ClientMutation) AddedEdges

func (m *OAuth2ClientMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*OAuth2ClientMutation) AddedField

func (m *OAuth2ClientMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OAuth2ClientMutation) AddedFields

func (m *OAuth2ClientMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*OAuth2ClientMutation) AddedIDs

func (m *OAuth2ClientMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*OAuth2ClientMutation) AppendRedirectUris

func (m *OAuth2ClientMutation) AppendRedirectUris(s []string)

AppendRedirectUris adds s to the "redirect_uris" field.

func (*OAuth2ClientMutation) AppendTrustedPeers

func (m *OAuth2ClientMutation) AppendTrustedPeers(s []string)

AppendTrustedPeers adds s to the "trusted_peers" field.

func (*OAuth2ClientMutation) AppendedRedirectUris

func (m *OAuth2ClientMutation) AppendedRedirectUris() ([]string, bool)

AppendedRedirectUris returns the list of values that were appended to the "redirect_uris" field in this mutation.

func (*OAuth2ClientMutation) AppendedTrustedPeers

func (m *OAuth2ClientMutation) AppendedTrustedPeers() ([]string, bool)

AppendedTrustedPeers returns the list of values that were appended to the "trusted_peers" field in this mutation.

func (*OAuth2ClientMutation) ClearEdge

func (m *OAuth2ClientMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*OAuth2ClientMutation) ClearField

func (m *OAuth2ClientMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*OAuth2ClientMutation) ClearRedirectUris

func (m *OAuth2ClientMutation) ClearRedirectUris()

ClearRedirectUris clears the value of the "redirect_uris" field.

func (*OAuth2ClientMutation) ClearTrustedPeers

func (m *OAuth2ClientMutation) ClearTrustedPeers()

ClearTrustedPeers clears the value of the "trusted_peers" field.

func (*OAuth2ClientMutation) ClearedEdges

func (m *OAuth2ClientMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*OAuth2ClientMutation) ClearedFields

func (m *OAuth2ClientMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (OAuth2ClientMutation) Client

func (m OAuth2ClientMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*OAuth2ClientMutation) EdgeCleared

func (m *OAuth2ClientMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*OAuth2ClientMutation) Field

func (m *OAuth2ClientMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OAuth2ClientMutation) FieldCleared

func (m *OAuth2ClientMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*OAuth2ClientMutation) Fields

func (m *OAuth2ClientMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*OAuth2ClientMutation) ID

func (m *OAuth2ClientMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*OAuth2ClientMutation) IDs

func (m *OAuth2ClientMutation) IDs(ctx context.Context) ([]string, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*OAuth2ClientMutation) LogoURL

func (m *OAuth2ClientMutation) LogoURL() (r string, exists bool)

LogoURL returns the value of the "logo_url" field in the mutation.

func (*OAuth2ClientMutation) Name

func (m *OAuth2ClientMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*OAuth2ClientMutation) OldField

func (m *OAuth2ClientMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*OAuth2ClientMutation) OldLogoURL

func (m *OAuth2ClientMutation) OldLogoURL(ctx context.Context) (v string, err error)

OldLogoURL returns the old "logo_url" field's value of the OAuth2Client entity. If the OAuth2Client object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OAuth2ClientMutation) OldName

func (m *OAuth2ClientMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the OAuth2Client entity. If the OAuth2Client object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OAuth2ClientMutation) OldPublic

func (m *OAuth2ClientMutation) OldPublic(ctx context.Context) (v bool, err error)

OldPublic returns the old "public" field's value of the OAuth2Client entity. If the OAuth2Client object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OAuth2ClientMutation) OldRedirectUris

func (m *OAuth2ClientMutation) OldRedirectUris(ctx context.Context) (v []string, err error)

OldRedirectUris returns the old "redirect_uris" field's value of the OAuth2Client entity. If the OAuth2Client object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OAuth2ClientMutation) OldSecret

func (m *OAuth2ClientMutation) OldSecret(ctx context.Context) (v string, err error)

OldSecret returns the old "secret" field's value of the OAuth2Client entity. If the OAuth2Client object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OAuth2ClientMutation) OldTrustedPeers

func (m *OAuth2ClientMutation) OldTrustedPeers(ctx context.Context) (v []string, err error)

OldTrustedPeers returns the old "trusted_peers" field's value of the OAuth2Client entity. If the OAuth2Client object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OAuth2ClientMutation) Op

func (m *OAuth2ClientMutation) Op() Op

Op returns the operation name.

func (*OAuth2ClientMutation) Public

func (m *OAuth2ClientMutation) Public() (r bool, exists bool)

Public returns the value of the "public" field in the mutation.

func (*OAuth2ClientMutation) RedirectUris

func (m *OAuth2ClientMutation) RedirectUris() (r []string, exists bool)

RedirectUris returns the value of the "redirect_uris" field in the mutation.

func (*OAuth2ClientMutation) RedirectUrisCleared

func (m *OAuth2ClientMutation) RedirectUrisCleared() bool

RedirectUrisCleared returns if the "redirect_uris" field was cleared in this mutation.

func (*OAuth2ClientMutation) RemovedEdges

func (m *OAuth2ClientMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*OAuth2ClientMutation) RemovedIDs

func (m *OAuth2ClientMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*OAuth2ClientMutation) ResetEdge

func (m *OAuth2ClientMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*OAuth2ClientMutation) ResetField

func (m *OAuth2ClientMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*OAuth2ClientMutation) ResetLogoURL

func (m *OAuth2ClientMutation) ResetLogoURL()

ResetLogoURL resets all changes to the "logo_url" field.

func (*OAuth2ClientMutation) ResetName

func (m *OAuth2ClientMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*OAuth2ClientMutation) ResetPublic

func (m *OAuth2ClientMutation) ResetPublic()

ResetPublic resets all changes to the "public" field.

func (*OAuth2ClientMutation) ResetRedirectUris

func (m *OAuth2ClientMutation) ResetRedirectUris()

ResetRedirectUris resets all changes to the "redirect_uris" field.

func (*OAuth2ClientMutation) ResetSecret

func (m *OAuth2ClientMutation) ResetSecret()

ResetSecret resets all changes to the "secret" field.

func (*OAuth2ClientMutation) ResetTrustedPeers

func (m *OAuth2ClientMutation) ResetTrustedPeers()

ResetTrustedPeers resets all changes to the "trusted_peers" field.

func (*OAuth2ClientMutation) Secret

func (m *OAuth2ClientMutation) Secret() (r string, exists bool)

Secret returns the value of the "secret" field in the mutation.

func (*OAuth2ClientMutation) SetField

func (m *OAuth2ClientMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OAuth2ClientMutation) SetID

func (m *OAuth2ClientMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of OAuth2Client entities.

func (*OAuth2ClientMutation) SetLogoURL

func (m *OAuth2ClientMutation) SetLogoURL(s string)

SetLogoURL sets the "logo_url" field.

func (*OAuth2ClientMutation) SetName

func (m *OAuth2ClientMutation) SetName(s string)

SetName sets the "name" field.

func (*OAuth2ClientMutation) SetOp

func (m *OAuth2ClientMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OAuth2ClientMutation) SetPublic

func (m *OAuth2ClientMutation) SetPublic(b bool)

SetPublic sets the "public" field.

func (*OAuth2ClientMutation) SetRedirectUris

func (m *OAuth2ClientMutation) SetRedirectUris(s []string)

SetRedirectUris sets the "redirect_uris" field.

func (*OAuth2ClientMutation) SetSecret

func (m *OAuth2ClientMutation) SetSecret(s string)

SetSecret sets the "secret" field.

func (*OAuth2ClientMutation) SetTrustedPeers

func (m *OAuth2ClientMutation) SetTrustedPeers(s []string)

SetTrustedPeers sets the "trusted_peers" field.

func (*OAuth2ClientMutation) TrustedPeers

func (m *OAuth2ClientMutation) TrustedPeers() (r []string, exists bool)

TrustedPeers returns the value of the "trusted_peers" field in the mutation.

func (*OAuth2ClientMutation) TrustedPeersCleared

func (m *OAuth2ClientMutation) TrustedPeersCleared() bool

TrustedPeersCleared returns if the "trusted_peers" field was cleared in this mutation.

func (OAuth2ClientMutation) Tx

func (m OAuth2ClientMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*OAuth2ClientMutation) Type

func (m *OAuth2ClientMutation) Type() string

Type returns the node type of this mutation (OAuth2Client).

func (*OAuth2ClientMutation) Where

Where appends a list predicates to the OAuth2ClientMutation builder.

func (*OAuth2ClientMutation) WhereP

func (m *OAuth2ClientMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the OAuth2ClientMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type OAuth2ClientQuery

type OAuth2ClientQuery struct {
	// contains filtered or unexported fields
}

OAuth2ClientQuery is the builder for querying OAuth2Client entities.

func (*OAuth2ClientQuery) Aggregate

func (oq *OAuth2ClientQuery) Aggregate(fns ...AggregateFunc) *OAuth2ClientSelect

Aggregate returns a OAuth2ClientSelect configured with the given aggregations.

func (*OAuth2ClientQuery) All

func (oq *OAuth2ClientQuery) All(ctx context.Context) ([]*OAuth2Client, error)

All executes the query and returns a list of OAuth2Clients.

func (*OAuth2ClientQuery) AllX

func (oq *OAuth2ClientQuery) AllX(ctx context.Context) []*OAuth2Client

AllX is like All, but panics if an error occurs.

func (*OAuth2ClientQuery) Clone

func (oq *OAuth2ClientQuery) Clone() *OAuth2ClientQuery

Clone returns a duplicate of the OAuth2ClientQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*OAuth2ClientQuery) Count

func (oq *OAuth2ClientQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OAuth2ClientQuery) CountX

func (oq *OAuth2ClientQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*OAuth2ClientQuery) Exist

func (oq *OAuth2ClientQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*OAuth2ClientQuery) ExistX

func (oq *OAuth2ClientQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*OAuth2ClientQuery) First

func (oq *OAuth2ClientQuery) First(ctx context.Context) (*OAuth2Client, error)

First returns the first OAuth2Client entity from the query. Returns a *NotFoundError when no OAuth2Client was found.

func (*OAuth2ClientQuery) FirstID

func (oq *OAuth2ClientQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first OAuth2Client ID from the query. Returns a *NotFoundError when no OAuth2Client ID was found.

func (*OAuth2ClientQuery) FirstIDX

func (oq *OAuth2ClientQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*OAuth2ClientQuery) FirstX

func (oq *OAuth2ClientQuery) FirstX(ctx context.Context) *OAuth2Client

FirstX is like First, but panics if an error occurs.

func (*OAuth2ClientQuery) GroupBy

func (oq *OAuth2ClientQuery) GroupBy(field string, fields ...string) *OAuth2ClientGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Secret string `json:"secret,omitempty"`
	Count int `json:"count,omitempty"`
}

client.OAuth2Client.Query().
	GroupBy(oauth2client.FieldSecret).
	Aggregate(db.Count()).
	Scan(ctx, &v)

func (*OAuth2ClientQuery) IDs

func (oq *OAuth2ClientQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of OAuth2Client IDs.

func (*OAuth2ClientQuery) IDsX

func (oq *OAuth2ClientQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*OAuth2ClientQuery) Limit

func (oq *OAuth2ClientQuery) Limit(limit int) *OAuth2ClientQuery

Limit the number of records to be returned by this query.

func (*OAuth2ClientQuery) Offset

func (oq *OAuth2ClientQuery) Offset(offset int) *OAuth2ClientQuery

Offset to start from.

func (*OAuth2ClientQuery) Only

Only returns a single OAuth2Client entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OAuth2Client entity is found. Returns a *NotFoundError when no OAuth2Client entities are found.

func (*OAuth2ClientQuery) OnlyID

func (oq *OAuth2ClientQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only OAuth2Client ID in the query. Returns a *NotSingularError when more than one OAuth2Client ID is found. Returns a *NotFoundError when no entities are found.

func (*OAuth2ClientQuery) OnlyIDX

func (oq *OAuth2ClientQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*OAuth2ClientQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*OAuth2ClientQuery) Order

Order specifies how the records should be ordered.

func (*OAuth2ClientQuery) Select

func (oq *OAuth2ClientQuery) Select(fields ...string) *OAuth2ClientSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Secret string `json:"secret,omitempty"`
}

client.OAuth2Client.Query().
	Select(oauth2client.FieldSecret).
	Scan(ctx, &v)

func (*OAuth2ClientQuery) Unique

func (oq *OAuth2ClientQuery) Unique(unique bool) *OAuth2ClientQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*OAuth2ClientQuery) Where

Where adds a new predicate for the OAuth2ClientQuery builder.

type OAuth2ClientSelect

type OAuth2ClientSelect struct {
	*OAuth2ClientQuery
	// contains filtered or unexported fields
}

OAuth2ClientSelect is the builder for selecting fields of OAuth2Client entities.

func (*OAuth2ClientSelect) Aggregate

func (os *OAuth2ClientSelect) Aggregate(fns ...AggregateFunc) *OAuth2ClientSelect

Aggregate adds the given aggregation functions to the selector query.

func (*OAuth2ClientSelect) Bool

func (s *OAuth2ClientSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OAuth2ClientSelect) BoolX

func (s *OAuth2ClientSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OAuth2ClientSelect) Bools

func (s *OAuth2ClientSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OAuth2ClientSelect) BoolsX

func (s *OAuth2ClientSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OAuth2ClientSelect) Float64

func (s *OAuth2ClientSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OAuth2ClientSelect) Float64X

func (s *OAuth2ClientSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OAuth2ClientSelect) Float64s

func (s *OAuth2ClientSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OAuth2ClientSelect) Float64sX

func (s *OAuth2ClientSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OAuth2ClientSelect) Int

func (s *OAuth2ClientSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OAuth2ClientSelect) IntX

func (s *OAuth2ClientSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OAuth2ClientSelect) Ints

func (s *OAuth2ClientSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OAuth2ClientSelect) IntsX

func (s *OAuth2ClientSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OAuth2ClientSelect) Scan

func (os *OAuth2ClientSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OAuth2ClientSelect) ScanX

func (s *OAuth2ClientSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OAuth2ClientSelect) String

func (s *OAuth2ClientSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OAuth2ClientSelect) StringX

func (s *OAuth2ClientSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OAuth2ClientSelect) Strings

func (s *OAuth2ClientSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OAuth2ClientSelect) StringsX

func (s *OAuth2ClientSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OAuth2ClientUpdate

type OAuth2ClientUpdate struct {
	// contains filtered or unexported fields
}

OAuth2ClientUpdate is the builder for updating OAuth2Client entities.

func (*OAuth2ClientUpdate) AppendRedirectUris

func (ou *OAuth2ClientUpdate) AppendRedirectUris(s []string) *OAuth2ClientUpdate

AppendRedirectUris appends s to the "redirect_uris" field.

func (*OAuth2ClientUpdate) AppendTrustedPeers

func (ou *OAuth2ClientUpdate) AppendTrustedPeers(s []string) *OAuth2ClientUpdate

AppendTrustedPeers appends s to the "trusted_peers" field.

func (*OAuth2ClientUpdate) ClearRedirectUris

func (ou *OAuth2ClientUpdate) ClearRedirectUris() *OAuth2ClientUpdate

ClearRedirectUris clears the value of the "redirect_uris" field.

func (*OAuth2ClientUpdate) ClearTrustedPeers

func (ou *OAuth2ClientUpdate) ClearTrustedPeers() *OAuth2ClientUpdate

ClearTrustedPeers clears the value of the "trusted_peers" field.

func (*OAuth2ClientUpdate) Exec

func (ou *OAuth2ClientUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OAuth2ClientUpdate) ExecX

func (ou *OAuth2ClientUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OAuth2ClientUpdate) Mutation

func (ou *OAuth2ClientUpdate) Mutation() *OAuth2ClientMutation

Mutation returns the OAuth2ClientMutation object of the builder.

func (*OAuth2ClientUpdate) Save

func (ou *OAuth2ClientUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*OAuth2ClientUpdate) SaveX

func (ou *OAuth2ClientUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*OAuth2ClientUpdate) SetLogoURL

func (ou *OAuth2ClientUpdate) SetLogoURL(s string) *OAuth2ClientUpdate

SetLogoURL sets the "logo_url" field.

func (*OAuth2ClientUpdate) SetName

SetName sets the "name" field.

func (*OAuth2ClientUpdate) SetPublic

func (ou *OAuth2ClientUpdate) SetPublic(b bool) *OAuth2ClientUpdate

SetPublic sets the "public" field.

func (*OAuth2ClientUpdate) SetRedirectUris

func (ou *OAuth2ClientUpdate) SetRedirectUris(s []string) *OAuth2ClientUpdate

SetRedirectUris sets the "redirect_uris" field.

func (*OAuth2ClientUpdate) SetSecret

func (ou *OAuth2ClientUpdate) SetSecret(s string) *OAuth2ClientUpdate

SetSecret sets the "secret" field.

func (*OAuth2ClientUpdate) SetTrustedPeers

func (ou *OAuth2ClientUpdate) SetTrustedPeers(s []string) *OAuth2ClientUpdate

SetTrustedPeers sets the "trusted_peers" field.

func (*OAuth2ClientUpdate) Where

Where appends a list predicates to the OAuth2ClientUpdate builder.

type OAuth2ClientUpdateOne

type OAuth2ClientUpdateOne struct {
	// contains filtered or unexported fields
}

OAuth2ClientUpdateOne is the builder for updating a single OAuth2Client entity.

func (*OAuth2ClientUpdateOne) AppendRedirectUris

func (ouo *OAuth2ClientUpdateOne) AppendRedirectUris(s []string) *OAuth2ClientUpdateOne

AppendRedirectUris appends s to the "redirect_uris" field.

func (*OAuth2ClientUpdateOne) AppendTrustedPeers

func (ouo *OAuth2ClientUpdateOne) AppendTrustedPeers(s []string) *OAuth2ClientUpdateOne

AppendTrustedPeers appends s to the "trusted_peers" field.

func (*OAuth2ClientUpdateOne) ClearRedirectUris

func (ouo *OAuth2ClientUpdateOne) ClearRedirectUris() *OAuth2ClientUpdateOne

ClearRedirectUris clears the value of the "redirect_uris" field.

func (*OAuth2ClientUpdateOne) ClearTrustedPeers

func (ouo *OAuth2ClientUpdateOne) ClearTrustedPeers() *OAuth2ClientUpdateOne

ClearTrustedPeers clears the value of the "trusted_peers" field.

func (*OAuth2ClientUpdateOne) Exec

func (ouo *OAuth2ClientUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*OAuth2ClientUpdateOne) ExecX

func (ouo *OAuth2ClientUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OAuth2ClientUpdateOne) Mutation

Mutation returns the OAuth2ClientMutation object of the builder.

func (*OAuth2ClientUpdateOne) Save

Save executes the query and returns the updated OAuth2Client entity.

func (*OAuth2ClientUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*OAuth2ClientUpdateOne) Select

func (ouo *OAuth2ClientUpdateOne) Select(field string, fields ...string) *OAuth2ClientUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*OAuth2ClientUpdateOne) SetLogoURL

SetLogoURL sets the "logo_url" field.

func (*OAuth2ClientUpdateOne) SetName

SetName sets the "name" field.

func (*OAuth2ClientUpdateOne) SetPublic

SetPublic sets the "public" field.

func (*OAuth2ClientUpdateOne) SetRedirectUris

func (ouo *OAuth2ClientUpdateOne) SetRedirectUris(s []string) *OAuth2ClientUpdateOne

SetRedirectUris sets the "redirect_uris" field.

func (*OAuth2ClientUpdateOne) SetSecret

SetSecret sets the "secret" field.

func (*OAuth2ClientUpdateOne) SetTrustedPeers

func (ouo *OAuth2ClientUpdateOne) SetTrustedPeers(s []string) *OAuth2ClientUpdateOne

SetTrustedPeers sets the "trusted_peers" field.

func (*OAuth2ClientUpdateOne) Where

Where appends a list predicates to the OAuth2ClientUpdate builder.

type OAuth2Clients

type OAuth2Clients []*OAuth2Client

OAuth2Clients is a parsable slice of OAuth2Client.

type OfflineSession

type OfflineSession struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// UserID holds the value of the "user_id" field.
	UserID string `json:"user_id,omitempty"`
	// ConnID holds the value of the "conn_id" field.
	ConnID string `json:"conn_id,omitempty"`
	// Refresh holds the value of the "refresh" field.
	Refresh []byte `json:"refresh,omitempty"`
	// ConnectorData holds the value of the "connector_data" field.
	ConnectorData *[]byte `json:"connector_data,omitempty"`
	// contains filtered or unexported fields
}

OfflineSession is the model entity for the OfflineSession schema.

func (*OfflineSession) String

func (os *OfflineSession) String() string

String implements the fmt.Stringer.

func (*OfflineSession) Unwrap

func (os *OfflineSession) Unwrap() *OfflineSession

Unwrap unwraps the OfflineSession entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*OfflineSession) Update

Update returns a builder for updating this OfflineSession. Note that you need to call OfflineSession.Unwrap() before calling this method if this OfflineSession was returned from a transaction, and the transaction was committed or rolled back.

type OfflineSessionClient

type OfflineSessionClient struct {
	// contains filtered or unexported fields
}

OfflineSessionClient is a client for the OfflineSession schema.

func NewOfflineSessionClient

func NewOfflineSessionClient(c config) *OfflineSessionClient

NewOfflineSessionClient returns a client for the OfflineSession from the given config.

func (*OfflineSessionClient) Create

Create returns a builder for creating a OfflineSession entity.

func (*OfflineSessionClient) CreateBulk

CreateBulk returns a builder for creating a bulk of OfflineSession entities.

func (*OfflineSessionClient) Delete

Delete returns a delete builder for OfflineSession.

func (*OfflineSessionClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OfflineSessionClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*OfflineSessionClient) Get

Get returns a OfflineSession entity by its id.

func (*OfflineSessionClient) GetX

GetX is like Get, but panics if an error occurs.

func (*OfflineSessionClient) Hooks

func (c *OfflineSessionClient) Hooks() []Hook

Hooks returns the client hooks.

func (*OfflineSessionClient) Intercept

func (c *OfflineSessionClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `offlinesession.Intercept(f(g(h())))`.

func (*OfflineSessionClient) Interceptors

func (c *OfflineSessionClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*OfflineSessionClient) Query

Query returns a query builder for OfflineSession.

func (*OfflineSessionClient) Update

Update returns an update builder for OfflineSession.

func (*OfflineSessionClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*OfflineSessionClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*OfflineSessionClient) Use

func (c *OfflineSessionClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `offlinesession.Hooks(f(g(h())))`.

type OfflineSessionCreate

type OfflineSessionCreate struct {
	// contains filtered or unexported fields
}

OfflineSessionCreate is the builder for creating a OfflineSession entity.

func (*OfflineSessionCreate) Exec

func (osc *OfflineSessionCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OfflineSessionCreate) ExecX

func (osc *OfflineSessionCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OfflineSessionCreate) Mutation

Mutation returns the OfflineSessionMutation object of the builder.

func (*OfflineSessionCreate) Save

Save creates the OfflineSession in the database.

func (*OfflineSessionCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*OfflineSessionCreate) SetConnID

SetConnID sets the "conn_id" field.

func (*OfflineSessionCreate) SetConnectorData

func (osc *OfflineSessionCreate) SetConnectorData(b []byte) *OfflineSessionCreate

SetConnectorData sets the "connector_data" field.

func (*OfflineSessionCreate) SetID

SetID sets the "id" field.

func (*OfflineSessionCreate) SetRefresh

func (osc *OfflineSessionCreate) SetRefresh(b []byte) *OfflineSessionCreate

SetRefresh sets the "refresh" field.

func (*OfflineSessionCreate) SetUserID

SetUserID sets the "user_id" field.

type OfflineSessionCreateBulk

type OfflineSessionCreateBulk struct {
	// contains filtered or unexported fields
}

OfflineSessionCreateBulk is the builder for creating many OfflineSession entities in bulk.

func (*OfflineSessionCreateBulk) Exec

Exec executes the query.

func (*OfflineSessionCreateBulk) ExecX

func (oscb *OfflineSessionCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OfflineSessionCreateBulk) Save

Save creates the OfflineSession entities in the database.

func (*OfflineSessionCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type OfflineSessionDelete

type OfflineSessionDelete struct {
	// contains filtered or unexported fields
}

OfflineSessionDelete is the builder for deleting a OfflineSession entity.

func (*OfflineSessionDelete) Exec

func (osd *OfflineSessionDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*OfflineSessionDelete) ExecX

func (osd *OfflineSessionDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OfflineSessionDelete) Where

Where appends a list predicates to the OfflineSessionDelete builder.

type OfflineSessionDeleteOne

type OfflineSessionDeleteOne struct {
	// contains filtered or unexported fields
}

OfflineSessionDeleteOne is the builder for deleting a single OfflineSession entity.

func (*OfflineSessionDeleteOne) Exec

func (osdo *OfflineSessionDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*OfflineSessionDeleteOne) ExecX

func (osdo *OfflineSessionDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OfflineSessionDeleteOne) Where

Where appends a list predicates to the OfflineSessionDelete builder.

type OfflineSessionGroupBy

type OfflineSessionGroupBy struct {
	// contains filtered or unexported fields
}

OfflineSessionGroupBy is the group-by builder for OfflineSession entities.

func (*OfflineSessionGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*OfflineSessionGroupBy) Bool

func (s *OfflineSessionGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OfflineSessionGroupBy) BoolX

func (s *OfflineSessionGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OfflineSessionGroupBy) Bools

func (s *OfflineSessionGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OfflineSessionGroupBy) BoolsX

func (s *OfflineSessionGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OfflineSessionGroupBy) Float64

func (s *OfflineSessionGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OfflineSessionGroupBy) Float64X

func (s *OfflineSessionGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OfflineSessionGroupBy) Float64s

func (s *OfflineSessionGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OfflineSessionGroupBy) Float64sX

func (s *OfflineSessionGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OfflineSessionGroupBy) Int

func (s *OfflineSessionGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OfflineSessionGroupBy) IntX

func (s *OfflineSessionGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OfflineSessionGroupBy) Ints

func (s *OfflineSessionGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OfflineSessionGroupBy) IntsX

func (s *OfflineSessionGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OfflineSessionGroupBy) Scan

func (osgb *OfflineSessionGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OfflineSessionGroupBy) ScanX

func (s *OfflineSessionGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OfflineSessionGroupBy) String

func (s *OfflineSessionGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OfflineSessionGroupBy) StringX

func (s *OfflineSessionGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OfflineSessionGroupBy) Strings

func (s *OfflineSessionGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OfflineSessionGroupBy) StringsX

func (s *OfflineSessionGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OfflineSessionMutation

type OfflineSessionMutation struct {
	// contains filtered or unexported fields
}

OfflineSessionMutation represents an operation that mutates the OfflineSession nodes in the graph.

func (*OfflineSessionMutation) AddField

func (m *OfflineSessionMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OfflineSessionMutation) AddedEdges

func (m *OfflineSessionMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*OfflineSessionMutation) AddedField

func (m *OfflineSessionMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OfflineSessionMutation) AddedFields

func (m *OfflineSessionMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*OfflineSessionMutation) AddedIDs

func (m *OfflineSessionMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*OfflineSessionMutation) ClearConnectorData

func (m *OfflineSessionMutation) ClearConnectorData()

ClearConnectorData clears the value of the "connector_data" field.

func (*OfflineSessionMutation) ClearEdge

func (m *OfflineSessionMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*OfflineSessionMutation) ClearField

func (m *OfflineSessionMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*OfflineSessionMutation) ClearedEdges

func (m *OfflineSessionMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*OfflineSessionMutation) ClearedFields

func (m *OfflineSessionMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (OfflineSessionMutation) Client

func (m OfflineSessionMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*OfflineSessionMutation) ConnID

func (m *OfflineSessionMutation) ConnID() (r string, exists bool)

ConnID returns the value of the "conn_id" field in the mutation.

func (*OfflineSessionMutation) ConnectorData

func (m *OfflineSessionMutation) ConnectorData() (r []byte, exists bool)

ConnectorData returns the value of the "connector_data" field in the mutation.

func (*OfflineSessionMutation) ConnectorDataCleared

func (m *OfflineSessionMutation) ConnectorDataCleared() bool

ConnectorDataCleared returns if the "connector_data" field was cleared in this mutation.

func (*OfflineSessionMutation) EdgeCleared

func (m *OfflineSessionMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*OfflineSessionMutation) Field

func (m *OfflineSessionMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OfflineSessionMutation) FieldCleared

func (m *OfflineSessionMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*OfflineSessionMutation) Fields

func (m *OfflineSessionMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*OfflineSessionMutation) ID

func (m *OfflineSessionMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*OfflineSessionMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*OfflineSessionMutation) OldConnID

func (m *OfflineSessionMutation) OldConnID(ctx context.Context) (v string, err error)

OldConnID returns the old "conn_id" field's value of the OfflineSession entity. If the OfflineSession object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OfflineSessionMutation) OldConnectorData

func (m *OfflineSessionMutation) OldConnectorData(ctx context.Context) (v *[]byte, err error)

OldConnectorData returns the old "connector_data" field's value of the OfflineSession entity. If the OfflineSession object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OfflineSessionMutation) OldField

func (m *OfflineSessionMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*OfflineSessionMutation) OldRefresh

func (m *OfflineSessionMutation) OldRefresh(ctx context.Context) (v []byte, err error)

OldRefresh returns the old "refresh" field's value of the OfflineSession entity. If the OfflineSession object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OfflineSessionMutation) OldUserID

func (m *OfflineSessionMutation) OldUserID(ctx context.Context) (v string, err error)

OldUserID returns the old "user_id" field's value of the OfflineSession entity. If the OfflineSession object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OfflineSessionMutation) Op

func (m *OfflineSessionMutation) Op() Op

Op returns the operation name.

func (*OfflineSessionMutation) Refresh

func (m *OfflineSessionMutation) Refresh() (r []byte, exists bool)

Refresh returns the value of the "refresh" field in the mutation.

func (*OfflineSessionMutation) RemovedEdges

func (m *OfflineSessionMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*OfflineSessionMutation) RemovedIDs

func (m *OfflineSessionMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*OfflineSessionMutation) ResetConnID

func (m *OfflineSessionMutation) ResetConnID()

ResetConnID resets all changes to the "conn_id" field.

func (*OfflineSessionMutation) ResetConnectorData

func (m *OfflineSessionMutation) ResetConnectorData()

ResetConnectorData resets all changes to the "connector_data" field.

func (*OfflineSessionMutation) ResetEdge

func (m *OfflineSessionMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*OfflineSessionMutation) ResetField

func (m *OfflineSessionMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*OfflineSessionMutation) ResetRefresh

func (m *OfflineSessionMutation) ResetRefresh()

ResetRefresh resets all changes to the "refresh" field.

func (*OfflineSessionMutation) ResetUserID

func (m *OfflineSessionMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*OfflineSessionMutation) SetConnID

func (m *OfflineSessionMutation) SetConnID(s string)

SetConnID sets the "conn_id" field.

func (*OfflineSessionMutation) SetConnectorData

func (m *OfflineSessionMutation) SetConnectorData(b []byte)

SetConnectorData sets the "connector_data" field.

func (*OfflineSessionMutation) SetField

func (m *OfflineSessionMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OfflineSessionMutation) SetID

func (m *OfflineSessionMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of OfflineSession entities.

func (*OfflineSessionMutation) SetOp

func (m *OfflineSessionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OfflineSessionMutation) SetRefresh

func (m *OfflineSessionMutation) SetRefresh(b []byte)

SetRefresh sets the "refresh" field.

func (*OfflineSessionMutation) SetUserID

func (m *OfflineSessionMutation) SetUserID(s string)

SetUserID sets the "user_id" field.

func (OfflineSessionMutation) Tx

func (m OfflineSessionMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*OfflineSessionMutation) Type

func (m *OfflineSessionMutation) Type() string

Type returns the node type of this mutation (OfflineSession).

func (*OfflineSessionMutation) UserID

func (m *OfflineSessionMutation) UserID() (r string, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*OfflineSessionMutation) Where

Where appends a list predicates to the OfflineSessionMutation builder.

func (*OfflineSessionMutation) WhereP

func (m *OfflineSessionMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the OfflineSessionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type OfflineSessionQuery

type OfflineSessionQuery struct {
	// contains filtered or unexported fields
}

OfflineSessionQuery is the builder for querying OfflineSession entities.

func (*OfflineSessionQuery) Aggregate

func (osq *OfflineSessionQuery) Aggregate(fns ...AggregateFunc) *OfflineSessionSelect

Aggregate returns a OfflineSessionSelect configured with the given aggregations.

func (*OfflineSessionQuery) All

All executes the query and returns a list of OfflineSessions.

func (*OfflineSessionQuery) AllX

AllX is like All, but panics if an error occurs.

func (*OfflineSessionQuery) Clone

Clone returns a duplicate of the OfflineSessionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*OfflineSessionQuery) Count

func (osq *OfflineSessionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OfflineSessionQuery) CountX

func (osq *OfflineSessionQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*OfflineSessionQuery) Exist

func (osq *OfflineSessionQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*OfflineSessionQuery) ExistX

func (osq *OfflineSessionQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*OfflineSessionQuery) First

First returns the first OfflineSession entity from the query. Returns a *NotFoundError when no OfflineSession was found.

func (*OfflineSessionQuery) FirstID

func (osq *OfflineSessionQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first OfflineSession ID from the query. Returns a *NotFoundError when no OfflineSession ID was found.

func (*OfflineSessionQuery) FirstIDX

func (osq *OfflineSessionQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*OfflineSessionQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*OfflineSessionQuery) GroupBy

func (osq *OfflineSessionQuery) GroupBy(field string, fields ...string) *OfflineSessionGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	UserID string `json:"user_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.OfflineSession.Query().
	GroupBy(offlinesession.FieldUserID).
	Aggregate(db.Count()).
	Scan(ctx, &v)

func (*OfflineSessionQuery) IDs

func (osq *OfflineSessionQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of OfflineSession IDs.

func (*OfflineSessionQuery) IDsX

func (osq *OfflineSessionQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*OfflineSessionQuery) Limit

func (osq *OfflineSessionQuery) Limit(limit int) *OfflineSessionQuery

Limit the number of records to be returned by this query.

func (*OfflineSessionQuery) Offset

func (osq *OfflineSessionQuery) Offset(offset int) *OfflineSessionQuery

Offset to start from.

func (*OfflineSessionQuery) Only

Only returns a single OfflineSession entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OfflineSession entity is found. Returns a *NotFoundError when no OfflineSession entities are found.

func (*OfflineSessionQuery) OnlyID

func (osq *OfflineSessionQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only OfflineSession ID in the query. Returns a *NotSingularError when more than one OfflineSession ID is found. Returns a *NotFoundError when no entities are found.

func (*OfflineSessionQuery) OnlyIDX

func (osq *OfflineSessionQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*OfflineSessionQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*OfflineSessionQuery) Order

Order specifies how the records should be ordered.

func (*OfflineSessionQuery) Select

func (osq *OfflineSessionQuery) Select(fields ...string) *OfflineSessionSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	UserID string `json:"user_id,omitempty"`
}

client.OfflineSession.Query().
	Select(offlinesession.FieldUserID).
	Scan(ctx, &v)

func (*OfflineSessionQuery) Unique

func (osq *OfflineSessionQuery) Unique(unique bool) *OfflineSessionQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*OfflineSessionQuery) Where

Where adds a new predicate for the OfflineSessionQuery builder.

type OfflineSessionSelect

type OfflineSessionSelect struct {
	*OfflineSessionQuery
	// contains filtered or unexported fields
}

OfflineSessionSelect is the builder for selecting fields of OfflineSession entities.

func (*OfflineSessionSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*OfflineSessionSelect) Bool

func (s *OfflineSessionSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OfflineSessionSelect) BoolX

func (s *OfflineSessionSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OfflineSessionSelect) Bools

func (s *OfflineSessionSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OfflineSessionSelect) BoolsX

func (s *OfflineSessionSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OfflineSessionSelect) Float64

func (s *OfflineSessionSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OfflineSessionSelect) Float64X

func (s *OfflineSessionSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OfflineSessionSelect) Float64s

func (s *OfflineSessionSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OfflineSessionSelect) Float64sX

func (s *OfflineSessionSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OfflineSessionSelect) Int

func (s *OfflineSessionSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OfflineSessionSelect) IntX

func (s *OfflineSessionSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OfflineSessionSelect) Ints

func (s *OfflineSessionSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OfflineSessionSelect) IntsX

func (s *OfflineSessionSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OfflineSessionSelect) Scan

func (oss *OfflineSessionSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OfflineSessionSelect) ScanX

func (s *OfflineSessionSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OfflineSessionSelect) String

func (s *OfflineSessionSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OfflineSessionSelect) StringX

func (s *OfflineSessionSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OfflineSessionSelect) Strings

func (s *OfflineSessionSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OfflineSessionSelect) StringsX

func (s *OfflineSessionSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OfflineSessionUpdate

type OfflineSessionUpdate struct {
	// contains filtered or unexported fields
}

OfflineSessionUpdate is the builder for updating OfflineSession entities.

func (*OfflineSessionUpdate) ClearConnectorData

func (osu *OfflineSessionUpdate) ClearConnectorData() *OfflineSessionUpdate

ClearConnectorData clears the value of the "connector_data" field.

func (*OfflineSessionUpdate) Exec

func (osu *OfflineSessionUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OfflineSessionUpdate) ExecX

func (osu *OfflineSessionUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OfflineSessionUpdate) Mutation

Mutation returns the OfflineSessionMutation object of the builder.

func (*OfflineSessionUpdate) Save

func (osu *OfflineSessionUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*OfflineSessionUpdate) SaveX

func (osu *OfflineSessionUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*OfflineSessionUpdate) SetConnID

SetConnID sets the "conn_id" field.

func (*OfflineSessionUpdate) SetConnectorData

func (osu *OfflineSessionUpdate) SetConnectorData(b []byte) *OfflineSessionUpdate

SetConnectorData sets the "connector_data" field.

func (*OfflineSessionUpdate) SetRefresh

func (osu *OfflineSessionUpdate) SetRefresh(b []byte) *OfflineSessionUpdate

SetRefresh sets the "refresh" field.

func (*OfflineSessionUpdate) SetUserID

SetUserID sets the "user_id" field.

func (*OfflineSessionUpdate) Where

Where appends a list predicates to the OfflineSessionUpdate builder.

type OfflineSessionUpdateOne

type OfflineSessionUpdateOne struct {
	// contains filtered or unexported fields
}

OfflineSessionUpdateOne is the builder for updating a single OfflineSession entity.

func (*OfflineSessionUpdateOne) ClearConnectorData

func (osuo *OfflineSessionUpdateOne) ClearConnectorData() *OfflineSessionUpdateOne

ClearConnectorData clears the value of the "connector_data" field.

func (*OfflineSessionUpdateOne) Exec

func (osuo *OfflineSessionUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*OfflineSessionUpdateOne) ExecX

func (osuo *OfflineSessionUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OfflineSessionUpdateOne) Mutation

Mutation returns the OfflineSessionMutation object of the builder.

func (*OfflineSessionUpdateOne) Save

Save executes the query and returns the updated OfflineSession entity.

func (*OfflineSessionUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*OfflineSessionUpdateOne) Select

func (osuo *OfflineSessionUpdateOne) Select(field string, fields ...string) *OfflineSessionUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*OfflineSessionUpdateOne) SetConnID

SetConnID sets the "conn_id" field.

func (*OfflineSessionUpdateOne) SetConnectorData

func (osuo *OfflineSessionUpdateOne) SetConnectorData(b []byte) *OfflineSessionUpdateOne

SetConnectorData sets the "connector_data" field.

func (*OfflineSessionUpdateOne) SetRefresh

func (osuo *OfflineSessionUpdateOne) SetRefresh(b []byte) *OfflineSessionUpdateOne

SetRefresh sets the "refresh" field.

func (*OfflineSessionUpdateOne) SetUserID

SetUserID sets the "user_id" field.

func (*OfflineSessionUpdateOne) Where

Where appends a list predicates to the OfflineSessionUpdate builder.

type OfflineSessions

type OfflineSessions []*OfflineSession

OfflineSessions is a parsable slice of OfflineSession.

type Op

type Op = ent.Op

ent aliases to avoid import conflicts in user's code.

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...any)) Option

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector.

func Asc

func Asc(fields ...string) OrderFunc

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) OrderFunc

Desc applies the given fields in DESC order.

type Password

type Password struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Email holds the value of the "email" field.
	Email string `json:"email,omitempty"`
	// Hash holds the value of the "hash" field.
	Hash []byte `json:"hash,omitempty"`
	// Username holds the value of the "username" field.
	Username string `json:"username,omitempty"`
	// UserID holds the value of the "user_id" field.
	UserID string `json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

Password is the model entity for the Password schema.

func (*Password) String

func (pa *Password) String() string

String implements the fmt.Stringer.

func (*Password) Unwrap

func (pa *Password) Unwrap() *Password

Unwrap unwraps the Password entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Password) Update

func (pa *Password) Update() *PasswordUpdateOne

Update returns a builder for updating this Password. Note that you need to call Password.Unwrap() before calling this method if this Password was returned from a transaction, and the transaction was committed or rolled back.

type PasswordClient

type PasswordClient struct {
	// contains filtered or unexported fields
}

PasswordClient is a client for the Password schema.

func NewPasswordClient

func NewPasswordClient(c config) *PasswordClient

NewPasswordClient returns a client for the Password from the given config.

func (*PasswordClient) Create

func (c *PasswordClient) Create() *PasswordCreate

Create returns a builder for creating a Password entity.

func (*PasswordClient) CreateBulk

func (c *PasswordClient) CreateBulk(builders ...*PasswordCreate) *PasswordCreateBulk

CreateBulk returns a builder for creating a bulk of Password entities.

func (*PasswordClient) Delete

func (c *PasswordClient) Delete() *PasswordDelete

Delete returns a delete builder for Password.

func (*PasswordClient) DeleteOne

func (c *PasswordClient) DeleteOne(pa *Password) *PasswordDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PasswordClient) DeleteOneID

func (c *PasswordClient) DeleteOneID(id int) *PasswordDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*PasswordClient) Get

func (c *PasswordClient) Get(ctx context.Context, id int) (*Password, error)

Get returns a Password entity by its id.

func (*PasswordClient) GetX

func (c *PasswordClient) GetX(ctx context.Context, id int) *Password

GetX is like Get, but panics if an error occurs.

func (*PasswordClient) Hooks

func (c *PasswordClient) Hooks() []Hook

Hooks returns the client hooks.

func (*PasswordClient) Intercept

func (c *PasswordClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `password.Intercept(f(g(h())))`.

func (*PasswordClient) Interceptors

func (c *PasswordClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*PasswordClient) Query

func (c *PasswordClient) Query() *PasswordQuery

Query returns a query builder for Password.

func (*PasswordClient) Update

func (c *PasswordClient) Update() *PasswordUpdate

Update returns an update builder for Password.

func (*PasswordClient) UpdateOne

func (c *PasswordClient) UpdateOne(pa *Password) *PasswordUpdateOne

UpdateOne returns an update builder for the given entity.

func (*PasswordClient) UpdateOneID

func (c *PasswordClient) UpdateOneID(id int) *PasswordUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PasswordClient) Use

func (c *PasswordClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `password.Hooks(f(g(h())))`.

type PasswordCreate

type PasswordCreate struct {
	// contains filtered or unexported fields
}

PasswordCreate is the builder for creating a Password entity.

func (*PasswordCreate) Exec

func (pc *PasswordCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PasswordCreate) ExecX

func (pc *PasswordCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PasswordCreate) Mutation

func (pc *PasswordCreate) Mutation() *PasswordMutation

Mutation returns the PasswordMutation object of the builder.

func (*PasswordCreate) Save

func (pc *PasswordCreate) Save(ctx context.Context) (*Password, error)

Save creates the Password in the database.

func (*PasswordCreate) SaveX

func (pc *PasswordCreate) SaveX(ctx context.Context) *Password

SaveX calls Save and panics if Save returns an error.

func (*PasswordCreate) SetEmail

func (pc *PasswordCreate) SetEmail(s string) *PasswordCreate

SetEmail sets the "email" field.

func (*PasswordCreate) SetHash

func (pc *PasswordCreate) SetHash(b []byte) *PasswordCreate

SetHash sets the "hash" field.

func (*PasswordCreate) SetUserID

func (pc *PasswordCreate) SetUserID(s string) *PasswordCreate

SetUserID sets the "user_id" field.

func (*PasswordCreate) SetUsername

func (pc *PasswordCreate) SetUsername(s string) *PasswordCreate

SetUsername sets the "username" field.

type PasswordCreateBulk

type PasswordCreateBulk struct {
	// contains filtered or unexported fields
}

PasswordCreateBulk is the builder for creating many Password entities in bulk.

func (*PasswordCreateBulk) Exec

func (pcb *PasswordCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PasswordCreateBulk) ExecX

func (pcb *PasswordCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PasswordCreateBulk) Save

func (pcb *PasswordCreateBulk) Save(ctx context.Context) ([]*Password, error)

Save creates the Password entities in the database.

func (*PasswordCreateBulk) SaveX

func (pcb *PasswordCreateBulk) SaveX(ctx context.Context) []*Password

SaveX is like Save, but panics if an error occurs.

type PasswordDelete

type PasswordDelete struct {
	// contains filtered or unexported fields
}

PasswordDelete is the builder for deleting a Password entity.

func (*PasswordDelete) Exec

func (pd *PasswordDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*PasswordDelete) ExecX

func (pd *PasswordDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*PasswordDelete) Where

func (pd *PasswordDelete) Where(ps ...predicate.Password) *PasswordDelete

Where appends a list predicates to the PasswordDelete builder.

type PasswordDeleteOne

type PasswordDeleteOne struct {
	// contains filtered or unexported fields
}

PasswordDeleteOne is the builder for deleting a single Password entity.

func (*PasswordDeleteOne) Exec

func (pdo *PasswordDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PasswordDeleteOne) ExecX

func (pdo *PasswordDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PasswordDeleteOne) Where

Where appends a list predicates to the PasswordDelete builder.

type PasswordGroupBy

type PasswordGroupBy struct {
	// contains filtered or unexported fields
}

PasswordGroupBy is the group-by builder for Password entities.

func (*PasswordGroupBy) Aggregate

func (pgb *PasswordGroupBy) Aggregate(fns ...AggregateFunc) *PasswordGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*PasswordGroupBy) Bool

func (s *PasswordGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PasswordGroupBy) BoolX

func (s *PasswordGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PasswordGroupBy) Bools

func (s *PasswordGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PasswordGroupBy) BoolsX

func (s *PasswordGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PasswordGroupBy) Float64

func (s *PasswordGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PasswordGroupBy) Float64X

func (s *PasswordGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PasswordGroupBy) Float64s

func (s *PasswordGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PasswordGroupBy) Float64sX

func (s *PasswordGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PasswordGroupBy) Int

func (s *PasswordGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PasswordGroupBy) IntX

func (s *PasswordGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PasswordGroupBy) Ints

func (s *PasswordGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PasswordGroupBy) IntsX

func (s *PasswordGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PasswordGroupBy) Scan

func (pgb *PasswordGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PasswordGroupBy) ScanX

func (s *PasswordGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PasswordGroupBy) String

func (s *PasswordGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PasswordGroupBy) StringX

func (s *PasswordGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PasswordGroupBy) Strings

func (s *PasswordGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PasswordGroupBy) StringsX

func (s *PasswordGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PasswordMutation

type PasswordMutation struct {
	// contains filtered or unexported fields
}

PasswordMutation represents an operation that mutates the Password nodes in the graph.

func (*PasswordMutation) AddField

func (m *PasswordMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*PasswordMutation) AddedEdges

func (m *PasswordMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*PasswordMutation) AddedField

func (m *PasswordMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*PasswordMutation) AddedFields

func (m *PasswordMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*PasswordMutation) AddedIDs

func (m *PasswordMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*PasswordMutation) ClearEdge

func (m *PasswordMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*PasswordMutation) ClearField

func (m *PasswordMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*PasswordMutation) ClearedEdges

func (m *PasswordMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*PasswordMutation) ClearedFields

func (m *PasswordMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (PasswordMutation) Client

func (m PasswordMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*PasswordMutation) EdgeCleared

func (m *PasswordMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*PasswordMutation) Email

func (m *PasswordMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*PasswordMutation) Field

func (m *PasswordMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*PasswordMutation) FieldCleared

func (m *PasswordMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*PasswordMutation) Fields

func (m *PasswordMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*PasswordMutation) Hash

func (m *PasswordMutation) Hash() (r []byte, exists bool)

Hash returns the value of the "hash" field in the mutation.

func (*PasswordMutation) ID

func (m *PasswordMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*PasswordMutation) IDs

func (m *PasswordMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*PasswordMutation) OldEmail

func (m *PasswordMutation) OldEmail(ctx context.Context) (v string, err error)

OldEmail returns the old "email" field's value of the Password entity. If the Password object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PasswordMutation) OldField

func (m *PasswordMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*PasswordMutation) OldHash

func (m *PasswordMutation) OldHash(ctx context.Context) (v []byte, err error)

OldHash returns the old "hash" field's value of the Password entity. If the Password object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PasswordMutation) OldUserID

func (m *PasswordMutation) OldUserID(ctx context.Context) (v string, err error)

OldUserID returns the old "user_id" field's value of the Password entity. If the Password object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PasswordMutation) OldUsername

func (m *PasswordMutation) OldUsername(ctx context.Context) (v string, err error)

OldUsername returns the old "username" field's value of the Password entity. If the Password object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PasswordMutation) Op

func (m *PasswordMutation) Op() Op

Op returns the operation name.

func (*PasswordMutation) RemovedEdges

func (m *PasswordMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*PasswordMutation) RemovedIDs

func (m *PasswordMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*PasswordMutation) ResetEdge

func (m *PasswordMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*PasswordMutation) ResetEmail

func (m *PasswordMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*PasswordMutation) ResetField

func (m *PasswordMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*PasswordMutation) ResetHash

func (m *PasswordMutation) ResetHash()

ResetHash resets all changes to the "hash" field.

func (*PasswordMutation) ResetUserID

func (m *PasswordMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*PasswordMutation) ResetUsername

func (m *PasswordMutation) ResetUsername()

ResetUsername resets all changes to the "username" field.

func (*PasswordMutation) SetEmail

func (m *PasswordMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*PasswordMutation) SetField

func (m *PasswordMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*PasswordMutation) SetHash

func (m *PasswordMutation) SetHash(b []byte)

SetHash sets the "hash" field.

func (*PasswordMutation) SetOp

func (m *PasswordMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*PasswordMutation) SetUserID

func (m *PasswordMutation) SetUserID(s string)

SetUserID sets the "user_id" field.

func (*PasswordMutation) SetUsername

func (m *PasswordMutation) SetUsername(s string)

SetUsername sets the "username" field.

func (PasswordMutation) Tx

func (m PasswordMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*PasswordMutation) Type

func (m *PasswordMutation) Type() string

Type returns the node type of this mutation (Password).

func (*PasswordMutation) UserID

func (m *PasswordMutation) UserID() (r string, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*PasswordMutation) Username

func (m *PasswordMutation) Username() (r string, exists bool)

Username returns the value of the "username" field in the mutation.

func (*PasswordMutation) Where

func (m *PasswordMutation) Where(ps ...predicate.Password)

Where appends a list predicates to the PasswordMutation builder.

func (*PasswordMutation) WhereP

func (m *PasswordMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the PasswordMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type PasswordQuery

type PasswordQuery struct {
	// contains filtered or unexported fields
}

PasswordQuery is the builder for querying Password entities.

func (*PasswordQuery) Aggregate

func (pq *PasswordQuery) Aggregate(fns ...AggregateFunc) *PasswordSelect

Aggregate returns a PasswordSelect configured with the given aggregations.

func (*PasswordQuery) All

func (pq *PasswordQuery) All(ctx context.Context) ([]*Password, error)

All executes the query and returns a list of Passwords.

func (*PasswordQuery) AllX

func (pq *PasswordQuery) AllX(ctx context.Context) []*Password

AllX is like All, but panics if an error occurs.

func (*PasswordQuery) Clone

func (pq *PasswordQuery) Clone() *PasswordQuery

Clone returns a duplicate of the PasswordQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*PasswordQuery) Count

func (pq *PasswordQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PasswordQuery) CountX

func (pq *PasswordQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PasswordQuery) Exist

func (pq *PasswordQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PasswordQuery) ExistX

func (pq *PasswordQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PasswordQuery) First

func (pq *PasswordQuery) First(ctx context.Context) (*Password, error)

First returns the first Password entity from the query. Returns a *NotFoundError when no Password was found.

func (*PasswordQuery) FirstID

func (pq *PasswordQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Password ID from the query. Returns a *NotFoundError when no Password ID was found.

func (*PasswordQuery) FirstIDX

func (pq *PasswordQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*PasswordQuery) FirstX

func (pq *PasswordQuery) FirstX(ctx context.Context) *Password

FirstX is like First, but panics if an error occurs.

func (*PasswordQuery) GroupBy

func (pq *PasswordQuery) GroupBy(field string, fields ...string) *PasswordGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Email string `json:"email,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Password.Query().
	GroupBy(password.FieldEmail).
	Aggregate(db.Count()).
	Scan(ctx, &v)

func (*PasswordQuery) IDs

func (pq *PasswordQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Password IDs.

func (*PasswordQuery) IDsX

func (pq *PasswordQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*PasswordQuery) Limit

func (pq *PasswordQuery) Limit(limit int) *PasswordQuery

Limit the number of records to be returned by this query.

func (*PasswordQuery) Offset

func (pq *PasswordQuery) Offset(offset int) *PasswordQuery

Offset to start from.

func (*PasswordQuery) Only

func (pq *PasswordQuery) Only(ctx context.Context) (*Password, error)

Only returns a single Password entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Password entity is found. Returns a *NotFoundError when no Password entities are found.

func (*PasswordQuery) OnlyID

func (pq *PasswordQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Password ID in the query. Returns a *NotSingularError when more than one Password ID is found. Returns a *NotFoundError when no entities are found.

func (*PasswordQuery) OnlyIDX

func (pq *PasswordQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*PasswordQuery) OnlyX

func (pq *PasswordQuery) OnlyX(ctx context.Context) *Password

OnlyX is like Only, but panics if an error occurs.

func (*PasswordQuery) Order

func (pq *PasswordQuery) Order(o ...OrderFunc) *PasswordQuery

Order specifies how the records should be ordered.

func (*PasswordQuery) Select

func (pq *PasswordQuery) Select(fields ...string) *PasswordSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Email string `json:"email,omitempty"`
}

client.Password.Query().
	Select(password.FieldEmail).
	Scan(ctx, &v)

func (*PasswordQuery) Unique

func (pq *PasswordQuery) Unique(unique bool) *PasswordQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*PasswordQuery) Where

func (pq *PasswordQuery) Where(ps ...predicate.Password) *PasswordQuery

Where adds a new predicate for the PasswordQuery builder.

type PasswordSelect

type PasswordSelect struct {
	*PasswordQuery
	// contains filtered or unexported fields
}

PasswordSelect is the builder for selecting fields of Password entities.

func (*PasswordSelect) Aggregate

func (ps *PasswordSelect) Aggregate(fns ...AggregateFunc) *PasswordSelect

Aggregate adds the given aggregation functions to the selector query.

func (*PasswordSelect) Bool

func (s *PasswordSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PasswordSelect) BoolX

func (s *PasswordSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PasswordSelect) Bools

func (s *PasswordSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PasswordSelect) BoolsX

func (s *PasswordSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PasswordSelect) Float64

func (s *PasswordSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PasswordSelect) Float64X

func (s *PasswordSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PasswordSelect) Float64s

func (s *PasswordSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PasswordSelect) Float64sX

func (s *PasswordSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PasswordSelect) Int

func (s *PasswordSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PasswordSelect) IntX

func (s *PasswordSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PasswordSelect) Ints

func (s *PasswordSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PasswordSelect) IntsX

func (s *PasswordSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PasswordSelect) Scan

func (ps *PasswordSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PasswordSelect) ScanX

func (s *PasswordSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PasswordSelect) String

func (s *PasswordSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PasswordSelect) StringX

func (s *PasswordSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PasswordSelect) Strings

func (s *PasswordSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PasswordSelect) StringsX

func (s *PasswordSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PasswordUpdate

type PasswordUpdate struct {
	// contains filtered or unexported fields
}

PasswordUpdate is the builder for updating Password entities.

func (*PasswordUpdate) Exec

func (pu *PasswordUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PasswordUpdate) ExecX

func (pu *PasswordUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PasswordUpdate) Mutation

func (pu *PasswordUpdate) Mutation() *PasswordMutation

Mutation returns the PasswordMutation object of the builder.

func (*PasswordUpdate) Save

func (pu *PasswordUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PasswordUpdate) SaveX

func (pu *PasswordUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PasswordUpdate) SetEmail

func (pu *PasswordUpdate) SetEmail(s string) *PasswordUpdate

SetEmail sets the "email" field.

func (*PasswordUpdate) SetHash

func (pu *PasswordUpdate) SetHash(b []byte) *PasswordUpdate

SetHash sets the "hash" field.

func (*PasswordUpdate) SetUserID

func (pu *PasswordUpdate) SetUserID(s string) *PasswordUpdate

SetUserID sets the "user_id" field.

func (*PasswordUpdate) SetUsername

func (pu *PasswordUpdate) SetUsername(s string) *PasswordUpdate

SetUsername sets the "username" field.

func (*PasswordUpdate) Where

func (pu *PasswordUpdate) Where(ps ...predicate.Password) *PasswordUpdate

Where appends a list predicates to the PasswordUpdate builder.

type PasswordUpdateOne

type PasswordUpdateOne struct {
	// contains filtered or unexported fields
}

PasswordUpdateOne is the builder for updating a single Password entity.

func (*PasswordUpdateOne) Exec

func (puo *PasswordUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PasswordUpdateOne) ExecX

func (puo *PasswordUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PasswordUpdateOne) Mutation

func (puo *PasswordUpdateOne) Mutation() *PasswordMutation

Mutation returns the PasswordMutation object of the builder.

func (*PasswordUpdateOne) Save

func (puo *PasswordUpdateOne) Save(ctx context.Context) (*Password, error)

Save executes the query and returns the updated Password entity.

func (*PasswordUpdateOne) SaveX

func (puo *PasswordUpdateOne) SaveX(ctx context.Context) *Password

SaveX is like Save, but panics if an error occurs.

func (*PasswordUpdateOne) Select

func (puo *PasswordUpdateOne) Select(field string, fields ...string) *PasswordUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PasswordUpdateOne) SetEmail

func (puo *PasswordUpdateOne) SetEmail(s string) *PasswordUpdateOne

SetEmail sets the "email" field.

func (*PasswordUpdateOne) SetHash

func (puo *PasswordUpdateOne) SetHash(b []byte) *PasswordUpdateOne

SetHash sets the "hash" field.

func (*PasswordUpdateOne) SetUserID

func (puo *PasswordUpdateOne) SetUserID(s string) *PasswordUpdateOne

SetUserID sets the "user_id" field.

func (*PasswordUpdateOne) SetUsername

func (puo *PasswordUpdateOne) SetUsername(s string) *PasswordUpdateOne

SetUsername sets the "username" field.

func (*PasswordUpdateOne) Where

Where appends a list predicates to the PasswordUpdate builder.

type Passwords

type Passwords []*Password

Passwords is a parsable slice of Password.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Querier

type Querier = ent.Querier

ent aliases to avoid import conflicts in user's code.

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

ent aliases to avoid import conflicts in user's code.

type QueryContext

type QueryContext = ent.QueryContext

ent aliases to avoid import conflicts in user's code.

type RefreshToken

type RefreshToken struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// ClientID holds the value of the "client_id" field.
	ClientID string `json:"client_id,omitempty"`
	// Scopes holds the value of the "scopes" field.
	Scopes []string `json:"scopes,omitempty"`
	// Nonce holds the value of the "nonce" field.
	Nonce string `json:"nonce,omitempty"`
	// ClaimsUserID holds the value of the "claims_user_id" field.
	ClaimsUserID string `json:"claims_user_id,omitempty"`
	// ClaimsUsername holds the value of the "claims_username" field.
	ClaimsUsername string `json:"claims_username,omitempty"`
	// ClaimsEmail holds the value of the "claims_email" field.
	ClaimsEmail string `json:"claims_email,omitempty"`
	// ClaimsEmailVerified holds the value of the "claims_email_verified" field.
	ClaimsEmailVerified bool `json:"claims_email_verified,omitempty"`
	// ClaimsGroups holds the value of the "claims_groups" field.
	ClaimsGroups []string `json:"claims_groups,omitempty"`
	// ClaimsPreferredUsername holds the value of the "claims_preferred_username" field.
	ClaimsPreferredUsername string `json:"claims_preferred_username,omitempty"`
	// ConnectorID holds the value of the "connector_id" field.
	ConnectorID string `json:"connector_id,omitempty"`
	// ConnectorData holds the value of the "connector_data" field.
	ConnectorData *[]byte `json:"connector_data,omitempty"`
	// Token holds the value of the "token" field.
	Token string `json:"token,omitempty"`
	// ObsoleteToken holds the value of the "obsolete_token" field.
	ObsoleteToken string `json:"obsolete_token,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// LastUsed holds the value of the "last_used" field.
	LastUsed time.Time `json:"last_used,omitempty"`
	// contains filtered or unexported fields
}

RefreshToken is the model entity for the RefreshToken schema.

func (*RefreshToken) String

func (rt *RefreshToken) String() string

String implements the fmt.Stringer.

func (*RefreshToken) Unwrap

func (rt *RefreshToken) Unwrap() *RefreshToken

Unwrap unwraps the RefreshToken entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*RefreshToken) Update

func (rt *RefreshToken) Update() *RefreshTokenUpdateOne

Update returns a builder for updating this RefreshToken. Note that you need to call RefreshToken.Unwrap() before calling this method if this RefreshToken was returned from a transaction, and the transaction was committed or rolled back.

type RefreshTokenClient

type RefreshTokenClient struct {
	// contains filtered or unexported fields
}

RefreshTokenClient is a client for the RefreshToken schema.

func NewRefreshTokenClient

func NewRefreshTokenClient(c config) *RefreshTokenClient

NewRefreshTokenClient returns a client for the RefreshToken from the given config.

func (*RefreshTokenClient) Create

Create returns a builder for creating a RefreshToken entity.

func (*RefreshTokenClient) CreateBulk

func (c *RefreshTokenClient) CreateBulk(builders ...*RefreshTokenCreate) *RefreshTokenCreateBulk

CreateBulk returns a builder for creating a bulk of RefreshToken entities.

func (*RefreshTokenClient) Delete

Delete returns a delete builder for RefreshToken.

func (*RefreshTokenClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*RefreshTokenClient) DeleteOneID

func (c *RefreshTokenClient) DeleteOneID(id string) *RefreshTokenDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*RefreshTokenClient) Get

Get returns a RefreshToken entity by its id.

func (*RefreshTokenClient) GetX

GetX is like Get, but panics if an error occurs.

func (*RefreshTokenClient) Hooks

func (c *RefreshTokenClient) Hooks() []Hook

Hooks returns the client hooks.

func (*RefreshTokenClient) Intercept

func (c *RefreshTokenClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `refreshtoken.Intercept(f(g(h())))`.

func (*RefreshTokenClient) Interceptors

func (c *RefreshTokenClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*RefreshTokenClient) Query

Query returns a query builder for RefreshToken.

func (*RefreshTokenClient) Update

Update returns an update builder for RefreshToken.

func (*RefreshTokenClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*RefreshTokenClient) UpdateOneID

func (c *RefreshTokenClient) UpdateOneID(id string) *RefreshTokenUpdateOne

UpdateOneID returns an update builder for the given id.

func (*RefreshTokenClient) Use

func (c *RefreshTokenClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `refreshtoken.Hooks(f(g(h())))`.

type RefreshTokenCreate

type RefreshTokenCreate struct {
	// contains filtered or unexported fields
}

RefreshTokenCreate is the builder for creating a RefreshToken entity.

func (*RefreshTokenCreate) Exec

func (rtc *RefreshTokenCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*RefreshTokenCreate) ExecX

func (rtc *RefreshTokenCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RefreshTokenCreate) Mutation

func (rtc *RefreshTokenCreate) Mutation() *RefreshTokenMutation

Mutation returns the RefreshTokenMutation object of the builder.

func (*RefreshTokenCreate) Save

Save creates the RefreshToken in the database.

func (*RefreshTokenCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*RefreshTokenCreate) SetClaimsEmail

func (rtc *RefreshTokenCreate) SetClaimsEmail(s string) *RefreshTokenCreate

SetClaimsEmail sets the "claims_email" field.

func (*RefreshTokenCreate) SetClaimsEmailVerified

func (rtc *RefreshTokenCreate) SetClaimsEmailVerified(b bool) *RefreshTokenCreate

SetClaimsEmailVerified sets the "claims_email_verified" field.

func (*RefreshTokenCreate) SetClaimsGroups

func (rtc *RefreshTokenCreate) SetClaimsGroups(s []string) *RefreshTokenCreate

SetClaimsGroups sets the "claims_groups" field.

func (*RefreshTokenCreate) SetClaimsPreferredUsername

func (rtc *RefreshTokenCreate) SetClaimsPreferredUsername(s string) *RefreshTokenCreate

SetClaimsPreferredUsername sets the "claims_preferred_username" field.

func (*RefreshTokenCreate) SetClaimsUserID

func (rtc *RefreshTokenCreate) SetClaimsUserID(s string) *RefreshTokenCreate

SetClaimsUserID sets the "claims_user_id" field.

func (*RefreshTokenCreate) SetClaimsUsername

func (rtc *RefreshTokenCreate) SetClaimsUsername(s string) *RefreshTokenCreate

SetClaimsUsername sets the "claims_username" field.

func (*RefreshTokenCreate) SetClientID

func (rtc *RefreshTokenCreate) SetClientID(s string) *RefreshTokenCreate

SetClientID sets the "client_id" field.

func (*RefreshTokenCreate) SetConnectorData

func (rtc *RefreshTokenCreate) SetConnectorData(b []byte) *RefreshTokenCreate

SetConnectorData sets the "connector_data" field.

func (*RefreshTokenCreate) SetConnectorID

func (rtc *RefreshTokenCreate) SetConnectorID(s string) *RefreshTokenCreate

SetConnectorID sets the "connector_id" field.

func (*RefreshTokenCreate) SetCreatedAt

func (rtc *RefreshTokenCreate) SetCreatedAt(t time.Time) *RefreshTokenCreate

SetCreatedAt sets the "created_at" field.

func (*RefreshTokenCreate) SetID

SetID sets the "id" field.

func (*RefreshTokenCreate) SetLastUsed

func (rtc *RefreshTokenCreate) SetLastUsed(t time.Time) *RefreshTokenCreate

SetLastUsed sets the "last_used" field.

func (*RefreshTokenCreate) SetNillableClaimsPreferredUsername

func (rtc *RefreshTokenCreate) SetNillableClaimsPreferredUsername(s *string) *RefreshTokenCreate

SetNillableClaimsPreferredUsername sets the "claims_preferred_username" field if the given value is not nil.

func (*RefreshTokenCreate) SetNillableCreatedAt

func (rtc *RefreshTokenCreate) SetNillableCreatedAt(t *time.Time) *RefreshTokenCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*RefreshTokenCreate) SetNillableLastUsed

func (rtc *RefreshTokenCreate) SetNillableLastUsed(t *time.Time) *RefreshTokenCreate

SetNillableLastUsed sets the "last_used" field if the given value is not nil.

func (*RefreshTokenCreate) SetNillableObsoleteToken

func (rtc *RefreshTokenCreate) SetNillableObsoleteToken(s *string) *RefreshTokenCreate

SetNillableObsoleteToken sets the "obsolete_token" field if the given value is not nil.

func (*RefreshTokenCreate) SetNillableToken

func (rtc *RefreshTokenCreate) SetNillableToken(s *string) *RefreshTokenCreate

SetNillableToken sets the "token" field if the given value is not nil.

func (*RefreshTokenCreate) SetNonce

func (rtc *RefreshTokenCreate) SetNonce(s string) *RefreshTokenCreate

SetNonce sets the "nonce" field.

func (*RefreshTokenCreate) SetObsoleteToken

func (rtc *RefreshTokenCreate) SetObsoleteToken(s string) *RefreshTokenCreate

SetObsoleteToken sets the "obsolete_token" field.

func (*RefreshTokenCreate) SetScopes

func (rtc *RefreshTokenCreate) SetScopes(s []string) *RefreshTokenCreate

SetScopes sets the "scopes" field.

func (*RefreshTokenCreate) SetToken

func (rtc *RefreshTokenCreate) SetToken(s string) *RefreshTokenCreate

SetToken sets the "token" field.

type RefreshTokenCreateBulk

type RefreshTokenCreateBulk struct {
	// contains filtered or unexported fields
}

RefreshTokenCreateBulk is the builder for creating many RefreshToken entities in bulk.

func (*RefreshTokenCreateBulk) Exec

func (rtcb *RefreshTokenCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*RefreshTokenCreateBulk) ExecX

func (rtcb *RefreshTokenCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RefreshTokenCreateBulk) Save

Save creates the RefreshToken entities in the database.

func (*RefreshTokenCreateBulk) SaveX

func (rtcb *RefreshTokenCreateBulk) SaveX(ctx context.Context) []*RefreshToken

SaveX is like Save, but panics if an error occurs.

type RefreshTokenDelete

type RefreshTokenDelete struct {
	// contains filtered or unexported fields
}

RefreshTokenDelete is the builder for deleting a RefreshToken entity.

func (*RefreshTokenDelete) Exec

func (rtd *RefreshTokenDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*RefreshTokenDelete) ExecX

func (rtd *RefreshTokenDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*RefreshTokenDelete) Where

Where appends a list predicates to the RefreshTokenDelete builder.

type RefreshTokenDeleteOne

type RefreshTokenDeleteOne struct {
	// contains filtered or unexported fields
}

RefreshTokenDeleteOne is the builder for deleting a single RefreshToken entity.

func (*RefreshTokenDeleteOne) Exec

func (rtdo *RefreshTokenDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*RefreshTokenDeleteOne) ExecX

func (rtdo *RefreshTokenDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RefreshTokenDeleteOne) Where

Where appends a list predicates to the RefreshTokenDelete builder.

type RefreshTokenGroupBy

type RefreshTokenGroupBy struct {
	// contains filtered or unexported fields
}

RefreshTokenGroupBy is the group-by builder for RefreshToken entities.

func (*RefreshTokenGroupBy) Aggregate

func (rtgb *RefreshTokenGroupBy) Aggregate(fns ...AggregateFunc) *RefreshTokenGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*RefreshTokenGroupBy) Bool

func (s *RefreshTokenGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RefreshTokenGroupBy) BoolX

func (s *RefreshTokenGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RefreshTokenGroupBy) Bools

func (s *RefreshTokenGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RefreshTokenGroupBy) BoolsX

func (s *RefreshTokenGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RefreshTokenGroupBy) Float64

func (s *RefreshTokenGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RefreshTokenGroupBy) Float64X

func (s *RefreshTokenGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RefreshTokenGroupBy) Float64s

func (s *RefreshTokenGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RefreshTokenGroupBy) Float64sX

func (s *RefreshTokenGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RefreshTokenGroupBy) Int

func (s *RefreshTokenGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RefreshTokenGroupBy) IntX

func (s *RefreshTokenGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RefreshTokenGroupBy) Ints

func (s *RefreshTokenGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RefreshTokenGroupBy) IntsX

func (s *RefreshTokenGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RefreshTokenGroupBy) Scan

func (rtgb *RefreshTokenGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RefreshTokenGroupBy) ScanX

func (s *RefreshTokenGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RefreshTokenGroupBy) String

func (s *RefreshTokenGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RefreshTokenGroupBy) StringX

func (s *RefreshTokenGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RefreshTokenGroupBy) Strings

func (s *RefreshTokenGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RefreshTokenGroupBy) StringsX

func (s *RefreshTokenGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RefreshTokenMutation

type RefreshTokenMutation struct {
	// contains filtered or unexported fields
}

RefreshTokenMutation represents an operation that mutates the RefreshToken nodes in the graph.

func (*RefreshTokenMutation) AddField

func (m *RefreshTokenMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*RefreshTokenMutation) AddedEdges

func (m *RefreshTokenMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*RefreshTokenMutation) AddedField

func (m *RefreshTokenMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*RefreshTokenMutation) AddedFields

func (m *RefreshTokenMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*RefreshTokenMutation) AddedIDs

func (m *RefreshTokenMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*RefreshTokenMutation) AppendClaimsGroups

func (m *RefreshTokenMutation) AppendClaimsGroups(s []string)

AppendClaimsGroups adds s to the "claims_groups" field.

func (*RefreshTokenMutation) AppendScopes

func (m *RefreshTokenMutation) AppendScopes(s []string)

AppendScopes adds s to the "scopes" field.

func (*RefreshTokenMutation) AppendedClaimsGroups

func (m *RefreshTokenMutation) AppendedClaimsGroups() ([]string, bool)

AppendedClaimsGroups returns the list of values that were appended to the "claims_groups" field in this mutation.

func (*RefreshTokenMutation) AppendedScopes

func (m *RefreshTokenMutation) AppendedScopes() ([]string, bool)

AppendedScopes returns the list of values that were appended to the "scopes" field in this mutation.

func (*RefreshTokenMutation) ClaimsEmail

func (m *RefreshTokenMutation) ClaimsEmail() (r string, exists bool)

ClaimsEmail returns the value of the "claims_email" field in the mutation.

func (*RefreshTokenMutation) ClaimsEmailVerified

func (m *RefreshTokenMutation) ClaimsEmailVerified() (r bool, exists bool)

ClaimsEmailVerified returns the value of the "claims_email_verified" field in the mutation.

func (*RefreshTokenMutation) ClaimsGroups

func (m *RefreshTokenMutation) ClaimsGroups() (r []string, exists bool)

ClaimsGroups returns the value of the "claims_groups" field in the mutation.

func (*RefreshTokenMutation) ClaimsGroupsCleared

func (m *RefreshTokenMutation) ClaimsGroupsCleared() bool

ClaimsGroupsCleared returns if the "claims_groups" field was cleared in this mutation.

func (*RefreshTokenMutation) ClaimsPreferredUsername

func (m *RefreshTokenMutation) ClaimsPreferredUsername() (r string, exists bool)

ClaimsPreferredUsername returns the value of the "claims_preferred_username" field in the mutation.

func (*RefreshTokenMutation) ClaimsUserID

func (m *RefreshTokenMutation) ClaimsUserID() (r string, exists bool)

ClaimsUserID returns the value of the "claims_user_id" field in the mutation.

func (*RefreshTokenMutation) ClaimsUsername

func (m *RefreshTokenMutation) ClaimsUsername() (r string, exists bool)

ClaimsUsername returns the value of the "claims_username" field in the mutation.

func (*RefreshTokenMutation) ClearClaimsGroups

func (m *RefreshTokenMutation) ClearClaimsGroups()

ClearClaimsGroups clears the value of the "claims_groups" field.

func (*RefreshTokenMutation) ClearConnectorData

func (m *RefreshTokenMutation) ClearConnectorData()

ClearConnectorData clears the value of the "connector_data" field.

func (*RefreshTokenMutation) ClearEdge

func (m *RefreshTokenMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*RefreshTokenMutation) ClearField

func (m *RefreshTokenMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*RefreshTokenMutation) ClearScopes

func (m *RefreshTokenMutation) ClearScopes()

ClearScopes clears the value of the "scopes" field.

func (*RefreshTokenMutation) ClearedEdges

func (m *RefreshTokenMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*RefreshTokenMutation) ClearedFields

func (m *RefreshTokenMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (RefreshTokenMutation) Client

func (m RefreshTokenMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*RefreshTokenMutation) ClientID

func (m *RefreshTokenMutation) ClientID() (r string, exists bool)

ClientID returns the value of the "client_id" field in the mutation.

func (*RefreshTokenMutation) ConnectorData

func (m *RefreshTokenMutation) ConnectorData() (r []byte, exists bool)

ConnectorData returns the value of the "connector_data" field in the mutation.

func (*RefreshTokenMutation) ConnectorDataCleared

func (m *RefreshTokenMutation) ConnectorDataCleared() bool

ConnectorDataCleared returns if the "connector_data" field was cleared in this mutation.

func (*RefreshTokenMutation) ConnectorID

func (m *RefreshTokenMutation) ConnectorID() (r string, exists bool)

ConnectorID returns the value of the "connector_id" field in the mutation.

func (*RefreshTokenMutation) CreatedAt

func (m *RefreshTokenMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*RefreshTokenMutation) EdgeCleared

func (m *RefreshTokenMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*RefreshTokenMutation) Field

func (m *RefreshTokenMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*RefreshTokenMutation) FieldCleared

func (m *RefreshTokenMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*RefreshTokenMutation) Fields

func (m *RefreshTokenMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*RefreshTokenMutation) ID

func (m *RefreshTokenMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*RefreshTokenMutation) IDs

func (m *RefreshTokenMutation) IDs(ctx context.Context) ([]string, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*RefreshTokenMutation) LastUsed

func (m *RefreshTokenMutation) LastUsed() (r time.Time, exists bool)

LastUsed returns the value of the "last_used" field in the mutation.

func (*RefreshTokenMutation) Nonce

func (m *RefreshTokenMutation) Nonce() (r string, exists bool)

Nonce returns the value of the "nonce" field in the mutation.

func (*RefreshTokenMutation) ObsoleteToken

func (m *RefreshTokenMutation) ObsoleteToken() (r string, exists bool)

ObsoleteToken returns the value of the "obsolete_token" field in the mutation.

func (*RefreshTokenMutation) OldClaimsEmail

func (m *RefreshTokenMutation) OldClaimsEmail(ctx context.Context) (v string, err error)

OldClaimsEmail returns the old "claims_email" field's value of the RefreshToken entity. If the RefreshToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RefreshTokenMutation) OldClaimsEmailVerified

func (m *RefreshTokenMutation) OldClaimsEmailVerified(ctx context.Context) (v bool, err error)

OldClaimsEmailVerified returns the old "claims_email_verified" field's value of the RefreshToken entity. If the RefreshToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RefreshTokenMutation) OldClaimsGroups

func (m *RefreshTokenMutation) OldClaimsGroups(ctx context.Context) (v []string, err error)

OldClaimsGroups returns the old "claims_groups" field's value of the RefreshToken entity. If the RefreshToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RefreshTokenMutation) OldClaimsPreferredUsername

func (m *RefreshTokenMutation) OldClaimsPreferredUsername(ctx context.Context) (v string, err error)

OldClaimsPreferredUsername returns the old "claims_preferred_username" field's value of the RefreshToken entity. If the RefreshToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RefreshTokenMutation) OldClaimsUserID

func (m *RefreshTokenMutation) OldClaimsUserID(ctx context.Context) (v string, err error)

OldClaimsUserID returns the old "claims_user_id" field's value of the RefreshToken entity. If the RefreshToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RefreshTokenMutation) OldClaimsUsername

func (m *RefreshTokenMutation) OldClaimsUsername(ctx context.Context) (v string, err error)

OldClaimsUsername returns the old "claims_username" field's value of the RefreshToken entity. If the RefreshToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RefreshTokenMutation) OldClientID

func (m *RefreshTokenMutation) OldClientID(ctx context.Context) (v string, err error)

OldClientID returns the old "client_id" field's value of the RefreshToken entity. If the RefreshToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RefreshTokenMutation) OldConnectorData

func (m *RefreshTokenMutation) OldConnectorData(ctx context.Context) (v *[]byte, err error)

OldConnectorData returns the old "connector_data" field's value of the RefreshToken entity. If the RefreshToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RefreshTokenMutation) OldConnectorID

func (m *RefreshTokenMutation) OldConnectorID(ctx context.Context) (v string, err error)

OldConnectorID returns the old "connector_id" field's value of the RefreshToken entity. If the RefreshToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RefreshTokenMutation) OldCreatedAt

func (m *RefreshTokenMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the RefreshToken entity. If the RefreshToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RefreshTokenMutation) OldField

func (m *RefreshTokenMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*RefreshTokenMutation) OldLastUsed

func (m *RefreshTokenMutation) OldLastUsed(ctx context.Context) (v time.Time, err error)

OldLastUsed returns the old "last_used" field's value of the RefreshToken entity. If the RefreshToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RefreshTokenMutation) OldNonce

func (m *RefreshTokenMutation) OldNonce(ctx context.Context) (v string, err error)

OldNonce returns the old "nonce" field's value of the RefreshToken entity. If the RefreshToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RefreshTokenMutation) OldObsoleteToken

func (m *RefreshTokenMutation) OldObsoleteToken(ctx context.Context) (v string, err error)

OldObsoleteToken returns the old "obsolete_token" field's value of the RefreshToken entity. If the RefreshToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RefreshTokenMutation) OldScopes

func (m *RefreshTokenMutation) OldScopes(ctx context.Context) (v []string, err error)

OldScopes returns the old "scopes" field's value of the RefreshToken entity. If the RefreshToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RefreshTokenMutation) OldToken

func (m *RefreshTokenMutation) OldToken(ctx context.Context) (v string, err error)

OldToken returns the old "token" field's value of the RefreshToken entity. If the RefreshToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RefreshTokenMutation) Op

func (m *RefreshTokenMutation) Op() Op

Op returns the operation name.

func (*RefreshTokenMutation) RemovedEdges

func (m *RefreshTokenMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*RefreshTokenMutation) RemovedIDs

func (m *RefreshTokenMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*RefreshTokenMutation) ResetClaimsEmail

func (m *RefreshTokenMutation) ResetClaimsEmail()

ResetClaimsEmail resets all changes to the "claims_email" field.

func (*RefreshTokenMutation) ResetClaimsEmailVerified

func (m *RefreshTokenMutation) ResetClaimsEmailVerified()

ResetClaimsEmailVerified resets all changes to the "claims_email_verified" field.

func (*RefreshTokenMutation) ResetClaimsGroups

func (m *RefreshTokenMutation) ResetClaimsGroups()

ResetClaimsGroups resets all changes to the "claims_groups" field.

func (*RefreshTokenMutation) ResetClaimsPreferredUsername

func (m *RefreshTokenMutation) ResetClaimsPreferredUsername()

ResetClaimsPreferredUsername resets all changes to the "claims_preferred_username" field.

func (*RefreshTokenMutation) ResetClaimsUserID

func (m *RefreshTokenMutation) ResetClaimsUserID()

ResetClaimsUserID resets all changes to the "claims_user_id" field.

func (*RefreshTokenMutation) ResetClaimsUsername

func (m *RefreshTokenMutation) ResetClaimsUsername()

ResetClaimsUsername resets all changes to the "claims_username" field.

func (*RefreshTokenMutation) ResetClientID

func (m *RefreshTokenMutation) ResetClientID()

ResetClientID resets all changes to the "client_id" field.

func (*RefreshTokenMutation) ResetConnectorData

func (m *RefreshTokenMutation) ResetConnectorData()

ResetConnectorData resets all changes to the "connector_data" field.

func (*RefreshTokenMutation) ResetConnectorID

func (m *RefreshTokenMutation) ResetConnectorID()

ResetConnectorID resets all changes to the "connector_id" field.

func (*RefreshTokenMutation) ResetCreatedAt

func (m *RefreshTokenMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*RefreshTokenMutation) ResetEdge

func (m *RefreshTokenMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*RefreshTokenMutation) ResetField

func (m *RefreshTokenMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*RefreshTokenMutation) ResetLastUsed

func (m *RefreshTokenMutation) ResetLastUsed()

ResetLastUsed resets all changes to the "last_used" field.

func (*RefreshTokenMutation) ResetNonce

func (m *RefreshTokenMutation) ResetNonce()

ResetNonce resets all changes to the "nonce" field.

func (*RefreshTokenMutation) ResetObsoleteToken

func (m *RefreshTokenMutation) ResetObsoleteToken()

ResetObsoleteToken resets all changes to the "obsolete_token" field.

func (*RefreshTokenMutation) ResetScopes

func (m *RefreshTokenMutation) ResetScopes()

ResetScopes resets all changes to the "scopes" field.

func (*RefreshTokenMutation) ResetToken

func (m *RefreshTokenMutation) ResetToken()

ResetToken resets all changes to the "token" field.

func (*RefreshTokenMutation) Scopes

func (m *RefreshTokenMutation) Scopes() (r []string, exists bool)

Scopes returns the value of the "scopes" field in the mutation.

func (*RefreshTokenMutation) ScopesCleared

func (m *RefreshTokenMutation) ScopesCleared() bool

ScopesCleared returns if the "scopes" field was cleared in this mutation.

func (*RefreshTokenMutation) SetClaimsEmail

func (m *RefreshTokenMutation) SetClaimsEmail(s string)

SetClaimsEmail sets the "claims_email" field.

func (*RefreshTokenMutation) SetClaimsEmailVerified

func (m *RefreshTokenMutation) SetClaimsEmailVerified(b bool)

SetClaimsEmailVerified sets the "claims_email_verified" field.

func (*RefreshTokenMutation) SetClaimsGroups

func (m *RefreshTokenMutation) SetClaimsGroups(s []string)

SetClaimsGroups sets the "claims_groups" field.

func (*RefreshTokenMutation) SetClaimsPreferredUsername

func (m *RefreshTokenMutation) SetClaimsPreferredUsername(s string)

SetClaimsPreferredUsername sets the "claims_preferred_username" field.

func (*RefreshTokenMutation) SetClaimsUserID

func (m *RefreshTokenMutation) SetClaimsUserID(s string)

SetClaimsUserID sets the "claims_user_id" field.

func (*RefreshTokenMutation) SetClaimsUsername

func (m *RefreshTokenMutation) SetClaimsUsername(s string)

SetClaimsUsername sets the "claims_username" field.

func (*RefreshTokenMutation) SetClientID

func (m *RefreshTokenMutation) SetClientID(s string)

SetClientID sets the "client_id" field.

func (*RefreshTokenMutation) SetConnectorData

func (m *RefreshTokenMutation) SetConnectorData(b []byte)

SetConnectorData sets the "connector_data" field.

func (*RefreshTokenMutation) SetConnectorID

func (m *RefreshTokenMutation) SetConnectorID(s string)

SetConnectorID sets the "connector_id" field.

func (*RefreshTokenMutation) SetCreatedAt

func (m *RefreshTokenMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*RefreshTokenMutation) SetField

func (m *RefreshTokenMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*RefreshTokenMutation) SetID

func (m *RefreshTokenMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of RefreshToken entities.

func (*RefreshTokenMutation) SetLastUsed

func (m *RefreshTokenMutation) SetLastUsed(t time.Time)

SetLastUsed sets the "last_used" field.

func (*RefreshTokenMutation) SetNonce

func (m *RefreshTokenMutation) SetNonce(s string)

SetNonce sets the "nonce" field.

func (*RefreshTokenMutation) SetObsoleteToken

func (m *RefreshTokenMutation) SetObsoleteToken(s string)

SetObsoleteToken sets the "obsolete_token" field.

func (*RefreshTokenMutation) SetOp

func (m *RefreshTokenMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*RefreshTokenMutation) SetScopes

func (m *RefreshTokenMutation) SetScopes(s []string)

SetScopes sets the "scopes" field.

func (*RefreshTokenMutation) SetToken

func (m *RefreshTokenMutation) SetToken(s string)

SetToken sets the "token" field.

func (*RefreshTokenMutation) Token

func (m *RefreshTokenMutation) Token() (r string, exists bool)

Token returns the value of the "token" field in the mutation.

func (RefreshTokenMutation) Tx

func (m RefreshTokenMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*RefreshTokenMutation) Type

func (m *RefreshTokenMutation) Type() string

Type returns the node type of this mutation (RefreshToken).

func (*RefreshTokenMutation) Where

Where appends a list predicates to the RefreshTokenMutation builder.

func (*RefreshTokenMutation) WhereP

func (m *RefreshTokenMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the RefreshTokenMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type RefreshTokenQuery

type RefreshTokenQuery struct {
	// contains filtered or unexported fields
}

RefreshTokenQuery is the builder for querying RefreshToken entities.

func (*RefreshTokenQuery) Aggregate

func (rtq *RefreshTokenQuery) Aggregate(fns ...AggregateFunc) *RefreshTokenSelect

Aggregate returns a RefreshTokenSelect configured with the given aggregations.

func (*RefreshTokenQuery) All

func (rtq *RefreshTokenQuery) All(ctx context.Context) ([]*RefreshToken, error)

All executes the query and returns a list of RefreshTokens.

func (*RefreshTokenQuery) AllX

func (rtq *RefreshTokenQuery) AllX(ctx context.Context) []*RefreshToken

AllX is like All, but panics if an error occurs.

func (*RefreshTokenQuery) Clone

func (rtq *RefreshTokenQuery) Clone() *RefreshTokenQuery

Clone returns a duplicate of the RefreshTokenQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*RefreshTokenQuery) Count

func (rtq *RefreshTokenQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*RefreshTokenQuery) CountX

func (rtq *RefreshTokenQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*RefreshTokenQuery) Exist

func (rtq *RefreshTokenQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*RefreshTokenQuery) ExistX

func (rtq *RefreshTokenQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*RefreshTokenQuery) First

func (rtq *RefreshTokenQuery) First(ctx context.Context) (*RefreshToken, error)

First returns the first RefreshToken entity from the query. Returns a *NotFoundError when no RefreshToken was found.

func (*RefreshTokenQuery) FirstID

func (rtq *RefreshTokenQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first RefreshToken ID from the query. Returns a *NotFoundError when no RefreshToken ID was found.

func (*RefreshTokenQuery) FirstIDX

func (rtq *RefreshTokenQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*RefreshTokenQuery) FirstX

func (rtq *RefreshTokenQuery) FirstX(ctx context.Context) *RefreshToken

FirstX is like First, but panics if an error occurs.

func (*RefreshTokenQuery) GroupBy

func (rtq *RefreshTokenQuery) GroupBy(field string, fields ...string) *RefreshTokenGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	ClientID string `json:"client_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.RefreshToken.Query().
	GroupBy(refreshtoken.FieldClientID).
	Aggregate(db.Count()).
	Scan(ctx, &v)

func (*RefreshTokenQuery) IDs

func (rtq *RefreshTokenQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of RefreshToken IDs.

func (*RefreshTokenQuery) IDsX

func (rtq *RefreshTokenQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*RefreshTokenQuery) Limit

func (rtq *RefreshTokenQuery) Limit(limit int) *RefreshTokenQuery

Limit the number of records to be returned by this query.

func (*RefreshTokenQuery) Offset

func (rtq *RefreshTokenQuery) Offset(offset int) *RefreshTokenQuery

Offset to start from.

func (*RefreshTokenQuery) Only

func (rtq *RefreshTokenQuery) Only(ctx context.Context) (*RefreshToken, error)

Only returns a single RefreshToken entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one RefreshToken entity is found. Returns a *NotFoundError when no RefreshToken entities are found.

func (*RefreshTokenQuery) OnlyID

func (rtq *RefreshTokenQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only RefreshToken ID in the query. Returns a *NotSingularError when more than one RefreshToken ID is found. Returns a *NotFoundError when no entities are found.

func (*RefreshTokenQuery) OnlyIDX

func (rtq *RefreshTokenQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*RefreshTokenQuery) OnlyX

func (rtq *RefreshTokenQuery) OnlyX(ctx context.Context) *RefreshToken

OnlyX is like Only, but panics if an error occurs.

func (*RefreshTokenQuery) Order

func (rtq *RefreshTokenQuery) Order(o ...OrderFunc) *RefreshTokenQuery

Order specifies how the records should be ordered.

func (*RefreshTokenQuery) Select

func (rtq *RefreshTokenQuery) Select(fields ...string) *RefreshTokenSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	ClientID string `json:"client_id,omitempty"`
}

client.RefreshToken.Query().
	Select(refreshtoken.FieldClientID).
	Scan(ctx, &v)

func (*RefreshTokenQuery) Unique

func (rtq *RefreshTokenQuery) Unique(unique bool) *RefreshTokenQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*RefreshTokenQuery) Where

Where adds a new predicate for the RefreshTokenQuery builder.

type RefreshTokenSelect

type RefreshTokenSelect struct {
	*RefreshTokenQuery
	// contains filtered or unexported fields
}

RefreshTokenSelect is the builder for selecting fields of RefreshToken entities.

func (*RefreshTokenSelect) Aggregate

func (rts *RefreshTokenSelect) Aggregate(fns ...AggregateFunc) *RefreshTokenSelect

Aggregate adds the given aggregation functions to the selector query.

func (*RefreshTokenSelect) Bool

func (s *RefreshTokenSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RefreshTokenSelect) BoolX

func (s *RefreshTokenSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RefreshTokenSelect) Bools

func (s *RefreshTokenSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RefreshTokenSelect) BoolsX

func (s *RefreshTokenSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RefreshTokenSelect) Float64

func (s *RefreshTokenSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RefreshTokenSelect) Float64X

func (s *RefreshTokenSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RefreshTokenSelect) Float64s

func (s *RefreshTokenSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RefreshTokenSelect) Float64sX

func (s *RefreshTokenSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RefreshTokenSelect) Int

func (s *RefreshTokenSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RefreshTokenSelect) IntX

func (s *RefreshTokenSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RefreshTokenSelect) Ints

func (s *RefreshTokenSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RefreshTokenSelect) IntsX

func (s *RefreshTokenSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RefreshTokenSelect) Scan

func (rts *RefreshTokenSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RefreshTokenSelect) ScanX

func (s *RefreshTokenSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RefreshTokenSelect) String

func (s *RefreshTokenSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RefreshTokenSelect) StringX

func (s *RefreshTokenSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RefreshTokenSelect) Strings

func (s *RefreshTokenSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RefreshTokenSelect) StringsX

func (s *RefreshTokenSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RefreshTokenUpdate

type RefreshTokenUpdate struct {
	// contains filtered or unexported fields
}

RefreshTokenUpdate is the builder for updating RefreshToken entities.

func (*RefreshTokenUpdate) AppendClaimsGroups

func (rtu *RefreshTokenUpdate) AppendClaimsGroups(s []string) *RefreshTokenUpdate

AppendClaimsGroups appends s to the "claims_groups" field.

func (*RefreshTokenUpdate) AppendScopes

func (rtu *RefreshTokenUpdate) AppendScopes(s []string) *RefreshTokenUpdate

AppendScopes appends s to the "scopes" field.

func (*RefreshTokenUpdate) ClearClaimsGroups

func (rtu *RefreshTokenUpdate) ClearClaimsGroups() *RefreshTokenUpdate

ClearClaimsGroups clears the value of the "claims_groups" field.

func (*RefreshTokenUpdate) ClearConnectorData

func (rtu *RefreshTokenUpdate) ClearConnectorData() *RefreshTokenUpdate

ClearConnectorData clears the value of the "connector_data" field.

func (*RefreshTokenUpdate) ClearScopes

func (rtu *RefreshTokenUpdate) ClearScopes() *RefreshTokenUpdate

ClearScopes clears the value of the "scopes" field.

func (*RefreshTokenUpdate) Exec

func (rtu *RefreshTokenUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*RefreshTokenUpdate) ExecX

func (rtu *RefreshTokenUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RefreshTokenUpdate) Mutation

func (rtu *RefreshTokenUpdate) Mutation() *RefreshTokenMutation

Mutation returns the RefreshTokenMutation object of the builder.

func (*RefreshTokenUpdate) Save

func (rtu *RefreshTokenUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*RefreshTokenUpdate) SaveX

func (rtu *RefreshTokenUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*RefreshTokenUpdate) SetClaimsEmail

func (rtu *RefreshTokenUpdate) SetClaimsEmail(s string) *RefreshTokenUpdate

SetClaimsEmail sets the "claims_email" field.

func (*RefreshTokenUpdate) SetClaimsEmailVerified

func (rtu *RefreshTokenUpdate) SetClaimsEmailVerified(b bool) *RefreshTokenUpdate

SetClaimsEmailVerified sets the "claims_email_verified" field.

func (*RefreshTokenUpdate) SetClaimsGroups

func (rtu *RefreshTokenUpdate) SetClaimsGroups(s []string) *RefreshTokenUpdate

SetClaimsGroups sets the "claims_groups" field.

func (*RefreshTokenUpdate) SetClaimsPreferredUsername

func (rtu *RefreshTokenUpdate) SetClaimsPreferredUsername(s string) *RefreshTokenUpdate

SetClaimsPreferredUsername sets the "claims_preferred_username" field.

func (*RefreshTokenUpdate) SetClaimsUserID

func (rtu *RefreshTokenUpdate) SetClaimsUserID(s string) *RefreshTokenUpdate

SetClaimsUserID sets the "claims_user_id" field.

func (*RefreshTokenUpdate) SetClaimsUsername

func (rtu *RefreshTokenUpdate) SetClaimsUsername(s string) *RefreshTokenUpdate

SetClaimsUsername sets the "claims_username" field.

func (*RefreshTokenUpdate) SetClientID

func (rtu *RefreshTokenUpdate) SetClientID(s string) *RefreshTokenUpdate

SetClientID sets the "client_id" field.

func (*RefreshTokenUpdate) SetConnectorData

func (rtu *RefreshTokenUpdate) SetConnectorData(b []byte) *RefreshTokenUpdate

SetConnectorData sets the "connector_data" field.

func (*RefreshTokenUpdate) SetConnectorID

func (rtu *RefreshTokenUpdate) SetConnectorID(s string) *RefreshTokenUpdate

SetConnectorID sets the "connector_id" field.

func (*RefreshTokenUpdate) SetCreatedAt

func (rtu *RefreshTokenUpdate) SetCreatedAt(t time.Time) *RefreshTokenUpdate

SetCreatedAt sets the "created_at" field.

func (*RefreshTokenUpdate) SetLastUsed

func (rtu *RefreshTokenUpdate) SetLastUsed(t time.Time) *RefreshTokenUpdate

SetLastUsed sets the "last_used" field.

func (*RefreshTokenUpdate) SetNillableClaimsPreferredUsername

func (rtu *RefreshTokenUpdate) SetNillableClaimsPreferredUsername(s *string) *RefreshTokenUpdate

SetNillableClaimsPreferredUsername sets the "claims_preferred_username" field if the given value is not nil.

func (*RefreshTokenUpdate) SetNillableCreatedAt

func (rtu *RefreshTokenUpdate) SetNillableCreatedAt(t *time.Time) *RefreshTokenUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*RefreshTokenUpdate) SetNillableLastUsed

func (rtu *RefreshTokenUpdate) SetNillableLastUsed(t *time.Time) *RefreshTokenUpdate

SetNillableLastUsed sets the "last_used" field if the given value is not nil.

func (*RefreshTokenUpdate) SetNillableObsoleteToken

func (rtu *RefreshTokenUpdate) SetNillableObsoleteToken(s *string) *RefreshTokenUpdate

SetNillableObsoleteToken sets the "obsolete_token" field if the given value is not nil.

func (*RefreshTokenUpdate) SetNillableToken

func (rtu *RefreshTokenUpdate) SetNillableToken(s *string) *RefreshTokenUpdate

SetNillableToken sets the "token" field if the given value is not nil.

func (*RefreshTokenUpdate) SetNonce

func (rtu *RefreshTokenUpdate) SetNonce(s string) *RefreshTokenUpdate

SetNonce sets the "nonce" field.

func (*RefreshTokenUpdate) SetObsoleteToken

func (rtu *RefreshTokenUpdate) SetObsoleteToken(s string) *RefreshTokenUpdate

SetObsoleteToken sets the "obsolete_token" field.

func (*RefreshTokenUpdate) SetScopes

func (rtu *RefreshTokenUpdate) SetScopes(s []string) *RefreshTokenUpdate

SetScopes sets the "scopes" field.

func (*RefreshTokenUpdate) SetToken

func (rtu *RefreshTokenUpdate) SetToken(s string) *RefreshTokenUpdate

SetToken sets the "token" field.

func (*RefreshTokenUpdate) Where

Where appends a list predicates to the RefreshTokenUpdate builder.

type RefreshTokenUpdateOne

type RefreshTokenUpdateOne struct {
	// contains filtered or unexported fields
}

RefreshTokenUpdateOne is the builder for updating a single RefreshToken entity.

func (*RefreshTokenUpdateOne) AppendClaimsGroups

func (rtuo *RefreshTokenUpdateOne) AppendClaimsGroups(s []string) *RefreshTokenUpdateOne

AppendClaimsGroups appends s to the "claims_groups" field.

func (*RefreshTokenUpdateOne) AppendScopes

func (rtuo *RefreshTokenUpdateOne) AppendScopes(s []string) *RefreshTokenUpdateOne

AppendScopes appends s to the "scopes" field.

func (*RefreshTokenUpdateOne) ClearClaimsGroups

func (rtuo *RefreshTokenUpdateOne) ClearClaimsGroups() *RefreshTokenUpdateOne

ClearClaimsGroups clears the value of the "claims_groups" field.

func (*RefreshTokenUpdateOne) ClearConnectorData

func (rtuo *RefreshTokenUpdateOne) ClearConnectorData() *RefreshTokenUpdateOne

ClearConnectorData clears the value of the "connector_data" field.

func (*RefreshTokenUpdateOne) ClearScopes

func (rtuo *RefreshTokenUpdateOne) ClearScopes() *RefreshTokenUpdateOne

ClearScopes clears the value of the "scopes" field.

func (*RefreshTokenUpdateOne) Exec

func (rtuo *RefreshTokenUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*RefreshTokenUpdateOne) ExecX

func (rtuo *RefreshTokenUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RefreshTokenUpdateOne) Mutation

func (rtuo *RefreshTokenUpdateOne) Mutation() *RefreshTokenMutation

Mutation returns the RefreshTokenMutation object of the builder.

func (*RefreshTokenUpdateOne) Save

Save executes the query and returns the updated RefreshToken entity.

func (*RefreshTokenUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*RefreshTokenUpdateOne) Select

func (rtuo *RefreshTokenUpdateOne) Select(field string, fields ...string) *RefreshTokenUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*RefreshTokenUpdateOne) SetClaimsEmail

func (rtuo *RefreshTokenUpdateOne) SetClaimsEmail(s string) *RefreshTokenUpdateOne

SetClaimsEmail sets the "claims_email" field.

func (*RefreshTokenUpdateOne) SetClaimsEmailVerified

func (rtuo *RefreshTokenUpdateOne) SetClaimsEmailVerified(b bool) *RefreshTokenUpdateOne

SetClaimsEmailVerified sets the "claims_email_verified" field.

func (*RefreshTokenUpdateOne) SetClaimsGroups

func (rtuo *RefreshTokenUpdateOne) SetClaimsGroups(s []string) *RefreshTokenUpdateOne

SetClaimsGroups sets the "claims_groups" field.

func (*RefreshTokenUpdateOne) SetClaimsPreferredUsername

func (rtuo *RefreshTokenUpdateOne) SetClaimsPreferredUsername(s string) *RefreshTokenUpdateOne

SetClaimsPreferredUsername sets the "claims_preferred_username" field.

func (*RefreshTokenUpdateOne) SetClaimsUserID

func (rtuo *RefreshTokenUpdateOne) SetClaimsUserID(s string) *RefreshTokenUpdateOne

SetClaimsUserID sets the "claims_user_id" field.

func (*RefreshTokenUpdateOne) SetClaimsUsername

func (rtuo *RefreshTokenUpdateOne) SetClaimsUsername(s string) *RefreshTokenUpdateOne

SetClaimsUsername sets the "claims_username" field.

func (*RefreshTokenUpdateOne) SetClientID

func (rtuo *RefreshTokenUpdateOne) SetClientID(s string) *RefreshTokenUpdateOne

SetClientID sets the "client_id" field.

func (*RefreshTokenUpdateOne) SetConnectorData

func (rtuo *RefreshTokenUpdateOne) SetConnectorData(b []byte) *RefreshTokenUpdateOne

SetConnectorData sets the "connector_data" field.

func (*RefreshTokenUpdateOne) SetConnectorID

func (rtuo *RefreshTokenUpdateOne) SetConnectorID(s string) *RefreshTokenUpdateOne

SetConnectorID sets the "connector_id" field.

func (*RefreshTokenUpdateOne) SetCreatedAt

func (rtuo *RefreshTokenUpdateOne) SetCreatedAt(t time.Time) *RefreshTokenUpdateOne

SetCreatedAt sets the "created_at" field.

func (*RefreshTokenUpdateOne) SetLastUsed

func (rtuo *RefreshTokenUpdateOne) SetLastUsed(t time.Time) *RefreshTokenUpdateOne

SetLastUsed sets the "last_used" field.

func (*RefreshTokenUpdateOne) SetNillableClaimsPreferredUsername

func (rtuo *RefreshTokenUpdateOne) SetNillableClaimsPreferredUsername(s *string) *RefreshTokenUpdateOne

SetNillableClaimsPreferredUsername sets the "claims_preferred_username" field if the given value is not nil.

func (*RefreshTokenUpdateOne) SetNillableCreatedAt

func (rtuo *RefreshTokenUpdateOne) SetNillableCreatedAt(t *time.Time) *RefreshTokenUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*RefreshTokenUpdateOne) SetNillableLastUsed

func (rtuo *RefreshTokenUpdateOne) SetNillableLastUsed(t *time.Time) *RefreshTokenUpdateOne

SetNillableLastUsed sets the "last_used" field if the given value is not nil.

func (*RefreshTokenUpdateOne) SetNillableObsoleteToken

func (rtuo *RefreshTokenUpdateOne) SetNillableObsoleteToken(s *string) *RefreshTokenUpdateOne

SetNillableObsoleteToken sets the "obsolete_token" field if the given value is not nil.

func (*RefreshTokenUpdateOne) SetNillableToken

func (rtuo *RefreshTokenUpdateOne) SetNillableToken(s *string) *RefreshTokenUpdateOne

SetNillableToken sets the "token" field if the given value is not nil.

func (*RefreshTokenUpdateOne) SetNonce

SetNonce sets the "nonce" field.

func (*RefreshTokenUpdateOne) SetObsoleteToken

func (rtuo *RefreshTokenUpdateOne) SetObsoleteToken(s string) *RefreshTokenUpdateOne

SetObsoleteToken sets the "obsolete_token" field.

func (*RefreshTokenUpdateOne) SetScopes

func (rtuo *RefreshTokenUpdateOne) SetScopes(s []string) *RefreshTokenUpdateOne

SetScopes sets the "scopes" field.

func (*RefreshTokenUpdateOne) SetToken

SetToken sets the "token" field.

func (*RefreshTokenUpdateOne) Where

Where appends a list predicates to the RefreshTokenUpdate builder.

type RefreshTokens

type RefreshTokens []*RefreshToken

RefreshTokens is a parsable slice of RefreshToken.

type RollbackFunc

type RollbackFunc func(context.Context, *Tx) error

The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

type RollbackHook

type RollbackHook func(Rollbacker) Rollbacker

RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:

hook := func(next ent.Rollbacker) ent.Rollbacker {
	return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Rollback(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Rollbacker

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

Rollbacker is the interface that wraps the Rollback method.

type TraverseFunc

type TraverseFunc = ent.TraverseFunc

ent aliases to avoid import conflicts in user's code.

type Traverser

type Traverser = ent.Traverser

ent aliases to avoid import conflicts in user's code.

type Tx

type Tx struct {

	// AuthCode is the client for interacting with the AuthCode builders.
	AuthCode *AuthCodeClient
	// AuthRequest is the client for interacting with the AuthRequest builders.
	AuthRequest *AuthRequestClient
	// Connector is the client for interacting with the Connector builders.
	Connector *ConnectorClient
	// DeviceRequest is the client for interacting with the DeviceRequest builders.
	DeviceRequest *DeviceRequestClient
	// DeviceToken is the client for interacting with the DeviceToken builders.
	DeviceToken *DeviceTokenClient
	// Keys is the client for interacting with the Keys builders.
	Keys *KeysClient
	// OAuth2Client is the client for interacting with the OAuth2Client builders.
	OAuth2Client *OAuth2ClientClient
	// OfflineSession is the client for interacting with the OfflineSession builders.
	OfflineSession *OfflineSessionClient
	// Password is the client for interacting with the Password builders.
	Password *PasswordClient
	// RefreshToken is the client for interacting with the RefreshToken builders.
	RefreshToken *RefreshTokenClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

Jump to

Keyboard shortcuts

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