ent

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 35 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.
	TypeAPIKey                = "APIKey"
	TypeMembership            = "Membership"
	TypeOAuthAccount          = "OAuthAccount"
	TypeOAuthApp              = "OAuthApp"
	TypeOAuthAppSecret        = "OAuthAppSecret"
	TypeOAuthAuthCode         = "OAuthAuthCode"
	TypeOAuthConsent          = "OAuthConsent"
	TypeOAuthToken            = "OAuthToken"
	TypeOrganization          = "Organization"
	TypeRefreshToken          = "RefreshToken"
	TypeServiceAccount        = "ServiceAccount"
	TypeServiceAccountKeyPair = "ServiceAccountKeyPair"
	TypeUser                  = "User"
)

Variables

View Source
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")

ErrTxStarted is returned when trying to start a new transaction from a transactional client.

Functions

func Asc

func Asc(fields ...string) func(*sql.Selector)

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) func(*sql.Selector)

Desc applies the given fields in DESC order.

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 APIKey

type APIKey struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Human-readable name for the API key
	Name string `json:"name,omitempty"`
	// Visible prefix of the API key (e.g., cf_live_abc123)
	Prefix string `json:"prefix,omitempty"`
	// SHA-256 hash of the full API key
	KeyHash string `json:"-"`
	// Permission scopes granted to this key
	Scopes []string `json:"scopes,omitempty"`
	// Optional description of the key's purpose
	Description *string `json:"description,omitempty"`
	// When the key expires (nil = never)
	ExpiresAt *time.Time `json:"expires_at,omitempty"`
	// When the key was last used
	LastUsedAt *time.Time `json:"last_used_at,omitempty"`
	// IP address that last used the key
	LastUsedIP *string `json:"last_used_ip,omitempty"`
	// Whether the key has been revoked
	Revoked bool `json:"revoked,omitempty"`
	// When the key was revoked
	RevokedAt *time.Time `json:"revoked_at,omitempty"`
	// Reason for revocation
	RevokedReason *string `json:"revoked_reason,omitempty"`
	// Environment: live or test
	Environment apikey.Environment `json:"environment,omitempty"`
	// Additional metadata
	Metadata map[string]string `json:"metadata,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the APIKeyQuery when eager-loading is set.
	Edges APIKeyEdges `json:"edges"`
	// contains filtered or unexported fields
}

APIKey is the model entity for the APIKey schema.

func (*APIKey) QueryOrganization

func (_m *APIKey) QueryOrganization() *OrganizationQuery

QueryOrganization queries the "organization" edge of the APIKey entity.

func (*APIKey) QueryOwner

func (_m *APIKey) QueryOwner() *UserQuery

QueryOwner queries the "owner" edge of the APIKey entity.

func (*APIKey) String

func (_m *APIKey) String() string

String implements the fmt.Stringer.

func (*APIKey) Unwrap

func (_m *APIKey) Unwrap() *APIKey

Unwrap unwraps the APIKey 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 (*APIKey) Update

func (_m *APIKey) Update() *APIKeyUpdateOne

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

func (*APIKey) Value

func (_m *APIKey) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the APIKey. This includes values selected through modifiers, order, etc.

type APIKeyClient

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

APIKeyClient is a client for the APIKey schema.

func NewAPIKeyClient

func NewAPIKeyClient(c config) *APIKeyClient

NewAPIKeyClient returns a client for the APIKey from the given config.

func (*APIKeyClient) Create

func (c *APIKeyClient) Create() *APIKeyCreate

Create returns a builder for creating a APIKey entity.

func (*APIKeyClient) CreateBulk

func (c *APIKeyClient) CreateBulk(builders ...*APIKeyCreate) *APIKeyCreateBulk

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

func (*APIKeyClient) Delete

func (c *APIKeyClient) Delete() *APIKeyDelete

Delete returns a delete builder for APIKey.

func (*APIKeyClient) DeleteOne

func (c *APIKeyClient) DeleteOne(_m *APIKey) *APIKeyDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*APIKeyClient) DeleteOneID

func (c *APIKeyClient) DeleteOneID(id uuid.UUID) *APIKeyDeleteOne

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

func (*APIKeyClient) Get

func (c *APIKeyClient) Get(ctx context.Context, id uuid.UUID) (*APIKey, error)

Get returns a APIKey entity by its id.

func (*APIKeyClient) GetX

func (c *APIKeyClient) GetX(ctx context.Context, id uuid.UUID) *APIKey

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

func (*APIKeyClient) Hooks

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

Hooks returns the client hooks.

func (*APIKeyClient) Intercept

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

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

func (*APIKeyClient) Interceptors

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

Interceptors returns the client interceptors.

func (*APIKeyClient) MapCreateBulk

func (c *APIKeyClient) MapCreateBulk(slice any, setFunc func(*APIKeyCreate, int)) *APIKeyCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*APIKeyClient) Query

func (c *APIKeyClient) Query() *APIKeyQuery

Query returns a query builder for APIKey.

func (*APIKeyClient) QueryOrganization

func (c *APIKeyClient) QueryOrganization(_m *APIKey) *OrganizationQuery

QueryOrganization queries the organization edge of a APIKey.

func (*APIKeyClient) QueryOwner

func (c *APIKeyClient) QueryOwner(_m *APIKey) *UserQuery

QueryOwner queries the owner edge of a APIKey.

func (*APIKeyClient) Update

func (c *APIKeyClient) Update() *APIKeyUpdate

Update returns an update builder for APIKey.

func (*APIKeyClient) UpdateOne

func (c *APIKeyClient) UpdateOne(_m *APIKey) *APIKeyUpdateOne

UpdateOne returns an update builder for the given entity.

func (*APIKeyClient) UpdateOneID

func (c *APIKeyClient) UpdateOneID(id uuid.UUID) *APIKeyUpdateOne

UpdateOneID returns an update builder for the given id.

func (*APIKeyClient) Use

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

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

type APIKeyCreate

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

APIKeyCreate is the builder for creating a APIKey entity.

func (*APIKeyCreate) Exec

func (_c *APIKeyCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*APIKeyCreate) ExecX

func (_c *APIKeyCreate) ExecX(ctx context.Context)

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

func (*APIKeyCreate) Mutation

func (_c *APIKeyCreate) Mutation() *APIKeyMutation

Mutation returns the APIKeyMutation object of the builder.

func (*APIKeyCreate) OnConflict

func (_c *APIKeyCreate) OnConflict(opts ...sql.ConflictOption) *APIKeyUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.APIKey.Create().
	SetCreatedAt(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.APIKeyUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*APIKeyCreate) OnConflictColumns

func (_c *APIKeyCreate) OnConflictColumns(columns ...string) *APIKeyUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.APIKey.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*APIKeyCreate) Save

func (_c *APIKeyCreate) Save(ctx context.Context) (*APIKey, error)

Save creates the APIKey in the database.

func (*APIKeyCreate) SaveX

func (_c *APIKeyCreate) SaveX(ctx context.Context) *APIKey

SaveX calls Save and panics if Save returns an error.

func (*APIKeyCreate) SetCreatedAt

func (_c *APIKeyCreate) SetCreatedAt(v time.Time) *APIKeyCreate

SetCreatedAt sets the "created_at" field.

func (*APIKeyCreate) SetDescription

func (_c *APIKeyCreate) SetDescription(v string) *APIKeyCreate

SetDescription sets the "description" field.

func (*APIKeyCreate) SetEnvironment

func (_c *APIKeyCreate) SetEnvironment(v apikey.Environment) *APIKeyCreate

SetEnvironment sets the "environment" field.

func (*APIKeyCreate) SetExpiresAt

func (_c *APIKeyCreate) SetExpiresAt(v time.Time) *APIKeyCreate

SetExpiresAt sets the "expires_at" field.

func (*APIKeyCreate) SetID

func (_c *APIKeyCreate) SetID(v uuid.UUID) *APIKeyCreate

SetID sets the "id" field.

func (*APIKeyCreate) SetKeyHash

func (_c *APIKeyCreate) SetKeyHash(v string) *APIKeyCreate

SetKeyHash sets the "key_hash" field.

func (*APIKeyCreate) SetLastUsedAt

func (_c *APIKeyCreate) SetLastUsedAt(v time.Time) *APIKeyCreate

SetLastUsedAt sets the "last_used_at" field.

func (*APIKeyCreate) SetLastUsedIP

func (_c *APIKeyCreate) SetLastUsedIP(v string) *APIKeyCreate

SetLastUsedIP sets the "last_used_ip" field.

func (*APIKeyCreate) SetMetadata

func (_c *APIKeyCreate) SetMetadata(v map[string]string) *APIKeyCreate

SetMetadata sets the "metadata" field.

func (*APIKeyCreate) SetName

func (_c *APIKeyCreate) SetName(v string) *APIKeyCreate

SetName sets the "name" field.

func (*APIKeyCreate) SetNillableCreatedAt

func (_c *APIKeyCreate) SetNillableCreatedAt(v *time.Time) *APIKeyCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*APIKeyCreate) SetNillableDescription

func (_c *APIKeyCreate) SetNillableDescription(v *string) *APIKeyCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*APIKeyCreate) SetNillableEnvironment

func (_c *APIKeyCreate) SetNillableEnvironment(v *apikey.Environment) *APIKeyCreate

SetNillableEnvironment sets the "environment" field if the given value is not nil.

func (*APIKeyCreate) SetNillableExpiresAt

func (_c *APIKeyCreate) SetNillableExpiresAt(v *time.Time) *APIKeyCreate

SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.

func (*APIKeyCreate) SetNillableID

func (_c *APIKeyCreate) SetNillableID(v *uuid.UUID) *APIKeyCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*APIKeyCreate) SetNillableLastUsedAt

func (_c *APIKeyCreate) SetNillableLastUsedAt(v *time.Time) *APIKeyCreate

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*APIKeyCreate) SetNillableLastUsedIP

func (_c *APIKeyCreate) SetNillableLastUsedIP(v *string) *APIKeyCreate

SetNillableLastUsedIP sets the "last_used_ip" field if the given value is not nil.

func (*APIKeyCreate) SetNillableOrganizationID

func (_c *APIKeyCreate) SetNillableOrganizationID(id *uuid.UUID) *APIKeyCreate

SetNillableOrganizationID sets the "organization" edge to the Organization entity by ID if the given value is not nil.

func (*APIKeyCreate) SetNillableRevoked

func (_c *APIKeyCreate) SetNillableRevoked(v *bool) *APIKeyCreate

SetNillableRevoked sets the "revoked" field if the given value is not nil.

func (*APIKeyCreate) SetNillableRevokedAt

func (_c *APIKeyCreate) SetNillableRevokedAt(v *time.Time) *APIKeyCreate

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*APIKeyCreate) SetNillableRevokedReason

func (_c *APIKeyCreate) SetNillableRevokedReason(v *string) *APIKeyCreate

SetNillableRevokedReason sets the "revoked_reason" field if the given value is not nil.

func (*APIKeyCreate) SetNillableUpdatedAt

func (_c *APIKeyCreate) SetNillableUpdatedAt(v *time.Time) *APIKeyCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*APIKeyCreate) SetOrganization

func (_c *APIKeyCreate) SetOrganization(v *Organization) *APIKeyCreate

SetOrganization sets the "organization" edge to the Organization entity.

func (*APIKeyCreate) SetOrganizationID

func (_c *APIKeyCreate) SetOrganizationID(id uuid.UUID) *APIKeyCreate

SetOrganizationID sets the "organization" edge to the Organization entity by ID.

func (*APIKeyCreate) SetOwner

func (_c *APIKeyCreate) SetOwner(v *User) *APIKeyCreate

SetOwner sets the "owner" edge to the User entity.

func (*APIKeyCreate) SetOwnerID

func (_c *APIKeyCreate) SetOwnerID(id uuid.UUID) *APIKeyCreate

SetOwnerID sets the "owner" edge to the User entity by ID.

func (*APIKeyCreate) SetPrefix

func (_c *APIKeyCreate) SetPrefix(v string) *APIKeyCreate

SetPrefix sets the "prefix" field.

func (*APIKeyCreate) SetRevoked

func (_c *APIKeyCreate) SetRevoked(v bool) *APIKeyCreate

SetRevoked sets the "revoked" field.

func (*APIKeyCreate) SetRevokedAt

func (_c *APIKeyCreate) SetRevokedAt(v time.Time) *APIKeyCreate

SetRevokedAt sets the "revoked_at" field.

func (*APIKeyCreate) SetRevokedReason

func (_c *APIKeyCreate) SetRevokedReason(v string) *APIKeyCreate

SetRevokedReason sets the "revoked_reason" field.

func (*APIKeyCreate) SetScopes

func (_c *APIKeyCreate) SetScopes(v []string) *APIKeyCreate

SetScopes sets the "scopes" field.

func (*APIKeyCreate) SetUpdatedAt

func (_c *APIKeyCreate) SetUpdatedAt(v time.Time) *APIKeyCreate

SetUpdatedAt sets the "updated_at" field.

type APIKeyCreateBulk

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

APIKeyCreateBulk is the builder for creating many APIKey entities in bulk.

func (*APIKeyCreateBulk) Exec

func (_c *APIKeyCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*APIKeyCreateBulk) ExecX

func (_c *APIKeyCreateBulk) ExecX(ctx context.Context)

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

func (*APIKeyCreateBulk) OnConflict

func (_c *APIKeyCreateBulk) OnConflict(opts ...sql.ConflictOption) *APIKeyUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.APIKey.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.APIKeyUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*APIKeyCreateBulk) OnConflictColumns

func (_c *APIKeyCreateBulk) OnConflictColumns(columns ...string) *APIKeyUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.APIKey.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*APIKeyCreateBulk) Save

func (_c *APIKeyCreateBulk) Save(ctx context.Context) ([]*APIKey, error)

Save creates the APIKey entities in the database.

func (*APIKeyCreateBulk) SaveX

func (_c *APIKeyCreateBulk) SaveX(ctx context.Context) []*APIKey

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

type APIKeyDelete

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

APIKeyDelete is the builder for deleting a APIKey entity.

func (*APIKeyDelete) Exec

func (_d *APIKeyDelete) Exec(ctx context.Context) (int, error)

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

func (*APIKeyDelete) ExecX

func (_d *APIKeyDelete) ExecX(ctx context.Context) int

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

func (*APIKeyDelete) Where

func (_d *APIKeyDelete) Where(ps ...predicate.APIKey) *APIKeyDelete

Where appends a list predicates to the APIKeyDelete builder.

type APIKeyDeleteOne

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

APIKeyDeleteOne is the builder for deleting a single APIKey entity.

func (*APIKeyDeleteOne) Exec

func (_d *APIKeyDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*APIKeyDeleteOne) ExecX

func (_d *APIKeyDeleteOne) ExecX(ctx context.Context)

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

func (*APIKeyDeleteOne) Where

func (_d *APIKeyDeleteOne) Where(ps ...predicate.APIKey) *APIKeyDeleteOne

Where appends a list predicates to the APIKeyDelete builder.

type APIKeyEdges

type APIKeyEdges struct {
	// User who owns this API key
	Owner *User `json:"owner,omitempty"`
	// Organization this key is scoped to (optional)
	Organization *Organization `json:"organization,omitempty"`
	// contains filtered or unexported fields
}

APIKeyEdges holds the relations/edges for other nodes in the graph.

func (APIKeyEdges) OrganizationOrErr

func (e APIKeyEdges) OrganizationOrErr() (*Organization, error)

OrganizationOrErr returns the Organization value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (APIKeyEdges) OwnerOrErr

func (e APIKeyEdges) OwnerOrErr() (*User, error)

OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type APIKeyFilter

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

APIKeyFilter provides a generic filtering capability at runtime for APIKeyQuery.

func (*APIKeyFilter) Where

func (f *APIKeyFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*APIKeyFilter) WhereCreatedAt

func (f *APIKeyFilter) WhereCreatedAt(p entql.TimeP)

WhereCreatedAt applies the entql time.Time predicate on the created_at field.

func (*APIKeyFilter) WhereDescription

func (f *APIKeyFilter) WhereDescription(p entql.StringP)

WhereDescription applies the entql string predicate on the description field.

func (*APIKeyFilter) WhereEnvironment

func (f *APIKeyFilter) WhereEnvironment(p entql.StringP)

WhereEnvironment applies the entql string predicate on the environment field.

func (*APIKeyFilter) WhereExpiresAt

func (f *APIKeyFilter) WhereExpiresAt(p entql.TimeP)

WhereExpiresAt applies the entql time.Time predicate on the expires_at field.

func (*APIKeyFilter) WhereHasOrganization

func (f *APIKeyFilter) WhereHasOrganization()

WhereHasOrganization applies a predicate to check if query has an edge organization.

func (*APIKeyFilter) WhereHasOrganizationWith

func (f *APIKeyFilter) WhereHasOrganizationWith(preds ...predicate.Organization)

WhereHasOrganizationWith applies a predicate to check if query has an edge organization with a given conditions (other predicates).

func (*APIKeyFilter) WhereHasOwner

func (f *APIKeyFilter) WhereHasOwner()

WhereHasOwner applies a predicate to check if query has an edge owner.

func (*APIKeyFilter) WhereHasOwnerWith

func (f *APIKeyFilter) WhereHasOwnerWith(preds ...predicate.User)

WhereHasOwnerWith applies a predicate to check if query has an edge owner with a given conditions (other predicates).

func (*APIKeyFilter) WhereID

func (f *APIKeyFilter) WhereID(p entql.ValueP)

WhereID applies the entql [16]byte predicate on the id field.

func (*APIKeyFilter) WhereKeyHash

func (f *APIKeyFilter) WhereKeyHash(p entql.StringP)

WhereKeyHash applies the entql string predicate on the key_hash field.

func (*APIKeyFilter) WhereLastUsedAt

func (f *APIKeyFilter) WhereLastUsedAt(p entql.TimeP)

WhereLastUsedAt applies the entql time.Time predicate on the last_used_at field.

func (*APIKeyFilter) WhereLastUsedIP

func (f *APIKeyFilter) WhereLastUsedIP(p entql.StringP)

WhereLastUsedIP applies the entql string predicate on the last_used_ip field.

func (*APIKeyFilter) WhereMetadata

func (f *APIKeyFilter) WhereMetadata(p entql.BytesP)

WhereMetadata applies the entql json.RawMessage predicate on the metadata field.

func (*APIKeyFilter) WhereName

func (f *APIKeyFilter) WhereName(p entql.StringP)

WhereName applies the entql string predicate on the name field.

func (*APIKeyFilter) WherePrefix

func (f *APIKeyFilter) WherePrefix(p entql.StringP)

WherePrefix applies the entql string predicate on the prefix field.

func (*APIKeyFilter) WhereRevoked

func (f *APIKeyFilter) WhereRevoked(p entql.BoolP)

WhereRevoked applies the entql bool predicate on the revoked field.

func (*APIKeyFilter) WhereRevokedAt

func (f *APIKeyFilter) WhereRevokedAt(p entql.TimeP)

WhereRevokedAt applies the entql time.Time predicate on the revoked_at field.

func (*APIKeyFilter) WhereRevokedReason

func (f *APIKeyFilter) WhereRevokedReason(p entql.StringP)

WhereRevokedReason applies the entql string predicate on the revoked_reason field.

func (*APIKeyFilter) WhereScopes

func (f *APIKeyFilter) WhereScopes(p entql.BytesP)

WhereScopes applies the entql json.RawMessage predicate on the scopes field.

func (*APIKeyFilter) WhereUpdatedAt

func (f *APIKeyFilter) WhereUpdatedAt(p entql.TimeP)

WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.

type APIKeyGroupBy

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

APIKeyGroupBy is the group-by builder for APIKey entities.

func (*APIKeyGroupBy) Aggregate

func (_g *APIKeyGroupBy) Aggregate(fns ...AggregateFunc) *APIKeyGroupBy

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

func (*APIKeyGroupBy) Bool

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

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

func (*APIKeyGroupBy) BoolX

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

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

func (*APIKeyGroupBy) Bools

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

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

func (*APIKeyGroupBy) BoolsX

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

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

func (*APIKeyGroupBy) Float64

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

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

func (*APIKeyGroupBy) Float64X

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

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

func (*APIKeyGroupBy) Float64s

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

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

func (*APIKeyGroupBy) Float64sX

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

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

func (*APIKeyGroupBy) Int

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

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

func (*APIKeyGroupBy) IntX

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

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

func (*APIKeyGroupBy) Ints

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

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

func (*APIKeyGroupBy) IntsX

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

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

func (*APIKeyGroupBy) Scan

func (_g *APIKeyGroupBy) Scan(ctx context.Context, v any) error

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

func (*APIKeyGroupBy) ScanX

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

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

func (*APIKeyGroupBy) String

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

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

func (*APIKeyGroupBy) StringX

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

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

func (*APIKeyGroupBy) Strings

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

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

func (*APIKeyGroupBy) StringsX

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

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

type APIKeyMutation

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

APIKeyMutation represents an operation that mutates the APIKey nodes in the graph.

func (*APIKeyMutation) AddField

func (m *APIKeyMutation) 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 (*APIKeyMutation) AddedEdges

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

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

func (*APIKeyMutation) AddedField

func (m *APIKeyMutation) 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 (*APIKeyMutation) AddedFields

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

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

func (*APIKeyMutation) AddedIDs

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

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

func (*APIKeyMutation) AppendScopes

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

AppendScopes adds s to the "scopes" field.

func (*APIKeyMutation) AppendedScopes

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

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

func (*APIKeyMutation) ClearDescription

func (m *APIKeyMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*APIKeyMutation) ClearEdge

func (m *APIKeyMutation) 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 (*APIKeyMutation) ClearExpiresAt

func (m *APIKeyMutation) ClearExpiresAt()

ClearExpiresAt clears the value of the "expires_at" field.

func (*APIKeyMutation) ClearField

func (m *APIKeyMutation) 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 (*APIKeyMutation) ClearLastUsedAt

func (m *APIKeyMutation) ClearLastUsedAt()

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*APIKeyMutation) ClearLastUsedIP

func (m *APIKeyMutation) ClearLastUsedIP()

ClearLastUsedIP clears the value of the "last_used_ip" field.

func (*APIKeyMutation) ClearMetadata

func (m *APIKeyMutation) ClearMetadata()

ClearMetadata clears the value of the "metadata" field.

func (*APIKeyMutation) ClearOrganization

func (m *APIKeyMutation) ClearOrganization()

ClearOrganization clears the "organization" edge to the Organization entity.

func (*APIKeyMutation) ClearOwner

func (m *APIKeyMutation) ClearOwner()

ClearOwner clears the "owner" edge to the User entity.

func (*APIKeyMutation) ClearRevokedAt

func (m *APIKeyMutation) ClearRevokedAt()

ClearRevokedAt clears the value of the "revoked_at" field.

func (*APIKeyMutation) ClearRevokedReason

func (m *APIKeyMutation) ClearRevokedReason()

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*APIKeyMutation) ClearScopes

func (m *APIKeyMutation) ClearScopes()

ClearScopes clears the value of the "scopes" field.

func (*APIKeyMutation) ClearedEdges

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

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

func (*APIKeyMutation) ClearedFields

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

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

func (APIKeyMutation) Client

func (m APIKeyMutation) 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 (*APIKeyMutation) CreatedAt

func (m *APIKeyMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*APIKeyMutation) Description

func (m *APIKeyMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*APIKeyMutation) DescriptionCleared

func (m *APIKeyMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*APIKeyMutation) EdgeCleared

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

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

func (*APIKeyMutation) Environment

func (m *APIKeyMutation) Environment() (r apikey.Environment, exists bool)

Environment returns the value of the "environment" field in the mutation.

func (*APIKeyMutation) ExpiresAt

func (m *APIKeyMutation) ExpiresAt() (r time.Time, exists bool)

ExpiresAt returns the value of the "expires_at" field in the mutation.

func (*APIKeyMutation) ExpiresAtCleared

func (m *APIKeyMutation) ExpiresAtCleared() bool

ExpiresAtCleared returns if the "expires_at" field was cleared in this mutation.

func (*APIKeyMutation) Field

func (m *APIKeyMutation) 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 (*APIKeyMutation) FieldCleared

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

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

func (*APIKeyMutation) Fields

func (m *APIKeyMutation) 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 (*APIKeyMutation) Filter

func (m *APIKeyMutation) Filter() *APIKeyFilter

Filter returns an entql.Where implementation to apply filters on the APIKeyMutation builder.

func (*APIKeyMutation) ID

func (m *APIKeyMutation) ID() (id uuid.UUID, 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 (*APIKeyMutation) IDs

func (m *APIKeyMutation) IDs(ctx context.Context) ([]uuid.UUID, 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 (*APIKeyMutation) KeyHash

func (m *APIKeyMutation) KeyHash() (r string, exists bool)

KeyHash returns the value of the "key_hash" field in the mutation.

func (*APIKeyMutation) LastUsedAt

func (m *APIKeyMutation) LastUsedAt() (r time.Time, exists bool)

LastUsedAt returns the value of the "last_used_at" field in the mutation.

func (*APIKeyMutation) LastUsedAtCleared

func (m *APIKeyMutation) LastUsedAtCleared() bool

LastUsedAtCleared returns if the "last_used_at" field was cleared in this mutation.

func (*APIKeyMutation) LastUsedIP

func (m *APIKeyMutation) LastUsedIP() (r string, exists bool)

LastUsedIP returns the value of the "last_used_ip" field in the mutation.

func (*APIKeyMutation) LastUsedIPCleared

func (m *APIKeyMutation) LastUsedIPCleared() bool

LastUsedIPCleared returns if the "last_used_ip" field was cleared in this mutation.

func (*APIKeyMutation) Metadata

func (m *APIKeyMutation) Metadata() (r map[string]string, exists bool)

Metadata returns the value of the "metadata" field in the mutation.

func (*APIKeyMutation) MetadataCleared

func (m *APIKeyMutation) MetadataCleared() bool

MetadataCleared returns if the "metadata" field was cleared in this mutation.

func (*APIKeyMutation) Name

func (m *APIKeyMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*APIKeyMutation) OldCreatedAt

func (m *APIKeyMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the APIKey entity. If the APIKey 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 (*APIKeyMutation) OldDescription

func (m *APIKeyMutation) OldDescription(ctx context.Context) (v *string, err error)

OldDescription returns the old "description" field's value of the APIKey entity. If the APIKey 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 (*APIKeyMutation) OldEnvironment

func (m *APIKeyMutation) OldEnvironment(ctx context.Context) (v apikey.Environment, err error)

OldEnvironment returns the old "environment" field's value of the APIKey entity. If the APIKey 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 (*APIKeyMutation) OldExpiresAt

func (m *APIKeyMutation) OldExpiresAt(ctx context.Context) (v *time.Time, err error)

OldExpiresAt returns the old "expires_at" field's value of the APIKey entity. If the APIKey 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 (*APIKeyMutation) OldField

func (m *APIKeyMutation) 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 (*APIKeyMutation) OldKeyHash

func (m *APIKeyMutation) OldKeyHash(ctx context.Context) (v string, err error)

OldKeyHash returns the old "key_hash" field's value of the APIKey entity. If the APIKey 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 (*APIKeyMutation) OldLastUsedAt

func (m *APIKeyMutation) OldLastUsedAt(ctx context.Context) (v *time.Time, err error)

OldLastUsedAt returns the old "last_used_at" field's value of the APIKey entity. If the APIKey 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 (*APIKeyMutation) OldLastUsedIP

func (m *APIKeyMutation) OldLastUsedIP(ctx context.Context) (v *string, err error)

OldLastUsedIP returns the old "last_used_ip" field's value of the APIKey entity. If the APIKey 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 (*APIKeyMutation) OldMetadata

func (m *APIKeyMutation) OldMetadata(ctx context.Context) (v map[string]string, err error)

OldMetadata returns the old "metadata" field's value of the APIKey entity. If the APIKey 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 (*APIKeyMutation) OldName

func (m *APIKeyMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the APIKey entity. If the APIKey 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 (*APIKeyMutation) OldPrefix

func (m *APIKeyMutation) OldPrefix(ctx context.Context) (v string, err error)

OldPrefix returns the old "prefix" field's value of the APIKey entity. If the APIKey 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 (*APIKeyMutation) OldRevoked

func (m *APIKeyMutation) OldRevoked(ctx context.Context) (v bool, err error)

OldRevoked returns the old "revoked" field's value of the APIKey entity. If the APIKey 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 (*APIKeyMutation) OldRevokedAt

func (m *APIKeyMutation) OldRevokedAt(ctx context.Context) (v *time.Time, err error)

OldRevokedAt returns the old "revoked_at" field's value of the APIKey entity. If the APIKey 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 (*APIKeyMutation) OldRevokedReason

func (m *APIKeyMutation) OldRevokedReason(ctx context.Context) (v *string, err error)

OldRevokedReason returns the old "revoked_reason" field's value of the APIKey entity. If the APIKey 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 (*APIKeyMutation) OldScopes

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

OldScopes returns the old "scopes" field's value of the APIKey entity. If the APIKey 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 (*APIKeyMutation) OldUpdatedAt

func (m *APIKeyMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the APIKey entity. If the APIKey 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 (*APIKeyMutation) Op

func (m *APIKeyMutation) Op() Op

Op returns the operation name.

func (*APIKeyMutation) OrganizationCleared

func (m *APIKeyMutation) OrganizationCleared() bool

OrganizationCleared reports if the "organization" edge to the Organization entity was cleared.

func (*APIKeyMutation) OrganizationID

func (m *APIKeyMutation) OrganizationID() (id uuid.UUID, exists bool)

OrganizationID returns the "organization" edge ID in the mutation.

func (*APIKeyMutation) OrganizationIDs

func (m *APIKeyMutation) OrganizationIDs() (ids []uuid.UUID)

OrganizationIDs returns the "organization" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrganizationID instead. It exists only for internal usage by the builders.

func (*APIKeyMutation) OwnerCleared

func (m *APIKeyMutation) OwnerCleared() bool

OwnerCleared reports if the "owner" edge to the User entity was cleared.

func (*APIKeyMutation) OwnerID

func (m *APIKeyMutation) OwnerID() (id uuid.UUID, exists bool)

OwnerID returns the "owner" edge ID in the mutation.

func (*APIKeyMutation) OwnerIDs

func (m *APIKeyMutation) OwnerIDs() (ids []uuid.UUID)

OwnerIDs returns the "owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.

func (*APIKeyMutation) Prefix

func (m *APIKeyMutation) Prefix() (r string, exists bool)

Prefix returns the value of the "prefix" field in the mutation.

func (*APIKeyMutation) RemovedEdges

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

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

func (*APIKeyMutation) RemovedIDs

func (m *APIKeyMutation) 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 (*APIKeyMutation) ResetCreatedAt

func (m *APIKeyMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*APIKeyMutation) ResetDescription

func (m *APIKeyMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*APIKeyMutation) ResetEdge

func (m *APIKeyMutation) 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 (*APIKeyMutation) ResetEnvironment

func (m *APIKeyMutation) ResetEnvironment()

ResetEnvironment resets all changes to the "environment" field.

func (*APIKeyMutation) ResetExpiresAt

func (m *APIKeyMutation) ResetExpiresAt()

ResetExpiresAt resets all changes to the "expires_at" field.

func (*APIKeyMutation) ResetField

func (m *APIKeyMutation) 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 (*APIKeyMutation) ResetKeyHash

func (m *APIKeyMutation) ResetKeyHash()

ResetKeyHash resets all changes to the "key_hash" field.

func (*APIKeyMutation) ResetLastUsedAt

func (m *APIKeyMutation) ResetLastUsedAt()

ResetLastUsedAt resets all changes to the "last_used_at" field.

func (*APIKeyMutation) ResetLastUsedIP

func (m *APIKeyMutation) ResetLastUsedIP()

ResetLastUsedIP resets all changes to the "last_used_ip" field.

func (*APIKeyMutation) ResetMetadata

func (m *APIKeyMutation) ResetMetadata()

ResetMetadata resets all changes to the "metadata" field.

func (*APIKeyMutation) ResetName

func (m *APIKeyMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*APIKeyMutation) ResetOrganization

func (m *APIKeyMutation) ResetOrganization()

ResetOrganization resets all changes to the "organization" edge.

func (*APIKeyMutation) ResetOwner

func (m *APIKeyMutation) ResetOwner()

ResetOwner resets all changes to the "owner" edge.

func (*APIKeyMutation) ResetPrefix

func (m *APIKeyMutation) ResetPrefix()

ResetPrefix resets all changes to the "prefix" field.

func (*APIKeyMutation) ResetRevoked

func (m *APIKeyMutation) ResetRevoked()

ResetRevoked resets all changes to the "revoked" field.

func (*APIKeyMutation) ResetRevokedAt

func (m *APIKeyMutation) ResetRevokedAt()

ResetRevokedAt resets all changes to the "revoked_at" field.

func (*APIKeyMutation) ResetRevokedReason

func (m *APIKeyMutation) ResetRevokedReason()

ResetRevokedReason resets all changes to the "revoked_reason" field.

func (*APIKeyMutation) ResetScopes

func (m *APIKeyMutation) ResetScopes()

ResetScopes resets all changes to the "scopes" field.

func (*APIKeyMutation) ResetUpdatedAt

func (m *APIKeyMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*APIKeyMutation) Revoked

func (m *APIKeyMutation) Revoked() (r bool, exists bool)

Revoked returns the value of the "revoked" field in the mutation.

func (*APIKeyMutation) RevokedAt

func (m *APIKeyMutation) RevokedAt() (r time.Time, exists bool)

RevokedAt returns the value of the "revoked_at" field in the mutation.

func (*APIKeyMutation) RevokedAtCleared

func (m *APIKeyMutation) RevokedAtCleared() bool

RevokedAtCleared returns if the "revoked_at" field was cleared in this mutation.

func (*APIKeyMutation) RevokedReason

func (m *APIKeyMutation) RevokedReason() (r string, exists bool)

RevokedReason returns the value of the "revoked_reason" field in the mutation.

func (*APIKeyMutation) RevokedReasonCleared

func (m *APIKeyMutation) RevokedReasonCleared() bool

RevokedReasonCleared returns if the "revoked_reason" field was cleared in this mutation.

func (*APIKeyMutation) Scopes

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

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

func (*APIKeyMutation) ScopesCleared

func (m *APIKeyMutation) ScopesCleared() bool

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

func (*APIKeyMutation) SetCreatedAt

func (m *APIKeyMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*APIKeyMutation) SetDescription

func (m *APIKeyMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*APIKeyMutation) SetEnvironment

func (m *APIKeyMutation) SetEnvironment(a apikey.Environment)

SetEnvironment sets the "environment" field.

func (*APIKeyMutation) SetExpiresAt

func (m *APIKeyMutation) SetExpiresAt(t time.Time)

SetExpiresAt sets the "expires_at" field.

func (*APIKeyMutation) SetField

func (m *APIKeyMutation) 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 (*APIKeyMutation) SetID

func (m *APIKeyMutation) SetID(id uuid.UUID)

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

func (*APIKeyMutation) SetKeyHash

func (m *APIKeyMutation) SetKeyHash(s string)

SetKeyHash sets the "key_hash" field.

func (*APIKeyMutation) SetLastUsedAt

func (m *APIKeyMutation) SetLastUsedAt(t time.Time)

SetLastUsedAt sets the "last_used_at" field.

func (*APIKeyMutation) SetLastUsedIP

func (m *APIKeyMutation) SetLastUsedIP(s string)

SetLastUsedIP sets the "last_used_ip" field.

func (*APIKeyMutation) SetMetadata

func (m *APIKeyMutation) SetMetadata(value map[string]string)

SetMetadata sets the "metadata" field.

func (*APIKeyMutation) SetName

func (m *APIKeyMutation) SetName(s string)

SetName sets the "name" field.

func (*APIKeyMutation) SetOp

func (m *APIKeyMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*APIKeyMutation) SetOrganizationID

func (m *APIKeyMutation) SetOrganizationID(id uuid.UUID)

SetOrganizationID sets the "organization" edge to the Organization entity by id.

func (*APIKeyMutation) SetOwnerID

func (m *APIKeyMutation) SetOwnerID(id uuid.UUID)

SetOwnerID sets the "owner" edge to the User entity by id.

func (*APIKeyMutation) SetPrefix

func (m *APIKeyMutation) SetPrefix(s string)

SetPrefix sets the "prefix" field.

func (*APIKeyMutation) SetRevoked

func (m *APIKeyMutation) SetRevoked(b bool)

SetRevoked sets the "revoked" field.

func (*APIKeyMutation) SetRevokedAt

func (m *APIKeyMutation) SetRevokedAt(t time.Time)

SetRevokedAt sets the "revoked_at" field.

func (*APIKeyMutation) SetRevokedReason

func (m *APIKeyMutation) SetRevokedReason(s string)

SetRevokedReason sets the "revoked_reason" field.

func (*APIKeyMutation) SetScopes

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

SetScopes sets the "scopes" field.

func (*APIKeyMutation) SetUpdatedAt

func (m *APIKeyMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (APIKeyMutation) Tx

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

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

func (*APIKeyMutation) Type

func (m *APIKeyMutation) Type() string

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

func (*APIKeyMutation) UpdatedAt

func (m *APIKeyMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*APIKeyMutation) Where

func (m *APIKeyMutation) Where(ps ...predicate.APIKey)

Where appends a list predicates to the APIKeyMutation builder.

func (*APIKeyMutation) WhereP

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

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

type APIKeyQuery

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

APIKeyQuery is the builder for querying APIKey entities.

func (*APIKeyQuery) Aggregate

func (_q *APIKeyQuery) Aggregate(fns ...AggregateFunc) *APIKeySelect

Aggregate returns a APIKeySelect configured with the given aggregations.

func (*APIKeyQuery) All

func (_q *APIKeyQuery) All(ctx context.Context) ([]*APIKey, error)

All executes the query and returns a list of APIKeys.

func (*APIKeyQuery) AllX

func (_q *APIKeyQuery) AllX(ctx context.Context) []*APIKey

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

func (*APIKeyQuery) Clone

func (_q *APIKeyQuery) Clone() *APIKeyQuery

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

func (*APIKeyQuery) Count

func (_q *APIKeyQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*APIKeyQuery) CountX

func (_q *APIKeyQuery) CountX(ctx context.Context) int

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

func (*APIKeyQuery) Exist

func (_q *APIKeyQuery) Exist(ctx context.Context) (bool, error)

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

func (*APIKeyQuery) ExistX

func (_q *APIKeyQuery) ExistX(ctx context.Context) bool

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

func (*APIKeyQuery) Filter

func (_q *APIKeyQuery) Filter() *APIKeyFilter

Filter returns a Filter implementation to apply filters on the APIKeyQuery builder.

func (*APIKeyQuery) First

func (_q *APIKeyQuery) First(ctx context.Context) (*APIKey, error)

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

func (*APIKeyQuery) FirstID

func (_q *APIKeyQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*APIKeyQuery) FirstIDX

func (_q *APIKeyQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*APIKeyQuery) FirstX

func (_q *APIKeyQuery) FirstX(ctx context.Context) *APIKey

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

func (*APIKeyQuery) GroupBy

func (_q *APIKeyQuery) GroupBy(field string, fields ...string) *APIKeyGroupBy

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 {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.APIKey.Query().
	GroupBy(apikey.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*APIKeyQuery) IDs

func (_q *APIKeyQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

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

func (*APIKeyQuery) IDsX

func (_q *APIKeyQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*APIKeyQuery) Limit

func (_q *APIKeyQuery) Limit(limit int) *APIKeyQuery

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

func (*APIKeyQuery) Offset

func (_q *APIKeyQuery) Offset(offset int) *APIKeyQuery

Offset to start from.

func (*APIKeyQuery) Only

func (_q *APIKeyQuery) Only(ctx context.Context) (*APIKey, error)

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

func (*APIKeyQuery) OnlyID

func (_q *APIKeyQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*APIKeyQuery) OnlyIDX

func (_q *APIKeyQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*APIKeyQuery) OnlyX

func (_q *APIKeyQuery) OnlyX(ctx context.Context) *APIKey

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

func (*APIKeyQuery) Order

func (_q *APIKeyQuery) Order(o ...apikey.OrderOption) *APIKeyQuery

Order specifies how the records should be ordered.

func (*APIKeyQuery) QueryOrganization

func (_q *APIKeyQuery) QueryOrganization() *OrganizationQuery

QueryOrganization chains the current query on the "organization" edge.

func (*APIKeyQuery) QueryOwner

func (_q *APIKeyQuery) QueryOwner() *UserQuery

QueryOwner chains the current query on the "owner" edge.

func (*APIKeyQuery) Select

func (_q *APIKeyQuery) Select(fields ...string) *APIKeySelect

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 {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.APIKey.Query().
	Select(apikey.FieldCreatedAt).
	Scan(ctx, &v)

func (*APIKeyQuery) Unique

func (_q *APIKeyQuery) Unique(unique bool) *APIKeyQuery

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 (*APIKeyQuery) Where

func (_q *APIKeyQuery) Where(ps ...predicate.APIKey) *APIKeyQuery

Where adds a new predicate for the APIKeyQuery builder.

func (*APIKeyQuery) WithOrganization

func (_q *APIKeyQuery) WithOrganization(opts ...func(*OrganizationQuery)) *APIKeyQuery

WithOrganization tells the query-builder to eager-load the nodes that are connected to the "organization" edge. The optional arguments are used to configure the query builder of the edge.

func (*APIKeyQuery) WithOwner

func (_q *APIKeyQuery) WithOwner(opts ...func(*UserQuery)) *APIKeyQuery

WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.

type APIKeySelect

type APIKeySelect struct {
	*APIKeyQuery
	// contains filtered or unexported fields
}

APIKeySelect is the builder for selecting fields of APIKey entities.

func (*APIKeySelect) Aggregate

func (_s *APIKeySelect) Aggregate(fns ...AggregateFunc) *APIKeySelect

Aggregate adds the given aggregation functions to the selector query.

func (*APIKeySelect) Bool

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

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

func (*APIKeySelect) BoolX

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

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

func (*APIKeySelect) Bools

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

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

func (*APIKeySelect) BoolsX

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

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

func (*APIKeySelect) Float64

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

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

func (*APIKeySelect) Float64X

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

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

func (*APIKeySelect) Float64s

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

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

func (*APIKeySelect) Float64sX

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

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

func (*APIKeySelect) Int

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

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

func (*APIKeySelect) IntX

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

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

func (*APIKeySelect) Ints

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

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

func (*APIKeySelect) IntsX

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

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

func (*APIKeySelect) Scan

func (_s *APIKeySelect) Scan(ctx context.Context, v any) error

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

func (*APIKeySelect) ScanX

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

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

func (*APIKeySelect) String

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

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

func (*APIKeySelect) StringX

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

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

func (*APIKeySelect) Strings

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

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

func (*APIKeySelect) StringsX

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

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

type APIKeyUpdate

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

APIKeyUpdate is the builder for updating APIKey entities.

func (*APIKeyUpdate) AppendScopes

func (_u *APIKeyUpdate) AppendScopes(v []string) *APIKeyUpdate

AppendScopes appends value to the "scopes" field.

func (*APIKeyUpdate) ClearDescription

func (_u *APIKeyUpdate) ClearDescription() *APIKeyUpdate

ClearDescription clears the value of the "description" field.

func (*APIKeyUpdate) ClearExpiresAt

func (_u *APIKeyUpdate) ClearExpiresAt() *APIKeyUpdate

ClearExpiresAt clears the value of the "expires_at" field.

func (*APIKeyUpdate) ClearLastUsedAt

func (_u *APIKeyUpdate) ClearLastUsedAt() *APIKeyUpdate

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*APIKeyUpdate) ClearLastUsedIP

func (_u *APIKeyUpdate) ClearLastUsedIP() *APIKeyUpdate

ClearLastUsedIP clears the value of the "last_used_ip" field.

func (*APIKeyUpdate) ClearMetadata

func (_u *APIKeyUpdate) ClearMetadata() *APIKeyUpdate

ClearMetadata clears the value of the "metadata" field.

func (*APIKeyUpdate) ClearOrganization

func (_u *APIKeyUpdate) ClearOrganization() *APIKeyUpdate

ClearOrganization clears the "organization" edge to the Organization entity.

func (*APIKeyUpdate) ClearOwner

func (_u *APIKeyUpdate) ClearOwner() *APIKeyUpdate

ClearOwner clears the "owner" edge to the User entity.

func (*APIKeyUpdate) ClearRevokedAt

func (_u *APIKeyUpdate) ClearRevokedAt() *APIKeyUpdate

ClearRevokedAt clears the value of the "revoked_at" field.

func (*APIKeyUpdate) ClearRevokedReason

func (_u *APIKeyUpdate) ClearRevokedReason() *APIKeyUpdate

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*APIKeyUpdate) ClearScopes

func (_u *APIKeyUpdate) ClearScopes() *APIKeyUpdate

ClearScopes clears the value of the "scopes" field.

func (*APIKeyUpdate) Exec

func (_u *APIKeyUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*APIKeyUpdate) ExecX

func (_u *APIKeyUpdate) ExecX(ctx context.Context)

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

func (*APIKeyUpdate) Mutation

func (_u *APIKeyUpdate) Mutation() *APIKeyMutation

Mutation returns the APIKeyMutation object of the builder.

func (*APIKeyUpdate) Save

func (_u *APIKeyUpdate) Save(ctx context.Context) (int, error)

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

func (*APIKeyUpdate) SaveX

func (_u *APIKeyUpdate) SaveX(ctx context.Context) int

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

func (*APIKeyUpdate) SetDescription

func (_u *APIKeyUpdate) SetDescription(v string) *APIKeyUpdate

SetDescription sets the "description" field.

func (*APIKeyUpdate) SetEnvironment

func (_u *APIKeyUpdate) SetEnvironment(v apikey.Environment) *APIKeyUpdate

SetEnvironment sets the "environment" field.

func (*APIKeyUpdate) SetExpiresAt

func (_u *APIKeyUpdate) SetExpiresAt(v time.Time) *APIKeyUpdate

SetExpiresAt sets the "expires_at" field.

func (*APIKeyUpdate) SetKeyHash

func (_u *APIKeyUpdate) SetKeyHash(v string) *APIKeyUpdate

SetKeyHash sets the "key_hash" field.

func (*APIKeyUpdate) SetLastUsedAt

func (_u *APIKeyUpdate) SetLastUsedAt(v time.Time) *APIKeyUpdate

SetLastUsedAt sets the "last_used_at" field.

func (*APIKeyUpdate) SetLastUsedIP

func (_u *APIKeyUpdate) SetLastUsedIP(v string) *APIKeyUpdate

SetLastUsedIP sets the "last_used_ip" field.

func (*APIKeyUpdate) SetMetadata

func (_u *APIKeyUpdate) SetMetadata(v map[string]string) *APIKeyUpdate

SetMetadata sets the "metadata" field.

func (*APIKeyUpdate) SetName

func (_u *APIKeyUpdate) SetName(v string) *APIKeyUpdate

SetName sets the "name" field.

func (*APIKeyUpdate) SetNillableDescription

func (_u *APIKeyUpdate) SetNillableDescription(v *string) *APIKeyUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*APIKeyUpdate) SetNillableEnvironment

func (_u *APIKeyUpdate) SetNillableEnvironment(v *apikey.Environment) *APIKeyUpdate

SetNillableEnvironment sets the "environment" field if the given value is not nil.

func (*APIKeyUpdate) SetNillableExpiresAt

func (_u *APIKeyUpdate) SetNillableExpiresAt(v *time.Time) *APIKeyUpdate

SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.

func (*APIKeyUpdate) SetNillableKeyHash

func (_u *APIKeyUpdate) SetNillableKeyHash(v *string) *APIKeyUpdate

SetNillableKeyHash sets the "key_hash" field if the given value is not nil.

func (*APIKeyUpdate) SetNillableLastUsedAt

func (_u *APIKeyUpdate) SetNillableLastUsedAt(v *time.Time) *APIKeyUpdate

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*APIKeyUpdate) SetNillableLastUsedIP

func (_u *APIKeyUpdate) SetNillableLastUsedIP(v *string) *APIKeyUpdate

SetNillableLastUsedIP sets the "last_used_ip" field if the given value is not nil.

func (*APIKeyUpdate) SetNillableName

func (_u *APIKeyUpdate) SetNillableName(v *string) *APIKeyUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*APIKeyUpdate) SetNillableOrganizationID

func (_u *APIKeyUpdate) SetNillableOrganizationID(id *uuid.UUID) *APIKeyUpdate

SetNillableOrganizationID sets the "organization" edge to the Organization entity by ID if the given value is not nil.

func (*APIKeyUpdate) SetNillablePrefix

func (_u *APIKeyUpdate) SetNillablePrefix(v *string) *APIKeyUpdate

SetNillablePrefix sets the "prefix" field if the given value is not nil.

func (*APIKeyUpdate) SetNillableRevoked

func (_u *APIKeyUpdate) SetNillableRevoked(v *bool) *APIKeyUpdate

SetNillableRevoked sets the "revoked" field if the given value is not nil.

func (*APIKeyUpdate) SetNillableRevokedAt

func (_u *APIKeyUpdate) SetNillableRevokedAt(v *time.Time) *APIKeyUpdate

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*APIKeyUpdate) SetNillableRevokedReason

func (_u *APIKeyUpdate) SetNillableRevokedReason(v *string) *APIKeyUpdate

SetNillableRevokedReason sets the "revoked_reason" field if the given value is not nil.

func (*APIKeyUpdate) SetOrganization

func (_u *APIKeyUpdate) SetOrganization(v *Organization) *APIKeyUpdate

SetOrganization sets the "organization" edge to the Organization entity.

func (*APIKeyUpdate) SetOrganizationID

func (_u *APIKeyUpdate) SetOrganizationID(id uuid.UUID) *APIKeyUpdate

SetOrganizationID sets the "organization" edge to the Organization entity by ID.

func (*APIKeyUpdate) SetOwner

func (_u *APIKeyUpdate) SetOwner(v *User) *APIKeyUpdate

SetOwner sets the "owner" edge to the User entity.

func (*APIKeyUpdate) SetOwnerID

func (_u *APIKeyUpdate) SetOwnerID(id uuid.UUID) *APIKeyUpdate

SetOwnerID sets the "owner" edge to the User entity by ID.

func (*APIKeyUpdate) SetPrefix

func (_u *APIKeyUpdate) SetPrefix(v string) *APIKeyUpdate

SetPrefix sets the "prefix" field.

func (*APIKeyUpdate) SetRevoked

func (_u *APIKeyUpdate) SetRevoked(v bool) *APIKeyUpdate

SetRevoked sets the "revoked" field.

func (*APIKeyUpdate) SetRevokedAt

func (_u *APIKeyUpdate) SetRevokedAt(v time.Time) *APIKeyUpdate

SetRevokedAt sets the "revoked_at" field.

func (*APIKeyUpdate) SetRevokedReason

func (_u *APIKeyUpdate) SetRevokedReason(v string) *APIKeyUpdate

SetRevokedReason sets the "revoked_reason" field.

func (*APIKeyUpdate) SetScopes

func (_u *APIKeyUpdate) SetScopes(v []string) *APIKeyUpdate

SetScopes sets the "scopes" field.

func (*APIKeyUpdate) SetUpdatedAt

func (_u *APIKeyUpdate) SetUpdatedAt(v time.Time) *APIKeyUpdate

SetUpdatedAt sets the "updated_at" field.

func (*APIKeyUpdate) Where

func (_u *APIKeyUpdate) Where(ps ...predicate.APIKey) *APIKeyUpdate

Where appends a list predicates to the APIKeyUpdate builder.

type APIKeyUpdateOne

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

APIKeyUpdateOne is the builder for updating a single APIKey entity.

func (*APIKeyUpdateOne) AppendScopes

func (_u *APIKeyUpdateOne) AppendScopes(v []string) *APIKeyUpdateOne

AppendScopes appends value to the "scopes" field.

func (*APIKeyUpdateOne) ClearDescription

func (_u *APIKeyUpdateOne) ClearDescription() *APIKeyUpdateOne

ClearDescription clears the value of the "description" field.

func (*APIKeyUpdateOne) ClearExpiresAt

func (_u *APIKeyUpdateOne) ClearExpiresAt() *APIKeyUpdateOne

ClearExpiresAt clears the value of the "expires_at" field.

func (*APIKeyUpdateOne) ClearLastUsedAt

func (_u *APIKeyUpdateOne) ClearLastUsedAt() *APIKeyUpdateOne

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*APIKeyUpdateOne) ClearLastUsedIP

func (_u *APIKeyUpdateOne) ClearLastUsedIP() *APIKeyUpdateOne

ClearLastUsedIP clears the value of the "last_used_ip" field.

func (*APIKeyUpdateOne) ClearMetadata

func (_u *APIKeyUpdateOne) ClearMetadata() *APIKeyUpdateOne

ClearMetadata clears the value of the "metadata" field.

func (*APIKeyUpdateOne) ClearOrganization

func (_u *APIKeyUpdateOne) ClearOrganization() *APIKeyUpdateOne

ClearOrganization clears the "organization" edge to the Organization entity.

func (*APIKeyUpdateOne) ClearOwner

func (_u *APIKeyUpdateOne) ClearOwner() *APIKeyUpdateOne

ClearOwner clears the "owner" edge to the User entity.

func (*APIKeyUpdateOne) ClearRevokedAt

func (_u *APIKeyUpdateOne) ClearRevokedAt() *APIKeyUpdateOne

ClearRevokedAt clears the value of the "revoked_at" field.

func (*APIKeyUpdateOne) ClearRevokedReason

func (_u *APIKeyUpdateOne) ClearRevokedReason() *APIKeyUpdateOne

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*APIKeyUpdateOne) ClearScopes

func (_u *APIKeyUpdateOne) ClearScopes() *APIKeyUpdateOne

ClearScopes clears the value of the "scopes" field.

func (*APIKeyUpdateOne) Exec

func (_u *APIKeyUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*APIKeyUpdateOne) ExecX

func (_u *APIKeyUpdateOne) ExecX(ctx context.Context)

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

func (*APIKeyUpdateOne) Mutation

func (_u *APIKeyUpdateOne) Mutation() *APIKeyMutation

Mutation returns the APIKeyMutation object of the builder.

func (*APIKeyUpdateOne) Save

func (_u *APIKeyUpdateOne) Save(ctx context.Context) (*APIKey, error)

Save executes the query and returns the updated APIKey entity.

func (*APIKeyUpdateOne) SaveX

func (_u *APIKeyUpdateOne) SaveX(ctx context.Context) *APIKey

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

func (*APIKeyUpdateOne) Select

func (_u *APIKeyUpdateOne) Select(field string, fields ...string) *APIKeyUpdateOne

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

func (*APIKeyUpdateOne) SetDescription

func (_u *APIKeyUpdateOne) SetDescription(v string) *APIKeyUpdateOne

SetDescription sets the "description" field.

func (*APIKeyUpdateOne) SetEnvironment

func (_u *APIKeyUpdateOne) SetEnvironment(v apikey.Environment) *APIKeyUpdateOne

SetEnvironment sets the "environment" field.

func (*APIKeyUpdateOne) SetExpiresAt

func (_u *APIKeyUpdateOne) SetExpiresAt(v time.Time) *APIKeyUpdateOne

SetExpiresAt sets the "expires_at" field.

func (*APIKeyUpdateOne) SetKeyHash

func (_u *APIKeyUpdateOne) SetKeyHash(v string) *APIKeyUpdateOne

SetKeyHash sets the "key_hash" field.

func (*APIKeyUpdateOne) SetLastUsedAt

func (_u *APIKeyUpdateOne) SetLastUsedAt(v time.Time) *APIKeyUpdateOne

SetLastUsedAt sets the "last_used_at" field.

func (*APIKeyUpdateOne) SetLastUsedIP

func (_u *APIKeyUpdateOne) SetLastUsedIP(v string) *APIKeyUpdateOne

SetLastUsedIP sets the "last_used_ip" field.

func (*APIKeyUpdateOne) SetMetadata

func (_u *APIKeyUpdateOne) SetMetadata(v map[string]string) *APIKeyUpdateOne

SetMetadata sets the "metadata" field.

func (*APIKeyUpdateOne) SetName

func (_u *APIKeyUpdateOne) SetName(v string) *APIKeyUpdateOne

SetName sets the "name" field.

func (*APIKeyUpdateOne) SetNillableDescription

func (_u *APIKeyUpdateOne) SetNillableDescription(v *string) *APIKeyUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*APIKeyUpdateOne) SetNillableEnvironment

func (_u *APIKeyUpdateOne) SetNillableEnvironment(v *apikey.Environment) *APIKeyUpdateOne

SetNillableEnvironment sets the "environment" field if the given value is not nil.

func (*APIKeyUpdateOne) SetNillableExpiresAt

func (_u *APIKeyUpdateOne) SetNillableExpiresAt(v *time.Time) *APIKeyUpdateOne

SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.

func (*APIKeyUpdateOne) SetNillableKeyHash

func (_u *APIKeyUpdateOne) SetNillableKeyHash(v *string) *APIKeyUpdateOne

SetNillableKeyHash sets the "key_hash" field if the given value is not nil.

func (*APIKeyUpdateOne) SetNillableLastUsedAt

func (_u *APIKeyUpdateOne) SetNillableLastUsedAt(v *time.Time) *APIKeyUpdateOne

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*APIKeyUpdateOne) SetNillableLastUsedIP

func (_u *APIKeyUpdateOne) SetNillableLastUsedIP(v *string) *APIKeyUpdateOne

SetNillableLastUsedIP sets the "last_used_ip" field if the given value is not nil.

func (*APIKeyUpdateOne) SetNillableName

func (_u *APIKeyUpdateOne) SetNillableName(v *string) *APIKeyUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*APIKeyUpdateOne) SetNillableOrganizationID

func (_u *APIKeyUpdateOne) SetNillableOrganizationID(id *uuid.UUID) *APIKeyUpdateOne

SetNillableOrganizationID sets the "organization" edge to the Organization entity by ID if the given value is not nil.

func (*APIKeyUpdateOne) SetNillablePrefix

func (_u *APIKeyUpdateOne) SetNillablePrefix(v *string) *APIKeyUpdateOne

SetNillablePrefix sets the "prefix" field if the given value is not nil.

func (*APIKeyUpdateOne) SetNillableRevoked

func (_u *APIKeyUpdateOne) SetNillableRevoked(v *bool) *APIKeyUpdateOne

SetNillableRevoked sets the "revoked" field if the given value is not nil.

func (*APIKeyUpdateOne) SetNillableRevokedAt

func (_u *APIKeyUpdateOne) SetNillableRevokedAt(v *time.Time) *APIKeyUpdateOne

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*APIKeyUpdateOne) SetNillableRevokedReason

func (_u *APIKeyUpdateOne) SetNillableRevokedReason(v *string) *APIKeyUpdateOne

SetNillableRevokedReason sets the "revoked_reason" field if the given value is not nil.

func (*APIKeyUpdateOne) SetOrganization

func (_u *APIKeyUpdateOne) SetOrganization(v *Organization) *APIKeyUpdateOne

SetOrganization sets the "organization" edge to the Organization entity.

func (*APIKeyUpdateOne) SetOrganizationID

func (_u *APIKeyUpdateOne) SetOrganizationID(id uuid.UUID) *APIKeyUpdateOne

SetOrganizationID sets the "organization" edge to the Organization entity by ID.

func (*APIKeyUpdateOne) SetOwner

func (_u *APIKeyUpdateOne) SetOwner(v *User) *APIKeyUpdateOne

SetOwner sets the "owner" edge to the User entity.

func (*APIKeyUpdateOne) SetOwnerID

func (_u *APIKeyUpdateOne) SetOwnerID(id uuid.UUID) *APIKeyUpdateOne

SetOwnerID sets the "owner" edge to the User entity by ID.

func (*APIKeyUpdateOne) SetPrefix

func (_u *APIKeyUpdateOne) SetPrefix(v string) *APIKeyUpdateOne

SetPrefix sets the "prefix" field.

func (*APIKeyUpdateOne) SetRevoked

func (_u *APIKeyUpdateOne) SetRevoked(v bool) *APIKeyUpdateOne

SetRevoked sets the "revoked" field.

func (*APIKeyUpdateOne) SetRevokedAt

func (_u *APIKeyUpdateOne) SetRevokedAt(v time.Time) *APIKeyUpdateOne

SetRevokedAt sets the "revoked_at" field.

func (*APIKeyUpdateOne) SetRevokedReason

func (_u *APIKeyUpdateOne) SetRevokedReason(v string) *APIKeyUpdateOne

SetRevokedReason sets the "revoked_reason" field.

func (*APIKeyUpdateOne) SetScopes

func (_u *APIKeyUpdateOne) SetScopes(v []string) *APIKeyUpdateOne

SetScopes sets the "scopes" field.

func (*APIKeyUpdateOne) SetUpdatedAt

func (_u *APIKeyUpdateOne) SetUpdatedAt(v time.Time) *APIKeyUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*APIKeyUpdateOne) Where

func (_u *APIKeyUpdateOne) Where(ps ...predicate.APIKey) *APIKeyUpdateOne

Where appends a list predicates to the APIKeyUpdate builder.

type APIKeyUpsert

type APIKeyUpsert struct {
	*sql.UpdateSet
}

APIKeyUpsert is the "OnConflict" setter.

func (*APIKeyUpsert) ClearDescription

func (u *APIKeyUpsert) ClearDescription() *APIKeyUpsert

ClearDescription clears the value of the "description" field.

func (*APIKeyUpsert) ClearExpiresAt

func (u *APIKeyUpsert) ClearExpiresAt() *APIKeyUpsert

ClearExpiresAt clears the value of the "expires_at" field.

func (*APIKeyUpsert) ClearLastUsedAt

func (u *APIKeyUpsert) ClearLastUsedAt() *APIKeyUpsert

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*APIKeyUpsert) ClearLastUsedIP

func (u *APIKeyUpsert) ClearLastUsedIP() *APIKeyUpsert

ClearLastUsedIP clears the value of the "last_used_ip" field.

func (*APIKeyUpsert) ClearMetadata

func (u *APIKeyUpsert) ClearMetadata() *APIKeyUpsert

ClearMetadata clears the value of the "metadata" field.

func (*APIKeyUpsert) ClearRevokedAt

func (u *APIKeyUpsert) ClearRevokedAt() *APIKeyUpsert

ClearRevokedAt clears the value of the "revoked_at" field.

func (*APIKeyUpsert) ClearRevokedReason

func (u *APIKeyUpsert) ClearRevokedReason() *APIKeyUpsert

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*APIKeyUpsert) ClearScopes

func (u *APIKeyUpsert) ClearScopes() *APIKeyUpsert

ClearScopes clears the value of the "scopes" field.

func (*APIKeyUpsert) SetDescription

func (u *APIKeyUpsert) SetDescription(v string) *APIKeyUpsert

SetDescription sets the "description" field.

func (*APIKeyUpsert) SetEnvironment

func (u *APIKeyUpsert) SetEnvironment(v apikey.Environment) *APIKeyUpsert

SetEnvironment sets the "environment" field.

func (*APIKeyUpsert) SetExpiresAt

func (u *APIKeyUpsert) SetExpiresAt(v time.Time) *APIKeyUpsert

SetExpiresAt sets the "expires_at" field.

func (*APIKeyUpsert) SetKeyHash

func (u *APIKeyUpsert) SetKeyHash(v string) *APIKeyUpsert

SetKeyHash sets the "key_hash" field.

func (*APIKeyUpsert) SetLastUsedAt

func (u *APIKeyUpsert) SetLastUsedAt(v time.Time) *APIKeyUpsert

SetLastUsedAt sets the "last_used_at" field.

func (*APIKeyUpsert) SetLastUsedIP

func (u *APIKeyUpsert) SetLastUsedIP(v string) *APIKeyUpsert

SetLastUsedIP sets the "last_used_ip" field.

func (*APIKeyUpsert) SetMetadata

func (u *APIKeyUpsert) SetMetadata(v map[string]string) *APIKeyUpsert

SetMetadata sets the "metadata" field.

func (*APIKeyUpsert) SetName

func (u *APIKeyUpsert) SetName(v string) *APIKeyUpsert

SetName sets the "name" field.

func (*APIKeyUpsert) SetPrefix

func (u *APIKeyUpsert) SetPrefix(v string) *APIKeyUpsert

SetPrefix sets the "prefix" field.

func (*APIKeyUpsert) SetRevoked

func (u *APIKeyUpsert) SetRevoked(v bool) *APIKeyUpsert

SetRevoked sets the "revoked" field.

func (*APIKeyUpsert) SetRevokedAt

func (u *APIKeyUpsert) SetRevokedAt(v time.Time) *APIKeyUpsert

SetRevokedAt sets the "revoked_at" field.

func (*APIKeyUpsert) SetRevokedReason

func (u *APIKeyUpsert) SetRevokedReason(v string) *APIKeyUpsert

SetRevokedReason sets the "revoked_reason" field.

func (*APIKeyUpsert) SetScopes

func (u *APIKeyUpsert) SetScopes(v []string) *APIKeyUpsert

SetScopes sets the "scopes" field.

func (*APIKeyUpsert) SetUpdatedAt

func (u *APIKeyUpsert) SetUpdatedAt(v time.Time) *APIKeyUpsert

SetUpdatedAt sets the "updated_at" field.

func (*APIKeyUpsert) UpdateDescription

func (u *APIKeyUpsert) UpdateDescription() *APIKeyUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*APIKeyUpsert) UpdateEnvironment

func (u *APIKeyUpsert) UpdateEnvironment() *APIKeyUpsert

UpdateEnvironment sets the "environment" field to the value that was provided on create.

func (*APIKeyUpsert) UpdateExpiresAt

func (u *APIKeyUpsert) UpdateExpiresAt() *APIKeyUpsert

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*APIKeyUpsert) UpdateKeyHash

func (u *APIKeyUpsert) UpdateKeyHash() *APIKeyUpsert

UpdateKeyHash sets the "key_hash" field to the value that was provided on create.

func (*APIKeyUpsert) UpdateLastUsedAt

func (u *APIKeyUpsert) UpdateLastUsedAt() *APIKeyUpsert

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*APIKeyUpsert) UpdateLastUsedIP

func (u *APIKeyUpsert) UpdateLastUsedIP() *APIKeyUpsert

UpdateLastUsedIP sets the "last_used_ip" field to the value that was provided on create.

func (*APIKeyUpsert) UpdateMetadata

func (u *APIKeyUpsert) UpdateMetadata() *APIKeyUpsert

UpdateMetadata sets the "metadata" field to the value that was provided on create.

func (*APIKeyUpsert) UpdateName

func (u *APIKeyUpsert) UpdateName() *APIKeyUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*APIKeyUpsert) UpdatePrefix

func (u *APIKeyUpsert) UpdatePrefix() *APIKeyUpsert

UpdatePrefix sets the "prefix" field to the value that was provided on create.

func (*APIKeyUpsert) UpdateRevoked

func (u *APIKeyUpsert) UpdateRevoked() *APIKeyUpsert

UpdateRevoked sets the "revoked" field to the value that was provided on create.

func (*APIKeyUpsert) UpdateRevokedAt

func (u *APIKeyUpsert) UpdateRevokedAt() *APIKeyUpsert

UpdateRevokedAt sets the "revoked_at" field to the value that was provided on create.

func (*APIKeyUpsert) UpdateRevokedReason

func (u *APIKeyUpsert) UpdateRevokedReason() *APIKeyUpsert

UpdateRevokedReason sets the "revoked_reason" field to the value that was provided on create.

func (*APIKeyUpsert) UpdateScopes

func (u *APIKeyUpsert) UpdateScopes() *APIKeyUpsert

UpdateScopes sets the "scopes" field to the value that was provided on create.

func (*APIKeyUpsert) UpdateUpdatedAt

func (u *APIKeyUpsert) UpdateUpdatedAt() *APIKeyUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type APIKeyUpsertBulk

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

APIKeyUpsertBulk is the builder for "upsert"-ing a bulk of APIKey nodes.

func (*APIKeyUpsertBulk) ClearDescription

func (u *APIKeyUpsertBulk) ClearDescription() *APIKeyUpsertBulk

ClearDescription clears the value of the "description" field.

func (*APIKeyUpsertBulk) ClearExpiresAt

func (u *APIKeyUpsertBulk) ClearExpiresAt() *APIKeyUpsertBulk

ClearExpiresAt clears the value of the "expires_at" field.

func (*APIKeyUpsertBulk) ClearLastUsedAt

func (u *APIKeyUpsertBulk) ClearLastUsedAt() *APIKeyUpsertBulk

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*APIKeyUpsertBulk) ClearLastUsedIP

func (u *APIKeyUpsertBulk) ClearLastUsedIP() *APIKeyUpsertBulk

ClearLastUsedIP clears the value of the "last_used_ip" field.

func (*APIKeyUpsertBulk) ClearMetadata

func (u *APIKeyUpsertBulk) ClearMetadata() *APIKeyUpsertBulk

ClearMetadata clears the value of the "metadata" field.

func (*APIKeyUpsertBulk) ClearRevokedAt

func (u *APIKeyUpsertBulk) ClearRevokedAt() *APIKeyUpsertBulk

ClearRevokedAt clears the value of the "revoked_at" field.

func (*APIKeyUpsertBulk) ClearRevokedReason

func (u *APIKeyUpsertBulk) ClearRevokedReason() *APIKeyUpsertBulk

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*APIKeyUpsertBulk) ClearScopes

func (u *APIKeyUpsertBulk) ClearScopes() *APIKeyUpsertBulk

ClearScopes clears the value of the "scopes" field.

func (*APIKeyUpsertBulk) DoNothing

func (u *APIKeyUpsertBulk) DoNothing() *APIKeyUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*APIKeyUpsertBulk) Exec

func (u *APIKeyUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*APIKeyUpsertBulk) ExecX

func (u *APIKeyUpsertBulk) ExecX(ctx context.Context)

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

func (*APIKeyUpsertBulk) Ignore

func (u *APIKeyUpsertBulk) Ignore() *APIKeyUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.APIKey.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*APIKeyUpsertBulk) SetDescription

func (u *APIKeyUpsertBulk) SetDescription(v string) *APIKeyUpsertBulk

SetDescription sets the "description" field.

func (*APIKeyUpsertBulk) SetEnvironment

func (u *APIKeyUpsertBulk) SetEnvironment(v apikey.Environment) *APIKeyUpsertBulk

SetEnvironment sets the "environment" field.

func (*APIKeyUpsertBulk) SetExpiresAt

func (u *APIKeyUpsertBulk) SetExpiresAt(v time.Time) *APIKeyUpsertBulk

SetExpiresAt sets the "expires_at" field.

func (*APIKeyUpsertBulk) SetKeyHash

func (u *APIKeyUpsertBulk) SetKeyHash(v string) *APIKeyUpsertBulk

SetKeyHash sets the "key_hash" field.

func (*APIKeyUpsertBulk) SetLastUsedAt

func (u *APIKeyUpsertBulk) SetLastUsedAt(v time.Time) *APIKeyUpsertBulk

SetLastUsedAt sets the "last_used_at" field.

func (*APIKeyUpsertBulk) SetLastUsedIP

func (u *APIKeyUpsertBulk) SetLastUsedIP(v string) *APIKeyUpsertBulk

SetLastUsedIP sets the "last_used_ip" field.

func (*APIKeyUpsertBulk) SetMetadata

func (u *APIKeyUpsertBulk) SetMetadata(v map[string]string) *APIKeyUpsertBulk

SetMetadata sets the "metadata" field.

func (*APIKeyUpsertBulk) SetName

func (u *APIKeyUpsertBulk) SetName(v string) *APIKeyUpsertBulk

SetName sets the "name" field.

func (*APIKeyUpsertBulk) SetPrefix

func (u *APIKeyUpsertBulk) SetPrefix(v string) *APIKeyUpsertBulk

SetPrefix sets the "prefix" field.

func (*APIKeyUpsertBulk) SetRevoked

func (u *APIKeyUpsertBulk) SetRevoked(v bool) *APIKeyUpsertBulk

SetRevoked sets the "revoked" field.

func (*APIKeyUpsertBulk) SetRevokedAt

func (u *APIKeyUpsertBulk) SetRevokedAt(v time.Time) *APIKeyUpsertBulk

SetRevokedAt sets the "revoked_at" field.

func (*APIKeyUpsertBulk) SetRevokedReason

func (u *APIKeyUpsertBulk) SetRevokedReason(v string) *APIKeyUpsertBulk

SetRevokedReason sets the "revoked_reason" field.

func (*APIKeyUpsertBulk) SetScopes

func (u *APIKeyUpsertBulk) SetScopes(v []string) *APIKeyUpsertBulk

SetScopes sets the "scopes" field.

func (*APIKeyUpsertBulk) SetUpdatedAt

func (u *APIKeyUpsertBulk) SetUpdatedAt(v time.Time) *APIKeyUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*APIKeyUpsertBulk) Update

func (u *APIKeyUpsertBulk) Update(set func(*APIKeyUpsert)) *APIKeyUpsertBulk

Update allows overriding fields `UPDATE` values. See the APIKeyCreateBulk.OnConflict documentation for more info.

func (*APIKeyUpsertBulk) UpdateDescription

func (u *APIKeyUpsertBulk) UpdateDescription() *APIKeyUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*APIKeyUpsertBulk) UpdateEnvironment

func (u *APIKeyUpsertBulk) UpdateEnvironment() *APIKeyUpsertBulk

UpdateEnvironment sets the "environment" field to the value that was provided on create.

func (*APIKeyUpsertBulk) UpdateExpiresAt

func (u *APIKeyUpsertBulk) UpdateExpiresAt() *APIKeyUpsertBulk

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*APIKeyUpsertBulk) UpdateKeyHash

func (u *APIKeyUpsertBulk) UpdateKeyHash() *APIKeyUpsertBulk

UpdateKeyHash sets the "key_hash" field to the value that was provided on create.

func (*APIKeyUpsertBulk) UpdateLastUsedAt

func (u *APIKeyUpsertBulk) UpdateLastUsedAt() *APIKeyUpsertBulk

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*APIKeyUpsertBulk) UpdateLastUsedIP

func (u *APIKeyUpsertBulk) UpdateLastUsedIP() *APIKeyUpsertBulk

UpdateLastUsedIP sets the "last_used_ip" field to the value that was provided on create.

func (*APIKeyUpsertBulk) UpdateMetadata

func (u *APIKeyUpsertBulk) UpdateMetadata() *APIKeyUpsertBulk

UpdateMetadata sets the "metadata" field to the value that was provided on create.

func (*APIKeyUpsertBulk) UpdateName

func (u *APIKeyUpsertBulk) UpdateName() *APIKeyUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*APIKeyUpsertBulk) UpdateNewValues

func (u *APIKeyUpsertBulk) UpdateNewValues() *APIKeyUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.APIKey.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(apikey.FieldID)
		}),
	).
	Exec(ctx)

func (*APIKeyUpsertBulk) UpdatePrefix

func (u *APIKeyUpsertBulk) UpdatePrefix() *APIKeyUpsertBulk

UpdatePrefix sets the "prefix" field to the value that was provided on create.

func (*APIKeyUpsertBulk) UpdateRevoked

func (u *APIKeyUpsertBulk) UpdateRevoked() *APIKeyUpsertBulk

UpdateRevoked sets the "revoked" field to the value that was provided on create.

func (*APIKeyUpsertBulk) UpdateRevokedAt

func (u *APIKeyUpsertBulk) UpdateRevokedAt() *APIKeyUpsertBulk

UpdateRevokedAt sets the "revoked_at" field to the value that was provided on create.

func (*APIKeyUpsertBulk) UpdateRevokedReason

func (u *APIKeyUpsertBulk) UpdateRevokedReason() *APIKeyUpsertBulk

UpdateRevokedReason sets the "revoked_reason" field to the value that was provided on create.

func (*APIKeyUpsertBulk) UpdateScopes

func (u *APIKeyUpsertBulk) UpdateScopes() *APIKeyUpsertBulk

UpdateScopes sets the "scopes" field to the value that was provided on create.

func (*APIKeyUpsertBulk) UpdateUpdatedAt

func (u *APIKeyUpsertBulk) UpdateUpdatedAt() *APIKeyUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type APIKeyUpsertOne

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

APIKeyUpsertOne is the builder for "upsert"-ing

one APIKey node.

func (*APIKeyUpsertOne) ClearDescription

func (u *APIKeyUpsertOne) ClearDescription() *APIKeyUpsertOne

ClearDescription clears the value of the "description" field.

func (*APIKeyUpsertOne) ClearExpiresAt

func (u *APIKeyUpsertOne) ClearExpiresAt() *APIKeyUpsertOne

ClearExpiresAt clears the value of the "expires_at" field.

func (*APIKeyUpsertOne) ClearLastUsedAt

func (u *APIKeyUpsertOne) ClearLastUsedAt() *APIKeyUpsertOne

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*APIKeyUpsertOne) ClearLastUsedIP

func (u *APIKeyUpsertOne) ClearLastUsedIP() *APIKeyUpsertOne

ClearLastUsedIP clears the value of the "last_used_ip" field.

func (*APIKeyUpsertOne) ClearMetadata

func (u *APIKeyUpsertOne) ClearMetadata() *APIKeyUpsertOne

ClearMetadata clears the value of the "metadata" field.

func (*APIKeyUpsertOne) ClearRevokedAt

func (u *APIKeyUpsertOne) ClearRevokedAt() *APIKeyUpsertOne

ClearRevokedAt clears the value of the "revoked_at" field.

func (*APIKeyUpsertOne) ClearRevokedReason

func (u *APIKeyUpsertOne) ClearRevokedReason() *APIKeyUpsertOne

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*APIKeyUpsertOne) ClearScopes

func (u *APIKeyUpsertOne) ClearScopes() *APIKeyUpsertOne

ClearScopes clears the value of the "scopes" field.

func (*APIKeyUpsertOne) DoNothing

func (u *APIKeyUpsertOne) DoNothing() *APIKeyUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*APIKeyUpsertOne) Exec

func (u *APIKeyUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*APIKeyUpsertOne) ExecX

func (u *APIKeyUpsertOne) ExecX(ctx context.Context)

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

func (*APIKeyUpsertOne) ID

func (u *APIKeyUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*APIKeyUpsertOne) IDX

func (u *APIKeyUpsertOne) IDX(ctx context.Context) uuid.UUID

IDX is like ID, but panics if an error occurs.

func (*APIKeyUpsertOne) Ignore

func (u *APIKeyUpsertOne) Ignore() *APIKeyUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.APIKey.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*APIKeyUpsertOne) SetDescription

func (u *APIKeyUpsertOne) SetDescription(v string) *APIKeyUpsertOne

SetDescription sets the "description" field.

func (*APIKeyUpsertOne) SetEnvironment

func (u *APIKeyUpsertOne) SetEnvironment(v apikey.Environment) *APIKeyUpsertOne

SetEnvironment sets the "environment" field.

func (*APIKeyUpsertOne) SetExpiresAt

func (u *APIKeyUpsertOne) SetExpiresAt(v time.Time) *APIKeyUpsertOne

SetExpiresAt sets the "expires_at" field.

func (*APIKeyUpsertOne) SetKeyHash

func (u *APIKeyUpsertOne) SetKeyHash(v string) *APIKeyUpsertOne

SetKeyHash sets the "key_hash" field.

func (*APIKeyUpsertOne) SetLastUsedAt

func (u *APIKeyUpsertOne) SetLastUsedAt(v time.Time) *APIKeyUpsertOne

SetLastUsedAt sets the "last_used_at" field.

func (*APIKeyUpsertOne) SetLastUsedIP

func (u *APIKeyUpsertOne) SetLastUsedIP(v string) *APIKeyUpsertOne

SetLastUsedIP sets the "last_used_ip" field.

func (*APIKeyUpsertOne) SetMetadata

func (u *APIKeyUpsertOne) SetMetadata(v map[string]string) *APIKeyUpsertOne

SetMetadata sets the "metadata" field.

func (*APIKeyUpsertOne) SetName

func (u *APIKeyUpsertOne) SetName(v string) *APIKeyUpsertOne

SetName sets the "name" field.

func (*APIKeyUpsertOne) SetPrefix

func (u *APIKeyUpsertOne) SetPrefix(v string) *APIKeyUpsertOne

SetPrefix sets the "prefix" field.

func (*APIKeyUpsertOne) SetRevoked

func (u *APIKeyUpsertOne) SetRevoked(v bool) *APIKeyUpsertOne

SetRevoked sets the "revoked" field.

func (*APIKeyUpsertOne) SetRevokedAt

func (u *APIKeyUpsertOne) SetRevokedAt(v time.Time) *APIKeyUpsertOne

SetRevokedAt sets the "revoked_at" field.

func (*APIKeyUpsertOne) SetRevokedReason

func (u *APIKeyUpsertOne) SetRevokedReason(v string) *APIKeyUpsertOne

SetRevokedReason sets the "revoked_reason" field.

func (*APIKeyUpsertOne) SetScopes

func (u *APIKeyUpsertOne) SetScopes(v []string) *APIKeyUpsertOne

SetScopes sets the "scopes" field.

func (*APIKeyUpsertOne) SetUpdatedAt

func (u *APIKeyUpsertOne) SetUpdatedAt(v time.Time) *APIKeyUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*APIKeyUpsertOne) Update

func (u *APIKeyUpsertOne) Update(set func(*APIKeyUpsert)) *APIKeyUpsertOne

Update allows overriding fields `UPDATE` values. See the APIKeyCreate.OnConflict documentation for more info.

func (*APIKeyUpsertOne) UpdateDescription

func (u *APIKeyUpsertOne) UpdateDescription() *APIKeyUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*APIKeyUpsertOne) UpdateEnvironment

func (u *APIKeyUpsertOne) UpdateEnvironment() *APIKeyUpsertOne

UpdateEnvironment sets the "environment" field to the value that was provided on create.

func (*APIKeyUpsertOne) UpdateExpiresAt

func (u *APIKeyUpsertOne) UpdateExpiresAt() *APIKeyUpsertOne

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*APIKeyUpsertOne) UpdateKeyHash

func (u *APIKeyUpsertOne) UpdateKeyHash() *APIKeyUpsertOne

UpdateKeyHash sets the "key_hash" field to the value that was provided on create.

func (*APIKeyUpsertOne) UpdateLastUsedAt

func (u *APIKeyUpsertOne) UpdateLastUsedAt() *APIKeyUpsertOne

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*APIKeyUpsertOne) UpdateLastUsedIP

func (u *APIKeyUpsertOne) UpdateLastUsedIP() *APIKeyUpsertOne

UpdateLastUsedIP sets the "last_used_ip" field to the value that was provided on create.

func (*APIKeyUpsertOne) UpdateMetadata

func (u *APIKeyUpsertOne) UpdateMetadata() *APIKeyUpsertOne

UpdateMetadata sets the "metadata" field to the value that was provided on create.

func (*APIKeyUpsertOne) UpdateName

func (u *APIKeyUpsertOne) UpdateName() *APIKeyUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*APIKeyUpsertOne) UpdateNewValues

func (u *APIKeyUpsertOne) UpdateNewValues() *APIKeyUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.APIKey.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(apikey.FieldID)
		}),
	).
	Exec(ctx)

func (*APIKeyUpsertOne) UpdatePrefix

func (u *APIKeyUpsertOne) UpdatePrefix() *APIKeyUpsertOne

UpdatePrefix sets the "prefix" field to the value that was provided on create.

func (*APIKeyUpsertOne) UpdateRevoked

func (u *APIKeyUpsertOne) UpdateRevoked() *APIKeyUpsertOne

UpdateRevoked sets the "revoked" field to the value that was provided on create.

func (*APIKeyUpsertOne) UpdateRevokedAt

func (u *APIKeyUpsertOne) UpdateRevokedAt() *APIKeyUpsertOne

UpdateRevokedAt sets the "revoked_at" field to the value that was provided on create.

func (*APIKeyUpsertOne) UpdateRevokedReason

func (u *APIKeyUpsertOne) UpdateRevokedReason() *APIKeyUpsertOne

UpdateRevokedReason sets the "revoked_reason" field to the value that was provided on create.

func (*APIKeyUpsertOne) UpdateScopes

func (u *APIKeyUpsertOne) UpdateScopes() *APIKeyUpsertOne

UpdateScopes sets the "scopes" field to the value that was provided on create.

func (*APIKeyUpsertOne) UpdateUpdatedAt

func (u *APIKeyUpsertOne) UpdateUpdatedAt() *APIKeyUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type APIKeys

type APIKeys []*APIKey

APIKeys is a parsable slice of APIKey.

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(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.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 Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// APIKey is the client for interacting with the APIKey builders.
	APIKey *APIKeyClient
	// Membership is the client for interacting with the Membership builders.
	Membership *MembershipClient
	// OAuthAccount is the client for interacting with the OAuthAccount builders.
	OAuthAccount *OAuthAccountClient
	// OAuthApp is the client for interacting with the OAuthApp builders.
	OAuthApp *OAuthAppClient
	// OAuthAppSecret is the client for interacting with the OAuthAppSecret builders.
	OAuthAppSecret *OAuthAppSecretClient
	// OAuthAuthCode is the client for interacting with the OAuthAuthCode builders.
	OAuthAuthCode *OAuthAuthCodeClient
	// OAuthConsent is the client for interacting with the OAuthConsent builders.
	OAuthConsent *OAuthConsentClient
	// OAuthToken is the client for interacting with the OAuthToken builders.
	OAuthToken *OAuthTokenClient
	// Organization is the client for interacting with the Organization builders.
	Organization *OrganizationClient
	// RefreshToken is the client for interacting with the RefreshToken builders.
	RefreshToken *RefreshTokenClient
	// ServiceAccount is the client for interacting with the ServiceAccount builders.
	ServiceAccount *ServiceAccountClient
	// ServiceAccountKeyPair is the client for interacting with the ServiceAccountKeyPair builders.
	ServiceAccountKeyPair *ServiceAccountKeyPairClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// 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().
	APIKey.
	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 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 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 Membership

type Membership struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// UserID holds the value of the "user_id" field.
	UserID uuid.UUID `json:"user_id,omitempty"`
	// OrganizationID holds the value of the "organization_id" field.
	OrganizationID uuid.UUID `json:"organization_id,omitempty"`
	// App-defined role (e.g., owner, admin, member, student, instructor)
	Role string `json:"role,omitempty"`
	// Optional fine-grained permissions
	Permissions []string `json:"permissions,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the MembershipQuery when eager-loading is set.
	Edges MembershipEdges `json:"edges"`
	// contains filtered or unexported fields
}

Membership is the model entity for the Membership schema.

func (*Membership) QueryOrganization

func (_m *Membership) QueryOrganization() *OrganizationQuery

QueryOrganization queries the "organization" edge of the Membership entity.

func (*Membership) QueryUser

func (_m *Membership) QueryUser() *UserQuery

QueryUser queries the "user" edge of the Membership entity.

func (*Membership) String

func (_m *Membership) String() string

String implements the fmt.Stringer.

func (*Membership) Unwrap

func (_m *Membership) Unwrap() *Membership

Unwrap unwraps the Membership 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 (*Membership) Update

func (_m *Membership) Update() *MembershipUpdateOne

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

func (*Membership) Value

func (_m *Membership) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Membership. This includes values selected through modifiers, order, etc.

type MembershipClient

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

MembershipClient is a client for the Membership schema.

func NewMembershipClient

func NewMembershipClient(c config) *MembershipClient

NewMembershipClient returns a client for the Membership from the given config.

func (*MembershipClient) Create

func (c *MembershipClient) Create() *MembershipCreate

Create returns a builder for creating a Membership entity.

func (*MembershipClient) CreateBulk

func (c *MembershipClient) CreateBulk(builders ...*MembershipCreate) *MembershipCreateBulk

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

func (*MembershipClient) Delete

func (c *MembershipClient) Delete() *MembershipDelete

Delete returns a delete builder for Membership.

func (*MembershipClient) DeleteOne

func (c *MembershipClient) DeleteOne(_m *Membership) *MembershipDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MembershipClient) DeleteOneID

func (c *MembershipClient) DeleteOneID(id uuid.UUID) *MembershipDeleteOne

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

func (*MembershipClient) Get

Get returns a Membership entity by its id.

func (*MembershipClient) GetX

func (c *MembershipClient) GetX(ctx context.Context, id uuid.UUID) *Membership

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

func (*MembershipClient) Hooks

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

Hooks returns the client hooks.

func (*MembershipClient) Intercept

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

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

func (*MembershipClient) Interceptors

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

Interceptors returns the client interceptors.

func (*MembershipClient) MapCreateBulk

func (c *MembershipClient) MapCreateBulk(slice any, setFunc func(*MembershipCreate, int)) *MembershipCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*MembershipClient) Query

func (c *MembershipClient) Query() *MembershipQuery

Query returns a query builder for Membership.

func (*MembershipClient) QueryOrganization

func (c *MembershipClient) QueryOrganization(_m *Membership) *OrganizationQuery

QueryOrganization queries the organization edge of a Membership.

func (*MembershipClient) QueryUser

func (c *MembershipClient) QueryUser(_m *Membership) *UserQuery

QueryUser queries the user edge of a Membership.

func (*MembershipClient) Update

func (c *MembershipClient) Update() *MembershipUpdate

Update returns an update builder for Membership.

func (*MembershipClient) UpdateOne

func (c *MembershipClient) UpdateOne(_m *Membership) *MembershipUpdateOne

UpdateOne returns an update builder for the given entity.

func (*MembershipClient) UpdateOneID

func (c *MembershipClient) UpdateOneID(id uuid.UUID) *MembershipUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MembershipClient) Use

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

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

type MembershipCreate

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

MembershipCreate is the builder for creating a Membership entity.

func (*MembershipCreate) Exec

func (_c *MembershipCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MembershipCreate) ExecX

func (_c *MembershipCreate) ExecX(ctx context.Context)

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

func (*MembershipCreate) Mutation

func (_c *MembershipCreate) Mutation() *MembershipMutation

Mutation returns the MembershipMutation object of the builder.

func (*MembershipCreate) OnConflict

func (_c *MembershipCreate) OnConflict(opts ...sql.ConflictOption) *MembershipUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Membership.Create().
	SetCreatedAt(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.MembershipUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*MembershipCreate) OnConflictColumns

func (_c *MembershipCreate) OnConflictColumns(columns ...string) *MembershipUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Membership.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*MembershipCreate) Save

func (_c *MembershipCreate) Save(ctx context.Context) (*Membership, error)

Save creates the Membership in the database.

func (*MembershipCreate) SaveX

func (_c *MembershipCreate) SaveX(ctx context.Context) *Membership

SaveX calls Save and panics if Save returns an error.

func (*MembershipCreate) SetCreatedAt

func (_c *MembershipCreate) SetCreatedAt(v time.Time) *MembershipCreate

SetCreatedAt sets the "created_at" field.

func (*MembershipCreate) SetID

SetID sets the "id" field.

func (*MembershipCreate) SetNillableCreatedAt

func (_c *MembershipCreate) SetNillableCreatedAt(v *time.Time) *MembershipCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*MembershipCreate) SetNillableID

func (_c *MembershipCreate) SetNillableID(v *uuid.UUID) *MembershipCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*MembershipCreate) SetNillableUpdatedAt

func (_c *MembershipCreate) SetNillableUpdatedAt(v *time.Time) *MembershipCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*MembershipCreate) SetOrganization

func (_c *MembershipCreate) SetOrganization(v *Organization) *MembershipCreate

SetOrganization sets the "organization" edge to the Organization entity.

func (*MembershipCreate) SetOrganizationID

func (_c *MembershipCreate) SetOrganizationID(v uuid.UUID) *MembershipCreate

SetOrganizationID sets the "organization_id" field.

func (*MembershipCreate) SetPermissions

func (_c *MembershipCreate) SetPermissions(v []string) *MembershipCreate

SetPermissions sets the "permissions" field.

func (*MembershipCreate) SetRole

func (_c *MembershipCreate) SetRole(v string) *MembershipCreate

SetRole sets the "role" field.

func (*MembershipCreate) SetUpdatedAt

func (_c *MembershipCreate) SetUpdatedAt(v time.Time) *MembershipCreate

SetUpdatedAt sets the "updated_at" field.

func (*MembershipCreate) SetUser

func (_c *MembershipCreate) SetUser(v *User) *MembershipCreate

SetUser sets the "user" edge to the User entity.

func (*MembershipCreate) SetUserID

func (_c *MembershipCreate) SetUserID(v uuid.UUID) *MembershipCreate

SetUserID sets the "user_id" field.

type MembershipCreateBulk

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

MembershipCreateBulk is the builder for creating many Membership entities in bulk.

func (*MembershipCreateBulk) Exec

func (_c *MembershipCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MembershipCreateBulk) ExecX

func (_c *MembershipCreateBulk) ExecX(ctx context.Context)

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

func (*MembershipCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Membership.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.MembershipUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*MembershipCreateBulk) OnConflictColumns

func (_c *MembershipCreateBulk) OnConflictColumns(columns ...string) *MembershipUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Membership.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*MembershipCreateBulk) Save

func (_c *MembershipCreateBulk) Save(ctx context.Context) ([]*Membership, error)

Save creates the Membership entities in the database.

func (*MembershipCreateBulk) SaveX

func (_c *MembershipCreateBulk) SaveX(ctx context.Context) []*Membership

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

type MembershipDelete

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

MembershipDelete is the builder for deleting a Membership entity.

func (*MembershipDelete) Exec

func (_d *MembershipDelete) Exec(ctx context.Context) (int, error)

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

func (*MembershipDelete) ExecX

func (_d *MembershipDelete) ExecX(ctx context.Context) int

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

func (*MembershipDelete) Where

Where appends a list predicates to the MembershipDelete builder.

type MembershipDeleteOne

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

MembershipDeleteOne is the builder for deleting a single Membership entity.

func (*MembershipDeleteOne) Exec

func (_d *MembershipDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MembershipDeleteOne) ExecX

func (_d *MembershipDeleteOne) ExecX(ctx context.Context)

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

func (*MembershipDeleteOne) Where

Where appends a list predicates to the MembershipDelete builder.

type MembershipEdges

type MembershipEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// Organization holds the value of the organization edge.
	Organization *Organization `json:"organization,omitempty"`
	// contains filtered or unexported fields
}

MembershipEdges holds the relations/edges for other nodes in the graph.

func (MembershipEdges) OrganizationOrErr

func (e MembershipEdges) OrganizationOrErr() (*Organization, error)

OrganizationOrErr returns the Organization value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (MembershipEdges) UserOrErr

func (e MembershipEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type MembershipFilter

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

MembershipFilter provides a generic filtering capability at runtime for MembershipQuery.

func (*MembershipFilter) Where

func (f *MembershipFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*MembershipFilter) WhereCreatedAt

func (f *MembershipFilter) WhereCreatedAt(p entql.TimeP)

WhereCreatedAt applies the entql time.Time predicate on the created_at field.

func (*MembershipFilter) WhereHasOrganization

func (f *MembershipFilter) WhereHasOrganization()

WhereHasOrganization applies a predicate to check if query has an edge organization.

func (*MembershipFilter) WhereHasOrganizationWith

func (f *MembershipFilter) WhereHasOrganizationWith(preds ...predicate.Organization)

WhereHasOrganizationWith applies a predicate to check if query has an edge organization with a given conditions (other predicates).

func (*MembershipFilter) WhereHasUser

func (f *MembershipFilter) WhereHasUser()

WhereHasUser applies a predicate to check if query has an edge user.

func (*MembershipFilter) WhereHasUserWith

func (f *MembershipFilter) WhereHasUserWith(preds ...predicate.User)

WhereHasUserWith applies a predicate to check if query has an edge user with a given conditions (other predicates).

func (*MembershipFilter) WhereID

func (f *MembershipFilter) WhereID(p entql.ValueP)

WhereID applies the entql [16]byte predicate on the id field.

func (*MembershipFilter) WhereOrganizationID

func (f *MembershipFilter) WhereOrganizationID(p entql.ValueP)

WhereOrganizationID applies the entql [16]byte predicate on the organization_id field.

func (*MembershipFilter) WherePermissions

func (f *MembershipFilter) WherePermissions(p entql.BytesP)

WherePermissions applies the entql json.RawMessage predicate on the permissions field.

func (*MembershipFilter) WhereRole

func (f *MembershipFilter) WhereRole(p entql.StringP)

WhereRole applies the entql string predicate on the role field.

func (*MembershipFilter) WhereUpdatedAt

func (f *MembershipFilter) WhereUpdatedAt(p entql.TimeP)

WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.

func (*MembershipFilter) WhereUserID

func (f *MembershipFilter) WhereUserID(p entql.ValueP)

WhereUserID applies the entql [16]byte predicate on the user_id field.

type MembershipGroupBy

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

MembershipGroupBy is the group-by builder for Membership entities.

func (*MembershipGroupBy) Aggregate

func (_g *MembershipGroupBy) Aggregate(fns ...AggregateFunc) *MembershipGroupBy

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

func (*MembershipGroupBy) Bool

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

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

func (*MembershipGroupBy) BoolX

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

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

func (*MembershipGroupBy) Bools

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

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

func (*MembershipGroupBy) BoolsX

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

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

func (*MembershipGroupBy) Float64

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

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

func (*MembershipGroupBy) Float64X

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

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

func (*MembershipGroupBy) Float64s

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

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

func (*MembershipGroupBy) Float64sX

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

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

func (*MembershipGroupBy) Int

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

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

func (*MembershipGroupBy) IntX

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

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

func (*MembershipGroupBy) Ints

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

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

func (*MembershipGroupBy) IntsX

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

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

func (*MembershipGroupBy) Scan

func (_g *MembershipGroupBy) Scan(ctx context.Context, v any) error

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

func (*MembershipGroupBy) ScanX

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

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

func (*MembershipGroupBy) String

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

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

func (*MembershipGroupBy) StringX

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

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

func (*MembershipGroupBy) Strings

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

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

func (*MembershipGroupBy) StringsX

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

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

type MembershipMutation

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

MembershipMutation represents an operation that mutates the Membership nodes in the graph.

func (*MembershipMutation) AddField

func (m *MembershipMutation) 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 (*MembershipMutation) AddedEdges

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

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

func (*MembershipMutation) AddedField

func (m *MembershipMutation) 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 (*MembershipMutation) AddedFields

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

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

func (*MembershipMutation) AddedIDs

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

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

func (*MembershipMutation) AppendPermissions

func (m *MembershipMutation) AppendPermissions(s []string)

AppendPermissions adds s to the "permissions" field.

func (*MembershipMutation) AppendedPermissions

func (m *MembershipMutation) AppendedPermissions() ([]string, bool)

AppendedPermissions returns the list of values that were appended to the "permissions" field in this mutation.

func (*MembershipMutation) ClearEdge

func (m *MembershipMutation) 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 (*MembershipMutation) ClearField

func (m *MembershipMutation) 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 (*MembershipMutation) ClearOrganization

func (m *MembershipMutation) ClearOrganization()

ClearOrganization clears the "organization" edge to the Organization entity.

func (*MembershipMutation) ClearPermissions

func (m *MembershipMutation) ClearPermissions()

ClearPermissions clears the value of the "permissions" field.

func (*MembershipMutation) ClearUser

func (m *MembershipMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*MembershipMutation) ClearedEdges

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

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

func (*MembershipMutation) ClearedFields

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

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

func (MembershipMutation) Client

func (m MembershipMutation) 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 (*MembershipMutation) CreatedAt

func (m *MembershipMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*MembershipMutation) EdgeCleared

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

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

func (*MembershipMutation) Field

func (m *MembershipMutation) 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 (*MembershipMutation) FieldCleared

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

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

func (*MembershipMutation) Fields

func (m *MembershipMutation) 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 (*MembershipMutation) Filter

func (m *MembershipMutation) Filter() *MembershipFilter

Filter returns an entql.Where implementation to apply filters on the MembershipMutation builder.

func (*MembershipMutation) ID

func (m *MembershipMutation) ID() (id uuid.UUID, 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 (*MembershipMutation) IDs

func (m *MembershipMutation) IDs(ctx context.Context) ([]uuid.UUID, 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 (*MembershipMutation) OldCreatedAt

func (m *MembershipMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Membership entity. If the Membership 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 (*MembershipMutation) OldField

func (m *MembershipMutation) 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 (*MembershipMutation) OldOrganizationID

func (m *MembershipMutation) OldOrganizationID(ctx context.Context) (v uuid.UUID, err error)

OldOrganizationID returns the old "organization_id" field's value of the Membership entity. If the Membership 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 (*MembershipMutation) OldPermissions

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

OldPermissions returns the old "permissions" field's value of the Membership entity. If the Membership 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 (*MembershipMutation) OldRole

func (m *MembershipMutation) OldRole(ctx context.Context) (v string, err error)

OldRole returns the old "role" field's value of the Membership entity. If the Membership 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 (*MembershipMutation) OldUpdatedAt

func (m *MembershipMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Membership entity. If the Membership 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 (*MembershipMutation) OldUserID

func (m *MembershipMutation) OldUserID(ctx context.Context) (v uuid.UUID, err error)

OldUserID returns the old "user_id" field's value of the Membership entity. If the Membership 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 (*MembershipMutation) Op

func (m *MembershipMutation) Op() Op

Op returns the operation name.

func (*MembershipMutation) OrganizationCleared

func (m *MembershipMutation) OrganizationCleared() bool

OrganizationCleared reports if the "organization" edge to the Organization entity was cleared.

func (*MembershipMutation) OrganizationID

func (m *MembershipMutation) OrganizationID() (r uuid.UUID, exists bool)

OrganizationID returns the value of the "organization_id" field in the mutation.

func (*MembershipMutation) OrganizationIDs

func (m *MembershipMutation) OrganizationIDs() (ids []uuid.UUID)

OrganizationIDs returns the "organization" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrganizationID instead. It exists only for internal usage by the builders.

func (*MembershipMutation) Permissions

func (m *MembershipMutation) Permissions() (r []string, exists bool)

Permissions returns the value of the "permissions" field in the mutation.

func (*MembershipMutation) PermissionsCleared

func (m *MembershipMutation) PermissionsCleared() bool

PermissionsCleared returns if the "permissions" field was cleared in this mutation.

func (*MembershipMutation) RemovedEdges

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

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

func (*MembershipMutation) RemovedIDs

func (m *MembershipMutation) 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 (*MembershipMutation) ResetCreatedAt

func (m *MembershipMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*MembershipMutation) ResetEdge

func (m *MembershipMutation) 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 (*MembershipMutation) ResetField

func (m *MembershipMutation) 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 (*MembershipMutation) ResetOrganization

func (m *MembershipMutation) ResetOrganization()

ResetOrganization resets all changes to the "organization" edge.

func (*MembershipMutation) ResetOrganizationID

func (m *MembershipMutation) ResetOrganizationID()

ResetOrganizationID resets all changes to the "organization_id" field.

func (*MembershipMutation) ResetPermissions

func (m *MembershipMutation) ResetPermissions()

ResetPermissions resets all changes to the "permissions" field.

func (*MembershipMutation) ResetRole

func (m *MembershipMutation) ResetRole()

ResetRole resets all changes to the "role" field.

func (*MembershipMutation) ResetUpdatedAt

func (m *MembershipMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*MembershipMutation) ResetUser

func (m *MembershipMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*MembershipMutation) ResetUserID

func (m *MembershipMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*MembershipMutation) Role

func (m *MembershipMutation) Role() (r string, exists bool)

Role returns the value of the "role" field in the mutation.

func (*MembershipMutation) SetCreatedAt

func (m *MembershipMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*MembershipMutation) SetField

func (m *MembershipMutation) 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 (*MembershipMutation) SetID

func (m *MembershipMutation) SetID(id uuid.UUID)

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

func (*MembershipMutation) SetOp

func (m *MembershipMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*MembershipMutation) SetOrganizationID

func (m *MembershipMutation) SetOrganizationID(u uuid.UUID)

SetOrganizationID sets the "organization_id" field.

func (*MembershipMutation) SetPermissions

func (m *MembershipMutation) SetPermissions(s []string)

SetPermissions sets the "permissions" field.

func (*MembershipMutation) SetRole

func (m *MembershipMutation) SetRole(s string)

SetRole sets the "role" field.

func (*MembershipMutation) SetUpdatedAt

func (m *MembershipMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*MembershipMutation) SetUserID

func (m *MembershipMutation) SetUserID(u uuid.UUID)

SetUserID sets the "user_id" field.

func (MembershipMutation) Tx

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

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

func (*MembershipMutation) Type

func (m *MembershipMutation) Type() string

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

func (*MembershipMutation) UpdatedAt

func (m *MembershipMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*MembershipMutation) UserCleared

func (m *MembershipMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*MembershipMutation) UserID

func (m *MembershipMutation) UserID() (r uuid.UUID, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*MembershipMutation) UserIDs

func (m *MembershipMutation) UserIDs() (ids []uuid.UUID)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*MembershipMutation) Where

func (m *MembershipMutation) Where(ps ...predicate.Membership)

Where appends a list predicates to the MembershipMutation builder.

func (*MembershipMutation) WhereP

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

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

type MembershipQuery

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

MembershipQuery is the builder for querying Membership entities.

func (*MembershipQuery) Aggregate

func (_q *MembershipQuery) Aggregate(fns ...AggregateFunc) *MembershipSelect

Aggregate returns a MembershipSelect configured with the given aggregations.

func (*MembershipQuery) All

func (_q *MembershipQuery) All(ctx context.Context) ([]*Membership, error)

All executes the query and returns a list of Memberships.

func (*MembershipQuery) AllX

func (_q *MembershipQuery) AllX(ctx context.Context) []*Membership

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

func (*MembershipQuery) Clone

func (_q *MembershipQuery) Clone() *MembershipQuery

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

func (*MembershipQuery) Count

func (_q *MembershipQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MembershipQuery) CountX

func (_q *MembershipQuery) CountX(ctx context.Context) int

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

func (*MembershipQuery) Exist

func (_q *MembershipQuery) Exist(ctx context.Context) (bool, error)

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

func (*MembershipQuery) ExistX

func (_q *MembershipQuery) ExistX(ctx context.Context) bool

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

func (*MembershipQuery) Filter

func (_q *MembershipQuery) Filter() *MembershipFilter

Filter returns a Filter implementation to apply filters on the MembershipQuery builder.

func (*MembershipQuery) First

func (_q *MembershipQuery) First(ctx context.Context) (*Membership, error)

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

func (*MembershipQuery) FirstID

func (_q *MembershipQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*MembershipQuery) FirstIDX

func (_q *MembershipQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*MembershipQuery) FirstX

func (_q *MembershipQuery) FirstX(ctx context.Context) *Membership

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

func (*MembershipQuery) GroupBy

func (_q *MembershipQuery) GroupBy(field string, fields ...string) *MembershipGroupBy

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 {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Membership.Query().
	GroupBy(membership.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MembershipQuery) IDs

func (_q *MembershipQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

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

func (*MembershipQuery) IDsX

func (_q *MembershipQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*MembershipQuery) Limit

func (_q *MembershipQuery) Limit(limit int) *MembershipQuery

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

func (*MembershipQuery) Offset

func (_q *MembershipQuery) Offset(offset int) *MembershipQuery

Offset to start from.

func (*MembershipQuery) Only

func (_q *MembershipQuery) Only(ctx context.Context) (*Membership, error)

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

func (*MembershipQuery) OnlyID

func (_q *MembershipQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*MembershipQuery) OnlyIDX

func (_q *MembershipQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*MembershipQuery) OnlyX

func (_q *MembershipQuery) OnlyX(ctx context.Context) *Membership

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

func (*MembershipQuery) Order

Order specifies how the records should be ordered.

func (*MembershipQuery) QueryOrganization

func (_q *MembershipQuery) QueryOrganization() *OrganizationQuery

QueryOrganization chains the current query on the "organization" edge.

func (*MembershipQuery) QueryUser

func (_q *MembershipQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*MembershipQuery) Select

func (_q *MembershipQuery) Select(fields ...string) *MembershipSelect

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 {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.Membership.Query().
	Select(membership.FieldCreatedAt).
	Scan(ctx, &v)

func (*MembershipQuery) Unique

func (_q *MembershipQuery) Unique(unique bool) *MembershipQuery

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 (*MembershipQuery) Where

Where adds a new predicate for the MembershipQuery builder.

func (*MembershipQuery) WithOrganization

func (_q *MembershipQuery) WithOrganization(opts ...func(*OrganizationQuery)) *MembershipQuery

WithOrganization tells the query-builder to eager-load the nodes that are connected to the "organization" edge. The optional arguments are used to configure the query builder of the edge.

func (*MembershipQuery) WithUser

func (_q *MembershipQuery) WithUser(opts ...func(*UserQuery)) *MembershipQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type MembershipSelect

type MembershipSelect struct {
	*MembershipQuery
	// contains filtered or unexported fields
}

MembershipSelect is the builder for selecting fields of Membership entities.

func (*MembershipSelect) Aggregate

func (_s *MembershipSelect) Aggregate(fns ...AggregateFunc) *MembershipSelect

Aggregate adds the given aggregation functions to the selector query.

func (*MembershipSelect) Bool

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

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

func (*MembershipSelect) BoolX

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

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

func (*MembershipSelect) Bools

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

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

func (*MembershipSelect) BoolsX

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

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

func (*MembershipSelect) Float64

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

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

func (*MembershipSelect) Float64X

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

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

func (*MembershipSelect) Float64s

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

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

func (*MembershipSelect) Float64sX

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

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

func (*MembershipSelect) Int

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

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

func (*MembershipSelect) IntX

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

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

func (*MembershipSelect) Ints

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

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

func (*MembershipSelect) IntsX

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

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

func (*MembershipSelect) Scan

func (_s *MembershipSelect) Scan(ctx context.Context, v any) error

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

func (*MembershipSelect) ScanX

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

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

func (*MembershipSelect) String

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

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

func (*MembershipSelect) StringX

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

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

func (*MembershipSelect) Strings

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

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

func (*MembershipSelect) StringsX

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

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

type MembershipUpdate

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

MembershipUpdate is the builder for updating Membership entities.

func (*MembershipUpdate) AppendPermissions

func (_u *MembershipUpdate) AppendPermissions(v []string) *MembershipUpdate

AppendPermissions appends value to the "permissions" field.

func (*MembershipUpdate) ClearOrganization

func (_u *MembershipUpdate) ClearOrganization() *MembershipUpdate

ClearOrganization clears the "organization" edge to the Organization entity.

func (*MembershipUpdate) ClearPermissions

func (_u *MembershipUpdate) ClearPermissions() *MembershipUpdate

ClearPermissions clears the value of the "permissions" field.

func (*MembershipUpdate) ClearUser

func (_u *MembershipUpdate) ClearUser() *MembershipUpdate

ClearUser clears the "user" edge to the User entity.

func (*MembershipUpdate) Exec

func (_u *MembershipUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MembershipUpdate) ExecX

func (_u *MembershipUpdate) ExecX(ctx context.Context)

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

func (*MembershipUpdate) Mutation

func (_u *MembershipUpdate) Mutation() *MembershipMutation

Mutation returns the MembershipMutation object of the builder.

func (*MembershipUpdate) Save

func (_u *MembershipUpdate) Save(ctx context.Context) (int, error)

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

func (*MembershipUpdate) SaveX

func (_u *MembershipUpdate) SaveX(ctx context.Context) int

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

func (*MembershipUpdate) SetNillableOrganizationID

func (_u *MembershipUpdate) SetNillableOrganizationID(v *uuid.UUID) *MembershipUpdate

SetNillableOrganizationID sets the "organization_id" field if the given value is not nil.

func (*MembershipUpdate) SetNillableRole

func (_u *MembershipUpdate) SetNillableRole(v *string) *MembershipUpdate

SetNillableRole sets the "role" field if the given value is not nil.

func (*MembershipUpdate) SetNillableUserID

func (_u *MembershipUpdate) SetNillableUserID(v *uuid.UUID) *MembershipUpdate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*MembershipUpdate) SetOrganization

func (_u *MembershipUpdate) SetOrganization(v *Organization) *MembershipUpdate

SetOrganization sets the "organization" edge to the Organization entity.

func (*MembershipUpdate) SetOrganizationID

func (_u *MembershipUpdate) SetOrganizationID(v uuid.UUID) *MembershipUpdate

SetOrganizationID sets the "organization_id" field.

func (*MembershipUpdate) SetPermissions

func (_u *MembershipUpdate) SetPermissions(v []string) *MembershipUpdate

SetPermissions sets the "permissions" field.

func (*MembershipUpdate) SetRole

func (_u *MembershipUpdate) SetRole(v string) *MembershipUpdate

SetRole sets the "role" field.

func (*MembershipUpdate) SetUpdatedAt

func (_u *MembershipUpdate) SetUpdatedAt(v time.Time) *MembershipUpdate

SetUpdatedAt sets the "updated_at" field.

func (*MembershipUpdate) SetUser

func (_u *MembershipUpdate) SetUser(v *User) *MembershipUpdate

SetUser sets the "user" edge to the User entity.

func (*MembershipUpdate) SetUserID

func (_u *MembershipUpdate) SetUserID(v uuid.UUID) *MembershipUpdate

SetUserID sets the "user_id" field.

func (*MembershipUpdate) Where

Where appends a list predicates to the MembershipUpdate builder.

type MembershipUpdateOne

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

MembershipUpdateOne is the builder for updating a single Membership entity.

func (*MembershipUpdateOne) AppendPermissions

func (_u *MembershipUpdateOne) AppendPermissions(v []string) *MembershipUpdateOne

AppendPermissions appends value to the "permissions" field.

func (*MembershipUpdateOne) ClearOrganization

func (_u *MembershipUpdateOne) ClearOrganization() *MembershipUpdateOne

ClearOrganization clears the "organization" edge to the Organization entity.

func (*MembershipUpdateOne) ClearPermissions

func (_u *MembershipUpdateOne) ClearPermissions() *MembershipUpdateOne

ClearPermissions clears the value of the "permissions" field.

func (*MembershipUpdateOne) ClearUser

func (_u *MembershipUpdateOne) ClearUser() *MembershipUpdateOne

ClearUser clears the "user" edge to the User entity.

func (*MembershipUpdateOne) Exec

func (_u *MembershipUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MembershipUpdateOne) ExecX

func (_u *MembershipUpdateOne) ExecX(ctx context.Context)

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

func (*MembershipUpdateOne) Mutation

func (_u *MembershipUpdateOne) Mutation() *MembershipMutation

Mutation returns the MembershipMutation object of the builder.

func (*MembershipUpdateOne) Save

Save executes the query and returns the updated Membership entity.

func (*MembershipUpdateOne) SaveX

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

func (*MembershipUpdateOne) Select

func (_u *MembershipUpdateOne) Select(field string, fields ...string) *MembershipUpdateOne

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

func (*MembershipUpdateOne) SetNillableOrganizationID

func (_u *MembershipUpdateOne) SetNillableOrganizationID(v *uuid.UUID) *MembershipUpdateOne

SetNillableOrganizationID sets the "organization_id" field if the given value is not nil.

func (*MembershipUpdateOne) SetNillableRole

func (_u *MembershipUpdateOne) SetNillableRole(v *string) *MembershipUpdateOne

SetNillableRole sets the "role" field if the given value is not nil.

func (*MembershipUpdateOne) SetNillableUserID

func (_u *MembershipUpdateOne) SetNillableUserID(v *uuid.UUID) *MembershipUpdateOne

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*MembershipUpdateOne) SetOrganization

func (_u *MembershipUpdateOne) SetOrganization(v *Organization) *MembershipUpdateOne

SetOrganization sets the "organization" edge to the Organization entity.

func (*MembershipUpdateOne) SetOrganizationID

func (_u *MembershipUpdateOne) SetOrganizationID(v uuid.UUID) *MembershipUpdateOne

SetOrganizationID sets the "organization_id" field.

func (*MembershipUpdateOne) SetPermissions

func (_u *MembershipUpdateOne) SetPermissions(v []string) *MembershipUpdateOne

SetPermissions sets the "permissions" field.

func (*MembershipUpdateOne) SetRole

SetRole sets the "role" field.

func (*MembershipUpdateOne) SetUpdatedAt

func (_u *MembershipUpdateOne) SetUpdatedAt(v time.Time) *MembershipUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*MembershipUpdateOne) SetUser

func (_u *MembershipUpdateOne) SetUser(v *User) *MembershipUpdateOne

SetUser sets the "user" edge to the User entity.

func (*MembershipUpdateOne) SetUserID

SetUserID sets the "user_id" field.

func (*MembershipUpdateOne) Where

Where appends a list predicates to the MembershipUpdate builder.

type MembershipUpsert

type MembershipUpsert struct {
	*sql.UpdateSet
}

MembershipUpsert is the "OnConflict" setter.

func (*MembershipUpsert) ClearPermissions

func (u *MembershipUpsert) ClearPermissions() *MembershipUpsert

ClearPermissions clears the value of the "permissions" field.

func (*MembershipUpsert) SetOrganizationID

func (u *MembershipUpsert) SetOrganizationID(v uuid.UUID) *MembershipUpsert

SetOrganizationID sets the "organization_id" field.

func (*MembershipUpsert) SetPermissions

func (u *MembershipUpsert) SetPermissions(v []string) *MembershipUpsert

SetPermissions sets the "permissions" field.

func (*MembershipUpsert) SetRole

func (u *MembershipUpsert) SetRole(v string) *MembershipUpsert

SetRole sets the "role" field.

func (*MembershipUpsert) SetUpdatedAt

func (u *MembershipUpsert) SetUpdatedAt(v time.Time) *MembershipUpsert

SetUpdatedAt sets the "updated_at" field.

func (*MembershipUpsert) SetUserID

func (u *MembershipUpsert) SetUserID(v uuid.UUID) *MembershipUpsert

SetUserID sets the "user_id" field.

func (*MembershipUpsert) UpdateOrganizationID

func (u *MembershipUpsert) UpdateOrganizationID() *MembershipUpsert

UpdateOrganizationID sets the "organization_id" field to the value that was provided on create.

func (*MembershipUpsert) UpdatePermissions

func (u *MembershipUpsert) UpdatePermissions() *MembershipUpsert

UpdatePermissions sets the "permissions" field to the value that was provided on create.

func (*MembershipUpsert) UpdateRole

func (u *MembershipUpsert) UpdateRole() *MembershipUpsert

UpdateRole sets the "role" field to the value that was provided on create.

func (*MembershipUpsert) UpdateUpdatedAt

func (u *MembershipUpsert) UpdateUpdatedAt() *MembershipUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*MembershipUpsert) UpdateUserID

func (u *MembershipUpsert) UpdateUserID() *MembershipUpsert

UpdateUserID sets the "user_id" field to the value that was provided on create.

type MembershipUpsertBulk

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

MembershipUpsertBulk is the builder for "upsert"-ing a bulk of Membership nodes.

func (*MembershipUpsertBulk) ClearPermissions

func (u *MembershipUpsertBulk) ClearPermissions() *MembershipUpsertBulk

ClearPermissions clears the value of the "permissions" field.

func (*MembershipUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*MembershipUpsertBulk) Exec

Exec executes the query.

func (*MembershipUpsertBulk) ExecX

func (u *MembershipUpsertBulk) ExecX(ctx context.Context)

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

func (*MembershipUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Membership.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*MembershipUpsertBulk) SetOrganizationID

func (u *MembershipUpsertBulk) SetOrganizationID(v uuid.UUID) *MembershipUpsertBulk

SetOrganizationID sets the "organization_id" field.

func (*MembershipUpsertBulk) SetPermissions

func (u *MembershipUpsertBulk) SetPermissions(v []string) *MembershipUpsertBulk

SetPermissions sets the "permissions" field.

func (*MembershipUpsertBulk) SetRole

SetRole sets the "role" field.

func (*MembershipUpsertBulk) SetUpdatedAt

func (u *MembershipUpsertBulk) SetUpdatedAt(v time.Time) *MembershipUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*MembershipUpsertBulk) SetUserID

SetUserID sets the "user_id" field.

func (*MembershipUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the MembershipCreateBulk.OnConflict documentation for more info.

func (*MembershipUpsertBulk) UpdateNewValues

func (u *MembershipUpsertBulk) UpdateNewValues() *MembershipUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Membership.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(membership.FieldID)
		}),
	).
	Exec(ctx)

func (*MembershipUpsertBulk) UpdateOrganizationID

func (u *MembershipUpsertBulk) UpdateOrganizationID() *MembershipUpsertBulk

UpdateOrganizationID sets the "organization_id" field to the value that was provided on create.

func (*MembershipUpsertBulk) UpdatePermissions

func (u *MembershipUpsertBulk) UpdatePermissions() *MembershipUpsertBulk

UpdatePermissions sets the "permissions" field to the value that was provided on create.

func (*MembershipUpsertBulk) UpdateRole

func (u *MembershipUpsertBulk) UpdateRole() *MembershipUpsertBulk

UpdateRole sets the "role" field to the value that was provided on create.

func (*MembershipUpsertBulk) UpdateUpdatedAt

func (u *MembershipUpsertBulk) UpdateUpdatedAt() *MembershipUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*MembershipUpsertBulk) UpdateUserID

func (u *MembershipUpsertBulk) UpdateUserID() *MembershipUpsertBulk

UpdateUserID sets the "user_id" field to the value that was provided on create.

type MembershipUpsertOne

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

MembershipUpsertOne is the builder for "upsert"-ing

one Membership node.

func (*MembershipUpsertOne) ClearPermissions

func (u *MembershipUpsertOne) ClearPermissions() *MembershipUpsertOne

ClearPermissions clears the value of the "permissions" field.

func (*MembershipUpsertOne) DoNothing

func (u *MembershipUpsertOne) DoNothing() *MembershipUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*MembershipUpsertOne) Exec

Exec executes the query.

func (*MembershipUpsertOne) ExecX

func (u *MembershipUpsertOne) ExecX(ctx context.Context)

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

func (*MembershipUpsertOne) ID

func (u *MembershipUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*MembershipUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*MembershipUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Membership.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*MembershipUpsertOne) SetOrganizationID

func (u *MembershipUpsertOne) SetOrganizationID(v uuid.UUID) *MembershipUpsertOne

SetOrganizationID sets the "organization_id" field.

func (*MembershipUpsertOne) SetPermissions

func (u *MembershipUpsertOne) SetPermissions(v []string) *MembershipUpsertOne

SetPermissions sets the "permissions" field.

func (*MembershipUpsertOne) SetRole

SetRole sets the "role" field.

func (*MembershipUpsertOne) SetUpdatedAt

func (u *MembershipUpsertOne) SetUpdatedAt(v time.Time) *MembershipUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*MembershipUpsertOne) SetUserID

SetUserID sets the "user_id" field.

func (*MembershipUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the MembershipCreate.OnConflict documentation for more info.

func (*MembershipUpsertOne) UpdateNewValues

func (u *MembershipUpsertOne) UpdateNewValues() *MembershipUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Membership.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(membership.FieldID)
		}),
	).
	Exec(ctx)

func (*MembershipUpsertOne) UpdateOrganizationID

func (u *MembershipUpsertOne) UpdateOrganizationID() *MembershipUpsertOne

UpdateOrganizationID sets the "organization_id" field to the value that was provided on create.

func (*MembershipUpsertOne) UpdatePermissions

func (u *MembershipUpsertOne) UpdatePermissions() *MembershipUpsertOne

UpdatePermissions sets the "permissions" field to the value that was provided on create.

func (*MembershipUpsertOne) UpdateRole

func (u *MembershipUpsertOne) UpdateRole() *MembershipUpsertOne

UpdateRole sets the "role" field to the value that was provided on create.

func (*MembershipUpsertOne) UpdateUpdatedAt

func (u *MembershipUpsertOne) UpdateUpdatedAt() *MembershipUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*MembershipUpsertOne) UpdateUserID

func (u *MembershipUpsertOne) UpdateUserID() *MembershipUpsertOne

UpdateUserID sets the "user_id" field to the value that was provided on create.

type Memberships

type Memberships []*Membership

Memberships is a parsable slice of Membership.

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 OAuthAccount

type OAuthAccount struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// UserID holds the value of the "user_id" field.
	UserID uuid.UUID `json:"user_id,omitempty"`
	// OAuth provider name (e.g., github, google)
	Provider string `json:"provider,omitempty"`
	// User ID from the OAuth provider
	ProviderUserID string `json:"provider_user_id,omitempty"`
	// Encrypted OAuth access token
	AccessToken string `json:"-"`
	// Encrypted OAuth refresh token
	RefreshToken string `json:"-"`
	// Access token expiration time
	TokenExpiresAt *time.Time `json:"token_expires_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the OAuthAccountQuery when eager-loading is set.
	Edges OAuthAccountEdges `json:"edges"`
	// contains filtered or unexported fields
}

OAuthAccount is the model entity for the OAuthAccount schema.

func (*OAuthAccount) QueryUser

func (_m *OAuthAccount) QueryUser() *UserQuery

QueryUser queries the "user" edge of the OAuthAccount entity.

func (*OAuthAccount) String

func (_m *OAuthAccount) String() string

String implements the fmt.Stringer.

func (*OAuthAccount) Unwrap

func (_m *OAuthAccount) Unwrap() *OAuthAccount

Unwrap unwraps the OAuthAccount 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 (*OAuthAccount) Update

func (_m *OAuthAccount) Update() *OAuthAccountUpdateOne

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

func (*OAuthAccount) Value

func (_m *OAuthAccount) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the OAuthAccount. This includes values selected through modifiers, order, etc.

type OAuthAccountClient

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

OAuthAccountClient is a client for the OAuthAccount schema.

func NewOAuthAccountClient

func NewOAuthAccountClient(c config) *OAuthAccountClient

NewOAuthAccountClient returns a client for the OAuthAccount from the given config.

func (*OAuthAccountClient) Create

Create returns a builder for creating a OAuthAccount entity.

func (*OAuthAccountClient) CreateBulk

func (c *OAuthAccountClient) CreateBulk(builders ...*OAuthAccountCreate) *OAuthAccountCreateBulk

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

func (*OAuthAccountClient) Delete

Delete returns a delete builder for OAuthAccount.

func (*OAuthAccountClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OAuthAccountClient) DeleteOneID

func (c *OAuthAccountClient) DeleteOneID(id uuid.UUID) *OAuthAccountDeleteOne

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

func (*OAuthAccountClient) Get

Get returns a OAuthAccount entity by its id.

func (*OAuthAccountClient) GetX

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

func (*OAuthAccountClient) Hooks

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

Hooks returns the client hooks.

func (*OAuthAccountClient) Intercept

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

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

func (*OAuthAccountClient) Interceptors

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

Interceptors returns the client interceptors.

func (*OAuthAccountClient) MapCreateBulk

func (c *OAuthAccountClient) MapCreateBulk(slice any, setFunc func(*OAuthAccountCreate, int)) *OAuthAccountCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*OAuthAccountClient) Query

Query returns a query builder for OAuthAccount.

func (*OAuthAccountClient) QueryUser

func (c *OAuthAccountClient) QueryUser(_m *OAuthAccount) *UserQuery

QueryUser queries the user edge of a OAuthAccount.

func (*OAuthAccountClient) Update

Update returns an update builder for OAuthAccount.

func (*OAuthAccountClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*OAuthAccountClient) UpdateOneID

func (c *OAuthAccountClient) UpdateOneID(id uuid.UUID) *OAuthAccountUpdateOne

UpdateOneID returns an update builder for the given id.

func (*OAuthAccountClient) Use

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

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

type OAuthAccountCreate

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

OAuthAccountCreate is the builder for creating a OAuthAccount entity.

func (*OAuthAccountCreate) Exec

func (_c *OAuthAccountCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OAuthAccountCreate) ExecX

func (_c *OAuthAccountCreate) ExecX(ctx context.Context)

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

func (*OAuthAccountCreate) Mutation

func (_c *OAuthAccountCreate) Mutation() *OAuthAccountMutation

Mutation returns the OAuthAccountMutation object of the builder.

func (*OAuthAccountCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OAuthAccount.Create().
	SetCreatedAt(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OAuthAccountUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*OAuthAccountCreate) OnConflictColumns

func (_c *OAuthAccountCreate) OnConflictColumns(columns ...string) *OAuthAccountUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OAuthAccount.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OAuthAccountCreate) Save

Save creates the OAuthAccount in the database.

func (*OAuthAccountCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*OAuthAccountCreate) SetAccessToken

func (_c *OAuthAccountCreate) SetAccessToken(v string) *OAuthAccountCreate

SetAccessToken sets the "access_token" field.

func (*OAuthAccountCreate) SetCreatedAt

func (_c *OAuthAccountCreate) SetCreatedAt(v time.Time) *OAuthAccountCreate

SetCreatedAt sets the "created_at" field.

func (*OAuthAccountCreate) SetID

SetID sets the "id" field.

func (*OAuthAccountCreate) SetNillableAccessToken

func (_c *OAuthAccountCreate) SetNillableAccessToken(v *string) *OAuthAccountCreate

SetNillableAccessToken sets the "access_token" field if the given value is not nil.

func (*OAuthAccountCreate) SetNillableCreatedAt

func (_c *OAuthAccountCreate) SetNillableCreatedAt(v *time.Time) *OAuthAccountCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*OAuthAccountCreate) SetNillableID

func (_c *OAuthAccountCreate) SetNillableID(v *uuid.UUID) *OAuthAccountCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*OAuthAccountCreate) SetNillableRefreshToken

func (_c *OAuthAccountCreate) SetNillableRefreshToken(v *string) *OAuthAccountCreate

SetNillableRefreshToken sets the "refresh_token" field if the given value is not nil.

func (*OAuthAccountCreate) SetNillableTokenExpiresAt

func (_c *OAuthAccountCreate) SetNillableTokenExpiresAt(v *time.Time) *OAuthAccountCreate

SetNillableTokenExpiresAt sets the "token_expires_at" field if the given value is not nil.

func (*OAuthAccountCreate) SetNillableUpdatedAt

func (_c *OAuthAccountCreate) SetNillableUpdatedAt(v *time.Time) *OAuthAccountCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OAuthAccountCreate) SetProvider

func (_c *OAuthAccountCreate) SetProvider(v string) *OAuthAccountCreate

SetProvider sets the "provider" field.

func (*OAuthAccountCreate) SetProviderUserID

func (_c *OAuthAccountCreate) SetProviderUserID(v string) *OAuthAccountCreate

SetProviderUserID sets the "provider_user_id" field.

func (*OAuthAccountCreate) SetRefreshToken

func (_c *OAuthAccountCreate) SetRefreshToken(v string) *OAuthAccountCreate

SetRefreshToken sets the "refresh_token" field.

func (*OAuthAccountCreate) SetTokenExpiresAt

func (_c *OAuthAccountCreate) SetTokenExpiresAt(v time.Time) *OAuthAccountCreate

SetTokenExpiresAt sets the "token_expires_at" field.

func (*OAuthAccountCreate) SetUpdatedAt

func (_c *OAuthAccountCreate) SetUpdatedAt(v time.Time) *OAuthAccountCreate

SetUpdatedAt sets the "updated_at" field.

func (*OAuthAccountCreate) SetUser

func (_c *OAuthAccountCreate) SetUser(v *User) *OAuthAccountCreate

SetUser sets the "user" edge to the User entity.

func (*OAuthAccountCreate) SetUserID

func (_c *OAuthAccountCreate) SetUserID(v uuid.UUID) *OAuthAccountCreate

SetUserID sets the "user_id" field.

type OAuthAccountCreateBulk

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

OAuthAccountCreateBulk is the builder for creating many OAuthAccount entities in bulk.

func (*OAuthAccountCreateBulk) Exec

Exec executes the query.

func (*OAuthAccountCreateBulk) ExecX

func (_c *OAuthAccountCreateBulk) ExecX(ctx context.Context)

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

func (*OAuthAccountCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OAuthAccount.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OAuthAccountUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*OAuthAccountCreateBulk) OnConflictColumns

func (_c *OAuthAccountCreateBulk) OnConflictColumns(columns ...string) *OAuthAccountUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OAuthAccount.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OAuthAccountCreateBulk) Save

Save creates the OAuthAccount entities in the database.

func (*OAuthAccountCreateBulk) SaveX

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

type OAuthAccountDelete

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

OAuthAccountDelete is the builder for deleting a OAuthAccount entity.

func (*OAuthAccountDelete) Exec

func (_d *OAuthAccountDelete) Exec(ctx context.Context) (int, error)

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

func (*OAuthAccountDelete) ExecX

func (_d *OAuthAccountDelete) ExecX(ctx context.Context) int

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

func (*OAuthAccountDelete) Where

Where appends a list predicates to the OAuthAccountDelete builder.

type OAuthAccountDeleteOne

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

OAuthAccountDeleteOne is the builder for deleting a single OAuthAccount entity.

func (*OAuthAccountDeleteOne) Exec

Exec executes the deletion query.

func (*OAuthAccountDeleteOne) ExecX

func (_d *OAuthAccountDeleteOne) ExecX(ctx context.Context)

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

func (*OAuthAccountDeleteOne) Where

Where appends a list predicates to the OAuthAccountDelete builder.

type OAuthAccountEdges

type OAuthAccountEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// contains filtered or unexported fields
}

OAuthAccountEdges holds the relations/edges for other nodes in the graph.

func (OAuthAccountEdges) UserOrErr

func (e OAuthAccountEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type OAuthAccountFilter

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

OAuthAccountFilter provides a generic filtering capability at runtime for OAuthAccountQuery.

func (*OAuthAccountFilter) Where

func (f *OAuthAccountFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*OAuthAccountFilter) WhereAccessToken

func (f *OAuthAccountFilter) WhereAccessToken(p entql.StringP)

WhereAccessToken applies the entql string predicate on the access_token field.

func (*OAuthAccountFilter) WhereCreatedAt

func (f *OAuthAccountFilter) WhereCreatedAt(p entql.TimeP)

WhereCreatedAt applies the entql time.Time predicate on the created_at field.

func (*OAuthAccountFilter) WhereHasUser

func (f *OAuthAccountFilter) WhereHasUser()

WhereHasUser applies a predicate to check if query has an edge user.

func (*OAuthAccountFilter) WhereHasUserWith

func (f *OAuthAccountFilter) WhereHasUserWith(preds ...predicate.User)

WhereHasUserWith applies a predicate to check if query has an edge user with a given conditions (other predicates).

func (*OAuthAccountFilter) WhereID

func (f *OAuthAccountFilter) WhereID(p entql.ValueP)

WhereID applies the entql [16]byte predicate on the id field.

func (*OAuthAccountFilter) WhereProvider

func (f *OAuthAccountFilter) WhereProvider(p entql.StringP)

WhereProvider applies the entql string predicate on the provider field.

func (*OAuthAccountFilter) WhereProviderUserID

func (f *OAuthAccountFilter) WhereProviderUserID(p entql.StringP)

WhereProviderUserID applies the entql string predicate on the provider_user_id field.

func (*OAuthAccountFilter) WhereRefreshToken

func (f *OAuthAccountFilter) WhereRefreshToken(p entql.StringP)

WhereRefreshToken applies the entql string predicate on the refresh_token field.

func (*OAuthAccountFilter) WhereTokenExpiresAt

func (f *OAuthAccountFilter) WhereTokenExpiresAt(p entql.TimeP)

WhereTokenExpiresAt applies the entql time.Time predicate on the token_expires_at field.

func (*OAuthAccountFilter) WhereUpdatedAt

func (f *OAuthAccountFilter) WhereUpdatedAt(p entql.TimeP)

WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.

func (*OAuthAccountFilter) WhereUserID

func (f *OAuthAccountFilter) WhereUserID(p entql.ValueP)

WhereUserID applies the entql [16]byte predicate on the user_id field.

type OAuthAccountGroupBy

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

OAuthAccountGroupBy is the group-by builder for OAuthAccount entities.

func (*OAuthAccountGroupBy) Aggregate

func (_g *OAuthAccountGroupBy) Aggregate(fns ...AggregateFunc) *OAuthAccountGroupBy

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

func (*OAuthAccountGroupBy) Bool

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

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

func (*OAuthAccountGroupBy) BoolX

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

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

func (*OAuthAccountGroupBy) Bools

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

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

func (*OAuthAccountGroupBy) BoolsX

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

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

func (*OAuthAccountGroupBy) Float64

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

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

func (*OAuthAccountGroupBy) Float64X

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

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

func (*OAuthAccountGroupBy) Float64s

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

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

func (*OAuthAccountGroupBy) Float64sX

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

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

func (*OAuthAccountGroupBy) Int

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

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

func (*OAuthAccountGroupBy) IntX

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

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

func (*OAuthAccountGroupBy) Ints

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

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

func (*OAuthAccountGroupBy) IntsX

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

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

func (*OAuthAccountGroupBy) Scan

func (_g *OAuthAccountGroupBy) Scan(ctx context.Context, v any) error

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

func (*OAuthAccountGroupBy) ScanX

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

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

func (*OAuthAccountGroupBy) String

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

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

func (*OAuthAccountGroupBy) StringX

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

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

func (*OAuthAccountGroupBy) Strings

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

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

func (*OAuthAccountGroupBy) StringsX

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

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

type OAuthAccountMutation

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

OAuthAccountMutation represents an operation that mutates the OAuthAccount nodes in the graph.

func (*OAuthAccountMutation) AccessToken

func (m *OAuthAccountMutation) AccessToken() (r string, exists bool)

AccessToken returns the value of the "access_token" field in the mutation.

func (*OAuthAccountMutation) AccessTokenCleared

func (m *OAuthAccountMutation) AccessTokenCleared() bool

AccessTokenCleared returns if the "access_token" field was cleared in this mutation.

func (*OAuthAccountMutation) AddField

func (m *OAuthAccountMutation) 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 (*OAuthAccountMutation) AddedEdges

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

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

func (*OAuthAccountMutation) AddedField

func (m *OAuthAccountMutation) 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 (*OAuthAccountMutation) AddedFields

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

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

func (*OAuthAccountMutation) AddedIDs

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

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

func (*OAuthAccountMutation) ClearAccessToken

func (m *OAuthAccountMutation) ClearAccessToken()

ClearAccessToken clears the value of the "access_token" field.

func (*OAuthAccountMutation) ClearEdge

func (m *OAuthAccountMutation) 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 (*OAuthAccountMutation) ClearField

func (m *OAuthAccountMutation) 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 (*OAuthAccountMutation) ClearRefreshToken

func (m *OAuthAccountMutation) ClearRefreshToken()

ClearRefreshToken clears the value of the "refresh_token" field.

func (*OAuthAccountMutation) ClearTokenExpiresAt

func (m *OAuthAccountMutation) ClearTokenExpiresAt()

ClearTokenExpiresAt clears the value of the "token_expires_at" field.

func (*OAuthAccountMutation) ClearUser

func (m *OAuthAccountMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*OAuthAccountMutation) ClearedEdges

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

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

func (*OAuthAccountMutation) ClearedFields

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

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

func (OAuthAccountMutation) Client

func (m OAuthAccountMutation) 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 (*OAuthAccountMutation) CreatedAt

func (m *OAuthAccountMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*OAuthAccountMutation) EdgeCleared

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

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

func (*OAuthAccountMutation) Field

func (m *OAuthAccountMutation) 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 (*OAuthAccountMutation) FieldCleared

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

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

func (*OAuthAccountMutation) Fields

func (m *OAuthAccountMutation) 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 (*OAuthAccountMutation) Filter

Filter returns an entql.Where implementation to apply filters on the OAuthAccountMutation builder.

func (*OAuthAccountMutation) ID

func (m *OAuthAccountMutation) ID() (id uuid.UUID, 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 (*OAuthAccountMutation) 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 (*OAuthAccountMutation) OldAccessToken

func (m *OAuthAccountMutation) OldAccessToken(ctx context.Context) (v string, err error)

OldAccessToken returns the old "access_token" field's value of the OAuthAccount entity. If the OAuthAccount 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 (*OAuthAccountMutation) OldCreatedAt

func (m *OAuthAccountMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the OAuthAccount entity. If the OAuthAccount 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 (*OAuthAccountMutation) OldField

func (m *OAuthAccountMutation) 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 (*OAuthAccountMutation) OldProvider

func (m *OAuthAccountMutation) OldProvider(ctx context.Context) (v string, err error)

OldProvider returns the old "provider" field's value of the OAuthAccount entity. If the OAuthAccount 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 (*OAuthAccountMutation) OldProviderUserID

func (m *OAuthAccountMutation) OldProviderUserID(ctx context.Context) (v string, err error)

OldProviderUserID returns the old "provider_user_id" field's value of the OAuthAccount entity. If the OAuthAccount 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 (*OAuthAccountMutation) OldRefreshToken

func (m *OAuthAccountMutation) OldRefreshToken(ctx context.Context) (v string, err error)

OldRefreshToken returns the old "refresh_token" field's value of the OAuthAccount entity. If the OAuthAccount 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 (*OAuthAccountMutation) OldTokenExpiresAt

func (m *OAuthAccountMutation) OldTokenExpiresAt(ctx context.Context) (v *time.Time, err error)

OldTokenExpiresAt returns the old "token_expires_at" field's value of the OAuthAccount entity. If the OAuthAccount 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 (*OAuthAccountMutation) OldUpdatedAt

func (m *OAuthAccountMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the OAuthAccount entity. If the OAuthAccount 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 (*OAuthAccountMutation) OldUserID

func (m *OAuthAccountMutation) OldUserID(ctx context.Context) (v uuid.UUID, err error)

OldUserID returns the old "user_id" field's value of the OAuthAccount entity. If the OAuthAccount 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 (*OAuthAccountMutation) Op

func (m *OAuthAccountMutation) Op() Op

Op returns the operation name.

func (*OAuthAccountMutation) Provider

func (m *OAuthAccountMutation) Provider() (r string, exists bool)

Provider returns the value of the "provider" field in the mutation.

func (*OAuthAccountMutation) ProviderUserID

func (m *OAuthAccountMutation) ProviderUserID() (r string, exists bool)

ProviderUserID returns the value of the "provider_user_id" field in the mutation.

func (*OAuthAccountMutation) RefreshToken

func (m *OAuthAccountMutation) RefreshToken() (r string, exists bool)

RefreshToken returns the value of the "refresh_token" field in the mutation.

func (*OAuthAccountMutation) RefreshTokenCleared

func (m *OAuthAccountMutation) RefreshTokenCleared() bool

RefreshTokenCleared returns if the "refresh_token" field was cleared in this mutation.

func (*OAuthAccountMutation) RemovedEdges

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

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

func (*OAuthAccountMutation) RemovedIDs

func (m *OAuthAccountMutation) 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 (*OAuthAccountMutation) ResetAccessToken

func (m *OAuthAccountMutation) ResetAccessToken()

ResetAccessToken resets all changes to the "access_token" field.

func (*OAuthAccountMutation) ResetCreatedAt

func (m *OAuthAccountMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*OAuthAccountMutation) ResetEdge

func (m *OAuthAccountMutation) 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 (*OAuthAccountMutation) ResetField

func (m *OAuthAccountMutation) 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 (*OAuthAccountMutation) ResetProvider

func (m *OAuthAccountMutation) ResetProvider()

ResetProvider resets all changes to the "provider" field.

func (*OAuthAccountMutation) ResetProviderUserID

func (m *OAuthAccountMutation) ResetProviderUserID()

ResetProviderUserID resets all changes to the "provider_user_id" field.

func (*OAuthAccountMutation) ResetRefreshToken

func (m *OAuthAccountMutation) ResetRefreshToken()

ResetRefreshToken resets all changes to the "refresh_token" field.

func (*OAuthAccountMutation) ResetTokenExpiresAt

func (m *OAuthAccountMutation) ResetTokenExpiresAt()

ResetTokenExpiresAt resets all changes to the "token_expires_at" field.

func (*OAuthAccountMutation) ResetUpdatedAt

func (m *OAuthAccountMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*OAuthAccountMutation) ResetUser

func (m *OAuthAccountMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*OAuthAccountMutation) ResetUserID

func (m *OAuthAccountMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*OAuthAccountMutation) SetAccessToken

func (m *OAuthAccountMutation) SetAccessToken(s string)

SetAccessToken sets the "access_token" field.

func (*OAuthAccountMutation) SetCreatedAt

func (m *OAuthAccountMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*OAuthAccountMutation) SetField

func (m *OAuthAccountMutation) 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 (*OAuthAccountMutation) SetID

func (m *OAuthAccountMutation) SetID(id uuid.UUID)

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

func (*OAuthAccountMutation) SetOp

func (m *OAuthAccountMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OAuthAccountMutation) SetProvider

func (m *OAuthAccountMutation) SetProvider(s string)

SetProvider sets the "provider" field.

func (*OAuthAccountMutation) SetProviderUserID

func (m *OAuthAccountMutation) SetProviderUserID(s string)

SetProviderUserID sets the "provider_user_id" field.

func (*OAuthAccountMutation) SetRefreshToken

func (m *OAuthAccountMutation) SetRefreshToken(s string)

SetRefreshToken sets the "refresh_token" field.

func (*OAuthAccountMutation) SetTokenExpiresAt

func (m *OAuthAccountMutation) SetTokenExpiresAt(t time.Time)

SetTokenExpiresAt sets the "token_expires_at" field.

func (*OAuthAccountMutation) SetUpdatedAt

func (m *OAuthAccountMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*OAuthAccountMutation) SetUserID

func (m *OAuthAccountMutation) SetUserID(u uuid.UUID)

SetUserID sets the "user_id" field.

func (*OAuthAccountMutation) TokenExpiresAt

func (m *OAuthAccountMutation) TokenExpiresAt() (r time.Time, exists bool)

TokenExpiresAt returns the value of the "token_expires_at" field in the mutation.

func (*OAuthAccountMutation) TokenExpiresAtCleared

func (m *OAuthAccountMutation) TokenExpiresAtCleared() bool

TokenExpiresAtCleared returns if the "token_expires_at" field was cleared in this mutation.

func (OAuthAccountMutation) Tx

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

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

func (*OAuthAccountMutation) Type

func (m *OAuthAccountMutation) Type() string

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

func (*OAuthAccountMutation) UpdatedAt

func (m *OAuthAccountMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*OAuthAccountMutation) UserCleared

func (m *OAuthAccountMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*OAuthAccountMutation) UserID

func (m *OAuthAccountMutation) UserID() (r uuid.UUID, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*OAuthAccountMutation) UserIDs

func (m *OAuthAccountMutation) UserIDs() (ids []uuid.UUID)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*OAuthAccountMutation) Where

Where appends a list predicates to the OAuthAccountMutation builder.

func (*OAuthAccountMutation) WhereP

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

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

type OAuthAccountQuery

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

OAuthAccountQuery is the builder for querying OAuthAccount entities.

func (*OAuthAccountQuery) Aggregate

func (_q *OAuthAccountQuery) Aggregate(fns ...AggregateFunc) *OAuthAccountSelect

Aggregate returns a OAuthAccountSelect configured with the given aggregations.

func (*OAuthAccountQuery) All

func (_q *OAuthAccountQuery) All(ctx context.Context) ([]*OAuthAccount, error)

All executes the query and returns a list of OAuthAccounts.

func (*OAuthAccountQuery) AllX

func (_q *OAuthAccountQuery) AllX(ctx context.Context) []*OAuthAccount

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

func (*OAuthAccountQuery) Clone

func (_q *OAuthAccountQuery) Clone() *OAuthAccountQuery

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

func (*OAuthAccountQuery) Count

func (_q *OAuthAccountQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OAuthAccountQuery) CountX

func (_q *OAuthAccountQuery) CountX(ctx context.Context) int

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

func (*OAuthAccountQuery) Exist

func (_q *OAuthAccountQuery) Exist(ctx context.Context) (bool, error)

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

func (*OAuthAccountQuery) ExistX

func (_q *OAuthAccountQuery) ExistX(ctx context.Context) bool

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

func (*OAuthAccountQuery) Filter

func (_q *OAuthAccountQuery) Filter() *OAuthAccountFilter

Filter returns a Filter implementation to apply filters on the OAuthAccountQuery builder.

func (*OAuthAccountQuery) First

func (_q *OAuthAccountQuery) First(ctx context.Context) (*OAuthAccount, error)

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

func (*OAuthAccountQuery) FirstID

func (_q *OAuthAccountQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*OAuthAccountQuery) FirstIDX

func (_q *OAuthAccountQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*OAuthAccountQuery) FirstX

func (_q *OAuthAccountQuery) FirstX(ctx context.Context) *OAuthAccount

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

func (*OAuthAccountQuery) GroupBy

func (_q *OAuthAccountQuery) GroupBy(field string, fields ...string) *OAuthAccountGroupBy

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 {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.OAuthAccount.Query().
	GroupBy(oauthaccount.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OAuthAccountQuery) IDs

func (_q *OAuthAccountQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

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

func (*OAuthAccountQuery) IDsX

func (_q *OAuthAccountQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*OAuthAccountQuery) Limit

func (_q *OAuthAccountQuery) Limit(limit int) *OAuthAccountQuery

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

func (*OAuthAccountQuery) Offset

func (_q *OAuthAccountQuery) Offset(offset int) *OAuthAccountQuery

Offset to start from.

func (*OAuthAccountQuery) Only

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

func (*OAuthAccountQuery) OnlyID

func (_q *OAuthAccountQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*OAuthAccountQuery) OnlyIDX

func (_q *OAuthAccountQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*OAuthAccountQuery) OnlyX

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

func (*OAuthAccountQuery) Order

Order specifies how the records should be ordered.

func (*OAuthAccountQuery) QueryUser

func (_q *OAuthAccountQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*OAuthAccountQuery) Select

func (_q *OAuthAccountQuery) Select(fields ...string) *OAuthAccountSelect

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 {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.OAuthAccount.Query().
	Select(oauthaccount.FieldCreatedAt).
	Scan(ctx, &v)

func (*OAuthAccountQuery) Unique

func (_q *OAuthAccountQuery) Unique(unique bool) *OAuthAccountQuery

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 (*OAuthAccountQuery) Where

Where adds a new predicate for the OAuthAccountQuery builder.

func (*OAuthAccountQuery) WithUser

func (_q *OAuthAccountQuery) WithUser(opts ...func(*UserQuery)) *OAuthAccountQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type OAuthAccountSelect

type OAuthAccountSelect struct {
	*OAuthAccountQuery
	// contains filtered or unexported fields
}

OAuthAccountSelect is the builder for selecting fields of OAuthAccount entities.

func (*OAuthAccountSelect) Aggregate

func (_s *OAuthAccountSelect) Aggregate(fns ...AggregateFunc) *OAuthAccountSelect

Aggregate adds the given aggregation functions to the selector query.

func (*OAuthAccountSelect) Bool

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

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

func (*OAuthAccountSelect) BoolX

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

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

func (*OAuthAccountSelect) Bools

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

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

func (*OAuthAccountSelect) BoolsX

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

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

func (*OAuthAccountSelect) Float64

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

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

func (*OAuthAccountSelect) Float64X

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

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

func (*OAuthAccountSelect) Float64s

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

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

func (*OAuthAccountSelect) Float64sX

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

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

func (*OAuthAccountSelect) Int

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

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

func (*OAuthAccountSelect) IntX

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

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

func (*OAuthAccountSelect) Ints

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

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

func (*OAuthAccountSelect) IntsX

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

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

func (*OAuthAccountSelect) Scan

func (_s *OAuthAccountSelect) Scan(ctx context.Context, v any) error

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

func (*OAuthAccountSelect) ScanX

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

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

func (*OAuthAccountSelect) String

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

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

func (*OAuthAccountSelect) StringX

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

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

func (*OAuthAccountSelect) Strings

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

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

func (*OAuthAccountSelect) StringsX

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

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

type OAuthAccountUpdate

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

OAuthAccountUpdate is the builder for updating OAuthAccount entities.

func (*OAuthAccountUpdate) ClearAccessToken

func (_u *OAuthAccountUpdate) ClearAccessToken() *OAuthAccountUpdate

ClearAccessToken clears the value of the "access_token" field.

func (*OAuthAccountUpdate) ClearRefreshToken

func (_u *OAuthAccountUpdate) ClearRefreshToken() *OAuthAccountUpdate

ClearRefreshToken clears the value of the "refresh_token" field.

func (*OAuthAccountUpdate) ClearTokenExpiresAt

func (_u *OAuthAccountUpdate) ClearTokenExpiresAt() *OAuthAccountUpdate

ClearTokenExpiresAt clears the value of the "token_expires_at" field.

func (*OAuthAccountUpdate) ClearUser

func (_u *OAuthAccountUpdate) ClearUser() *OAuthAccountUpdate

ClearUser clears the "user" edge to the User entity.

func (*OAuthAccountUpdate) Exec

func (_u *OAuthAccountUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OAuthAccountUpdate) ExecX

func (_u *OAuthAccountUpdate) ExecX(ctx context.Context)

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

func (*OAuthAccountUpdate) Mutation

func (_u *OAuthAccountUpdate) Mutation() *OAuthAccountMutation

Mutation returns the OAuthAccountMutation object of the builder.

func (*OAuthAccountUpdate) Save

func (_u *OAuthAccountUpdate) Save(ctx context.Context) (int, error)

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

func (*OAuthAccountUpdate) SaveX

func (_u *OAuthAccountUpdate) SaveX(ctx context.Context) int

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

func (*OAuthAccountUpdate) SetAccessToken

func (_u *OAuthAccountUpdate) SetAccessToken(v string) *OAuthAccountUpdate

SetAccessToken sets the "access_token" field.

func (*OAuthAccountUpdate) SetNillableAccessToken

func (_u *OAuthAccountUpdate) SetNillableAccessToken(v *string) *OAuthAccountUpdate

SetNillableAccessToken sets the "access_token" field if the given value is not nil.

func (*OAuthAccountUpdate) SetNillableProvider

func (_u *OAuthAccountUpdate) SetNillableProvider(v *string) *OAuthAccountUpdate

SetNillableProvider sets the "provider" field if the given value is not nil.

func (*OAuthAccountUpdate) SetNillableProviderUserID

func (_u *OAuthAccountUpdate) SetNillableProviderUserID(v *string) *OAuthAccountUpdate

SetNillableProviderUserID sets the "provider_user_id" field if the given value is not nil.

func (*OAuthAccountUpdate) SetNillableRefreshToken

func (_u *OAuthAccountUpdate) SetNillableRefreshToken(v *string) *OAuthAccountUpdate

SetNillableRefreshToken sets the "refresh_token" field if the given value is not nil.

func (*OAuthAccountUpdate) SetNillableTokenExpiresAt

func (_u *OAuthAccountUpdate) SetNillableTokenExpiresAt(v *time.Time) *OAuthAccountUpdate

SetNillableTokenExpiresAt sets the "token_expires_at" field if the given value is not nil.

func (*OAuthAccountUpdate) SetNillableUserID

func (_u *OAuthAccountUpdate) SetNillableUserID(v *uuid.UUID) *OAuthAccountUpdate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*OAuthAccountUpdate) SetProvider

func (_u *OAuthAccountUpdate) SetProvider(v string) *OAuthAccountUpdate

SetProvider sets the "provider" field.

func (*OAuthAccountUpdate) SetProviderUserID

func (_u *OAuthAccountUpdate) SetProviderUserID(v string) *OAuthAccountUpdate

SetProviderUserID sets the "provider_user_id" field.

func (*OAuthAccountUpdate) SetRefreshToken

func (_u *OAuthAccountUpdate) SetRefreshToken(v string) *OAuthAccountUpdate

SetRefreshToken sets the "refresh_token" field.

func (*OAuthAccountUpdate) SetTokenExpiresAt

func (_u *OAuthAccountUpdate) SetTokenExpiresAt(v time.Time) *OAuthAccountUpdate

SetTokenExpiresAt sets the "token_expires_at" field.

func (*OAuthAccountUpdate) SetUpdatedAt

func (_u *OAuthAccountUpdate) SetUpdatedAt(v time.Time) *OAuthAccountUpdate

SetUpdatedAt sets the "updated_at" field.

func (*OAuthAccountUpdate) SetUser

func (_u *OAuthAccountUpdate) SetUser(v *User) *OAuthAccountUpdate

SetUser sets the "user" edge to the User entity.

func (*OAuthAccountUpdate) SetUserID

func (_u *OAuthAccountUpdate) SetUserID(v uuid.UUID) *OAuthAccountUpdate

SetUserID sets the "user_id" field.

func (*OAuthAccountUpdate) Where

Where appends a list predicates to the OAuthAccountUpdate builder.

type OAuthAccountUpdateOne

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

OAuthAccountUpdateOne is the builder for updating a single OAuthAccount entity.

func (*OAuthAccountUpdateOne) ClearAccessToken

func (_u *OAuthAccountUpdateOne) ClearAccessToken() *OAuthAccountUpdateOne

ClearAccessToken clears the value of the "access_token" field.

func (*OAuthAccountUpdateOne) ClearRefreshToken

func (_u *OAuthAccountUpdateOne) ClearRefreshToken() *OAuthAccountUpdateOne

ClearRefreshToken clears the value of the "refresh_token" field.

func (*OAuthAccountUpdateOne) ClearTokenExpiresAt

func (_u *OAuthAccountUpdateOne) ClearTokenExpiresAt() *OAuthAccountUpdateOne

ClearTokenExpiresAt clears the value of the "token_expires_at" field.

func (*OAuthAccountUpdateOne) ClearUser

ClearUser clears the "user" edge to the User entity.

func (*OAuthAccountUpdateOne) Exec

Exec executes the query on the entity.

func (*OAuthAccountUpdateOne) ExecX

func (_u *OAuthAccountUpdateOne) ExecX(ctx context.Context)

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

func (*OAuthAccountUpdateOne) Mutation

Mutation returns the OAuthAccountMutation object of the builder.

func (*OAuthAccountUpdateOne) Save

Save executes the query and returns the updated OAuthAccount entity.

func (*OAuthAccountUpdateOne) SaveX

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

func (*OAuthAccountUpdateOne) Select

func (_u *OAuthAccountUpdateOne) Select(field string, fields ...string) *OAuthAccountUpdateOne

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

func (*OAuthAccountUpdateOne) SetAccessToken

func (_u *OAuthAccountUpdateOne) SetAccessToken(v string) *OAuthAccountUpdateOne

SetAccessToken sets the "access_token" field.

func (*OAuthAccountUpdateOne) SetNillableAccessToken

func (_u *OAuthAccountUpdateOne) SetNillableAccessToken(v *string) *OAuthAccountUpdateOne

SetNillableAccessToken sets the "access_token" field if the given value is not nil.

func (*OAuthAccountUpdateOne) SetNillableProvider

func (_u *OAuthAccountUpdateOne) SetNillableProvider(v *string) *OAuthAccountUpdateOne

SetNillableProvider sets the "provider" field if the given value is not nil.

func (*OAuthAccountUpdateOne) SetNillableProviderUserID

func (_u *OAuthAccountUpdateOne) SetNillableProviderUserID(v *string) *OAuthAccountUpdateOne

SetNillableProviderUserID sets the "provider_user_id" field if the given value is not nil.

func (*OAuthAccountUpdateOne) SetNillableRefreshToken

func (_u *OAuthAccountUpdateOne) SetNillableRefreshToken(v *string) *OAuthAccountUpdateOne

SetNillableRefreshToken sets the "refresh_token" field if the given value is not nil.

func (*OAuthAccountUpdateOne) SetNillableTokenExpiresAt

func (_u *OAuthAccountUpdateOne) SetNillableTokenExpiresAt(v *time.Time) *OAuthAccountUpdateOne

SetNillableTokenExpiresAt sets the "token_expires_at" field if the given value is not nil.

func (*OAuthAccountUpdateOne) SetNillableUserID

func (_u *OAuthAccountUpdateOne) SetNillableUserID(v *uuid.UUID) *OAuthAccountUpdateOne

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*OAuthAccountUpdateOne) SetProvider

SetProvider sets the "provider" field.

func (*OAuthAccountUpdateOne) SetProviderUserID

func (_u *OAuthAccountUpdateOne) SetProviderUserID(v string) *OAuthAccountUpdateOne

SetProviderUserID sets the "provider_user_id" field.

func (*OAuthAccountUpdateOne) SetRefreshToken

func (_u *OAuthAccountUpdateOne) SetRefreshToken(v string) *OAuthAccountUpdateOne

SetRefreshToken sets the "refresh_token" field.

func (*OAuthAccountUpdateOne) SetTokenExpiresAt

func (_u *OAuthAccountUpdateOne) SetTokenExpiresAt(v time.Time) *OAuthAccountUpdateOne

SetTokenExpiresAt sets the "token_expires_at" field.

func (*OAuthAccountUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*OAuthAccountUpdateOne) SetUser

SetUser sets the "user" edge to the User entity.

func (*OAuthAccountUpdateOne) SetUserID

SetUserID sets the "user_id" field.

func (*OAuthAccountUpdateOne) Where

Where appends a list predicates to the OAuthAccountUpdate builder.

type OAuthAccountUpsert

type OAuthAccountUpsert struct {
	*sql.UpdateSet
}

OAuthAccountUpsert is the "OnConflict" setter.

func (*OAuthAccountUpsert) ClearAccessToken

func (u *OAuthAccountUpsert) ClearAccessToken() *OAuthAccountUpsert

ClearAccessToken clears the value of the "access_token" field.

func (*OAuthAccountUpsert) ClearRefreshToken

func (u *OAuthAccountUpsert) ClearRefreshToken() *OAuthAccountUpsert

ClearRefreshToken clears the value of the "refresh_token" field.

func (*OAuthAccountUpsert) ClearTokenExpiresAt

func (u *OAuthAccountUpsert) ClearTokenExpiresAt() *OAuthAccountUpsert

ClearTokenExpiresAt clears the value of the "token_expires_at" field.

func (*OAuthAccountUpsert) SetAccessToken

func (u *OAuthAccountUpsert) SetAccessToken(v string) *OAuthAccountUpsert

SetAccessToken sets the "access_token" field.

func (*OAuthAccountUpsert) SetProvider

func (u *OAuthAccountUpsert) SetProvider(v string) *OAuthAccountUpsert

SetProvider sets the "provider" field.

func (*OAuthAccountUpsert) SetProviderUserID

func (u *OAuthAccountUpsert) SetProviderUserID(v string) *OAuthAccountUpsert

SetProviderUserID sets the "provider_user_id" field.

func (*OAuthAccountUpsert) SetRefreshToken

func (u *OAuthAccountUpsert) SetRefreshToken(v string) *OAuthAccountUpsert

SetRefreshToken sets the "refresh_token" field.

func (*OAuthAccountUpsert) SetTokenExpiresAt

func (u *OAuthAccountUpsert) SetTokenExpiresAt(v time.Time) *OAuthAccountUpsert

SetTokenExpiresAt sets the "token_expires_at" field.

func (*OAuthAccountUpsert) SetUpdatedAt

func (u *OAuthAccountUpsert) SetUpdatedAt(v time.Time) *OAuthAccountUpsert

SetUpdatedAt sets the "updated_at" field.

func (*OAuthAccountUpsert) SetUserID

SetUserID sets the "user_id" field.

func (*OAuthAccountUpsert) UpdateAccessToken

func (u *OAuthAccountUpsert) UpdateAccessToken() *OAuthAccountUpsert

UpdateAccessToken sets the "access_token" field to the value that was provided on create.

func (*OAuthAccountUpsert) UpdateProvider

func (u *OAuthAccountUpsert) UpdateProvider() *OAuthAccountUpsert

UpdateProvider sets the "provider" field to the value that was provided on create.

func (*OAuthAccountUpsert) UpdateProviderUserID

func (u *OAuthAccountUpsert) UpdateProviderUserID() *OAuthAccountUpsert

UpdateProviderUserID sets the "provider_user_id" field to the value that was provided on create.

func (*OAuthAccountUpsert) UpdateRefreshToken

func (u *OAuthAccountUpsert) UpdateRefreshToken() *OAuthAccountUpsert

UpdateRefreshToken sets the "refresh_token" field to the value that was provided on create.

func (*OAuthAccountUpsert) UpdateTokenExpiresAt

func (u *OAuthAccountUpsert) UpdateTokenExpiresAt() *OAuthAccountUpsert

UpdateTokenExpiresAt sets the "token_expires_at" field to the value that was provided on create.

func (*OAuthAccountUpsert) UpdateUpdatedAt

func (u *OAuthAccountUpsert) UpdateUpdatedAt() *OAuthAccountUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OAuthAccountUpsert) UpdateUserID

func (u *OAuthAccountUpsert) UpdateUserID() *OAuthAccountUpsert

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OAuthAccountUpsertBulk

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

OAuthAccountUpsertBulk is the builder for "upsert"-ing a bulk of OAuthAccount nodes.

func (*OAuthAccountUpsertBulk) ClearAccessToken

func (u *OAuthAccountUpsertBulk) ClearAccessToken() *OAuthAccountUpsertBulk

ClearAccessToken clears the value of the "access_token" field.

func (*OAuthAccountUpsertBulk) ClearRefreshToken

func (u *OAuthAccountUpsertBulk) ClearRefreshToken() *OAuthAccountUpsertBulk

ClearRefreshToken clears the value of the "refresh_token" field.

func (*OAuthAccountUpsertBulk) ClearTokenExpiresAt

func (u *OAuthAccountUpsertBulk) ClearTokenExpiresAt() *OAuthAccountUpsertBulk

ClearTokenExpiresAt clears the value of the "token_expires_at" field.

func (*OAuthAccountUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OAuthAccountUpsertBulk) Exec

Exec executes the query.

func (*OAuthAccountUpsertBulk) ExecX

func (u *OAuthAccountUpsertBulk) ExecX(ctx context.Context)

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

func (*OAuthAccountUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OAuthAccount.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*OAuthAccountUpsertBulk) SetAccessToken

SetAccessToken sets the "access_token" field.

func (*OAuthAccountUpsertBulk) SetProvider

SetProvider sets the "provider" field.

func (*OAuthAccountUpsertBulk) SetProviderUserID

func (u *OAuthAccountUpsertBulk) SetProviderUserID(v string) *OAuthAccountUpsertBulk

SetProviderUserID sets the "provider_user_id" field.

func (*OAuthAccountUpsertBulk) SetRefreshToken

func (u *OAuthAccountUpsertBulk) SetRefreshToken(v string) *OAuthAccountUpsertBulk

SetRefreshToken sets the "refresh_token" field.

func (*OAuthAccountUpsertBulk) SetTokenExpiresAt

func (u *OAuthAccountUpsertBulk) SetTokenExpiresAt(v time.Time) *OAuthAccountUpsertBulk

SetTokenExpiresAt sets the "token_expires_at" field.

func (*OAuthAccountUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*OAuthAccountUpsertBulk) SetUserID

SetUserID sets the "user_id" field.

func (*OAuthAccountUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the OAuthAccountCreateBulk.OnConflict documentation for more info.

func (*OAuthAccountUpsertBulk) UpdateAccessToken

func (u *OAuthAccountUpsertBulk) UpdateAccessToken() *OAuthAccountUpsertBulk

UpdateAccessToken sets the "access_token" field to the value that was provided on create.

func (*OAuthAccountUpsertBulk) UpdateNewValues

func (u *OAuthAccountUpsertBulk) UpdateNewValues() *OAuthAccountUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.OAuthAccount.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(oauthaccount.FieldID)
		}),
	).
	Exec(ctx)

func (*OAuthAccountUpsertBulk) UpdateProvider

func (u *OAuthAccountUpsertBulk) UpdateProvider() *OAuthAccountUpsertBulk

UpdateProvider sets the "provider" field to the value that was provided on create.

func (*OAuthAccountUpsertBulk) UpdateProviderUserID

func (u *OAuthAccountUpsertBulk) UpdateProviderUserID() *OAuthAccountUpsertBulk

UpdateProviderUserID sets the "provider_user_id" field to the value that was provided on create.

func (*OAuthAccountUpsertBulk) UpdateRefreshToken

func (u *OAuthAccountUpsertBulk) UpdateRefreshToken() *OAuthAccountUpsertBulk

UpdateRefreshToken sets the "refresh_token" field to the value that was provided on create.

func (*OAuthAccountUpsertBulk) UpdateTokenExpiresAt

func (u *OAuthAccountUpsertBulk) UpdateTokenExpiresAt() *OAuthAccountUpsertBulk

UpdateTokenExpiresAt sets the "token_expires_at" field to the value that was provided on create.

func (*OAuthAccountUpsertBulk) UpdateUpdatedAt

func (u *OAuthAccountUpsertBulk) UpdateUpdatedAt() *OAuthAccountUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OAuthAccountUpsertBulk) UpdateUserID

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OAuthAccountUpsertOne

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

OAuthAccountUpsertOne is the builder for "upsert"-ing

one OAuthAccount node.

func (*OAuthAccountUpsertOne) ClearAccessToken

func (u *OAuthAccountUpsertOne) ClearAccessToken() *OAuthAccountUpsertOne

ClearAccessToken clears the value of the "access_token" field.

func (*OAuthAccountUpsertOne) ClearRefreshToken

func (u *OAuthAccountUpsertOne) ClearRefreshToken() *OAuthAccountUpsertOne

ClearRefreshToken clears the value of the "refresh_token" field.

func (*OAuthAccountUpsertOne) ClearTokenExpiresAt

func (u *OAuthAccountUpsertOne) ClearTokenExpiresAt() *OAuthAccountUpsertOne

ClearTokenExpiresAt clears the value of the "token_expires_at" field.

func (*OAuthAccountUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OAuthAccountUpsertOne) Exec

Exec executes the query.

func (*OAuthAccountUpsertOne) ExecX

func (u *OAuthAccountUpsertOne) ExecX(ctx context.Context)

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

func (*OAuthAccountUpsertOne) ID

func (u *OAuthAccountUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*OAuthAccountUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*OAuthAccountUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OAuthAccount.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*OAuthAccountUpsertOne) SetAccessToken

func (u *OAuthAccountUpsertOne) SetAccessToken(v string) *OAuthAccountUpsertOne

SetAccessToken sets the "access_token" field.

func (*OAuthAccountUpsertOne) SetProvider

SetProvider sets the "provider" field.

func (*OAuthAccountUpsertOne) SetProviderUserID

func (u *OAuthAccountUpsertOne) SetProviderUserID(v string) *OAuthAccountUpsertOne

SetProviderUserID sets the "provider_user_id" field.

func (*OAuthAccountUpsertOne) SetRefreshToken

func (u *OAuthAccountUpsertOne) SetRefreshToken(v string) *OAuthAccountUpsertOne

SetRefreshToken sets the "refresh_token" field.

func (*OAuthAccountUpsertOne) SetTokenExpiresAt

func (u *OAuthAccountUpsertOne) SetTokenExpiresAt(v time.Time) *OAuthAccountUpsertOne

SetTokenExpiresAt sets the "token_expires_at" field.

func (*OAuthAccountUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*OAuthAccountUpsertOne) SetUserID

SetUserID sets the "user_id" field.

func (*OAuthAccountUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the OAuthAccountCreate.OnConflict documentation for more info.

func (*OAuthAccountUpsertOne) UpdateAccessToken

func (u *OAuthAccountUpsertOne) UpdateAccessToken() *OAuthAccountUpsertOne

UpdateAccessToken sets the "access_token" field to the value that was provided on create.

func (*OAuthAccountUpsertOne) UpdateNewValues

func (u *OAuthAccountUpsertOne) UpdateNewValues() *OAuthAccountUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.OAuthAccount.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(oauthaccount.FieldID)
		}),
	).
	Exec(ctx)

func (*OAuthAccountUpsertOne) UpdateProvider

func (u *OAuthAccountUpsertOne) UpdateProvider() *OAuthAccountUpsertOne

UpdateProvider sets the "provider" field to the value that was provided on create.

func (*OAuthAccountUpsertOne) UpdateProviderUserID

func (u *OAuthAccountUpsertOne) UpdateProviderUserID() *OAuthAccountUpsertOne

UpdateProviderUserID sets the "provider_user_id" field to the value that was provided on create.

func (*OAuthAccountUpsertOne) UpdateRefreshToken

func (u *OAuthAccountUpsertOne) UpdateRefreshToken() *OAuthAccountUpsertOne

UpdateRefreshToken sets the "refresh_token" field to the value that was provided on create.

func (*OAuthAccountUpsertOne) UpdateTokenExpiresAt

func (u *OAuthAccountUpsertOne) UpdateTokenExpiresAt() *OAuthAccountUpsertOne

UpdateTokenExpiresAt sets the "token_expires_at" field to the value that was provided on create.

func (*OAuthAccountUpsertOne) UpdateUpdatedAt

func (u *OAuthAccountUpsertOne) UpdateUpdatedAt() *OAuthAccountUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OAuthAccountUpsertOne) UpdateUserID

func (u *OAuthAccountUpsertOne) UpdateUserID() *OAuthAccountUpsertOne

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OAuthAccounts

type OAuthAccounts []*OAuthAccount

OAuthAccounts is a parsable slice of OAuthAccount.

type OAuthApp

type OAuthApp struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Public client identifier
	ClientID string `json:"client_id,omitempty"`
	// Human-readable app name
	Name string `json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// LogoURL holds the value of the "logo_url" field.
	LogoURL string `json:"logo_url,omitempty"`
	// web=confidential, spa/native=public+PKCE, service/machine=client_credentials
	AppType oauthapp.AppType `json:"app_type,omitempty"`
	// User who created this app
	OwnerID uuid.UUID `json:"owner_id,omitempty"`
	// Organization scope (optional)
	OrganizationID *uuid.UUID `json:"organization_id,omitempty"`
	// Allowed redirect URIs
	RedirectUris []string `json:"redirect_uris,omitempty"`
	// Scopes this app can request
	AllowedScopes []string `json:"allowed_scopes,omitempty"`
	// Allowed grant types
	AllowedGrants []string `json:"allowed_grants,omitempty"`
	// Allowed response types
	AllowedResponseTypes []string `json:"allowed_response_types,omitempty"`
	// Access token TTL in seconds (default 15 min)
	AccessTokenTTL int `json:"access_token_ttl,omitempty"`
	// Refresh token TTL in seconds (default 7 days)
	RefreshTokenTTL int `json:"refresh_token_ttl,omitempty"`
	// Rotate refresh tokens on use
	RefreshTokenRotation bool `json:"refresh_token_rotation,omitempty"`
	// First-party apps skip consent screen
	FirstParty bool `json:"first_party,omitempty"`
	// Public clients cannot keep secrets
	Public bool `json:"public,omitempty"`
	// Active holds the value of the "active" field.
	Active bool `json:"active,omitempty"`
	// RevokedAt holds the value of the "revoked_at" field.
	RevokedAt *time.Time `json:"revoked_at,omitempty"`
	// Custom metadata
	Metadata map[string]string `json:"metadata,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the OAuthAppQuery when eager-loading is set.
	Edges OAuthAppEdges `json:"edges"`
	// contains filtered or unexported fields
}

OAuthApp is the model entity for the OAuthApp schema.

func (*OAuthApp) QueryAuthCodes

func (_m *OAuthApp) QueryAuthCodes() *OAuthAuthCodeQuery

QueryAuthCodes queries the "auth_codes" edge of the OAuthApp entity.

func (*OAuthApp) QueryConsents

func (_m *OAuthApp) QueryConsents() *OAuthConsentQuery

QueryConsents queries the "consents" edge of the OAuthApp entity.

func (*OAuthApp) QueryOrganization

func (_m *OAuthApp) QueryOrganization() *OrganizationQuery

QueryOrganization queries the "organization" edge of the OAuthApp entity.

func (*OAuthApp) QueryOwner

func (_m *OAuthApp) QueryOwner() *UserQuery

QueryOwner queries the "owner" edge of the OAuthApp entity.

func (*OAuthApp) QuerySecrets

func (_m *OAuthApp) QuerySecrets() *OAuthAppSecretQuery

QuerySecrets queries the "secrets" edge of the OAuthApp entity.

func (*OAuthApp) QueryTokens

func (_m *OAuthApp) QueryTokens() *OAuthTokenQuery

QueryTokens queries the "tokens" edge of the OAuthApp entity.

func (*OAuthApp) String

func (_m *OAuthApp) String() string

String implements the fmt.Stringer.

func (*OAuthApp) Unwrap

func (_m *OAuthApp) Unwrap() *OAuthApp

Unwrap unwraps the OAuthApp 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 (*OAuthApp) Update

func (_m *OAuthApp) Update() *OAuthAppUpdateOne

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

func (*OAuthApp) Value

func (_m *OAuthApp) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the OAuthApp. This includes values selected through modifiers, order, etc.

type OAuthAppClient

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

OAuthAppClient is a client for the OAuthApp schema.

func NewOAuthAppClient

func NewOAuthAppClient(c config) *OAuthAppClient

NewOAuthAppClient returns a client for the OAuthApp from the given config.

func (*OAuthAppClient) Create

func (c *OAuthAppClient) Create() *OAuthAppCreate

Create returns a builder for creating a OAuthApp entity.

func (*OAuthAppClient) CreateBulk

func (c *OAuthAppClient) CreateBulk(builders ...*OAuthAppCreate) *OAuthAppCreateBulk

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

func (*OAuthAppClient) Delete

func (c *OAuthAppClient) Delete() *OAuthAppDelete

Delete returns a delete builder for OAuthApp.

func (*OAuthAppClient) DeleteOne

func (c *OAuthAppClient) DeleteOne(_m *OAuthApp) *OAuthAppDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OAuthAppClient) DeleteOneID

func (c *OAuthAppClient) DeleteOneID(id uuid.UUID) *OAuthAppDeleteOne

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

func (*OAuthAppClient) Get

func (c *OAuthAppClient) Get(ctx context.Context, id uuid.UUID) (*OAuthApp, error)

Get returns a OAuthApp entity by its id.

func (*OAuthAppClient) GetX

func (c *OAuthAppClient) GetX(ctx context.Context, id uuid.UUID) *OAuthApp

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

func (*OAuthAppClient) Hooks

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

Hooks returns the client hooks.

func (*OAuthAppClient) Intercept

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

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

func (*OAuthAppClient) Interceptors

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

Interceptors returns the client interceptors.

func (*OAuthAppClient) MapCreateBulk

func (c *OAuthAppClient) MapCreateBulk(slice any, setFunc func(*OAuthAppCreate, int)) *OAuthAppCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*OAuthAppClient) Query

func (c *OAuthAppClient) Query() *OAuthAppQuery

Query returns a query builder for OAuthApp.

func (*OAuthAppClient) QueryAuthCodes

func (c *OAuthAppClient) QueryAuthCodes(_m *OAuthApp) *OAuthAuthCodeQuery

QueryAuthCodes queries the auth_codes edge of a OAuthApp.

func (*OAuthAppClient) QueryConsents

func (c *OAuthAppClient) QueryConsents(_m *OAuthApp) *OAuthConsentQuery

QueryConsents queries the consents edge of a OAuthApp.

func (*OAuthAppClient) QueryOrganization

func (c *OAuthAppClient) QueryOrganization(_m *OAuthApp) *OrganizationQuery

QueryOrganization queries the organization edge of a OAuthApp.

func (*OAuthAppClient) QueryOwner

func (c *OAuthAppClient) QueryOwner(_m *OAuthApp) *UserQuery

QueryOwner queries the owner edge of a OAuthApp.

func (*OAuthAppClient) QuerySecrets

func (c *OAuthAppClient) QuerySecrets(_m *OAuthApp) *OAuthAppSecretQuery

QuerySecrets queries the secrets edge of a OAuthApp.

func (*OAuthAppClient) QueryTokens

func (c *OAuthAppClient) QueryTokens(_m *OAuthApp) *OAuthTokenQuery

QueryTokens queries the tokens edge of a OAuthApp.

func (*OAuthAppClient) Update

func (c *OAuthAppClient) Update() *OAuthAppUpdate

Update returns an update builder for OAuthApp.

func (*OAuthAppClient) UpdateOne

func (c *OAuthAppClient) UpdateOne(_m *OAuthApp) *OAuthAppUpdateOne

UpdateOne returns an update builder for the given entity.

func (*OAuthAppClient) UpdateOneID

func (c *OAuthAppClient) UpdateOneID(id uuid.UUID) *OAuthAppUpdateOne

UpdateOneID returns an update builder for the given id.

func (*OAuthAppClient) Use

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

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

type OAuthAppCreate

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

OAuthAppCreate is the builder for creating a OAuthApp entity.

func (*OAuthAppCreate) AddAuthCodeIDs

func (_c *OAuthAppCreate) AddAuthCodeIDs(ids ...uuid.UUID) *OAuthAppCreate

AddAuthCodeIDs adds the "auth_codes" edge to the OAuthAuthCode entity by IDs.

func (*OAuthAppCreate) AddAuthCodes

func (_c *OAuthAppCreate) AddAuthCodes(v ...*OAuthAuthCode) *OAuthAppCreate

AddAuthCodes adds the "auth_codes" edges to the OAuthAuthCode entity.

func (*OAuthAppCreate) AddConsentIDs

func (_c *OAuthAppCreate) AddConsentIDs(ids ...uuid.UUID) *OAuthAppCreate

AddConsentIDs adds the "consents" edge to the OAuthConsent entity by IDs.

func (*OAuthAppCreate) AddConsents

func (_c *OAuthAppCreate) AddConsents(v ...*OAuthConsent) *OAuthAppCreate

AddConsents adds the "consents" edges to the OAuthConsent entity.

func (*OAuthAppCreate) AddSecretIDs

func (_c *OAuthAppCreate) AddSecretIDs(ids ...uuid.UUID) *OAuthAppCreate

AddSecretIDs adds the "secrets" edge to the OAuthAppSecret entity by IDs.

func (*OAuthAppCreate) AddSecrets

func (_c *OAuthAppCreate) AddSecrets(v ...*OAuthAppSecret) *OAuthAppCreate

AddSecrets adds the "secrets" edges to the OAuthAppSecret entity.

func (*OAuthAppCreate) AddTokenIDs

func (_c *OAuthAppCreate) AddTokenIDs(ids ...uuid.UUID) *OAuthAppCreate

AddTokenIDs adds the "tokens" edge to the OAuthToken entity by IDs.

func (*OAuthAppCreate) AddTokens

func (_c *OAuthAppCreate) AddTokens(v ...*OAuthToken) *OAuthAppCreate

AddTokens adds the "tokens" edges to the OAuthToken entity.

func (*OAuthAppCreate) Exec

func (_c *OAuthAppCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OAuthAppCreate) ExecX

func (_c *OAuthAppCreate) ExecX(ctx context.Context)

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

func (*OAuthAppCreate) Mutation

func (_c *OAuthAppCreate) Mutation() *OAuthAppMutation

Mutation returns the OAuthAppMutation object of the builder.

func (*OAuthAppCreate) OnConflict

func (_c *OAuthAppCreate) OnConflict(opts ...sql.ConflictOption) *OAuthAppUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OAuthApp.Create().
	SetClientID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OAuthAppUpsert) {
		SetClientID(v+v).
	}).
	Exec(ctx)

func (*OAuthAppCreate) OnConflictColumns

func (_c *OAuthAppCreate) OnConflictColumns(columns ...string) *OAuthAppUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OAuthApp.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OAuthAppCreate) Save

func (_c *OAuthAppCreate) Save(ctx context.Context) (*OAuthApp, error)

Save creates the OAuthApp in the database.

func (*OAuthAppCreate) SaveX

func (_c *OAuthAppCreate) SaveX(ctx context.Context) *OAuthApp

SaveX calls Save and panics if Save returns an error.

func (*OAuthAppCreate) SetAccessTokenTTL

func (_c *OAuthAppCreate) SetAccessTokenTTL(v int) *OAuthAppCreate

SetAccessTokenTTL sets the "access_token_ttl" field.

func (*OAuthAppCreate) SetActive

func (_c *OAuthAppCreate) SetActive(v bool) *OAuthAppCreate

SetActive sets the "active" field.

func (*OAuthAppCreate) SetAllowedGrants

func (_c *OAuthAppCreate) SetAllowedGrants(v []string) *OAuthAppCreate

SetAllowedGrants sets the "allowed_grants" field.

func (*OAuthAppCreate) SetAllowedResponseTypes

func (_c *OAuthAppCreate) SetAllowedResponseTypes(v []string) *OAuthAppCreate

SetAllowedResponseTypes sets the "allowed_response_types" field.

func (*OAuthAppCreate) SetAllowedScopes

func (_c *OAuthAppCreate) SetAllowedScopes(v []string) *OAuthAppCreate

SetAllowedScopes sets the "allowed_scopes" field.

func (*OAuthAppCreate) SetAppType

func (_c *OAuthAppCreate) SetAppType(v oauthapp.AppType) *OAuthAppCreate

SetAppType sets the "app_type" field.

func (*OAuthAppCreate) SetClientID

func (_c *OAuthAppCreate) SetClientID(v string) *OAuthAppCreate

SetClientID sets the "client_id" field.

func (*OAuthAppCreate) SetCreatedAt

func (_c *OAuthAppCreate) SetCreatedAt(v time.Time) *OAuthAppCreate

SetCreatedAt sets the "created_at" field.

func (*OAuthAppCreate) SetDescription

func (_c *OAuthAppCreate) SetDescription(v string) *OAuthAppCreate

SetDescription sets the "description" field.

func (*OAuthAppCreate) SetFirstParty

func (_c *OAuthAppCreate) SetFirstParty(v bool) *OAuthAppCreate

SetFirstParty sets the "first_party" field.

func (*OAuthAppCreate) SetID

func (_c *OAuthAppCreate) SetID(v uuid.UUID) *OAuthAppCreate

SetID sets the "id" field.

func (*OAuthAppCreate) SetLogoURL

func (_c *OAuthAppCreate) SetLogoURL(v string) *OAuthAppCreate

SetLogoURL sets the "logo_url" field.

func (*OAuthAppCreate) SetMetadata

func (_c *OAuthAppCreate) SetMetadata(v map[string]string) *OAuthAppCreate

SetMetadata sets the "metadata" field.

func (*OAuthAppCreate) SetName

func (_c *OAuthAppCreate) SetName(v string) *OAuthAppCreate

SetName sets the "name" field.

func (*OAuthAppCreate) SetNillableAccessTokenTTL

func (_c *OAuthAppCreate) SetNillableAccessTokenTTL(v *int) *OAuthAppCreate

SetNillableAccessTokenTTL sets the "access_token_ttl" field if the given value is not nil.

func (*OAuthAppCreate) SetNillableActive

func (_c *OAuthAppCreate) SetNillableActive(v *bool) *OAuthAppCreate

SetNillableActive sets the "active" field if the given value is not nil.

func (*OAuthAppCreate) SetNillableAppType

func (_c *OAuthAppCreate) SetNillableAppType(v *oauthapp.AppType) *OAuthAppCreate

SetNillableAppType sets the "app_type" field if the given value is not nil.

func (*OAuthAppCreate) SetNillableCreatedAt

func (_c *OAuthAppCreate) SetNillableCreatedAt(v *time.Time) *OAuthAppCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*OAuthAppCreate) SetNillableDescription

func (_c *OAuthAppCreate) SetNillableDescription(v *string) *OAuthAppCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*OAuthAppCreate) SetNillableFirstParty

func (_c *OAuthAppCreate) SetNillableFirstParty(v *bool) *OAuthAppCreate

SetNillableFirstParty sets the "first_party" field if the given value is not nil.

func (*OAuthAppCreate) SetNillableID

func (_c *OAuthAppCreate) SetNillableID(v *uuid.UUID) *OAuthAppCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*OAuthAppCreate) SetNillableLogoURL

func (_c *OAuthAppCreate) SetNillableLogoURL(v *string) *OAuthAppCreate

SetNillableLogoURL sets the "logo_url" field if the given value is not nil.

func (*OAuthAppCreate) SetNillableOrganizationID

func (_c *OAuthAppCreate) SetNillableOrganizationID(v *uuid.UUID) *OAuthAppCreate

SetNillableOrganizationID sets the "organization_id" field if the given value is not nil.

func (*OAuthAppCreate) SetNillablePublic

func (_c *OAuthAppCreate) SetNillablePublic(v *bool) *OAuthAppCreate

SetNillablePublic sets the "public" field if the given value is not nil.

func (*OAuthAppCreate) SetNillableRefreshTokenRotation

func (_c *OAuthAppCreate) SetNillableRefreshTokenRotation(v *bool) *OAuthAppCreate

SetNillableRefreshTokenRotation sets the "refresh_token_rotation" field if the given value is not nil.

func (*OAuthAppCreate) SetNillableRefreshTokenTTL

func (_c *OAuthAppCreate) SetNillableRefreshTokenTTL(v *int) *OAuthAppCreate

SetNillableRefreshTokenTTL sets the "refresh_token_ttl" field if the given value is not nil.

func (*OAuthAppCreate) SetNillableRevokedAt

func (_c *OAuthAppCreate) SetNillableRevokedAt(v *time.Time) *OAuthAppCreate

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*OAuthAppCreate) SetNillableUpdatedAt

func (_c *OAuthAppCreate) SetNillableUpdatedAt(v *time.Time) *OAuthAppCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OAuthAppCreate) SetOrganization

func (_c *OAuthAppCreate) SetOrganization(v *Organization) *OAuthAppCreate

SetOrganization sets the "organization" edge to the Organization entity.

func (*OAuthAppCreate) SetOrganizationID

func (_c *OAuthAppCreate) SetOrganizationID(v uuid.UUID) *OAuthAppCreate

SetOrganizationID sets the "organization_id" field.

func (*OAuthAppCreate) SetOwner

func (_c *OAuthAppCreate) SetOwner(v *User) *OAuthAppCreate

SetOwner sets the "owner" edge to the User entity.

func (*OAuthAppCreate) SetOwnerID

func (_c *OAuthAppCreate) SetOwnerID(v uuid.UUID) *OAuthAppCreate

SetOwnerID sets the "owner_id" field.

func (*OAuthAppCreate) SetPublic

func (_c *OAuthAppCreate) SetPublic(v bool) *OAuthAppCreate

SetPublic sets the "public" field.

func (*OAuthAppCreate) SetRedirectUris

func (_c *OAuthAppCreate) SetRedirectUris(v []string) *OAuthAppCreate

SetRedirectUris sets the "redirect_uris" field.

func (*OAuthAppCreate) SetRefreshTokenRotation

func (_c *OAuthAppCreate) SetRefreshTokenRotation(v bool) *OAuthAppCreate

SetRefreshTokenRotation sets the "refresh_token_rotation" field.

func (*OAuthAppCreate) SetRefreshTokenTTL

func (_c *OAuthAppCreate) SetRefreshTokenTTL(v int) *OAuthAppCreate

SetRefreshTokenTTL sets the "refresh_token_ttl" field.

func (*OAuthAppCreate) SetRevokedAt

func (_c *OAuthAppCreate) SetRevokedAt(v time.Time) *OAuthAppCreate

SetRevokedAt sets the "revoked_at" field.

func (*OAuthAppCreate) SetUpdatedAt

func (_c *OAuthAppCreate) SetUpdatedAt(v time.Time) *OAuthAppCreate

SetUpdatedAt sets the "updated_at" field.

type OAuthAppCreateBulk

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

OAuthAppCreateBulk is the builder for creating many OAuthApp entities in bulk.

func (*OAuthAppCreateBulk) Exec

func (_c *OAuthAppCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*OAuthAppCreateBulk) ExecX

func (_c *OAuthAppCreateBulk) ExecX(ctx context.Context)

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

func (*OAuthAppCreateBulk) OnConflict

func (_c *OAuthAppCreateBulk) OnConflict(opts ...sql.ConflictOption) *OAuthAppUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OAuthApp.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OAuthAppUpsert) {
		SetClientID(v+v).
	}).
	Exec(ctx)

func (*OAuthAppCreateBulk) OnConflictColumns

func (_c *OAuthAppCreateBulk) OnConflictColumns(columns ...string) *OAuthAppUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OAuthApp.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OAuthAppCreateBulk) Save

func (_c *OAuthAppCreateBulk) Save(ctx context.Context) ([]*OAuthApp, error)

Save creates the OAuthApp entities in the database.

func (*OAuthAppCreateBulk) SaveX

func (_c *OAuthAppCreateBulk) SaveX(ctx context.Context) []*OAuthApp

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

type OAuthAppDelete

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

OAuthAppDelete is the builder for deleting a OAuthApp entity.

func (*OAuthAppDelete) Exec

func (_d *OAuthAppDelete) Exec(ctx context.Context) (int, error)

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

func (*OAuthAppDelete) ExecX

func (_d *OAuthAppDelete) ExecX(ctx context.Context) int

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

func (*OAuthAppDelete) Where

func (_d *OAuthAppDelete) Where(ps ...predicate.OAuthApp) *OAuthAppDelete

Where appends a list predicates to the OAuthAppDelete builder.

type OAuthAppDeleteOne

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

OAuthAppDeleteOne is the builder for deleting a single OAuthApp entity.

func (*OAuthAppDeleteOne) Exec

func (_d *OAuthAppDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*OAuthAppDeleteOne) ExecX

func (_d *OAuthAppDeleteOne) ExecX(ctx context.Context)

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

func (*OAuthAppDeleteOne) Where

Where appends a list predicates to the OAuthAppDelete builder.

type OAuthAppEdges

type OAuthAppEdges struct {
	// Owner holds the value of the owner edge.
	Owner *User `json:"owner,omitempty"`
	// Organization holds the value of the organization edge.
	Organization *Organization `json:"organization,omitempty"`
	// Secrets holds the value of the secrets edge.
	Secrets []*OAuthAppSecret `json:"secrets,omitempty"`
	// Tokens holds the value of the tokens edge.
	Tokens []*OAuthToken `json:"tokens,omitempty"`
	// AuthCodes holds the value of the auth_codes edge.
	AuthCodes []*OAuthAuthCode `json:"auth_codes,omitempty"`
	// Consents holds the value of the consents edge.
	Consents []*OAuthConsent `json:"consents,omitempty"`
	// contains filtered or unexported fields
}

OAuthAppEdges holds the relations/edges for other nodes in the graph.

func (OAuthAppEdges) AuthCodesOrErr

func (e OAuthAppEdges) AuthCodesOrErr() ([]*OAuthAuthCode, error)

AuthCodesOrErr returns the AuthCodes value or an error if the edge was not loaded in eager-loading.

func (OAuthAppEdges) ConsentsOrErr

func (e OAuthAppEdges) ConsentsOrErr() ([]*OAuthConsent, error)

ConsentsOrErr returns the Consents value or an error if the edge was not loaded in eager-loading.

func (OAuthAppEdges) OrganizationOrErr

func (e OAuthAppEdges) OrganizationOrErr() (*Organization, error)

OrganizationOrErr returns the Organization value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (OAuthAppEdges) OwnerOrErr

func (e OAuthAppEdges) OwnerOrErr() (*User, error)

OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (OAuthAppEdges) SecretsOrErr

func (e OAuthAppEdges) SecretsOrErr() ([]*OAuthAppSecret, error)

SecretsOrErr returns the Secrets value or an error if the edge was not loaded in eager-loading.

func (OAuthAppEdges) TokensOrErr

func (e OAuthAppEdges) TokensOrErr() ([]*OAuthToken, error)

TokensOrErr returns the Tokens value or an error if the edge was not loaded in eager-loading.

type OAuthAppFilter

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

OAuthAppFilter provides a generic filtering capability at runtime for OAuthAppQuery.

func (*OAuthAppFilter) Where

func (f *OAuthAppFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*OAuthAppFilter) WhereAccessTokenTTL

func (f *OAuthAppFilter) WhereAccessTokenTTL(p entql.IntP)

WhereAccessTokenTTL applies the entql int predicate on the access_token_ttl field.

func (*OAuthAppFilter) WhereActive

func (f *OAuthAppFilter) WhereActive(p entql.BoolP)

WhereActive applies the entql bool predicate on the active field.

func (*OAuthAppFilter) WhereAllowedGrants

func (f *OAuthAppFilter) WhereAllowedGrants(p entql.BytesP)

WhereAllowedGrants applies the entql json.RawMessage predicate on the allowed_grants field.

func (*OAuthAppFilter) WhereAllowedResponseTypes

func (f *OAuthAppFilter) WhereAllowedResponseTypes(p entql.BytesP)

WhereAllowedResponseTypes applies the entql json.RawMessage predicate on the allowed_response_types field.

func (*OAuthAppFilter) WhereAllowedScopes

func (f *OAuthAppFilter) WhereAllowedScopes(p entql.BytesP)

WhereAllowedScopes applies the entql json.RawMessage predicate on the allowed_scopes field.

func (*OAuthAppFilter) WhereAppType

func (f *OAuthAppFilter) WhereAppType(p entql.StringP)

WhereAppType applies the entql string predicate on the app_type field.

func (*OAuthAppFilter) WhereClientID

func (f *OAuthAppFilter) WhereClientID(p entql.StringP)

WhereClientID applies the entql string predicate on the client_id field.

func (*OAuthAppFilter) WhereCreatedAt

func (f *OAuthAppFilter) WhereCreatedAt(p entql.TimeP)

WhereCreatedAt applies the entql time.Time predicate on the created_at field.

func (*OAuthAppFilter) WhereDescription

func (f *OAuthAppFilter) WhereDescription(p entql.StringP)

WhereDescription applies the entql string predicate on the description field.

func (*OAuthAppFilter) WhereFirstParty

func (f *OAuthAppFilter) WhereFirstParty(p entql.BoolP)

WhereFirstParty applies the entql bool predicate on the first_party field.

func (*OAuthAppFilter) WhereHasAuthCodes

func (f *OAuthAppFilter) WhereHasAuthCodes()

WhereHasAuthCodes applies a predicate to check if query has an edge auth_codes.

func (*OAuthAppFilter) WhereHasAuthCodesWith

func (f *OAuthAppFilter) WhereHasAuthCodesWith(preds ...predicate.OAuthAuthCode)

WhereHasAuthCodesWith applies a predicate to check if query has an edge auth_codes with a given conditions (other predicates).

func (*OAuthAppFilter) WhereHasConsents

func (f *OAuthAppFilter) WhereHasConsents()

WhereHasConsents applies a predicate to check if query has an edge consents.

func (*OAuthAppFilter) WhereHasConsentsWith

func (f *OAuthAppFilter) WhereHasConsentsWith(preds ...predicate.OAuthConsent)

WhereHasConsentsWith applies a predicate to check if query has an edge consents with a given conditions (other predicates).

func (*OAuthAppFilter) WhereHasOrganization

func (f *OAuthAppFilter) WhereHasOrganization()

WhereHasOrganization applies a predicate to check if query has an edge organization.

func (*OAuthAppFilter) WhereHasOrganizationWith

func (f *OAuthAppFilter) WhereHasOrganizationWith(preds ...predicate.Organization)

WhereHasOrganizationWith applies a predicate to check if query has an edge organization with a given conditions (other predicates).

func (*OAuthAppFilter) WhereHasOwner

func (f *OAuthAppFilter) WhereHasOwner()

WhereHasOwner applies a predicate to check if query has an edge owner.

func (*OAuthAppFilter) WhereHasOwnerWith

func (f *OAuthAppFilter) WhereHasOwnerWith(preds ...predicate.User)

WhereHasOwnerWith applies a predicate to check if query has an edge owner with a given conditions (other predicates).

func (*OAuthAppFilter) WhereHasSecrets

func (f *OAuthAppFilter) WhereHasSecrets()

WhereHasSecrets applies a predicate to check if query has an edge secrets.

func (*OAuthAppFilter) WhereHasSecretsWith

func (f *OAuthAppFilter) WhereHasSecretsWith(preds ...predicate.OAuthAppSecret)

WhereHasSecretsWith applies a predicate to check if query has an edge secrets with a given conditions (other predicates).

func (*OAuthAppFilter) WhereHasTokens

func (f *OAuthAppFilter) WhereHasTokens()

WhereHasTokens applies a predicate to check if query has an edge tokens.

func (*OAuthAppFilter) WhereHasTokensWith

func (f *OAuthAppFilter) WhereHasTokensWith(preds ...predicate.OAuthToken)

WhereHasTokensWith applies a predicate to check if query has an edge tokens with a given conditions (other predicates).

func (*OAuthAppFilter) WhereID

func (f *OAuthAppFilter) WhereID(p entql.ValueP)

WhereID applies the entql [16]byte predicate on the id field.

func (*OAuthAppFilter) WhereLogoURL

func (f *OAuthAppFilter) WhereLogoURL(p entql.StringP)

WhereLogoURL applies the entql string predicate on the logo_url field.

func (*OAuthAppFilter) WhereMetadata

func (f *OAuthAppFilter) WhereMetadata(p entql.BytesP)

WhereMetadata applies the entql json.RawMessage predicate on the metadata field.

func (*OAuthAppFilter) WhereName

func (f *OAuthAppFilter) WhereName(p entql.StringP)

WhereName applies the entql string predicate on the name field.

func (*OAuthAppFilter) WhereOrganizationID

func (f *OAuthAppFilter) WhereOrganizationID(p entql.ValueP)

WhereOrganizationID applies the entql [16]byte predicate on the organization_id field.

func (*OAuthAppFilter) WhereOwnerID

func (f *OAuthAppFilter) WhereOwnerID(p entql.ValueP)

WhereOwnerID applies the entql [16]byte predicate on the owner_id field.

func (*OAuthAppFilter) WherePublic

func (f *OAuthAppFilter) WherePublic(p entql.BoolP)

WherePublic applies the entql bool predicate on the public field.

func (*OAuthAppFilter) WhereRedirectUris

func (f *OAuthAppFilter) WhereRedirectUris(p entql.BytesP)

WhereRedirectUris applies the entql json.RawMessage predicate on the redirect_uris field.

func (*OAuthAppFilter) WhereRefreshTokenRotation

func (f *OAuthAppFilter) WhereRefreshTokenRotation(p entql.BoolP)

WhereRefreshTokenRotation applies the entql bool predicate on the refresh_token_rotation field.

func (*OAuthAppFilter) WhereRefreshTokenTTL

func (f *OAuthAppFilter) WhereRefreshTokenTTL(p entql.IntP)

WhereRefreshTokenTTL applies the entql int predicate on the refresh_token_ttl field.

func (*OAuthAppFilter) WhereRevokedAt

func (f *OAuthAppFilter) WhereRevokedAt(p entql.TimeP)

WhereRevokedAt applies the entql time.Time predicate on the revoked_at field.

func (*OAuthAppFilter) WhereUpdatedAt

func (f *OAuthAppFilter) WhereUpdatedAt(p entql.TimeP)

WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.

type OAuthAppGroupBy

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

OAuthAppGroupBy is the group-by builder for OAuthApp entities.

func (*OAuthAppGroupBy) Aggregate

func (_g *OAuthAppGroupBy) Aggregate(fns ...AggregateFunc) *OAuthAppGroupBy

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

func (*OAuthAppGroupBy) Bool

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

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

func (*OAuthAppGroupBy) BoolX

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

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

func (*OAuthAppGroupBy) Bools

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

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

func (*OAuthAppGroupBy) BoolsX

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

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

func (*OAuthAppGroupBy) Float64

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

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

func (*OAuthAppGroupBy) Float64X

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

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

func (*OAuthAppGroupBy) Float64s

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

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

func (*OAuthAppGroupBy) Float64sX

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

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

func (*OAuthAppGroupBy) Int

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

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

func (*OAuthAppGroupBy) IntX

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

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

func (*OAuthAppGroupBy) Ints

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

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

func (*OAuthAppGroupBy) IntsX

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

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

func (*OAuthAppGroupBy) Scan

func (_g *OAuthAppGroupBy) Scan(ctx context.Context, v any) error

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

func (*OAuthAppGroupBy) ScanX

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

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

func (*OAuthAppGroupBy) String

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

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

func (*OAuthAppGroupBy) StringX

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

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

func (*OAuthAppGroupBy) Strings

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

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

func (*OAuthAppGroupBy) StringsX

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

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

type OAuthAppMutation

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

OAuthAppMutation represents an operation that mutates the OAuthApp nodes in the graph.

func (*OAuthAppMutation) AccessTokenTTL

func (m *OAuthAppMutation) AccessTokenTTL() (r int, exists bool)

AccessTokenTTL returns the value of the "access_token_ttl" field in the mutation.

func (*OAuthAppMutation) Active

func (m *OAuthAppMutation) Active() (r bool, exists bool)

Active returns the value of the "active" field in the mutation.

func (*OAuthAppMutation) AddAccessTokenTTL

func (m *OAuthAppMutation) AddAccessTokenTTL(i int)

AddAccessTokenTTL adds i to the "access_token_ttl" field.

func (*OAuthAppMutation) AddAuthCodeIDs

func (m *OAuthAppMutation) AddAuthCodeIDs(ids ...uuid.UUID)

AddAuthCodeIDs adds the "auth_codes" edge to the OAuthAuthCode entity by ids.

func (*OAuthAppMutation) AddConsentIDs

func (m *OAuthAppMutation) AddConsentIDs(ids ...uuid.UUID)

AddConsentIDs adds the "consents" edge to the OAuthConsent entity by ids.

func (*OAuthAppMutation) AddField

func (m *OAuthAppMutation) 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 (*OAuthAppMutation) AddRefreshTokenTTL

func (m *OAuthAppMutation) AddRefreshTokenTTL(i int)

AddRefreshTokenTTL adds i to the "refresh_token_ttl" field.

func (*OAuthAppMutation) AddSecretIDs

func (m *OAuthAppMutation) AddSecretIDs(ids ...uuid.UUID)

AddSecretIDs adds the "secrets" edge to the OAuthAppSecret entity by ids.

func (*OAuthAppMutation) AddTokenIDs

func (m *OAuthAppMutation) AddTokenIDs(ids ...uuid.UUID)

AddTokenIDs adds the "tokens" edge to the OAuthToken entity by ids.

func (*OAuthAppMutation) AddedAccessTokenTTL

func (m *OAuthAppMutation) AddedAccessTokenTTL() (r int, exists bool)

AddedAccessTokenTTL returns the value that was added to the "access_token_ttl" field in this mutation.

func (*OAuthAppMutation) AddedEdges

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

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

func (*OAuthAppMutation) AddedField

func (m *OAuthAppMutation) 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 (*OAuthAppMutation) AddedFields

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

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

func (*OAuthAppMutation) AddedIDs

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

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

func (*OAuthAppMutation) AddedRefreshTokenTTL

func (m *OAuthAppMutation) AddedRefreshTokenTTL() (r int, exists bool)

AddedRefreshTokenTTL returns the value that was added to the "refresh_token_ttl" field in this mutation.

func (*OAuthAppMutation) AllowedGrants

func (m *OAuthAppMutation) AllowedGrants() (r []string, exists bool)

AllowedGrants returns the value of the "allowed_grants" field in the mutation.

func (*OAuthAppMutation) AllowedResponseTypes

func (m *OAuthAppMutation) AllowedResponseTypes() (r []string, exists bool)

AllowedResponseTypes returns the value of the "allowed_response_types" field in the mutation.

func (*OAuthAppMutation) AllowedScopes

func (m *OAuthAppMutation) AllowedScopes() (r []string, exists bool)

AllowedScopes returns the value of the "allowed_scopes" field in the mutation.

func (*OAuthAppMutation) AppType

func (m *OAuthAppMutation) AppType() (r oauthapp.AppType, exists bool)

AppType returns the value of the "app_type" field in the mutation.

func (*OAuthAppMutation) AppendAllowedGrants

func (m *OAuthAppMutation) AppendAllowedGrants(s []string)

AppendAllowedGrants adds s to the "allowed_grants" field.

func (*OAuthAppMutation) AppendAllowedResponseTypes

func (m *OAuthAppMutation) AppendAllowedResponseTypes(s []string)

AppendAllowedResponseTypes adds s to the "allowed_response_types" field.

func (*OAuthAppMutation) AppendAllowedScopes

func (m *OAuthAppMutation) AppendAllowedScopes(s []string)

AppendAllowedScopes adds s to the "allowed_scopes" field.

func (*OAuthAppMutation) AppendRedirectUris

func (m *OAuthAppMutation) AppendRedirectUris(s []string)

AppendRedirectUris adds s to the "redirect_uris" field.

func (*OAuthAppMutation) AppendedAllowedGrants

func (m *OAuthAppMutation) AppendedAllowedGrants() ([]string, bool)

AppendedAllowedGrants returns the list of values that were appended to the "allowed_grants" field in this mutation.

func (*OAuthAppMutation) AppendedAllowedResponseTypes

func (m *OAuthAppMutation) AppendedAllowedResponseTypes() ([]string, bool)

AppendedAllowedResponseTypes returns the list of values that were appended to the "allowed_response_types" field in this mutation.

func (*OAuthAppMutation) AppendedAllowedScopes

func (m *OAuthAppMutation) AppendedAllowedScopes() ([]string, bool)

AppendedAllowedScopes returns the list of values that were appended to the "allowed_scopes" field in this mutation.

func (*OAuthAppMutation) AppendedRedirectUris

func (m *OAuthAppMutation) AppendedRedirectUris() ([]string, bool)

AppendedRedirectUris returns the list of values that were appended to the "redirect_uris" field in this mutation.

func (*OAuthAppMutation) AuthCodesCleared

func (m *OAuthAppMutation) AuthCodesCleared() bool

AuthCodesCleared reports if the "auth_codes" edge to the OAuthAuthCode entity was cleared.

func (*OAuthAppMutation) AuthCodesIDs

func (m *OAuthAppMutation) AuthCodesIDs() (ids []uuid.UUID)

AuthCodesIDs returns the "auth_codes" edge IDs in the mutation.

func (*OAuthAppMutation) ClearAuthCodes

func (m *OAuthAppMutation) ClearAuthCodes()

ClearAuthCodes clears the "auth_codes" edge to the OAuthAuthCode entity.

func (*OAuthAppMutation) ClearConsents

func (m *OAuthAppMutation) ClearConsents()

ClearConsents clears the "consents" edge to the OAuthConsent entity.

func (*OAuthAppMutation) ClearDescription

func (m *OAuthAppMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*OAuthAppMutation) ClearEdge

func (m *OAuthAppMutation) 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 (*OAuthAppMutation) ClearField

func (m *OAuthAppMutation) 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 (*OAuthAppMutation) ClearLogoURL

func (m *OAuthAppMutation) ClearLogoURL()

ClearLogoURL clears the value of the "logo_url" field.

func (*OAuthAppMutation) ClearMetadata

func (m *OAuthAppMutation) ClearMetadata()

ClearMetadata clears the value of the "metadata" field.

func (*OAuthAppMutation) ClearOrganization

func (m *OAuthAppMutation) ClearOrganization()

ClearOrganization clears the "organization" edge to the Organization entity.

func (*OAuthAppMutation) ClearOrganizationID

func (m *OAuthAppMutation) ClearOrganizationID()

ClearOrganizationID clears the value of the "organization_id" field.

func (*OAuthAppMutation) ClearOwner

func (m *OAuthAppMutation) ClearOwner()

ClearOwner clears the "owner" edge to the User entity.

func (*OAuthAppMutation) ClearRevokedAt

func (m *OAuthAppMutation) ClearRevokedAt()

ClearRevokedAt clears the value of the "revoked_at" field.

func (*OAuthAppMutation) ClearSecrets

func (m *OAuthAppMutation) ClearSecrets()

ClearSecrets clears the "secrets" edge to the OAuthAppSecret entity.

func (*OAuthAppMutation) ClearTokens

func (m *OAuthAppMutation) ClearTokens()

ClearTokens clears the "tokens" edge to the OAuthToken entity.

func (*OAuthAppMutation) ClearedEdges

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

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

func (*OAuthAppMutation) ClearedFields

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

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

func (OAuthAppMutation) Client

func (m OAuthAppMutation) 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 (*OAuthAppMutation) ClientID

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

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

func (*OAuthAppMutation) ConsentsCleared

func (m *OAuthAppMutation) ConsentsCleared() bool

ConsentsCleared reports if the "consents" edge to the OAuthConsent entity was cleared.

func (*OAuthAppMutation) ConsentsIDs

func (m *OAuthAppMutation) ConsentsIDs() (ids []uuid.UUID)

ConsentsIDs returns the "consents" edge IDs in the mutation.

func (*OAuthAppMutation) CreatedAt

func (m *OAuthAppMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*OAuthAppMutation) Description

func (m *OAuthAppMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*OAuthAppMutation) DescriptionCleared

func (m *OAuthAppMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*OAuthAppMutation) EdgeCleared

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

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

func (*OAuthAppMutation) Field

func (m *OAuthAppMutation) 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 (*OAuthAppMutation) FieldCleared

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

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

func (*OAuthAppMutation) Fields

func (m *OAuthAppMutation) 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 (*OAuthAppMutation) Filter

func (m *OAuthAppMutation) Filter() *OAuthAppFilter

Filter returns an entql.Where implementation to apply filters on the OAuthAppMutation builder.

func (*OAuthAppMutation) FirstParty

func (m *OAuthAppMutation) FirstParty() (r bool, exists bool)

FirstParty returns the value of the "first_party" field in the mutation.

func (*OAuthAppMutation) ID

func (m *OAuthAppMutation) ID() (id uuid.UUID, 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 (*OAuthAppMutation) IDs

func (m *OAuthAppMutation) IDs(ctx context.Context) ([]uuid.UUID, 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 (*OAuthAppMutation) LogoURL

func (m *OAuthAppMutation) LogoURL() (r string, exists bool)

LogoURL returns the value of the "logo_url" field in the mutation.

func (*OAuthAppMutation) LogoURLCleared

func (m *OAuthAppMutation) LogoURLCleared() bool

LogoURLCleared returns if the "logo_url" field was cleared in this mutation.

func (*OAuthAppMutation) Metadata

func (m *OAuthAppMutation) Metadata() (r map[string]string, exists bool)

Metadata returns the value of the "metadata" field in the mutation.

func (*OAuthAppMutation) MetadataCleared

func (m *OAuthAppMutation) MetadataCleared() bool

MetadataCleared returns if the "metadata" field was cleared in this mutation.

func (*OAuthAppMutation) Name

func (m *OAuthAppMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*OAuthAppMutation) OldAccessTokenTTL

func (m *OAuthAppMutation) OldAccessTokenTTL(ctx context.Context) (v int, err error)

OldAccessTokenTTL returns the old "access_token_ttl" field's value of the OAuthApp entity. If the OAuthApp 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 (*OAuthAppMutation) OldActive

func (m *OAuthAppMutation) OldActive(ctx context.Context) (v bool, err error)

OldActive returns the old "active" field's value of the OAuthApp entity. If the OAuthApp 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 (*OAuthAppMutation) OldAllowedGrants

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

OldAllowedGrants returns the old "allowed_grants" field's value of the OAuthApp entity. If the OAuthApp 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 (*OAuthAppMutation) OldAllowedResponseTypes

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

OldAllowedResponseTypes returns the old "allowed_response_types" field's value of the OAuthApp entity. If the OAuthApp 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 (*OAuthAppMutation) OldAllowedScopes

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

OldAllowedScopes returns the old "allowed_scopes" field's value of the OAuthApp entity. If the OAuthApp 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 (*OAuthAppMutation) OldAppType

func (m *OAuthAppMutation) OldAppType(ctx context.Context) (v oauthapp.AppType, err error)

OldAppType returns the old "app_type" field's value of the OAuthApp entity. If the OAuthApp 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 (*OAuthAppMutation) OldClientID

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

OldClientID returns the old "client_id" field's value of the OAuthApp entity. If the OAuthApp 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 (*OAuthAppMutation) OldCreatedAt

func (m *OAuthAppMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the OAuthApp entity. If the OAuthApp 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 (*OAuthAppMutation) OldDescription

func (m *OAuthAppMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the OAuthApp entity. If the OAuthApp 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 (*OAuthAppMutation) OldField

func (m *OAuthAppMutation) 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 (*OAuthAppMutation) OldFirstParty

func (m *OAuthAppMutation) OldFirstParty(ctx context.Context) (v bool, err error)

OldFirstParty returns the old "first_party" field's value of the OAuthApp entity. If the OAuthApp 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 (*OAuthAppMutation) OldLogoURL

func (m *OAuthAppMutation) OldLogoURL(ctx context.Context) (v string, err error)

OldLogoURL returns the old "logo_url" field's value of the OAuthApp entity. If the OAuthApp 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 (*OAuthAppMutation) OldMetadata

func (m *OAuthAppMutation) OldMetadata(ctx context.Context) (v map[string]string, err error)

OldMetadata returns the old "metadata" field's value of the OAuthApp entity. If the OAuthApp 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 (*OAuthAppMutation) OldName

func (m *OAuthAppMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the OAuthApp entity. If the OAuthApp 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 (*OAuthAppMutation) OldOrganizationID

func (m *OAuthAppMutation) OldOrganizationID(ctx context.Context) (v *uuid.UUID, err error)

OldOrganizationID returns the old "organization_id" field's value of the OAuthApp entity. If the OAuthApp 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 (*OAuthAppMutation) OldOwnerID

func (m *OAuthAppMutation) OldOwnerID(ctx context.Context) (v uuid.UUID, err error)

OldOwnerID returns the old "owner_id" field's value of the OAuthApp entity. If the OAuthApp 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 (*OAuthAppMutation) OldPublic

func (m *OAuthAppMutation) OldPublic(ctx context.Context) (v bool, err error)

OldPublic returns the old "public" field's value of the OAuthApp entity. If the OAuthApp 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 (*OAuthAppMutation) OldRedirectUris

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

OldRedirectUris returns the old "redirect_uris" field's value of the OAuthApp entity. If the OAuthApp 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 (*OAuthAppMutation) OldRefreshTokenRotation

func (m *OAuthAppMutation) OldRefreshTokenRotation(ctx context.Context) (v bool, err error)

OldRefreshTokenRotation returns the old "refresh_token_rotation" field's value of the OAuthApp entity. If the OAuthApp 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 (*OAuthAppMutation) OldRefreshTokenTTL

func (m *OAuthAppMutation) OldRefreshTokenTTL(ctx context.Context) (v int, err error)

OldRefreshTokenTTL returns the old "refresh_token_ttl" field's value of the OAuthApp entity. If the OAuthApp 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 (*OAuthAppMutation) OldRevokedAt

func (m *OAuthAppMutation) OldRevokedAt(ctx context.Context) (v *time.Time, err error)

OldRevokedAt returns the old "revoked_at" field's value of the OAuthApp entity. If the OAuthApp 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 (*OAuthAppMutation) OldUpdatedAt

func (m *OAuthAppMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the OAuthApp entity. If the OAuthApp 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 (*OAuthAppMutation) Op

func (m *OAuthAppMutation) Op() Op

Op returns the operation name.

func (*OAuthAppMutation) OrganizationCleared

func (m *OAuthAppMutation) OrganizationCleared() bool

OrganizationCleared reports if the "organization" edge to the Organization entity was cleared.

func (*OAuthAppMutation) OrganizationID

func (m *OAuthAppMutation) OrganizationID() (r uuid.UUID, exists bool)

OrganizationID returns the value of the "organization_id" field in the mutation.

func (*OAuthAppMutation) OrganizationIDCleared

func (m *OAuthAppMutation) OrganizationIDCleared() bool

OrganizationIDCleared returns if the "organization_id" field was cleared in this mutation.

func (*OAuthAppMutation) OrganizationIDs

func (m *OAuthAppMutation) OrganizationIDs() (ids []uuid.UUID)

OrganizationIDs returns the "organization" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrganizationID instead. It exists only for internal usage by the builders.

func (*OAuthAppMutation) OwnerCleared

func (m *OAuthAppMutation) OwnerCleared() bool

OwnerCleared reports if the "owner" edge to the User entity was cleared.

func (*OAuthAppMutation) OwnerID

func (m *OAuthAppMutation) OwnerID() (r uuid.UUID, exists bool)

OwnerID returns the value of the "owner_id" field in the mutation.

func (*OAuthAppMutation) OwnerIDs

func (m *OAuthAppMutation) OwnerIDs() (ids []uuid.UUID)

OwnerIDs returns the "owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.

func (*OAuthAppMutation) Public

func (m *OAuthAppMutation) Public() (r bool, exists bool)

Public returns the value of the "public" field in the mutation.

func (*OAuthAppMutation) RedirectUris

func (m *OAuthAppMutation) RedirectUris() (r []string, exists bool)

RedirectUris returns the value of the "redirect_uris" field in the mutation.

func (*OAuthAppMutation) RefreshTokenRotation

func (m *OAuthAppMutation) RefreshTokenRotation() (r bool, exists bool)

RefreshTokenRotation returns the value of the "refresh_token_rotation" field in the mutation.

func (*OAuthAppMutation) RefreshTokenTTL

func (m *OAuthAppMutation) RefreshTokenTTL() (r int, exists bool)

RefreshTokenTTL returns the value of the "refresh_token_ttl" field in the mutation.

func (*OAuthAppMutation) RemoveAuthCodeIDs

func (m *OAuthAppMutation) RemoveAuthCodeIDs(ids ...uuid.UUID)

RemoveAuthCodeIDs removes the "auth_codes" edge to the OAuthAuthCode entity by IDs.

func (*OAuthAppMutation) RemoveConsentIDs

func (m *OAuthAppMutation) RemoveConsentIDs(ids ...uuid.UUID)

RemoveConsentIDs removes the "consents" edge to the OAuthConsent entity by IDs.

func (*OAuthAppMutation) RemoveSecretIDs

func (m *OAuthAppMutation) RemoveSecretIDs(ids ...uuid.UUID)

RemoveSecretIDs removes the "secrets" edge to the OAuthAppSecret entity by IDs.

func (*OAuthAppMutation) RemoveTokenIDs

func (m *OAuthAppMutation) RemoveTokenIDs(ids ...uuid.UUID)

RemoveTokenIDs removes the "tokens" edge to the OAuthToken entity by IDs.

func (*OAuthAppMutation) RemovedAuthCodesIDs

func (m *OAuthAppMutation) RemovedAuthCodesIDs() (ids []uuid.UUID)

RemovedAuthCodes returns the removed IDs of the "auth_codes" edge to the OAuthAuthCode entity.

func (*OAuthAppMutation) RemovedConsentsIDs

func (m *OAuthAppMutation) RemovedConsentsIDs() (ids []uuid.UUID)

RemovedConsents returns the removed IDs of the "consents" edge to the OAuthConsent entity.

func (*OAuthAppMutation) RemovedEdges

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

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

func (*OAuthAppMutation) RemovedIDs

func (m *OAuthAppMutation) 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 (*OAuthAppMutation) RemovedSecretsIDs

func (m *OAuthAppMutation) RemovedSecretsIDs() (ids []uuid.UUID)

RemovedSecrets returns the removed IDs of the "secrets" edge to the OAuthAppSecret entity.

func (*OAuthAppMutation) RemovedTokensIDs

func (m *OAuthAppMutation) RemovedTokensIDs() (ids []uuid.UUID)

RemovedTokens returns the removed IDs of the "tokens" edge to the OAuthToken entity.

func (*OAuthAppMutation) ResetAccessTokenTTL

func (m *OAuthAppMutation) ResetAccessTokenTTL()

ResetAccessTokenTTL resets all changes to the "access_token_ttl" field.

func (*OAuthAppMutation) ResetActive

func (m *OAuthAppMutation) ResetActive()

ResetActive resets all changes to the "active" field.

func (*OAuthAppMutation) ResetAllowedGrants

func (m *OAuthAppMutation) ResetAllowedGrants()

ResetAllowedGrants resets all changes to the "allowed_grants" field.

func (*OAuthAppMutation) ResetAllowedResponseTypes

func (m *OAuthAppMutation) ResetAllowedResponseTypes()

ResetAllowedResponseTypes resets all changes to the "allowed_response_types" field.

func (*OAuthAppMutation) ResetAllowedScopes

func (m *OAuthAppMutation) ResetAllowedScopes()

ResetAllowedScopes resets all changes to the "allowed_scopes" field.

func (*OAuthAppMutation) ResetAppType

func (m *OAuthAppMutation) ResetAppType()

ResetAppType resets all changes to the "app_type" field.

func (*OAuthAppMutation) ResetAuthCodes

func (m *OAuthAppMutation) ResetAuthCodes()

ResetAuthCodes resets all changes to the "auth_codes" edge.

func (*OAuthAppMutation) ResetClientID

func (m *OAuthAppMutation) ResetClientID()

ResetClientID resets all changes to the "client_id" field.

func (*OAuthAppMutation) ResetConsents

func (m *OAuthAppMutation) ResetConsents()

ResetConsents resets all changes to the "consents" edge.

func (*OAuthAppMutation) ResetCreatedAt

func (m *OAuthAppMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*OAuthAppMutation) ResetDescription

func (m *OAuthAppMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*OAuthAppMutation) ResetEdge

func (m *OAuthAppMutation) 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 (*OAuthAppMutation) ResetField

func (m *OAuthAppMutation) 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 (*OAuthAppMutation) ResetFirstParty

func (m *OAuthAppMutation) ResetFirstParty()

ResetFirstParty resets all changes to the "first_party" field.

func (*OAuthAppMutation) ResetLogoURL

func (m *OAuthAppMutation) ResetLogoURL()

ResetLogoURL resets all changes to the "logo_url" field.

func (*OAuthAppMutation) ResetMetadata

func (m *OAuthAppMutation) ResetMetadata()

ResetMetadata resets all changes to the "metadata" field.

func (*OAuthAppMutation) ResetName

func (m *OAuthAppMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*OAuthAppMutation) ResetOrganization

func (m *OAuthAppMutation) ResetOrganization()

ResetOrganization resets all changes to the "organization" edge.

func (*OAuthAppMutation) ResetOrganizationID

func (m *OAuthAppMutation) ResetOrganizationID()

ResetOrganizationID resets all changes to the "organization_id" field.

func (*OAuthAppMutation) ResetOwner

func (m *OAuthAppMutation) ResetOwner()

ResetOwner resets all changes to the "owner" edge.

func (*OAuthAppMutation) ResetOwnerID

func (m *OAuthAppMutation) ResetOwnerID()

ResetOwnerID resets all changes to the "owner_id" field.

func (*OAuthAppMutation) ResetPublic

func (m *OAuthAppMutation) ResetPublic()

ResetPublic resets all changes to the "public" field.

func (*OAuthAppMutation) ResetRedirectUris

func (m *OAuthAppMutation) ResetRedirectUris()

ResetRedirectUris resets all changes to the "redirect_uris" field.

func (*OAuthAppMutation) ResetRefreshTokenRotation

func (m *OAuthAppMutation) ResetRefreshTokenRotation()

ResetRefreshTokenRotation resets all changes to the "refresh_token_rotation" field.

func (*OAuthAppMutation) ResetRefreshTokenTTL

func (m *OAuthAppMutation) ResetRefreshTokenTTL()

ResetRefreshTokenTTL resets all changes to the "refresh_token_ttl" field.

func (*OAuthAppMutation) ResetRevokedAt

func (m *OAuthAppMutation) ResetRevokedAt()

ResetRevokedAt resets all changes to the "revoked_at" field.

func (*OAuthAppMutation) ResetSecrets

func (m *OAuthAppMutation) ResetSecrets()

ResetSecrets resets all changes to the "secrets" edge.

func (*OAuthAppMutation) ResetTokens

func (m *OAuthAppMutation) ResetTokens()

ResetTokens resets all changes to the "tokens" edge.

func (*OAuthAppMutation) ResetUpdatedAt

func (m *OAuthAppMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*OAuthAppMutation) RevokedAt

func (m *OAuthAppMutation) RevokedAt() (r time.Time, exists bool)

RevokedAt returns the value of the "revoked_at" field in the mutation.

func (*OAuthAppMutation) RevokedAtCleared

func (m *OAuthAppMutation) RevokedAtCleared() bool

RevokedAtCleared returns if the "revoked_at" field was cleared in this mutation.

func (*OAuthAppMutation) SecretsCleared

func (m *OAuthAppMutation) SecretsCleared() bool

SecretsCleared reports if the "secrets" edge to the OAuthAppSecret entity was cleared.

func (*OAuthAppMutation) SecretsIDs

func (m *OAuthAppMutation) SecretsIDs() (ids []uuid.UUID)

SecretsIDs returns the "secrets" edge IDs in the mutation.

func (*OAuthAppMutation) SetAccessTokenTTL

func (m *OAuthAppMutation) SetAccessTokenTTL(i int)

SetAccessTokenTTL sets the "access_token_ttl" field.

func (*OAuthAppMutation) SetActive

func (m *OAuthAppMutation) SetActive(b bool)

SetActive sets the "active" field.

func (*OAuthAppMutation) SetAllowedGrants

func (m *OAuthAppMutation) SetAllowedGrants(s []string)

SetAllowedGrants sets the "allowed_grants" field.

func (*OAuthAppMutation) SetAllowedResponseTypes

func (m *OAuthAppMutation) SetAllowedResponseTypes(s []string)

SetAllowedResponseTypes sets the "allowed_response_types" field.

func (*OAuthAppMutation) SetAllowedScopes

func (m *OAuthAppMutation) SetAllowedScopes(s []string)

SetAllowedScopes sets the "allowed_scopes" field.

func (*OAuthAppMutation) SetAppType

func (m *OAuthAppMutation) SetAppType(ot oauthapp.AppType)

SetAppType sets the "app_type" field.

func (*OAuthAppMutation) SetClientID

func (m *OAuthAppMutation) SetClientID(s string)

SetClientID sets the "client_id" field.

func (*OAuthAppMutation) SetCreatedAt

func (m *OAuthAppMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*OAuthAppMutation) SetDescription

func (m *OAuthAppMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*OAuthAppMutation) SetField

func (m *OAuthAppMutation) 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 (*OAuthAppMutation) SetFirstParty

func (m *OAuthAppMutation) SetFirstParty(b bool)

SetFirstParty sets the "first_party" field.

func (*OAuthAppMutation) SetID

func (m *OAuthAppMutation) SetID(id uuid.UUID)

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

func (*OAuthAppMutation) SetLogoURL

func (m *OAuthAppMutation) SetLogoURL(s string)

SetLogoURL sets the "logo_url" field.

func (*OAuthAppMutation) SetMetadata

func (m *OAuthAppMutation) SetMetadata(value map[string]string)

SetMetadata sets the "metadata" field.

func (*OAuthAppMutation) SetName

func (m *OAuthAppMutation) SetName(s string)

SetName sets the "name" field.

func (*OAuthAppMutation) SetOp

func (m *OAuthAppMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OAuthAppMutation) SetOrganizationID

func (m *OAuthAppMutation) SetOrganizationID(u uuid.UUID)

SetOrganizationID sets the "organization_id" field.

func (*OAuthAppMutation) SetOwnerID

func (m *OAuthAppMutation) SetOwnerID(u uuid.UUID)

SetOwnerID sets the "owner_id" field.

func (*OAuthAppMutation) SetPublic

func (m *OAuthAppMutation) SetPublic(b bool)

SetPublic sets the "public" field.

func (*OAuthAppMutation) SetRedirectUris

func (m *OAuthAppMutation) SetRedirectUris(s []string)

SetRedirectUris sets the "redirect_uris" field.

func (*OAuthAppMutation) SetRefreshTokenRotation

func (m *OAuthAppMutation) SetRefreshTokenRotation(b bool)

SetRefreshTokenRotation sets the "refresh_token_rotation" field.

func (*OAuthAppMutation) SetRefreshTokenTTL

func (m *OAuthAppMutation) SetRefreshTokenTTL(i int)

SetRefreshTokenTTL sets the "refresh_token_ttl" field.

func (*OAuthAppMutation) SetRevokedAt

func (m *OAuthAppMutation) SetRevokedAt(t time.Time)

SetRevokedAt sets the "revoked_at" field.

func (*OAuthAppMutation) SetUpdatedAt

func (m *OAuthAppMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*OAuthAppMutation) TokensCleared

func (m *OAuthAppMutation) TokensCleared() bool

TokensCleared reports if the "tokens" edge to the OAuthToken entity was cleared.

func (*OAuthAppMutation) TokensIDs

func (m *OAuthAppMutation) TokensIDs() (ids []uuid.UUID)

TokensIDs returns the "tokens" edge IDs in the mutation.

func (OAuthAppMutation) Tx

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

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

func (*OAuthAppMutation) Type

func (m *OAuthAppMutation) Type() string

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

func (*OAuthAppMutation) UpdatedAt

func (m *OAuthAppMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*OAuthAppMutation) Where

func (m *OAuthAppMutation) Where(ps ...predicate.OAuthApp)

Where appends a list predicates to the OAuthAppMutation builder.

func (*OAuthAppMutation) WhereP

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

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

type OAuthAppQuery

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

OAuthAppQuery is the builder for querying OAuthApp entities.

func (*OAuthAppQuery) Aggregate

func (_q *OAuthAppQuery) Aggregate(fns ...AggregateFunc) *OAuthAppSelect

Aggregate returns a OAuthAppSelect configured with the given aggregations.

func (*OAuthAppQuery) All

func (_q *OAuthAppQuery) All(ctx context.Context) ([]*OAuthApp, error)

All executes the query and returns a list of OAuthApps.

func (*OAuthAppQuery) AllX

func (_q *OAuthAppQuery) AllX(ctx context.Context) []*OAuthApp

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

func (*OAuthAppQuery) Clone

func (_q *OAuthAppQuery) Clone() *OAuthAppQuery

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

func (*OAuthAppQuery) Count

func (_q *OAuthAppQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OAuthAppQuery) CountX

func (_q *OAuthAppQuery) CountX(ctx context.Context) int

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

func (*OAuthAppQuery) Exist

func (_q *OAuthAppQuery) Exist(ctx context.Context) (bool, error)

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

func (*OAuthAppQuery) ExistX

func (_q *OAuthAppQuery) ExistX(ctx context.Context) bool

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

func (*OAuthAppQuery) Filter

func (_q *OAuthAppQuery) Filter() *OAuthAppFilter

Filter returns a Filter implementation to apply filters on the OAuthAppQuery builder.

func (*OAuthAppQuery) First

func (_q *OAuthAppQuery) First(ctx context.Context) (*OAuthApp, error)

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

func (*OAuthAppQuery) FirstID

func (_q *OAuthAppQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*OAuthAppQuery) FirstIDX

func (_q *OAuthAppQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*OAuthAppQuery) FirstX

func (_q *OAuthAppQuery) FirstX(ctx context.Context) *OAuthApp

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

func (*OAuthAppQuery) GroupBy

func (_q *OAuthAppQuery) GroupBy(field string, fields ...string) *OAuthAppGroupBy

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.OAuthApp.Query().
	GroupBy(oauthapp.FieldClientID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OAuthAppQuery) IDs

func (_q *OAuthAppQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

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

func (*OAuthAppQuery) IDsX

func (_q *OAuthAppQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*OAuthAppQuery) Limit

func (_q *OAuthAppQuery) Limit(limit int) *OAuthAppQuery

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

func (*OAuthAppQuery) Offset

func (_q *OAuthAppQuery) Offset(offset int) *OAuthAppQuery

Offset to start from.

func (*OAuthAppQuery) Only

func (_q *OAuthAppQuery) Only(ctx context.Context) (*OAuthApp, error)

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

func (*OAuthAppQuery) OnlyID

func (_q *OAuthAppQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*OAuthAppQuery) OnlyIDX

func (_q *OAuthAppQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*OAuthAppQuery) OnlyX

func (_q *OAuthAppQuery) OnlyX(ctx context.Context) *OAuthApp

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

func (*OAuthAppQuery) Order

Order specifies how the records should be ordered.

func (*OAuthAppQuery) QueryAuthCodes

func (_q *OAuthAppQuery) QueryAuthCodes() *OAuthAuthCodeQuery

QueryAuthCodes chains the current query on the "auth_codes" edge.

func (*OAuthAppQuery) QueryConsents

func (_q *OAuthAppQuery) QueryConsents() *OAuthConsentQuery

QueryConsents chains the current query on the "consents" edge.

func (*OAuthAppQuery) QueryOrganization

func (_q *OAuthAppQuery) QueryOrganization() *OrganizationQuery

QueryOrganization chains the current query on the "organization" edge.

func (*OAuthAppQuery) QueryOwner

func (_q *OAuthAppQuery) QueryOwner() *UserQuery

QueryOwner chains the current query on the "owner" edge.

func (*OAuthAppQuery) QuerySecrets

func (_q *OAuthAppQuery) QuerySecrets() *OAuthAppSecretQuery

QuerySecrets chains the current query on the "secrets" edge.

func (*OAuthAppQuery) QueryTokens

func (_q *OAuthAppQuery) QueryTokens() *OAuthTokenQuery

QueryTokens chains the current query on the "tokens" edge.

func (*OAuthAppQuery) Select

func (_q *OAuthAppQuery) Select(fields ...string) *OAuthAppSelect

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.OAuthApp.Query().
	Select(oauthapp.FieldClientID).
	Scan(ctx, &v)

func (*OAuthAppQuery) Unique

func (_q *OAuthAppQuery) Unique(unique bool) *OAuthAppQuery

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 (*OAuthAppQuery) Where

func (_q *OAuthAppQuery) Where(ps ...predicate.OAuthApp) *OAuthAppQuery

Where adds a new predicate for the OAuthAppQuery builder.

func (*OAuthAppQuery) WithAuthCodes

func (_q *OAuthAppQuery) WithAuthCodes(opts ...func(*OAuthAuthCodeQuery)) *OAuthAppQuery

WithAuthCodes tells the query-builder to eager-load the nodes that are connected to the "auth_codes" edge. The optional arguments are used to configure the query builder of the edge.

func (*OAuthAppQuery) WithConsents

func (_q *OAuthAppQuery) WithConsents(opts ...func(*OAuthConsentQuery)) *OAuthAppQuery

WithConsents tells the query-builder to eager-load the nodes that are connected to the "consents" edge. The optional arguments are used to configure the query builder of the edge.

func (*OAuthAppQuery) WithOrganization

func (_q *OAuthAppQuery) WithOrganization(opts ...func(*OrganizationQuery)) *OAuthAppQuery

WithOrganization tells the query-builder to eager-load the nodes that are connected to the "organization" edge. The optional arguments are used to configure the query builder of the edge.

func (*OAuthAppQuery) WithOwner

func (_q *OAuthAppQuery) WithOwner(opts ...func(*UserQuery)) *OAuthAppQuery

WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.

func (*OAuthAppQuery) WithSecrets

func (_q *OAuthAppQuery) WithSecrets(opts ...func(*OAuthAppSecretQuery)) *OAuthAppQuery

WithSecrets tells the query-builder to eager-load the nodes that are connected to the "secrets" edge. The optional arguments are used to configure the query builder of the edge.

func (*OAuthAppQuery) WithTokens

func (_q *OAuthAppQuery) WithTokens(opts ...func(*OAuthTokenQuery)) *OAuthAppQuery

WithTokens tells the query-builder to eager-load the nodes that are connected to the "tokens" edge. The optional arguments are used to configure the query builder of the edge.

type OAuthAppSecret

type OAuthAppSecret struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// OAuth app this secret belongs to
	AppID uuid.UUID `json:"app_id,omitempty"`
	// Argon2id hash of the secret
	SecretHash string `json:"-"`
	// First few chars for identification
	SecretPrefix string `json:"secret_prefix,omitempty"`
	// When this secret expires
	ExpiresAt *time.Time `json:"expires_at,omitempty"`
	// LastUsedAt holds the value of the "last_used_at" field.
	LastUsedAt *time.Time `json:"last_used_at,omitempty"`
	// Revoked holds the value of the "revoked" field.
	Revoked bool `json:"revoked,omitempty"`
	// RevokedAt holds the value of the "revoked_at" field.
	RevokedAt *time.Time `json:"revoked_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the OAuthAppSecretQuery when eager-loading is set.
	Edges OAuthAppSecretEdges `json:"edges"`
	// contains filtered or unexported fields
}

OAuthAppSecret is the model entity for the OAuthAppSecret schema.

func (*OAuthAppSecret) QueryApp

func (_m *OAuthAppSecret) QueryApp() *OAuthAppQuery

QueryApp queries the "app" edge of the OAuthAppSecret entity.

func (*OAuthAppSecret) String

func (_m *OAuthAppSecret) String() string

String implements the fmt.Stringer.

func (*OAuthAppSecret) Unwrap

func (_m *OAuthAppSecret) Unwrap() *OAuthAppSecret

Unwrap unwraps the OAuthAppSecret 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 (*OAuthAppSecret) Update

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

func (*OAuthAppSecret) Value

func (_m *OAuthAppSecret) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the OAuthAppSecret. This includes values selected through modifiers, order, etc.

type OAuthAppSecretClient

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

OAuthAppSecretClient is a client for the OAuthAppSecret schema.

func NewOAuthAppSecretClient

func NewOAuthAppSecretClient(c config) *OAuthAppSecretClient

NewOAuthAppSecretClient returns a client for the OAuthAppSecret from the given config.

func (*OAuthAppSecretClient) Create

Create returns a builder for creating a OAuthAppSecret entity.

func (*OAuthAppSecretClient) CreateBulk

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

func (*OAuthAppSecretClient) Delete

Delete returns a delete builder for OAuthAppSecret.

func (*OAuthAppSecretClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OAuthAppSecretClient) DeleteOneID

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

func (*OAuthAppSecretClient) Get

Get returns a OAuthAppSecret entity by its id.

func (*OAuthAppSecretClient) GetX

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

func (*OAuthAppSecretClient) Hooks

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

Hooks returns the client hooks.

func (*OAuthAppSecretClient) Intercept

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

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

func (*OAuthAppSecretClient) Interceptors

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

Interceptors returns the client interceptors.

func (*OAuthAppSecretClient) MapCreateBulk

func (c *OAuthAppSecretClient) MapCreateBulk(slice any, setFunc func(*OAuthAppSecretCreate, int)) *OAuthAppSecretCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*OAuthAppSecretClient) Query

Query returns a query builder for OAuthAppSecret.

func (*OAuthAppSecretClient) QueryApp

QueryApp queries the app edge of a OAuthAppSecret.

func (*OAuthAppSecretClient) Update

Update returns an update builder for OAuthAppSecret.

func (*OAuthAppSecretClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*OAuthAppSecretClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*OAuthAppSecretClient) Use

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

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

type OAuthAppSecretCreate

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

OAuthAppSecretCreate is the builder for creating a OAuthAppSecret entity.

func (*OAuthAppSecretCreate) Exec

func (_c *OAuthAppSecretCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OAuthAppSecretCreate) ExecX

func (_c *OAuthAppSecretCreate) ExecX(ctx context.Context)

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

func (*OAuthAppSecretCreate) Mutation

Mutation returns the OAuthAppSecretMutation object of the builder.

func (*OAuthAppSecretCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OAuthAppSecret.Create().
	SetAppID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OAuthAppSecretUpsert) {
		SetAppID(v+v).
	}).
	Exec(ctx)

func (*OAuthAppSecretCreate) OnConflictColumns

func (_c *OAuthAppSecretCreate) OnConflictColumns(columns ...string) *OAuthAppSecretUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OAuthAppSecret.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OAuthAppSecretCreate) Save

Save creates the OAuthAppSecret in the database.

func (*OAuthAppSecretCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*OAuthAppSecretCreate) SetApp

SetApp sets the "app" edge to the OAuthApp entity.

func (*OAuthAppSecretCreate) SetAppID

SetAppID sets the "app_id" field.

func (*OAuthAppSecretCreate) SetCreatedAt

func (_c *OAuthAppSecretCreate) SetCreatedAt(v time.Time) *OAuthAppSecretCreate

SetCreatedAt sets the "created_at" field.

func (*OAuthAppSecretCreate) SetExpiresAt

func (_c *OAuthAppSecretCreate) SetExpiresAt(v time.Time) *OAuthAppSecretCreate

SetExpiresAt sets the "expires_at" field.

func (*OAuthAppSecretCreate) SetID

SetID sets the "id" field.

func (*OAuthAppSecretCreate) SetLastUsedAt

func (_c *OAuthAppSecretCreate) SetLastUsedAt(v time.Time) *OAuthAppSecretCreate

SetLastUsedAt sets the "last_used_at" field.

func (*OAuthAppSecretCreate) SetNillableCreatedAt

func (_c *OAuthAppSecretCreate) SetNillableCreatedAt(v *time.Time) *OAuthAppSecretCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*OAuthAppSecretCreate) SetNillableExpiresAt

func (_c *OAuthAppSecretCreate) SetNillableExpiresAt(v *time.Time) *OAuthAppSecretCreate

SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.

func (*OAuthAppSecretCreate) SetNillableID

func (_c *OAuthAppSecretCreate) SetNillableID(v *uuid.UUID) *OAuthAppSecretCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*OAuthAppSecretCreate) SetNillableLastUsedAt

func (_c *OAuthAppSecretCreate) SetNillableLastUsedAt(v *time.Time) *OAuthAppSecretCreate

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*OAuthAppSecretCreate) SetNillableRevoked

func (_c *OAuthAppSecretCreate) SetNillableRevoked(v *bool) *OAuthAppSecretCreate

SetNillableRevoked sets the "revoked" field if the given value is not nil.

func (*OAuthAppSecretCreate) SetNillableRevokedAt

func (_c *OAuthAppSecretCreate) SetNillableRevokedAt(v *time.Time) *OAuthAppSecretCreate

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*OAuthAppSecretCreate) SetRevoked

func (_c *OAuthAppSecretCreate) SetRevoked(v bool) *OAuthAppSecretCreate

SetRevoked sets the "revoked" field.

func (*OAuthAppSecretCreate) SetRevokedAt

func (_c *OAuthAppSecretCreate) SetRevokedAt(v time.Time) *OAuthAppSecretCreate

SetRevokedAt sets the "revoked_at" field.

func (*OAuthAppSecretCreate) SetSecretHash

func (_c *OAuthAppSecretCreate) SetSecretHash(v string) *OAuthAppSecretCreate

SetSecretHash sets the "secret_hash" field.

func (*OAuthAppSecretCreate) SetSecretPrefix

func (_c *OAuthAppSecretCreate) SetSecretPrefix(v string) *OAuthAppSecretCreate

SetSecretPrefix sets the "secret_prefix" field.

type OAuthAppSecretCreateBulk

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

OAuthAppSecretCreateBulk is the builder for creating many OAuthAppSecret entities in bulk.

func (*OAuthAppSecretCreateBulk) Exec

Exec executes the query.

func (*OAuthAppSecretCreateBulk) ExecX

func (_c *OAuthAppSecretCreateBulk) ExecX(ctx context.Context)

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

func (*OAuthAppSecretCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OAuthAppSecret.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OAuthAppSecretUpsert) {
		SetAppID(v+v).
	}).
	Exec(ctx)

func (*OAuthAppSecretCreateBulk) OnConflictColumns

func (_c *OAuthAppSecretCreateBulk) OnConflictColumns(columns ...string) *OAuthAppSecretUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OAuthAppSecret.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OAuthAppSecretCreateBulk) Save

Save creates the OAuthAppSecret entities in the database.

func (*OAuthAppSecretCreateBulk) SaveX

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

type OAuthAppSecretDelete

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

OAuthAppSecretDelete is the builder for deleting a OAuthAppSecret entity.

func (*OAuthAppSecretDelete) Exec

func (_d *OAuthAppSecretDelete) Exec(ctx context.Context) (int, error)

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

func (*OAuthAppSecretDelete) ExecX

func (_d *OAuthAppSecretDelete) ExecX(ctx context.Context) int

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

func (*OAuthAppSecretDelete) Where

Where appends a list predicates to the OAuthAppSecretDelete builder.

type OAuthAppSecretDeleteOne

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

OAuthAppSecretDeleteOne is the builder for deleting a single OAuthAppSecret entity.

func (*OAuthAppSecretDeleteOne) Exec

Exec executes the deletion query.

func (*OAuthAppSecretDeleteOne) ExecX

func (_d *OAuthAppSecretDeleteOne) ExecX(ctx context.Context)

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

func (*OAuthAppSecretDeleteOne) Where

Where appends a list predicates to the OAuthAppSecretDelete builder.

type OAuthAppSecretEdges

type OAuthAppSecretEdges struct {
	// App holds the value of the app edge.
	App *OAuthApp `json:"app,omitempty"`
	// contains filtered or unexported fields
}

OAuthAppSecretEdges holds the relations/edges for other nodes in the graph.

func (OAuthAppSecretEdges) AppOrErr

func (e OAuthAppSecretEdges) AppOrErr() (*OAuthApp, error)

AppOrErr returns the App value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type OAuthAppSecretFilter

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

OAuthAppSecretFilter provides a generic filtering capability at runtime for OAuthAppSecretQuery.

func (*OAuthAppSecretFilter) Where

func (f *OAuthAppSecretFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*OAuthAppSecretFilter) WhereAppID

func (f *OAuthAppSecretFilter) WhereAppID(p entql.ValueP)

WhereAppID applies the entql [16]byte predicate on the app_id field.

func (*OAuthAppSecretFilter) WhereCreatedAt

func (f *OAuthAppSecretFilter) WhereCreatedAt(p entql.TimeP)

WhereCreatedAt applies the entql time.Time predicate on the created_at field.

func (*OAuthAppSecretFilter) WhereExpiresAt

func (f *OAuthAppSecretFilter) WhereExpiresAt(p entql.TimeP)

WhereExpiresAt applies the entql time.Time predicate on the expires_at field.

func (*OAuthAppSecretFilter) WhereHasApp

func (f *OAuthAppSecretFilter) WhereHasApp()

WhereHasApp applies a predicate to check if query has an edge app.

func (*OAuthAppSecretFilter) WhereHasAppWith

func (f *OAuthAppSecretFilter) WhereHasAppWith(preds ...predicate.OAuthApp)

WhereHasAppWith applies a predicate to check if query has an edge app with a given conditions (other predicates).

func (*OAuthAppSecretFilter) WhereID

func (f *OAuthAppSecretFilter) WhereID(p entql.ValueP)

WhereID applies the entql [16]byte predicate on the id field.

func (*OAuthAppSecretFilter) WhereLastUsedAt

func (f *OAuthAppSecretFilter) WhereLastUsedAt(p entql.TimeP)

WhereLastUsedAt applies the entql time.Time predicate on the last_used_at field.

func (*OAuthAppSecretFilter) WhereRevoked

func (f *OAuthAppSecretFilter) WhereRevoked(p entql.BoolP)

WhereRevoked applies the entql bool predicate on the revoked field.

func (*OAuthAppSecretFilter) WhereRevokedAt

func (f *OAuthAppSecretFilter) WhereRevokedAt(p entql.TimeP)

WhereRevokedAt applies the entql time.Time predicate on the revoked_at field.

func (*OAuthAppSecretFilter) WhereSecretHash

func (f *OAuthAppSecretFilter) WhereSecretHash(p entql.StringP)

WhereSecretHash applies the entql string predicate on the secret_hash field.

func (*OAuthAppSecretFilter) WhereSecretPrefix

func (f *OAuthAppSecretFilter) WhereSecretPrefix(p entql.StringP)

WhereSecretPrefix applies the entql string predicate on the secret_prefix field.

type OAuthAppSecretGroupBy

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

OAuthAppSecretGroupBy is the group-by builder for OAuthAppSecret entities.

func (*OAuthAppSecretGroupBy) Aggregate

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

func (*OAuthAppSecretGroupBy) Bool

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

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

func (*OAuthAppSecretGroupBy) BoolX

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

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

func (*OAuthAppSecretGroupBy) Bools

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

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

func (*OAuthAppSecretGroupBy) BoolsX

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

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

func (*OAuthAppSecretGroupBy) Float64

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

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

func (*OAuthAppSecretGroupBy) Float64X

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

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

func (*OAuthAppSecretGroupBy) Float64s

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

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

func (*OAuthAppSecretGroupBy) Float64sX

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

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

func (*OAuthAppSecretGroupBy) Int

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

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

func (*OAuthAppSecretGroupBy) IntX

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

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

func (*OAuthAppSecretGroupBy) Ints

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

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

func (*OAuthAppSecretGroupBy) IntsX

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

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

func (*OAuthAppSecretGroupBy) Scan

func (_g *OAuthAppSecretGroupBy) Scan(ctx context.Context, v any) error

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

func (*OAuthAppSecretGroupBy) ScanX

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

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

func (*OAuthAppSecretGroupBy) String

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

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

func (*OAuthAppSecretGroupBy) StringX

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

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

func (*OAuthAppSecretGroupBy) Strings

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

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

func (*OAuthAppSecretGroupBy) StringsX

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

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

type OAuthAppSecretMutation

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

OAuthAppSecretMutation represents an operation that mutates the OAuthAppSecret nodes in the graph.

func (*OAuthAppSecretMutation) AddField

func (m *OAuthAppSecretMutation) 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 (*OAuthAppSecretMutation) AddedEdges

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

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

func (*OAuthAppSecretMutation) AddedField

func (m *OAuthAppSecretMutation) 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 (*OAuthAppSecretMutation) AddedFields

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

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

func (*OAuthAppSecretMutation) AddedIDs

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

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

func (*OAuthAppSecretMutation) AppCleared

func (m *OAuthAppSecretMutation) AppCleared() bool

AppCleared reports if the "app" edge to the OAuthApp entity was cleared.

func (*OAuthAppSecretMutation) AppID

func (m *OAuthAppSecretMutation) AppID() (r uuid.UUID, exists bool)

AppID returns the value of the "app_id" field in the mutation.

func (*OAuthAppSecretMutation) AppIDs

func (m *OAuthAppSecretMutation) AppIDs() (ids []uuid.UUID)

AppIDs returns the "app" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AppID instead. It exists only for internal usage by the builders.

func (*OAuthAppSecretMutation) ClearApp

func (m *OAuthAppSecretMutation) ClearApp()

ClearApp clears the "app" edge to the OAuthApp entity.

func (*OAuthAppSecretMutation) ClearEdge

func (m *OAuthAppSecretMutation) 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 (*OAuthAppSecretMutation) ClearExpiresAt

func (m *OAuthAppSecretMutation) ClearExpiresAt()

ClearExpiresAt clears the value of the "expires_at" field.

func (*OAuthAppSecretMutation) ClearField

func (m *OAuthAppSecretMutation) 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 (*OAuthAppSecretMutation) ClearLastUsedAt

func (m *OAuthAppSecretMutation) ClearLastUsedAt()

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*OAuthAppSecretMutation) ClearRevokedAt

func (m *OAuthAppSecretMutation) ClearRevokedAt()

ClearRevokedAt clears the value of the "revoked_at" field.

func (*OAuthAppSecretMutation) ClearedEdges

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

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

func (*OAuthAppSecretMutation) ClearedFields

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

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

func (OAuthAppSecretMutation) Client

func (m OAuthAppSecretMutation) 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 (*OAuthAppSecretMutation) CreatedAt

func (m *OAuthAppSecretMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*OAuthAppSecretMutation) EdgeCleared

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

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

func (*OAuthAppSecretMutation) ExpiresAt

func (m *OAuthAppSecretMutation) ExpiresAt() (r time.Time, exists bool)

ExpiresAt returns the value of the "expires_at" field in the mutation.

func (*OAuthAppSecretMutation) ExpiresAtCleared

func (m *OAuthAppSecretMutation) ExpiresAtCleared() bool

ExpiresAtCleared returns if the "expires_at" field was cleared in this mutation.

func (*OAuthAppSecretMutation) Field

func (m *OAuthAppSecretMutation) 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 (*OAuthAppSecretMutation) FieldCleared

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

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

func (*OAuthAppSecretMutation) Fields

func (m *OAuthAppSecretMutation) 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 (*OAuthAppSecretMutation) Filter

Filter returns an entql.Where implementation to apply filters on the OAuthAppSecretMutation builder.

func (*OAuthAppSecretMutation) ID

func (m *OAuthAppSecretMutation) ID() (id uuid.UUID, 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 (*OAuthAppSecretMutation) 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 (*OAuthAppSecretMutation) LastUsedAt

func (m *OAuthAppSecretMutation) LastUsedAt() (r time.Time, exists bool)

LastUsedAt returns the value of the "last_used_at" field in the mutation.

func (*OAuthAppSecretMutation) LastUsedAtCleared

func (m *OAuthAppSecretMutation) LastUsedAtCleared() bool

LastUsedAtCleared returns if the "last_used_at" field was cleared in this mutation.

func (*OAuthAppSecretMutation) OldAppID

func (m *OAuthAppSecretMutation) OldAppID(ctx context.Context) (v uuid.UUID, err error)

OldAppID returns the old "app_id" field's value of the OAuthAppSecret entity. If the OAuthAppSecret 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 (*OAuthAppSecretMutation) OldCreatedAt

func (m *OAuthAppSecretMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the OAuthAppSecret entity. If the OAuthAppSecret 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 (*OAuthAppSecretMutation) OldExpiresAt

func (m *OAuthAppSecretMutation) OldExpiresAt(ctx context.Context) (v *time.Time, err error)

OldExpiresAt returns the old "expires_at" field's value of the OAuthAppSecret entity. If the OAuthAppSecret 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 (*OAuthAppSecretMutation) OldField

func (m *OAuthAppSecretMutation) 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 (*OAuthAppSecretMutation) OldLastUsedAt

func (m *OAuthAppSecretMutation) OldLastUsedAt(ctx context.Context) (v *time.Time, err error)

OldLastUsedAt returns the old "last_used_at" field's value of the OAuthAppSecret entity. If the OAuthAppSecret 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 (*OAuthAppSecretMutation) OldRevoked

func (m *OAuthAppSecretMutation) OldRevoked(ctx context.Context) (v bool, err error)

OldRevoked returns the old "revoked" field's value of the OAuthAppSecret entity. If the OAuthAppSecret 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 (*OAuthAppSecretMutation) OldRevokedAt

func (m *OAuthAppSecretMutation) OldRevokedAt(ctx context.Context) (v *time.Time, err error)

OldRevokedAt returns the old "revoked_at" field's value of the OAuthAppSecret entity. If the OAuthAppSecret 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 (*OAuthAppSecretMutation) OldSecretHash

func (m *OAuthAppSecretMutation) OldSecretHash(ctx context.Context) (v string, err error)

OldSecretHash returns the old "secret_hash" field's value of the OAuthAppSecret entity. If the OAuthAppSecret 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 (*OAuthAppSecretMutation) OldSecretPrefix

func (m *OAuthAppSecretMutation) OldSecretPrefix(ctx context.Context) (v string, err error)

OldSecretPrefix returns the old "secret_prefix" field's value of the OAuthAppSecret entity. If the OAuthAppSecret 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 (*OAuthAppSecretMutation) Op

func (m *OAuthAppSecretMutation) Op() Op

Op returns the operation name.

func (*OAuthAppSecretMutation) RemovedEdges

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

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

func (*OAuthAppSecretMutation) RemovedIDs

func (m *OAuthAppSecretMutation) 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 (*OAuthAppSecretMutation) ResetApp

func (m *OAuthAppSecretMutation) ResetApp()

ResetApp resets all changes to the "app" edge.

func (*OAuthAppSecretMutation) ResetAppID

func (m *OAuthAppSecretMutation) ResetAppID()

ResetAppID resets all changes to the "app_id" field.

func (*OAuthAppSecretMutation) ResetCreatedAt

func (m *OAuthAppSecretMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*OAuthAppSecretMutation) ResetEdge

func (m *OAuthAppSecretMutation) 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 (*OAuthAppSecretMutation) ResetExpiresAt

func (m *OAuthAppSecretMutation) ResetExpiresAt()

ResetExpiresAt resets all changes to the "expires_at" field.

func (*OAuthAppSecretMutation) ResetField

func (m *OAuthAppSecretMutation) 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 (*OAuthAppSecretMutation) ResetLastUsedAt

func (m *OAuthAppSecretMutation) ResetLastUsedAt()

ResetLastUsedAt resets all changes to the "last_used_at" field.

func (*OAuthAppSecretMutation) ResetRevoked

func (m *OAuthAppSecretMutation) ResetRevoked()

ResetRevoked resets all changes to the "revoked" field.

func (*OAuthAppSecretMutation) ResetRevokedAt

func (m *OAuthAppSecretMutation) ResetRevokedAt()

ResetRevokedAt resets all changes to the "revoked_at" field.

func (*OAuthAppSecretMutation) ResetSecretHash

func (m *OAuthAppSecretMutation) ResetSecretHash()

ResetSecretHash resets all changes to the "secret_hash" field.

func (*OAuthAppSecretMutation) ResetSecretPrefix

func (m *OAuthAppSecretMutation) ResetSecretPrefix()

ResetSecretPrefix resets all changes to the "secret_prefix" field.

func (*OAuthAppSecretMutation) Revoked

func (m *OAuthAppSecretMutation) Revoked() (r bool, exists bool)

Revoked returns the value of the "revoked" field in the mutation.

func (*OAuthAppSecretMutation) RevokedAt

func (m *OAuthAppSecretMutation) RevokedAt() (r time.Time, exists bool)

RevokedAt returns the value of the "revoked_at" field in the mutation.

func (*OAuthAppSecretMutation) RevokedAtCleared

func (m *OAuthAppSecretMutation) RevokedAtCleared() bool

RevokedAtCleared returns if the "revoked_at" field was cleared in this mutation.

func (*OAuthAppSecretMutation) SecretHash

func (m *OAuthAppSecretMutation) SecretHash() (r string, exists bool)

SecretHash returns the value of the "secret_hash" field in the mutation.

func (*OAuthAppSecretMutation) SecretPrefix

func (m *OAuthAppSecretMutation) SecretPrefix() (r string, exists bool)

SecretPrefix returns the value of the "secret_prefix" field in the mutation.

func (*OAuthAppSecretMutation) SetAppID

func (m *OAuthAppSecretMutation) SetAppID(u uuid.UUID)

SetAppID sets the "app_id" field.

func (*OAuthAppSecretMutation) SetCreatedAt

func (m *OAuthAppSecretMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*OAuthAppSecretMutation) SetExpiresAt

func (m *OAuthAppSecretMutation) SetExpiresAt(t time.Time)

SetExpiresAt sets the "expires_at" field.

func (*OAuthAppSecretMutation) SetField

func (m *OAuthAppSecretMutation) 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 (*OAuthAppSecretMutation) SetID

func (m *OAuthAppSecretMutation) SetID(id uuid.UUID)

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

func (*OAuthAppSecretMutation) SetLastUsedAt

func (m *OAuthAppSecretMutation) SetLastUsedAt(t time.Time)

SetLastUsedAt sets the "last_used_at" field.

func (*OAuthAppSecretMutation) SetOp

func (m *OAuthAppSecretMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OAuthAppSecretMutation) SetRevoked

func (m *OAuthAppSecretMutation) SetRevoked(b bool)

SetRevoked sets the "revoked" field.

func (*OAuthAppSecretMutation) SetRevokedAt

func (m *OAuthAppSecretMutation) SetRevokedAt(t time.Time)

SetRevokedAt sets the "revoked_at" field.

func (*OAuthAppSecretMutation) SetSecretHash

func (m *OAuthAppSecretMutation) SetSecretHash(s string)

SetSecretHash sets the "secret_hash" field.

func (*OAuthAppSecretMutation) SetSecretPrefix

func (m *OAuthAppSecretMutation) SetSecretPrefix(s string)

SetSecretPrefix sets the "secret_prefix" field.

func (OAuthAppSecretMutation) Tx

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

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

func (*OAuthAppSecretMutation) Type

func (m *OAuthAppSecretMutation) Type() string

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

func (*OAuthAppSecretMutation) Where

Where appends a list predicates to the OAuthAppSecretMutation builder.

func (*OAuthAppSecretMutation) WhereP

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

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

type OAuthAppSecretQuery

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

OAuthAppSecretQuery is the builder for querying OAuthAppSecret entities.

func (*OAuthAppSecretQuery) Aggregate

Aggregate returns a OAuthAppSecretSelect configured with the given aggregations.

func (*OAuthAppSecretQuery) All

All executes the query and returns a list of OAuthAppSecrets.

func (*OAuthAppSecretQuery) AllX

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

func (*OAuthAppSecretQuery) Clone

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

func (*OAuthAppSecretQuery) Count

func (_q *OAuthAppSecretQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OAuthAppSecretQuery) CountX

func (_q *OAuthAppSecretQuery) CountX(ctx context.Context) int

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

func (*OAuthAppSecretQuery) Exist

func (_q *OAuthAppSecretQuery) Exist(ctx context.Context) (bool, error)

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

func (*OAuthAppSecretQuery) ExistX

func (_q *OAuthAppSecretQuery) ExistX(ctx context.Context) bool

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

func (*OAuthAppSecretQuery) Filter

Filter returns a Filter implementation to apply filters on the OAuthAppSecretQuery builder.

func (*OAuthAppSecretQuery) First

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

func (*OAuthAppSecretQuery) FirstID

func (_q *OAuthAppSecretQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*OAuthAppSecretQuery) FirstIDX

func (_q *OAuthAppSecretQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*OAuthAppSecretQuery) FirstX

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

func (*OAuthAppSecretQuery) GroupBy

func (_q *OAuthAppSecretQuery) GroupBy(field string, fields ...string) *OAuthAppSecretGroupBy

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 {
	AppID uuid.UUID `json:"app_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.OAuthAppSecret.Query().
	GroupBy(oauthappsecret.FieldAppID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OAuthAppSecretQuery) IDs

func (_q *OAuthAppSecretQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

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

func (*OAuthAppSecretQuery) IDsX

func (_q *OAuthAppSecretQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*OAuthAppSecretQuery) Limit

func (_q *OAuthAppSecretQuery) Limit(limit int) *OAuthAppSecretQuery

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

func (*OAuthAppSecretQuery) Offset

func (_q *OAuthAppSecretQuery) Offset(offset int) *OAuthAppSecretQuery

Offset to start from.

func (*OAuthAppSecretQuery) Only

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

func (*OAuthAppSecretQuery) OnlyID

func (_q *OAuthAppSecretQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*OAuthAppSecretQuery) OnlyIDX

func (_q *OAuthAppSecretQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*OAuthAppSecretQuery) OnlyX

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

func (*OAuthAppSecretQuery) Order

Order specifies how the records should be ordered.

func (*OAuthAppSecretQuery) QueryApp

func (_q *OAuthAppSecretQuery) QueryApp() *OAuthAppQuery

QueryApp chains the current query on the "app" edge.

func (*OAuthAppSecretQuery) Select

func (_q *OAuthAppSecretQuery) Select(fields ...string) *OAuthAppSecretSelect

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 {
	AppID uuid.UUID `json:"app_id,omitempty"`
}

client.OAuthAppSecret.Query().
	Select(oauthappsecret.FieldAppID).
	Scan(ctx, &v)

func (*OAuthAppSecretQuery) Unique

func (_q *OAuthAppSecretQuery) Unique(unique bool) *OAuthAppSecretQuery

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 (*OAuthAppSecretQuery) Where

Where adds a new predicate for the OAuthAppSecretQuery builder.

func (*OAuthAppSecretQuery) WithApp

func (_q *OAuthAppSecretQuery) WithApp(opts ...func(*OAuthAppQuery)) *OAuthAppSecretQuery

WithApp tells the query-builder to eager-load the nodes that are connected to the "app" edge. The optional arguments are used to configure the query builder of the edge.

type OAuthAppSecretSelect

type OAuthAppSecretSelect struct {
	*OAuthAppSecretQuery
	// contains filtered or unexported fields
}

OAuthAppSecretSelect is the builder for selecting fields of OAuthAppSecret entities.

func (*OAuthAppSecretSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*OAuthAppSecretSelect) Bool

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

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

func (*OAuthAppSecretSelect) BoolX

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

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

func (*OAuthAppSecretSelect) Bools

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

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

func (*OAuthAppSecretSelect) BoolsX

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

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

func (*OAuthAppSecretSelect) Float64

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

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

func (*OAuthAppSecretSelect) Float64X

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

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

func (*OAuthAppSecretSelect) Float64s

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

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

func (*OAuthAppSecretSelect) Float64sX

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

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

func (*OAuthAppSecretSelect) Int

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

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

func (*OAuthAppSecretSelect) IntX

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

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

func (*OAuthAppSecretSelect) Ints

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

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

func (*OAuthAppSecretSelect) IntsX

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

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

func (*OAuthAppSecretSelect) Scan

func (_s *OAuthAppSecretSelect) Scan(ctx context.Context, v any) error

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

func (*OAuthAppSecretSelect) ScanX

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

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

func (*OAuthAppSecretSelect) String

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

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

func (*OAuthAppSecretSelect) StringX

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

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

func (*OAuthAppSecretSelect) Strings

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

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

func (*OAuthAppSecretSelect) StringsX

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

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

type OAuthAppSecretUpdate

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

OAuthAppSecretUpdate is the builder for updating OAuthAppSecret entities.

func (*OAuthAppSecretUpdate) ClearApp

ClearApp clears the "app" edge to the OAuthApp entity.

func (*OAuthAppSecretUpdate) ClearExpiresAt

func (_u *OAuthAppSecretUpdate) ClearExpiresAt() *OAuthAppSecretUpdate

ClearExpiresAt clears the value of the "expires_at" field.

func (*OAuthAppSecretUpdate) ClearLastUsedAt

func (_u *OAuthAppSecretUpdate) ClearLastUsedAt() *OAuthAppSecretUpdate

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*OAuthAppSecretUpdate) ClearRevokedAt

func (_u *OAuthAppSecretUpdate) ClearRevokedAt() *OAuthAppSecretUpdate

ClearRevokedAt clears the value of the "revoked_at" field.

func (*OAuthAppSecretUpdate) Exec

func (_u *OAuthAppSecretUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OAuthAppSecretUpdate) ExecX

func (_u *OAuthAppSecretUpdate) ExecX(ctx context.Context)

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

func (*OAuthAppSecretUpdate) Mutation

Mutation returns the OAuthAppSecretMutation object of the builder.

func (*OAuthAppSecretUpdate) Save

func (_u *OAuthAppSecretUpdate) Save(ctx context.Context) (int, error)

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

func (*OAuthAppSecretUpdate) SaveX

func (_u *OAuthAppSecretUpdate) SaveX(ctx context.Context) int

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

func (*OAuthAppSecretUpdate) SetApp

SetApp sets the "app" edge to the OAuthApp entity.

func (*OAuthAppSecretUpdate) SetAppID

SetAppID sets the "app_id" field.

func (*OAuthAppSecretUpdate) SetExpiresAt

func (_u *OAuthAppSecretUpdate) SetExpiresAt(v time.Time) *OAuthAppSecretUpdate

SetExpiresAt sets the "expires_at" field.

func (*OAuthAppSecretUpdate) SetLastUsedAt

func (_u *OAuthAppSecretUpdate) SetLastUsedAt(v time.Time) *OAuthAppSecretUpdate

SetLastUsedAt sets the "last_used_at" field.

func (*OAuthAppSecretUpdate) SetNillableAppID

func (_u *OAuthAppSecretUpdate) SetNillableAppID(v *uuid.UUID) *OAuthAppSecretUpdate

SetNillableAppID sets the "app_id" field if the given value is not nil.

func (*OAuthAppSecretUpdate) SetNillableExpiresAt

func (_u *OAuthAppSecretUpdate) SetNillableExpiresAt(v *time.Time) *OAuthAppSecretUpdate

SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.

func (*OAuthAppSecretUpdate) SetNillableLastUsedAt

func (_u *OAuthAppSecretUpdate) SetNillableLastUsedAt(v *time.Time) *OAuthAppSecretUpdate

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*OAuthAppSecretUpdate) SetNillableRevoked

func (_u *OAuthAppSecretUpdate) SetNillableRevoked(v *bool) *OAuthAppSecretUpdate

SetNillableRevoked sets the "revoked" field if the given value is not nil.

func (*OAuthAppSecretUpdate) SetNillableRevokedAt

func (_u *OAuthAppSecretUpdate) SetNillableRevokedAt(v *time.Time) *OAuthAppSecretUpdate

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*OAuthAppSecretUpdate) SetNillableSecretHash

func (_u *OAuthAppSecretUpdate) SetNillableSecretHash(v *string) *OAuthAppSecretUpdate

SetNillableSecretHash sets the "secret_hash" field if the given value is not nil.

func (*OAuthAppSecretUpdate) SetNillableSecretPrefix

func (_u *OAuthAppSecretUpdate) SetNillableSecretPrefix(v *string) *OAuthAppSecretUpdate

SetNillableSecretPrefix sets the "secret_prefix" field if the given value is not nil.

func (*OAuthAppSecretUpdate) SetRevoked

func (_u *OAuthAppSecretUpdate) SetRevoked(v bool) *OAuthAppSecretUpdate

SetRevoked sets the "revoked" field.

func (*OAuthAppSecretUpdate) SetRevokedAt

func (_u *OAuthAppSecretUpdate) SetRevokedAt(v time.Time) *OAuthAppSecretUpdate

SetRevokedAt sets the "revoked_at" field.

func (*OAuthAppSecretUpdate) SetSecretHash

func (_u *OAuthAppSecretUpdate) SetSecretHash(v string) *OAuthAppSecretUpdate

SetSecretHash sets the "secret_hash" field.

func (*OAuthAppSecretUpdate) SetSecretPrefix

func (_u *OAuthAppSecretUpdate) SetSecretPrefix(v string) *OAuthAppSecretUpdate

SetSecretPrefix sets the "secret_prefix" field.

func (*OAuthAppSecretUpdate) Where

Where appends a list predicates to the OAuthAppSecretUpdate builder.

type OAuthAppSecretUpdateOne

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

OAuthAppSecretUpdateOne is the builder for updating a single OAuthAppSecret entity.

func (*OAuthAppSecretUpdateOne) ClearApp

ClearApp clears the "app" edge to the OAuthApp entity.

func (*OAuthAppSecretUpdateOne) ClearExpiresAt

func (_u *OAuthAppSecretUpdateOne) ClearExpiresAt() *OAuthAppSecretUpdateOne

ClearExpiresAt clears the value of the "expires_at" field.

func (*OAuthAppSecretUpdateOne) ClearLastUsedAt

func (_u *OAuthAppSecretUpdateOne) ClearLastUsedAt() *OAuthAppSecretUpdateOne

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*OAuthAppSecretUpdateOne) ClearRevokedAt

func (_u *OAuthAppSecretUpdateOne) ClearRevokedAt() *OAuthAppSecretUpdateOne

ClearRevokedAt clears the value of the "revoked_at" field.

func (*OAuthAppSecretUpdateOne) Exec

Exec executes the query on the entity.

func (*OAuthAppSecretUpdateOne) ExecX

func (_u *OAuthAppSecretUpdateOne) ExecX(ctx context.Context)

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

func (*OAuthAppSecretUpdateOne) Mutation

Mutation returns the OAuthAppSecretMutation object of the builder.

func (*OAuthAppSecretUpdateOne) Save

Save executes the query and returns the updated OAuthAppSecret entity.

func (*OAuthAppSecretUpdateOne) SaveX

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

func (*OAuthAppSecretUpdateOne) Select

func (_u *OAuthAppSecretUpdateOne) Select(field string, fields ...string) *OAuthAppSecretUpdateOne

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

func (*OAuthAppSecretUpdateOne) SetApp

SetApp sets the "app" edge to the OAuthApp entity.

func (*OAuthAppSecretUpdateOne) SetAppID

SetAppID sets the "app_id" field.

func (*OAuthAppSecretUpdateOne) SetExpiresAt

SetExpiresAt sets the "expires_at" field.

func (*OAuthAppSecretUpdateOne) SetLastUsedAt

SetLastUsedAt sets the "last_used_at" field.

func (*OAuthAppSecretUpdateOne) SetNillableAppID

func (_u *OAuthAppSecretUpdateOne) SetNillableAppID(v *uuid.UUID) *OAuthAppSecretUpdateOne

SetNillableAppID sets the "app_id" field if the given value is not nil.

func (*OAuthAppSecretUpdateOne) SetNillableExpiresAt

func (_u *OAuthAppSecretUpdateOne) SetNillableExpiresAt(v *time.Time) *OAuthAppSecretUpdateOne

SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.

func (*OAuthAppSecretUpdateOne) SetNillableLastUsedAt

func (_u *OAuthAppSecretUpdateOne) SetNillableLastUsedAt(v *time.Time) *OAuthAppSecretUpdateOne

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*OAuthAppSecretUpdateOne) SetNillableRevoked

func (_u *OAuthAppSecretUpdateOne) SetNillableRevoked(v *bool) *OAuthAppSecretUpdateOne

SetNillableRevoked sets the "revoked" field if the given value is not nil.

func (*OAuthAppSecretUpdateOne) SetNillableRevokedAt

func (_u *OAuthAppSecretUpdateOne) SetNillableRevokedAt(v *time.Time) *OAuthAppSecretUpdateOne

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*OAuthAppSecretUpdateOne) SetNillableSecretHash

func (_u *OAuthAppSecretUpdateOne) SetNillableSecretHash(v *string) *OAuthAppSecretUpdateOne

SetNillableSecretHash sets the "secret_hash" field if the given value is not nil.

func (*OAuthAppSecretUpdateOne) SetNillableSecretPrefix

func (_u *OAuthAppSecretUpdateOne) SetNillableSecretPrefix(v *string) *OAuthAppSecretUpdateOne

SetNillableSecretPrefix sets the "secret_prefix" field if the given value is not nil.

func (*OAuthAppSecretUpdateOne) SetRevoked

SetRevoked sets the "revoked" field.

func (*OAuthAppSecretUpdateOne) SetRevokedAt

SetRevokedAt sets the "revoked_at" field.

func (*OAuthAppSecretUpdateOne) SetSecretHash

SetSecretHash sets the "secret_hash" field.

func (*OAuthAppSecretUpdateOne) SetSecretPrefix

func (_u *OAuthAppSecretUpdateOne) SetSecretPrefix(v string) *OAuthAppSecretUpdateOne

SetSecretPrefix sets the "secret_prefix" field.

func (*OAuthAppSecretUpdateOne) Where

Where appends a list predicates to the OAuthAppSecretUpdate builder.

type OAuthAppSecretUpsert

type OAuthAppSecretUpsert struct {
	*sql.UpdateSet
}

OAuthAppSecretUpsert is the "OnConflict" setter.

func (*OAuthAppSecretUpsert) ClearExpiresAt

func (u *OAuthAppSecretUpsert) ClearExpiresAt() *OAuthAppSecretUpsert

ClearExpiresAt clears the value of the "expires_at" field.

func (*OAuthAppSecretUpsert) ClearLastUsedAt

func (u *OAuthAppSecretUpsert) ClearLastUsedAt() *OAuthAppSecretUpsert

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*OAuthAppSecretUpsert) ClearRevokedAt

func (u *OAuthAppSecretUpsert) ClearRevokedAt() *OAuthAppSecretUpsert

ClearRevokedAt clears the value of the "revoked_at" field.

func (*OAuthAppSecretUpsert) SetAppID

SetAppID sets the "app_id" field.

func (*OAuthAppSecretUpsert) SetExpiresAt

func (u *OAuthAppSecretUpsert) SetExpiresAt(v time.Time) *OAuthAppSecretUpsert

SetExpiresAt sets the "expires_at" field.

func (*OAuthAppSecretUpsert) SetLastUsedAt

func (u *OAuthAppSecretUpsert) SetLastUsedAt(v time.Time) *OAuthAppSecretUpsert

SetLastUsedAt sets the "last_used_at" field.

func (*OAuthAppSecretUpsert) SetRevoked

SetRevoked sets the "revoked" field.

func (*OAuthAppSecretUpsert) SetRevokedAt

func (u *OAuthAppSecretUpsert) SetRevokedAt(v time.Time) *OAuthAppSecretUpsert

SetRevokedAt sets the "revoked_at" field.

func (*OAuthAppSecretUpsert) SetSecretHash

func (u *OAuthAppSecretUpsert) SetSecretHash(v string) *OAuthAppSecretUpsert

SetSecretHash sets the "secret_hash" field.

func (*OAuthAppSecretUpsert) SetSecretPrefix

func (u *OAuthAppSecretUpsert) SetSecretPrefix(v string) *OAuthAppSecretUpsert

SetSecretPrefix sets the "secret_prefix" field.

func (*OAuthAppSecretUpsert) UpdateAppID

func (u *OAuthAppSecretUpsert) UpdateAppID() *OAuthAppSecretUpsert

UpdateAppID sets the "app_id" field to the value that was provided on create.

func (*OAuthAppSecretUpsert) UpdateExpiresAt

func (u *OAuthAppSecretUpsert) UpdateExpiresAt() *OAuthAppSecretUpsert

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*OAuthAppSecretUpsert) UpdateLastUsedAt

func (u *OAuthAppSecretUpsert) UpdateLastUsedAt() *OAuthAppSecretUpsert

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*OAuthAppSecretUpsert) UpdateRevoked

func (u *OAuthAppSecretUpsert) UpdateRevoked() *OAuthAppSecretUpsert

UpdateRevoked sets the "revoked" field to the value that was provided on create.

func (*OAuthAppSecretUpsert) UpdateRevokedAt

func (u *OAuthAppSecretUpsert) UpdateRevokedAt() *OAuthAppSecretUpsert

UpdateRevokedAt sets the "revoked_at" field to the value that was provided on create.

func (*OAuthAppSecretUpsert) UpdateSecretHash

func (u *OAuthAppSecretUpsert) UpdateSecretHash() *OAuthAppSecretUpsert

UpdateSecretHash sets the "secret_hash" field to the value that was provided on create.

func (*OAuthAppSecretUpsert) UpdateSecretPrefix

func (u *OAuthAppSecretUpsert) UpdateSecretPrefix() *OAuthAppSecretUpsert

UpdateSecretPrefix sets the "secret_prefix" field to the value that was provided on create.

type OAuthAppSecretUpsertBulk

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

OAuthAppSecretUpsertBulk is the builder for "upsert"-ing a bulk of OAuthAppSecret nodes.

func (*OAuthAppSecretUpsertBulk) ClearExpiresAt

ClearExpiresAt clears the value of the "expires_at" field.

func (*OAuthAppSecretUpsertBulk) ClearLastUsedAt

func (u *OAuthAppSecretUpsertBulk) ClearLastUsedAt() *OAuthAppSecretUpsertBulk

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*OAuthAppSecretUpsertBulk) ClearRevokedAt

ClearRevokedAt clears the value of the "revoked_at" field.

func (*OAuthAppSecretUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OAuthAppSecretUpsertBulk) Exec

Exec executes the query.

func (*OAuthAppSecretUpsertBulk) ExecX

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

func (*OAuthAppSecretUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OAuthAppSecret.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*OAuthAppSecretUpsertBulk) SetAppID

SetAppID sets the "app_id" field.

func (*OAuthAppSecretUpsertBulk) SetExpiresAt

SetExpiresAt sets the "expires_at" field.

func (*OAuthAppSecretUpsertBulk) SetLastUsedAt

SetLastUsedAt sets the "last_used_at" field.

func (*OAuthAppSecretUpsertBulk) SetRevoked

SetRevoked sets the "revoked" field.

func (*OAuthAppSecretUpsertBulk) SetRevokedAt

SetRevokedAt sets the "revoked_at" field.

func (*OAuthAppSecretUpsertBulk) SetSecretHash

SetSecretHash sets the "secret_hash" field.

func (*OAuthAppSecretUpsertBulk) SetSecretPrefix

SetSecretPrefix sets the "secret_prefix" field.

func (*OAuthAppSecretUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the OAuthAppSecretCreateBulk.OnConflict documentation for more info.

func (*OAuthAppSecretUpsertBulk) UpdateAppID

UpdateAppID sets the "app_id" field to the value that was provided on create.

func (*OAuthAppSecretUpsertBulk) UpdateExpiresAt

func (u *OAuthAppSecretUpsertBulk) UpdateExpiresAt() *OAuthAppSecretUpsertBulk

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*OAuthAppSecretUpsertBulk) UpdateLastUsedAt

func (u *OAuthAppSecretUpsertBulk) UpdateLastUsedAt() *OAuthAppSecretUpsertBulk

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*OAuthAppSecretUpsertBulk) UpdateNewValues

func (u *OAuthAppSecretUpsertBulk) UpdateNewValues() *OAuthAppSecretUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.OAuthAppSecret.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(oauthappsecret.FieldID)
		}),
	).
	Exec(ctx)

func (*OAuthAppSecretUpsertBulk) UpdateRevoked

UpdateRevoked sets the "revoked" field to the value that was provided on create.

func (*OAuthAppSecretUpsertBulk) UpdateRevokedAt

func (u *OAuthAppSecretUpsertBulk) UpdateRevokedAt() *OAuthAppSecretUpsertBulk

UpdateRevokedAt sets the "revoked_at" field to the value that was provided on create.

func (*OAuthAppSecretUpsertBulk) UpdateSecretHash

func (u *OAuthAppSecretUpsertBulk) UpdateSecretHash() *OAuthAppSecretUpsertBulk

UpdateSecretHash sets the "secret_hash" field to the value that was provided on create.

func (*OAuthAppSecretUpsertBulk) UpdateSecretPrefix

func (u *OAuthAppSecretUpsertBulk) UpdateSecretPrefix() *OAuthAppSecretUpsertBulk

UpdateSecretPrefix sets the "secret_prefix" field to the value that was provided on create.

type OAuthAppSecretUpsertOne

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

OAuthAppSecretUpsertOne is the builder for "upsert"-ing

one OAuthAppSecret node.

func (*OAuthAppSecretUpsertOne) ClearExpiresAt

func (u *OAuthAppSecretUpsertOne) ClearExpiresAt() *OAuthAppSecretUpsertOne

ClearExpiresAt clears the value of the "expires_at" field.

func (*OAuthAppSecretUpsertOne) ClearLastUsedAt

func (u *OAuthAppSecretUpsertOne) ClearLastUsedAt() *OAuthAppSecretUpsertOne

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*OAuthAppSecretUpsertOne) ClearRevokedAt

func (u *OAuthAppSecretUpsertOne) ClearRevokedAt() *OAuthAppSecretUpsertOne

ClearRevokedAt clears the value of the "revoked_at" field.

func (*OAuthAppSecretUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OAuthAppSecretUpsertOne) Exec

Exec executes the query.

func (*OAuthAppSecretUpsertOne) ExecX

func (u *OAuthAppSecretUpsertOne) ExecX(ctx context.Context)

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

func (*OAuthAppSecretUpsertOne) ID

func (u *OAuthAppSecretUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*OAuthAppSecretUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*OAuthAppSecretUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OAuthAppSecret.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*OAuthAppSecretUpsertOne) SetAppID

SetAppID sets the "app_id" field.

func (*OAuthAppSecretUpsertOne) SetExpiresAt

SetExpiresAt sets the "expires_at" field.

func (*OAuthAppSecretUpsertOne) SetLastUsedAt

SetLastUsedAt sets the "last_used_at" field.

func (*OAuthAppSecretUpsertOne) SetRevoked

SetRevoked sets the "revoked" field.

func (*OAuthAppSecretUpsertOne) SetRevokedAt

SetRevokedAt sets the "revoked_at" field.

func (*OAuthAppSecretUpsertOne) SetSecretHash

SetSecretHash sets the "secret_hash" field.

func (*OAuthAppSecretUpsertOne) SetSecretPrefix

SetSecretPrefix sets the "secret_prefix" field.

func (*OAuthAppSecretUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the OAuthAppSecretCreate.OnConflict documentation for more info.

func (*OAuthAppSecretUpsertOne) UpdateAppID

UpdateAppID sets the "app_id" field to the value that was provided on create.

func (*OAuthAppSecretUpsertOne) UpdateExpiresAt

func (u *OAuthAppSecretUpsertOne) UpdateExpiresAt() *OAuthAppSecretUpsertOne

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*OAuthAppSecretUpsertOne) UpdateLastUsedAt

func (u *OAuthAppSecretUpsertOne) UpdateLastUsedAt() *OAuthAppSecretUpsertOne

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*OAuthAppSecretUpsertOne) UpdateNewValues

func (u *OAuthAppSecretUpsertOne) UpdateNewValues() *OAuthAppSecretUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.OAuthAppSecret.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(oauthappsecret.FieldID)
		}),
	).
	Exec(ctx)

func (*OAuthAppSecretUpsertOne) UpdateRevoked

UpdateRevoked sets the "revoked" field to the value that was provided on create.

func (*OAuthAppSecretUpsertOne) UpdateRevokedAt

func (u *OAuthAppSecretUpsertOne) UpdateRevokedAt() *OAuthAppSecretUpsertOne

UpdateRevokedAt sets the "revoked_at" field to the value that was provided on create.

func (*OAuthAppSecretUpsertOne) UpdateSecretHash

func (u *OAuthAppSecretUpsertOne) UpdateSecretHash() *OAuthAppSecretUpsertOne

UpdateSecretHash sets the "secret_hash" field to the value that was provided on create.

func (*OAuthAppSecretUpsertOne) UpdateSecretPrefix

func (u *OAuthAppSecretUpsertOne) UpdateSecretPrefix() *OAuthAppSecretUpsertOne

UpdateSecretPrefix sets the "secret_prefix" field to the value that was provided on create.

type OAuthAppSecrets

type OAuthAppSecrets []*OAuthAppSecret

OAuthAppSecrets is a parsable slice of OAuthAppSecret.

type OAuthAppSelect

type OAuthAppSelect struct {
	*OAuthAppQuery
	// contains filtered or unexported fields
}

OAuthAppSelect is the builder for selecting fields of OAuthApp entities.

func (*OAuthAppSelect) Aggregate

func (_s *OAuthAppSelect) Aggregate(fns ...AggregateFunc) *OAuthAppSelect

Aggregate adds the given aggregation functions to the selector query.

func (*OAuthAppSelect) Bool

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

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

func (*OAuthAppSelect) BoolX

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

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

func (*OAuthAppSelect) Bools

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

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

func (*OAuthAppSelect) BoolsX

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

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

func (*OAuthAppSelect) Float64

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

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

func (*OAuthAppSelect) Float64X

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

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

func (*OAuthAppSelect) Float64s

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

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

func (*OAuthAppSelect) Float64sX

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

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

func (*OAuthAppSelect) Int

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

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

func (*OAuthAppSelect) IntX

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

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

func (*OAuthAppSelect) Ints

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

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

func (*OAuthAppSelect) IntsX

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

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

func (*OAuthAppSelect) Scan

func (_s *OAuthAppSelect) Scan(ctx context.Context, v any) error

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

func (*OAuthAppSelect) ScanX

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

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

func (*OAuthAppSelect) String

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

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

func (*OAuthAppSelect) StringX

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

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

func (*OAuthAppSelect) Strings

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

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

func (*OAuthAppSelect) StringsX

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

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

type OAuthAppUpdate

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

OAuthAppUpdate is the builder for updating OAuthApp entities.

func (*OAuthAppUpdate) AddAccessTokenTTL

func (_u *OAuthAppUpdate) AddAccessTokenTTL(v int) *OAuthAppUpdate

AddAccessTokenTTL adds value to the "access_token_ttl" field.

func (*OAuthAppUpdate) AddAuthCodeIDs

func (_u *OAuthAppUpdate) AddAuthCodeIDs(ids ...uuid.UUID) *OAuthAppUpdate

AddAuthCodeIDs adds the "auth_codes" edge to the OAuthAuthCode entity by IDs.

func (*OAuthAppUpdate) AddAuthCodes

func (_u *OAuthAppUpdate) AddAuthCodes(v ...*OAuthAuthCode) *OAuthAppUpdate

AddAuthCodes adds the "auth_codes" edges to the OAuthAuthCode entity.

func (*OAuthAppUpdate) AddConsentIDs

func (_u *OAuthAppUpdate) AddConsentIDs(ids ...uuid.UUID) *OAuthAppUpdate

AddConsentIDs adds the "consents" edge to the OAuthConsent entity by IDs.

func (*OAuthAppUpdate) AddConsents

func (_u *OAuthAppUpdate) AddConsents(v ...*OAuthConsent) *OAuthAppUpdate

AddConsents adds the "consents" edges to the OAuthConsent entity.

func (*OAuthAppUpdate) AddRefreshTokenTTL

func (_u *OAuthAppUpdate) AddRefreshTokenTTL(v int) *OAuthAppUpdate

AddRefreshTokenTTL adds value to the "refresh_token_ttl" field.

func (*OAuthAppUpdate) AddSecretIDs

func (_u *OAuthAppUpdate) AddSecretIDs(ids ...uuid.UUID) *OAuthAppUpdate

AddSecretIDs adds the "secrets" edge to the OAuthAppSecret entity by IDs.

func (*OAuthAppUpdate) AddSecrets

func (_u *OAuthAppUpdate) AddSecrets(v ...*OAuthAppSecret) *OAuthAppUpdate

AddSecrets adds the "secrets" edges to the OAuthAppSecret entity.

func (*OAuthAppUpdate) AddTokenIDs

func (_u *OAuthAppUpdate) AddTokenIDs(ids ...uuid.UUID) *OAuthAppUpdate

AddTokenIDs adds the "tokens" edge to the OAuthToken entity by IDs.

func (*OAuthAppUpdate) AddTokens

func (_u *OAuthAppUpdate) AddTokens(v ...*OAuthToken) *OAuthAppUpdate

AddTokens adds the "tokens" edges to the OAuthToken entity.

func (*OAuthAppUpdate) AppendAllowedGrants

func (_u *OAuthAppUpdate) AppendAllowedGrants(v []string) *OAuthAppUpdate

AppendAllowedGrants appends value to the "allowed_grants" field.

func (*OAuthAppUpdate) AppendAllowedResponseTypes

func (_u *OAuthAppUpdate) AppendAllowedResponseTypes(v []string) *OAuthAppUpdate

AppendAllowedResponseTypes appends value to the "allowed_response_types" field.

func (*OAuthAppUpdate) AppendAllowedScopes

func (_u *OAuthAppUpdate) AppendAllowedScopes(v []string) *OAuthAppUpdate

AppendAllowedScopes appends value to the "allowed_scopes" field.

func (*OAuthAppUpdate) AppendRedirectUris

func (_u *OAuthAppUpdate) AppendRedirectUris(v []string) *OAuthAppUpdate

AppendRedirectUris appends value to the "redirect_uris" field.

func (*OAuthAppUpdate) ClearAuthCodes

func (_u *OAuthAppUpdate) ClearAuthCodes() *OAuthAppUpdate

ClearAuthCodes clears all "auth_codes" edges to the OAuthAuthCode entity.

func (*OAuthAppUpdate) ClearConsents

func (_u *OAuthAppUpdate) ClearConsents() *OAuthAppUpdate

ClearConsents clears all "consents" edges to the OAuthConsent entity.

func (*OAuthAppUpdate) ClearDescription

func (_u *OAuthAppUpdate) ClearDescription() *OAuthAppUpdate

ClearDescription clears the value of the "description" field.

func (*OAuthAppUpdate) ClearLogoURL

func (_u *OAuthAppUpdate) ClearLogoURL() *OAuthAppUpdate

ClearLogoURL clears the value of the "logo_url" field.

func (*OAuthAppUpdate) ClearMetadata

func (_u *OAuthAppUpdate) ClearMetadata() *OAuthAppUpdate

ClearMetadata clears the value of the "metadata" field.

func (*OAuthAppUpdate) ClearOrganization

func (_u *OAuthAppUpdate) ClearOrganization() *OAuthAppUpdate

ClearOrganization clears the "organization" edge to the Organization entity.

func (*OAuthAppUpdate) ClearOrganizationID

func (_u *OAuthAppUpdate) ClearOrganizationID() *OAuthAppUpdate

ClearOrganizationID clears the value of the "organization_id" field.

func (*OAuthAppUpdate) ClearOwner

func (_u *OAuthAppUpdate) ClearOwner() *OAuthAppUpdate

ClearOwner clears the "owner" edge to the User entity.

func (*OAuthAppUpdate) ClearRevokedAt

func (_u *OAuthAppUpdate) ClearRevokedAt() *OAuthAppUpdate

ClearRevokedAt clears the value of the "revoked_at" field.

func (*OAuthAppUpdate) ClearSecrets

func (_u *OAuthAppUpdate) ClearSecrets() *OAuthAppUpdate

ClearSecrets clears all "secrets" edges to the OAuthAppSecret entity.

func (*OAuthAppUpdate) ClearTokens

func (_u *OAuthAppUpdate) ClearTokens() *OAuthAppUpdate

ClearTokens clears all "tokens" edges to the OAuthToken entity.

func (*OAuthAppUpdate) Exec

func (_u *OAuthAppUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OAuthAppUpdate) ExecX

func (_u *OAuthAppUpdate) ExecX(ctx context.Context)

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

func (*OAuthAppUpdate) Mutation

func (_u *OAuthAppUpdate) Mutation() *OAuthAppMutation

Mutation returns the OAuthAppMutation object of the builder.

func (*OAuthAppUpdate) RemoveAuthCodeIDs

func (_u *OAuthAppUpdate) RemoveAuthCodeIDs(ids ...uuid.UUID) *OAuthAppUpdate

RemoveAuthCodeIDs removes the "auth_codes" edge to OAuthAuthCode entities by IDs.

func (*OAuthAppUpdate) RemoveAuthCodes

func (_u *OAuthAppUpdate) RemoveAuthCodes(v ...*OAuthAuthCode) *OAuthAppUpdate

RemoveAuthCodes removes "auth_codes" edges to OAuthAuthCode entities.

func (*OAuthAppUpdate) RemoveConsentIDs

func (_u *OAuthAppUpdate) RemoveConsentIDs(ids ...uuid.UUID) *OAuthAppUpdate

RemoveConsentIDs removes the "consents" edge to OAuthConsent entities by IDs.

func (*OAuthAppUpdate) RemoveConsents

func (_u *OAuthAppUpdate) RemoveConsents(v ...*OAuthConsent) *OAuthAppUpdate

RemoveConsents removes "consents" edges to OAuthConsent entities.

func (*OAuthAppUpdate) RemoveSecretIDs

func (_u *OAuthAppUpdate) RemoveSecretIDs(ids ...uuid.UUID) *OAuthAppUpdate

RemoveSecretIDs removes the "secrets" edge to OAuthAppSecret entities by IDs.

func (*OAuthAppUpdate) RemoveSecrets

func (_u *OAuthAppUpdate) RemoveSecrets(v ...*OAuthAppSecret) *OAuthAppUpdate

RemoveSecrets removes "secrets" edges to OAuthAppSecret entities.

func (*OAuthAppUpdate) RemoveTokenIDs

func (_u *OAuthAppUpdate) RemoveTokenIDs(ids ...uuid.UUID) *OAuthAppUpdate

RemoveTokenIDs removes the "tokens" edge to OAuthToken entities by IDs.

func (*OAuthAppUpdate) RemoveTokens

func (_u *OAuthAppUpdate) RemoveTokens(v ...*OAuthToken) *OAuthAppUpdate

RemoveTokens removes "tokens" edges to OAuthToken entities.

func (*OAuthAppUpdate) Save

func (_u *OAuthAppUpdate) Save(ctx context.Context) (int, error)

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

func (*OAuthAppUpdate) SaveX

func (_u *OAuthAppUpdate) SaveX(ctx context.Context) int

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

func (*OAuthAppUpdate) SetAccessTokenTTL

func (_u *OAuthAppUpdate) SetAccessTokenTTL(v int) *OAuthAppUpdate

SetAccessTokenTTL sets the "access_token_ttl" field.

func (*OAuthAppUpdate) SetActive

func (_u *OAuthAppUpdate) SetActive(v bool) *OAuthAppUpdate

SetActive sets the "active" field.

func (*OAuthAppUpdate) SetAllowedGrants

func (_u *OAuthAppUpdate) SetAllowedGrants(v []string) *OAuthAppUpdate

SetAllowedGrants sets the "allowed_grants" field.

func (*OAuthAppUpdate) SetAllowedResponseTypes

func (_u *OAuthAppUpdate) SetAllowedResponseTypes(v []string) *OAuthAppUpdate

SetAllowedResponseTypes sets the "allowed_response_types" field.

func (*OAuthAppUpdate) SetAllowedScopes

func (_u *OAuthAppUpdate) SetAllowedScopes(v []string) *OAuthAppUpdate

SetAllowedScopes sets the "allowed_scopes" field.

func (*OAuthAppUpdate) SetAppType

func (_u *OAuthAppUpdate) SetAppType(v oauthapp.AppType) *OAuthAppUpdate

SetAppType sets the "app_type" field.

func (*OAuthAppUpdate) SetDescription

func (_u *OAuthAppUpdate) SetDescription(v string) *OAuthAppUpdate

SetDescription sets the "description" field.

func (*OAuthAppUpdate) SetFirstParty

func (_u *OAuthAppUpdate) SetFirstParty(v bool) *OAuthAppUpdate

SetFirstParty sets the "first_party" field.

func (*OAuthAppUpdate) SetLogoURL

func (_u *OAuthAppUpdate) SetLogoURL(v string) *OAuthAppUpdate

SetLogoURL sets the "logo_url" field.

func (*OAuthAppUpdate) SetMetadata

func (_u *OAuthAppUpdate) SetMetadata(v map[string]string) *OAuthAppUpdate

SetMetadata sets the "metadata" field.

func (*OAuthAppUpdate) SetName

func (_u *OAuthAppUpdate) SetName(v string) *OAuthAppUpdate

SetName sets the "name" field.

func (*OAuthAppUpdate) SetNillableAccessTokenTTL

func (_u *OAuthAppUpdate) SetNillableAccessTokenTTL(v *int) *OAuthAppUpdate

SetNillableAccessTokenTTL sets the "access_token_ttl" field if the given value is not nil.

func (*OAuthAppUpdate) SetNillableActive

func (_u *OAuthAppUpdate) SetNillableActive(v *bool) *OAuthAppUpdate

SetNillableActive sets the "active" field if the given value is not nil.

func (*OAuthAppUpdate) SetNillableAppType

func (_u *OAuthAppUpdate) SetNillableAppType(v *oauthapp.AppType) *OAuthAppUpdate

SetNillableAppType sets the "app_type" field if the given value is not nil.

func (*OAuthAppUpdate) SetNillableDescription

func (_u *OAuthAppUpdate) SetNillableDescription(v *string) *OAuthAppUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*OAuthAppUpdate) SetNillableFirstParty

func (_u *OAuthAppUpdate) SetNillableFirstParty(v *bool) *OAuthAppUpdate

SetNillableFirstParty sets the "first_party" field if the given value is not nil.

func (*OAuthAppUpdate) SetNillableLogoURL

func (_u *OAuthAppUpdate) SetNillableLogoURL(v *string) *OAuthAppUpdate

SetNillableLogoURL sets the "logo_url" field if the given value is not nil.

func (*OAuthAppUpdate) SetNillableName

func (_u *OAuthAppUpdate) SetNillableName(v *string) *OAuthAppUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*OAuthAppUpdate) SetNillableOrganizationID

func (_u *OAuthAppUpdate) SetNillableOrganizationID(v *uuid.UUID) *OAuthAppUpdate

SetNillableOrganizationID sets the "organization_id" field if the given value is not nil.

func (*OAuthAppUpdate) SetNillableOwnerID

func (_u *OAuthAppUpdate) SetNillableOwnerID(v *uuid.UUID) *OAuthAppUpdate

SetNillableOwnerID sets the "owner_id" field if the given value is not nil.

func (*OAuthAppUpdate) SetNillablePublic

func (_u *OAuthAppUpdate) SetNillablePublic(v *bool) *OAuthAppUpdate

SetNillablePublic sets the "public" field if the given value is not nil.

func (*OAuthAppUpdate) SetNillableRefreshTokenRotation

func (_u *OAuthAppUpdate) SetNillableRefreshTokenRotation(v *bool) *OAuthAppUpdate

SetNillableRefreshTokenRotation sets the "refresh_token_rotation" field if the given value is not nil.

func (*OAuthAppUpdate) SetNillableRefreshTokenTTL

func (_u *OAuthAppUpdate) SetNillableRefreshTokenTTL(v *int) *OAuthAppUpdate

SetNillableRefreshTokenTTL sets the "refresh_token_ttl" field if the given value is not nil.

func (*OAuthAppUpdate) SetNillableRevokedAt

func (_u *OAuthAppUpdate) SetNillableRevokedAt(v *time.Time) *OAuthAppUpdate

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*OAuthAppUpdate) SetOrganization

func (_u *OAuthAppUpdate) SetOrganization(v *Organization) *OAuthAppUpdate

SetOrganization sets the "organization" edge to the Organization entity.

func (*OAuthAppUpdate) SetOrganizationID

func (_u *OAuthAppUpdate) SetOrganizationID(v uuid.UUID) *OAuthAppUpdate

SetOrganizationID sets the "organization_id" field.

func (*OAuthAppUpdate) SetOwner

func (_u *OAuthAppUpdate) SetOwner(v *User) *OAuthAppUpdate

SetOwner sets the "owner" edge to the User entity.

func (*OAuthAppUpdate) SetOwnerID

func (_u *OAuthAppUpdate) SetOwnerID(v uuid.UUID) *OAuthAppUpdate

SetOwnerID sets the "owner_id" field.

func (*OAuthAppUpdate) SetPublic

func (_u *OAuthAppUpdate) SetPublic(v bool) *OAuthAppUpdate

SetPublic sets the "public" field.

func (*OAuthAppUpdate) SetRedirectUris

func (_u *OAuthAppUpdate) SetRedirectUris(v []string) *OAuthAppUpdate

SetRedirectUris sets the "redirect_uris" field.

func (*OAuthAppUpdate) SetRefreshTokenRotation

func (_u *OAuthAppUpdate) SetRefreshTokenRotation(v bool) *OAuthAppUpdate

SetRefreshTokenRotation sets the "refresh_token_rotation" field.

func (*OAuthAppUpdate) SetRefreshTokenTTL

func (_u *OAuthAppUpdate) SetRefreshTokenTTL(v int) *OAuthAppUpdate

SetRefreshTokenTTL sets the "refresh_token_ttl" field.

func (*OAuthAppUpdate) SetRevokedAt

func (_u *OAuthAppUpdate) SetRevokedAt(v time.Time) *OAuthAppUpdate

SetRevokedAt sets the "revoked_at" field.

func (*OAuthAppUpdate) SetUpdatedAt

func (_u *OAuthAppUpdate) SetUpdatedAt(v time.Time) *OAuthAppUpdate

SetUpdatedAt sets the "updated_at" field.

func (*OAuthAppUpdate) Where

func (_u *OAuthAppUpdate) Where(ps ...predicate.OAuthApp) *OAuthAppUpdate

Where appends a list predicates to the OAuthAppUpdate builder.

type OAuthAppUpdateOne

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

OAuthAppUpdateOne is the builder for updating a single OAuthApp entity.

func (*OAuthAppUpdateOne) AddAccessTokenTTL

func (_u *OAuthAppUpdateOne) AddAccessTokenTTL(v int) *OAuthAppUpdateOne

AddAccessTokenTTL adds value to the "access_token_ttl" field.

func (*OAuthAppUpdateOne) AddAuthCodeIDs

func (_u *OAuthAppUpdateOne) AddAuthCodeIDs(ids ...uuid.UUID) *OAuthAppUpdateOne

AddAuthCodeIDs adds the "auth_codes" edge to the OAuthAuthCode entity by IDs.

func (*OAuthAppUpdateOne) AddAuthCodes

func (_u *OAuthAppUpdateOne) AddAuthCodes(v ...*OAuthAuthCode) *OAuthAppUpdateOne

AddAuthCodes adds the "auth_codes" edges to the OAuthAuthCode entity.

func (*OAuthAppUpdateOne) AddConsentIDs

func (_u *OAuthAppUpdateOne) AddConsentIDs(ids ...uuid.UUID) *OAuthAppUpdateOne

AddConsentIDs adds the "consents" edge to the OAuthConsent entity by IDs.

func (*OAuthAppUpdateOne) AddConsents

func (_u *OAuthAppUpdateOne) AddConsents(v ...*OAuthConsent) *OAuthAppUpdateOne

AddConsents adds the "consents" edges to the OAuthConsent entity.

func (*OAuthAppUpdateOne) AddRefreshTokenTTL

func (_u *OAuthAppUpdateOne) AddRefreshTokenTTL(v int) *OAuthAppUpdateOne

AddRefreshTokenTTL adds value to the "refresh_token_ttl" field.

func (*OAuthAppUpdateOne) AddSecretIDs

func (_u *OAuthAppUpdateOne) AddSecretIDs(ids ...uuid.UUID) *OAuthAppUpdateOne

AddSecretIDs adds the "secrets" edge to the OAuthAppSecret entity by IDs.

func (*OAuthAppUpdateOne) AddSecrets

func (_u *OAuthAppUpdateOne) AddSecrets(v ...*OAuthAppSecret) *OAuthAppUpdateOne

AddSecrets adds the "secrets" edges to the OAuthAppSecret entity.

func (*OAuthAppUpdateOne) AddTokenIDs

func (_u *OAuthAppUpdateOne) AddTokenIDs(ids ...uuid.UUID) *OAuthAppUpdateOne

AddTokenIDs adds the "tokens" edge to the OAuthToken entity by IDs.

func (*OAuthAppUpdateOne) AddTokens

func (_u *OAuthAppUpdateOne) AddTokens(v ...*OAuthToken) *OAuthAppUpdateOne

AddTokens adds the "tokens" edges to the OAuthToken entity.

func (*OAuthAppUpdateOne) AppendAllowedGrants

func (_u *OAuthAppUpdateOne) AppendAllowedGrants(v []string) *OAuthAppUpdateOne

AppendAllowedGrants appends value to the "allowed_grants" field.

func (*OAuthAppUpdateOne) AppendAllowedResponseTypes

func (_u *OAuthAppUpdateOne) AppendAllowedResponseTypes(v []string) *OAuthAppUpdateOne

AppendAllowedResponseTypes appends value to the "allowed_response_types" field.

func (*OAuthAppUpdateOne) AppendAllowedScopes

func (_u *OAuthAppUpdateOne) AppendAllowedScopes(v []string) *OAuthAppUpdateOne

AppendAllowedScopes appends value to the "allowed_scopes" field.

func (*OAuthAppUpdateOne) AppendRedirectUris

func (_u *OAuthAppUpdateOne) AppendRedirectUris(v []string) *OAuthAppUpdateOne

AppendRedirectUris appends value to the "redirect_uris" field.

func (*OAuthAppUpdateOne) ClearAuthCodes

func (_u *OAuthAppUpdateOne) ClearAuthCodes() *OAuthAppUpdateOne

ClearAuthCodes clears all "auth_codes" edges to the OAuthAuthCode entity.

func (*OAuthAppUpdateOne) ClearConsents

func (_u *OAuthAppUpdateOne) ClearConsents() *OAuthAppUpdateOne

ClearConsents clears all "consents" edges to the OAuthConsent entity.

func (*OAuthAppUpdateOne) ClearDescription

func (_u *OAuthAppUpdateOne) ClearDescription() *OAuthAppUpdateOne

ClearDescription clears the value of the "description" field.

func (*OAuthAppUpdateOne) ClearLogoURL

func (_u *OAuthAppUpdateOne) ClearLogoURL() *OAuthAppUpdateOne

ClearLogoURL clears the value of the "logo_url" field.

func (*OAuthAppUpdateOne) ClearMetadata

func (_u *OAuthAppUpdateOne) ClearMetadata() *OAuthAppUpdateOne

ClearMetadata clears the value of the "metadata" field.

func (*OAuthAppUpdateOne) ClearOrganization

func (_u *OAuthAppUpdateOne) ClearOrganization() *OAuthAppUpdateOne

ClearOrganization clears the "organization" edge to the Organization entity.

func (*OAuthAppUpdateOne) ClearOrganizationID

func (_u *OAuthAppUpdateOne) ClearOrganizationID() *OAuthAppUpdateOne

ClearOrganizationID clears the value of the "organization_id" field.

func (*OAuthAppUpdateOne) ClearOwner

func (_u *OAuthAppUpdateOne) ClearOwner() *OAuthAppUpdateOne

ClearOwner clears the "owner" edge to the User entity.

func (*OAuthAppUpdateOne) ClearRevokedAt

func (_u *OAuthAppUpdateOne) ClearRevokedAt() *OAuthAppUpdateOne

ClearRevokedAt clears the value of the "revoked_at" field.

func (*OAuthAppUpdateOne) ClearSecrets

func (_u *OAuthAppUpdateOne) ClearSecrets() *OAuthAppUpdateOne

ClearSecrets clears all "secrets" edges to the OAuthAppSecret entity.

func (*OAuthAppUpdateOne) ClearTokens

func (_u *OAuthAppUpdateOne) ClearTokens() *OAuthAppUpdateOne

ClearTokens clears all "tokens" edges to the OAuthToken entity.

func (*OAuthAppUpdateOne) Exec

func (_u *OAuthAppUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*OAuthAppUpdateOne) ExecX

func (_u *OAuthAppUpdateOne) ExecX(ctx context.Context)

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

func (*OAuthAppUpdateOne) Mutation

func (_u *OAuthAppUpdateOne) Mutation() *OAuthAppMutation

Mutation returns the OAuthAppMutation object of the builder.

func (*OAuthAppUpdateOne) RemoveAuthCodeIDs

func (_u *OAuthAppUpdateOne) RemoveAuthCodeIDs(ids ...uuid.UUID) *OAuthAppUpdateOne

RemoveAuthCodeIDs removes the "auth_codes" edge to OAuthAuthCode entities by IDs.

func (*OAuthAppUpdateOne) RemoveAuthCodes

func (_u *OAuthAppUpdateOne) RemoveAuthCodes(v ...*OAuthAuthCode) *OAuthAppUpdateOne

RemoveAuthCodes removes "auth_codes" edges to OAuthAuthCode entities.

func (*OAuthAppUpdateOne) RemoveConsentIDs

func (_u *OAuthAppUpdateOne) RemoveConsentIDs(ids ...uuid.UUID) *OAuthAppUpdateOne

RemoveConsentIDs removes the "consents" edge to OAuthConsent entities by IDs.

func (*OAuthAppUpdateOne) RemoveConsents

func (_u *OAuthAppUpdateOne) RemoveConsents(v ...*OAuthConsent) *OAuthAppUpdateOne

RemoveConsents removes "consents" edges to OAuthConsent entities.

func (*OAuthAppUpdateOne) RemoveSecretIDs

func (_u *OAuthAppUpdateOne) RemoveSecretIDs(ids ...uuid.UUID) *OAuthAppUpdateOne

RemoveSecretIDs removes the "secrets" edge to OAuthAppSecret entities by IDs.

func (*OAuthAppUpdateOne) RemoveSecrets

func (_u *OAuthAppUpdateOne) RemoveSecrets(v ...*OAuthAppSecret) *OAuthAppUpdateOne

RemoveSecrets removes "secrets" edges to OAuthAppSecret entities.

func (*OAuthAppUpdateOne) RemoveTokenIDs

func (_u *OAuthAppUpdateOne) RemoveTokenIDs(ids ...uuid.UUID) *OAuthAppUpdateOne

RemoveTokenIDs removes the "tokens" edge to OAuthToken entities by IDs.

func (*OAuthAppUpdateOne) RemoveTokens

func (_u *OAuthAppUpdateOne) RemoveTokens(v ...*OAuthToken) *OAuthAppUpdateOne

RemoveTokens removes "tokens" edges to OAuthToken entities.

func (*OAuthAppUpdateOne) Save

func (_u *OAuthAppUpdateOne) Save(ctx context.Context) (*OAuthApp, error)

Save executes the query and returns the updated OAuthApp entity.

func (*OAuthAppUpdateOne) SaveX

func (_u *OAuthAppUpdateOne) SaveX(ctx context.Context) *OAuthApp

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

func (*OAuthAppUpdateOne) Select

func (_u *OAuthAppUpdateOne) Select(field string, fields ...string) *OAuthAppUpdateOne

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

func (*OAuthAppUpdateOne) SetAccessTokenTTL

func (_u *OAuthAppUpdateOne) SetAccessTokenTTL(v int) *OAuthAppUpdateOne

SetAccessTokenTTL sets the "access_token_ttl" field.

func (*OAuthAppUpdateOne) SetActive

func (_u *OAuthAppUpdateOne) SetActive(v bool) *OAuthAppUpdateOne

SetActive sets the "active" field.

func (*OAuthAppUpdateOne) SetAllowedGrants

func (_u *OAuthAppUpdateOne) SetAllowedGrants(v []string) *OAuthAppUpdateOne

SetAllowedGrants sets the "allowed_grants" field.

func (*OAuthAppUpdateOne) SetAllowedResponseTypes

func (_u *OAuthAppUpdateOne) SetAllowedResponseTypes(v []string) *OAuthAppUpdateOne

SetAllowedResponseTypes sets the "allowed_response_types" field.

func (*OAuthAppUpdateOne) SetAllowedScopes

func (_u *OAuthAppUpdateOne) SetAllowedScopes(v []string) *OAuthAppUpdateOne

SetAllowedScopes sets the "allowed_scopes" field.

func (*OAuthAppUpdateOne) SetAppType

SetAppType sets the "app_type" field.

func (*OAuthAppUpdateOne) SetDescription

func (_u *OAuthAppUpdateOne) SetDescription(v string) *OAuthAppUpdateOne

SetDescription sets the "description" field.

func (*OAuthAppUpdateOne) SetFirstParty

func (_u *OAuthAppUpdateOne) SetFirstParty(v bool) *OAuthAppUpdateOne

SetFirstParty sets the "first_party" field.

func (*OAuthAppUpdateOne) SetLogoURL

func (_u *OAuthAppUpdateOne) SetLogoURL(v string) *OAuthAppUpdateOne

SetLogoURL sets the "logo_url" field.

func (*OAuthAppUpdateOne) SetMetadata

func (_u *OAuthAppUpdateOne) SetMetadata(v map[string]string) *OAuthAppUpdateOne

SetMetadata sets the "metadata" field.

func (*OAuthAppUpdateOne) SetName

func (_u *OAuthAppUpdateOne) SetName(v string) *OAuthAppUpdateOne

SetName sets the "name" field.

func (*OAuthAppUpdateOne) SetNillableAccessTokenTTL

func (_u *OAuthAppUpdateOne) SetNillableAccessTokenTTL(v *int) *OAuthAppUpdateOne

SetNillableAccessTokenTTL sets the "access_token_ttl" field if the given value is not nil.

func (*OAuthAppUpdateOne) SetNillableActive

func (_u *OAuthAppUpdateOne) SetNillableActive(v *bool) *OAuthAppUpdateOne

SetNillableActive sets the "active" field if the given value is not nil.

func (*OAuthAppUpdateOne) SetNillableAppType

func (_u *OAuthAppUpdateOne) SetNillableAppType(v *oauthapp.AppType) *OAuthAppUpdateOne

SetNillableAppType sets the "app_type" field if the given value is not nil.

func (*OAuthAppUpdateOne) SetNillableDescription

func (_u *OAuthAppUpdateOne) SetNillableDescription(v *string) *OAuthAppUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*OAuthAppUpdateOne) SetNillableFirstParty

func (_u *OAuthAppUpdateOne) SetNillableFirstParty(v *bool) *OAuthAppUpdateOne

SetNillableFirstParty sets the "first_party" field if the given value is not nil.

func (*OAuthAppUpdateOne) SetNillableLogoURL

func (_u *OAuthAppUpdateOne) SetNillableLogoURL(v *string) *OAuthAppUpdateOne

SetNillableLogoURL sets the "logo_url" field if the given value is not nil.

func (*OAuthAppUpdateOne) SetNillableName

func (_u *OAuthAppUpdateOne) SetNillableName(v *string) *OAuthAppUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*OAuthAppUpdateOne) SetNillableOrganizationID

func (_u *OAuthAppUpdateOne) SetNillableOrganizationID(v *uuid.UUID) *OAuthAppUpdateOne

SetNillableOrganizationID sets the "organization_id" field if the given value is not nil.

func (*OAuthAppUpdateOne) SetNillableOwnerID

func (_u *OAuthAppUpdateOne) SetNillableOwnerID(v *uuid.UUID) *OAuthAppUpdateOne

SetNillableOwnerID sets the "owner_id" field if the given value is not nil.

func (*OAuthAppUpdateOne) SetNillablePublic

func (_u *OAuthAppUpdateOne) SetNillablePublic(v *bool) *OAuthAppUpdateOne

SetNillablePublic sets the "public" field if the given value is not nil.

func (*OAuthAppUpdateOne) SetNillableRefreshTokenRotation

func (_u *OAuthAppUpdateOne) SetNillableRefreshTokenRotation(v *bool) *OAuthAppUpdateOne

SetNillableRefreshTokenRotation sets the "refresh_token_rotation" field if the given value is not nil.

func (*OAuthAppUpdateOne) SetNillableRefreshTokenTTL

func (_u *OAuthAppUpdateOne) SetNillableRefreshTokenTTL(v *int) *OAuthAppUpdateOne

SetNillableRefreshTokenTTL sets the "refresh_token_ttl" field if the given value is not nil.

func (*OAuthAppUpdateOne) SetNillableRevokedAt

func (_u *OAuthAppUpdateOne) SetNillableRevokedAt(v *time.Time) *OAuthAppUpdateOne

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*OAuthAppUpdateOne) SetOrganization

func (_u *OAuthAppUpdateOne) SetOrganization(v *Organization) *OAuthAppUpdateOne

SetOrganization sets the "organization" edge to the Organization entity.

func (*OAuthAppUpdateOne) SetOrganizationID

func (_u *OAuthAppUpdateOne) SetOrganizationID(v uuid.UUID) *OAuthAppUpdateOne

SetOrganizationID sets the "organization_id" field.

func (*OAuthAppUpdateOne) SetOwner

func (_u *OAuthAppUpdateOne) SetOwner(v *User) *OAuthAppUpdateOne

SetOwner sets the "owner" edge to the User entity.

func (*OAuthAppUpdateOne) SetOwnerID

func (_u *OAuthAppUpdateOne) SetOwnerID(v uuid.UUID) *OAuthAppUpdateOne

SetOwnerID sets the "owner_id" field.

func (*OAuthAppUpdateOne) SetPublic

func (_u *OAuthAppUpdateOne) SetPublic(v bool) *OAuthAppUpdateOne

SetPublic sets the "public" field.

func (*OAuthAppUpdateOne) SetRedirectUris

func (_u *OAuthAppUpdateOne) SetRedirectUris(v []string) *OAuthAppUpdateOne

SetRedirectUris sets the "redirect_uris" field.

func (*OAuthAppUpdateOne) SetRefreshTokenRotation

func (_u *OAuthAppUpdateOne) SetRefreshTokenRotation(v bool) *OAuthAppUpdateOne

SetRefreshTokenRotation sets the "refresh_token_rotation" field.

func (*OAuthAppUpdateOne) SetRefreshTokenTTL

func (_u *OAuthAppUpdateOne) SetRefreshTokenTTL(v int) *OAuthAppUpdateOne

SetRefreshTokenTTL sets the "refresh_token_ttl" field.

func (*OAuthAppUpdateOne) SetRevokedAt

func (_u *OAuthAppUpdateOne) SetRevokedAt(v time.Time) *OAuthAppUpdateOne

SetRevokedAt sets the "revoked_at" field.

func (*OAuthAppUpdateOne) SetUpdatedAt

func (_u *OAuthAppUpdateOne) SetUpdatedAt(v time.Time) *OAuthAppUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*OAuthAppUpdateOne) Where

Where appends a list predicates to the OAuthAppUpdate builder.

type OAuthAppUpsert

type OAuthAppUpsert struct {
	*sql.UpdateSet
}

OAuthAppUpsert is the "OnConflict" setter.

func (*OAuthAppUpsert) AddAccessTokenTTL

func (u *OAuthAppUpsert) AddAccessTokenTTL(v int) *OAuthAppUpsert

AddAccessTokenTTL adds v to the "access_token_ttl" field.

func (*OAuthAppUpsert) AddRefreshTokenTTL

func (u *OAuthAppUpsert) AddRefreshTokenTTL(v int) *OAuthAppUpsert

AddRefreshTokenTTL adds v to the "refresh_token_ttl" field.

func (*OAuthAppUpsert) ClearDescription

func (u *OAuthAppUpsert) ClearDescription() *OAuthAppUpsert

ClearDescription clears the value of the "description" field.

func (*OAuthAppUpsert) ClearLogoURL

func (u *OAuthAppUpsert) ClearLogoURL() *OAuthAppUpsert

ClearLogoURL clears the value of the "logo_url" field.

func (*OAuthAppUpsert) ClearMetadata

func (u *OAuthAppUpsert) ClearMetadata() *OAuthAppUpsert

ClearMetadata clears the value of the "metadata" field.

func (*OAuthAppUpsert) ClearOrganizationID

func (u *OAuthAppUpsert) ClearOrganizationID() *OAuthAppUpsert

ClearOrganizationID clears the value of the "organization_id" field.

func (*OAuthAppUpsert) ClearRevokedAt

func (u *OAuthAppUpsert) ClearRevokedAt() *OAuthAppUpsert

ClearRevokedAt clears the value of the "revoked_at" field.

func (*OAuthAppUpsert) SetAccessTokenTTL

func (u *OAuthAppUpsert) SetAccessTokenTTL(v int) *OAuthAppUpsert

SetAccessTokenTTL sets the "access_token_ttl" field.

func (*OAuthAppUpsert) SetActive

func (u *OAuthAppUpsert) SetActive(v bool) *OAuthAppUpsert

SetActive sets the "active" field.

func (*OAuthAppUpsert) SetAllowedGrants

func (u *OAuthAppUpsert) SetAllowedGrants(v []string) *OAuthAppUpsert

SetAllowedGrants sets the "allowed_grants" field.

func (*OAuthAppUpsert) SetAllowedResponseTypes

func (u *OAuthAppUpsert) SetAllowedResponseTypes(v []string) *OAuthAppUpsert

SetAllowedResponseTypes sets the "allowed_response_types" field.

func (*OAuthAppUpsert) SetAllowedScopes

func (u *OAuthAppUpsert) SetAllowedScopes(v []string) *OAuthAppUpsert

SetAllowedScopes sets the "allowed_scopes" field.

func (*OAuthAppUpsert) SetAppType

func (u *OAuthAppUpsert) SetAppType(v oauthapp.AppType) *OAuthAppUpsert

SetAppType sets the "app_type" field.

func (*OAuthAppUpsert) SetDescription

func (u *OAuthAppUpsert) SetDescription(v string) *OAuthAppUpsert

SetDescription sets the "description" field.

func (*OAuthAppUpsert) SetFirstParty

func (u *OAuthAppUpsert) SetFirstParty(v bool) *OAuthAppUpsert

SetFirstParty sets the "first_party" field.

func (*OAuthAppUpsert) SetLogoURL

func (u *OAuthAppUpsert) SetLogoURL(v string) *OAuthAppUpsert

SetLogoURL sets the "logo_url" field.

func (*OAuthAppUpsert) SetMetadata

func (u *OAuthAppUpsert) SetMetadata(v map[string]string) *OAuthAppUpsert

SetMetadata sets the "metadata" field.

func (*OAuthAppUpsert) SetName

func (u *OAuthAppUpsert) SetName(v string) *OAuthAppUpsert

SetName sets the "name" field.

func (*OAuthAppUpsert) SetOrganizationID

func (u *OAuthAppUpsert) SetOrganizationID(v uuid.UUID) *OAuthAppUpsert

SetOrganizationID sets the "organization_id" field.

func (*OAuthAppUpsert) SetOwnerID

func (u *OAuthAppUpsert) SetOwnerID(v uuid.UUID) *OAuthAppUpsert

SetOwnerID sets the "owner_id" field.

func (*OAuthAppUpsert) SetPublic

func (u *OAuthAppUpsert) SetPublic(v bool) *OAuthAppUpsert

SetPublic sets the "public" field.

func (*OAuthAppUpsert) SetRedirectUris

func (u *OAuthAppUpsert) SetRedirectUris(v []string) *OAuthAppUpsert

SetRedirectUris sets the "redirect_uris" field.

func (*OAuthAppUpsert) SetRefreshTokenRotation

func (u *OAuthAppUpsert) SetRefreshTokenRotation(v bool) *OAuthAppUpsert

SetRefreshTokenRotation sets the "refresh_token_rotation" field.

func (*OAuthAppUpsert) SetRefreshTokenTTL

func (u *OAuthAppUpsert) SetRefreshTokenTTL(v int) *OAuthAppUpsert

SetRefreshTokenTTL sets the "refresh_token_ttl" field.

func (*OAuthAppUpsert) SetRevokedAt

func (u *OAuthAppUpsert) SetRevokedAt(v time.Time) *OAuthAppUpsert

SetRevokedAt sets the "revoked_at" field.

func (*OAuthAppUpsert) SetUpdatedAt

func (u *OAuthAppUpsert) SetUpdatedAt(v time.Time) *OAuthAppUpsert

SetUpdatedAt sets the "updated_at" field.

func (*OAuthAppUpsert) UpdateAccessTokenTTL

func (u *OAuthAppUpsert) UpdateAccessTokenTTL() *OAuthAppUpsert

UpdateAccessTokenTTL sets the "access_token_ttl" field to the value that was provided on create.

func (*OAuthAppUpsert) UpdateActive

func (u *OAuthAppUpsert) UpdateActive() *OAuthAppUpsert

UpdateActive sets the "active" field to the value that was provided on create.

func (*OAuthAppUpsert) UpdateAllowedGrants

func (u *OAuthAppUpsert) UpdateAllowedGrants() *OAuthAppUpsert

UpdateAllowedGrants sets the "allowed_grants" field to the value that was provided on create.

func (*OAuthAppUpsert) UpdateAllowedResponseTypes

func (u *OAuthAppUpsert) UpdateAllowedResponseTypes() *OAuthAppUpsert

UpdateAllowedResponseTypes sets the "allowed_response_types" field to the value that was provided on create.

func (*OAuthAppUpsert) UpdateAllowedScopes

func (u *OAuthAppUpsert) UpdateAllowedScopes() *OAuthAppUpsert

UpdateAllowedScopes sets the "allowed_scopes" field to the value that was provided on create.

func (*OAuthAppUpsert) UpdateAppType

func (u *OAuthAppUpsert) UpdateAppType() *OAuthAppUpsert

UpdateAppType sets the "app_type" field to the value that was provided on create.

func (*OAuthAppUpsert) UpdateDescription

func (u *OAuthAppUpsert) UpdateDescription() *OAuthAppUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*OAuthAppUpsert) UpdateFirstParty

func (u *OAuthAppUpsert) UpdateFirstParty() *OAuthAppUpsert

UpdateFirstParty sets the "first_party" field to the value that was provided on create.

func (*OAuthAppUpsert) UpdateLogoURL

func (u *OAuthAppUpsert) UpdateLogoURL() *OAuthAppUpsert

UpdateLogoURL sets the "logo_url" field to the value that was provided on create.

func (*OAuthAppUpsert) UpdateMetadata

func (u *OAuthAppUpsert) UpdateMetadata() *OAuthAppUpsert

UpdateMetadata sets the "metadata" field to the value that was provided on create.

func (*OAuthAppUpsert) UpdateName

func (u *OAuthAppUpsert) UpdateName() *OAuthAppUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*OAuthAppUpsert) UpdateOrganizationID

func (u *OAuthAppUpsert) UpdateOrganizationID() *OAuthAppUpsert

UpdateOrganizationID sets the "organization_id" field to the value that was provided on create.

func (*OAuthAppUpsert) UpdateOwnerID

func (u *OAuthAppUpsert) UpdateOwnerID() *OAuthAppUpsert

UpdateOwnerID sets the "owner_id" field to the value that was provided on create.

func (*OAuthAppUpsert) UpdatePublic

func (u *OAuthAppUpsert) UpdatePublic() *OAuthAppUpsert

UpdatePublic sets the "public" field to the value that was provided on create.

func (*OAuthAppUpsert) UpdateRedirectUris

func (u *OAuthAppUpsert) UpdateRedirectUris() *OAuthAppUpsert

UpdateRedirectUris sets the "redirect_uris" field to the value that was provided on create.

func (*OAuthAppUpsert) UpdateRefreshTokenRotation

func (u *OAuthAppUpsert) UpdateRefreshTokenRotation() *OAuthAppUpsert

UpdateRefreshTokenRotation sets the "refresh_token_rotation" field to the value that was provided on create.

func (*OAuthAppUpsert) UpdateRefreshTokenTTL

func (u *OAuthAppUpsert) UpdateRefreshTokenTTL() *OAuthAppUpsert

UpdateRefreshTokenTTL sets the "refresh_token_ttl" field to the value that was provided on create.

func (*OAuthAppUpsert) UpdateRevokedAt

func (u *OAuthAppUpsert) UpdateRevokedAt() *OAuthAppUpsert

UpdateRevokedAt sets the "revoked_at" field to the value that was provided on create.

func (*OAuthAppUpsert) UpdateUpdatedAt

func (u *OAuthAppUpsert) UpdateUpdatedAt() *OAuthAppUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type OAuthAppUpsertBulk

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

OAuthAppUpsertBulk is the builder for "upsert"-ing a bulk of OAuthApp nodes.

func (*OAuthAppUpsertBulk) AddAccessTokenTTL

func (u *OAuthAppUpsertBulk) AddAccessTokenTTL(v int) *OAuthAppUpsertBulk

AddAccessTokenTTL adds v to the "access_token_ttl" field.

func (*OAuthAppUpsertBulk) AddRefreshTokenTTL

func (u *OAuthAppUpsertBulk) AddRefreshTokenTTL(v int) *OAuthAppUpsertBulk

AddRefreshTokenTTL adds v to the "refresh_token_ttl" field.

func (*OAuthAppUpsertBulk) ClearDescription

func (u *OAuthAppUpsertBulk) ClearDescription() *OAuthAppUpsertBulk

ClearDescription clears the value of the "description" field.

func (*OAuthAppUpsertBulk) ClearLogoURL

func (u *OAuthAppUpsertBulk) ClearLogoURL() *OAuthAppUpsertBulk

ClearLogoURL clears the value of the "logo_url" field.

func (*OAuthAppUpsertBulk) ClearMetadata

func (u *OAuthAppUpsertBulk) ClearMetadata() *OAuthAppUpsertBulk

ClearMetadata clears the value of the "metadata" field.

func (*OAuthAppUpsertBulk) ClearOrganizationID

func (u *OAuthAppUpsertBulk) ClearOrganizationID() *OAuthAppUpsertBulk

ClearOrganizationID clears the value of the "organization_id" field.

func (*OAuthAppUpsertBulk) ClearRevokedAt

func (u *OAuthAppUpsertBulk) ClearRevokedAt() *OAuthAppUpsertBulk

ClearRevokedAt clears the value of the "revoked_at" field.

func (*OAuthAppUpsertBulk) DoNothing

func (u *OAuthAppUpsertBulk) DoNothing() *OAuthAppUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OAuthAppUpsertBulk) Exec

func (u *OAuthAppUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*OAuthAppUpsertBulk) ExecX

func (u *OAuthAppUpsertBulk) ExecX(ctx context.Context)

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

func (*OAuthAppUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OAuthApp.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*OAuthAppUpsertBulk) SetAccessTokenTTL

func (u *OAuthAppUpsertBulk) SetAccessTokenTTL(v int) *OAuthAppUpsertBulk

SetAccessTokenTTL sets the "access_token_ttl" field.

func (*OAuthAppUpsertBulk) SetActive

func (u *OAuthAppUpsertBulk) SetActive(v bool) *OAuthAppUpsertBulk

SetActive sets the "active" field.

func (*OAuthAppUpsertBulk) SetAllowedGrants

func (u *OAuthAppUpsertBulk) SetAllowedGrants(v []string) *OAuthAppUpsertBulk

SetAllowedGrants sets the "allowed_grants" field.

func (*OAuthAppUpsertBulk) SetAllowedResponseTypes

func (u *OAuthAppUpsertBulk) SetAllowedResponseTypes(v []string) *OAuthAppUpsertBulk

SetAllowedResponseTypes sets the "allowed_response_types" field.

func (*OAuthAppUpsertBulk) SetAllowedScopes

func (u *OAuthAppUpsertBulk) SetAllowedScopes(v []string) *OAuthAppUpsertBulk

SetAllowedScopes sets the "allowed_scopes" field.

func (*OAuthAppUpsertBulk) SetAppType

SetAppType sets the "app_type" field.

func (*OAuthAppUpsertBulk) SetDescription

func (u *OAuthAppUpsertBulk) SetDescription(v string) *OAuthAppUpsertBulk

SetDescription sets the "description" field.

func (*OAuthAppUpsertBulk) SetFirstParty

func (u *OAuthAppUpsertBulk) SetFirstParty(v bool) *OAuthAppUpsertBulk

SetFirstParty sets the "first_party" field.

func (*OAuthAppUpsertBulk) SetLogoURL

func (u *OAuthAppUpsertBulk) SetLogoURL(v string) *OAuthAppUpsertBulk

SetLogoURL sets the "logo_url" field.

func (*OAuthAppUpsertBulk) SetMetadata

func (u *OAuthAppUpsertBulk) SetMetadata(v map[string]string) *OAuthAppUpsertBulk

SetMetadata sets the "metadata" field.

func (*OAuthAppUpsertBulk) SetName

SetName sets the "name" field.

func (*OAuthAppUpsertBulk) SetOrganizationID

func (u *OAuthAppUpsertBulk) SetOrganizationID(v uuid.UUID) *OAuthAppUpsertBulk

SetOrganizationID sets the "organization_id" field.

func (*OAuthAppUpsertBulk) SetOwnerID

func (u *OAuthAppUpsertBulk) SetOwnerID(v uuid.UUID) *OAuthAppUpsertBulk

SetOwnerID sets the "owner_id" field.

func (*OAuthAppUpsertBulk) SetPublic

func (u *OAuthAppUpsertBulk) SetPublic(v bool) *OAuthAppUpsertBulk

SetPublic sets the "public" field.

func (*OAuthAppUpsertBulk) SetRedirectUris

func (u *OAuthAppUpsertBulk) SetRedirectUris(v []string) *OAuthAppUpsertBulk

SetRedirectUris sets the "redirect_uris" field.

func (*OAuthAppUpsertBulk) SetRefreshTokenRotation

func (u *OAuthAppUpsertBulk) SetRefreshTokenRotation(v bool) *OAuthAppUpsertBulk

SetRefreshTokenRotation sets the "refresh_token_rotation" field.

func (*OAuthAppUpsertBulk) SetRefreshTokenTTL

func (u *OAuthAppUpsertBulk) SetRefreshTokenTTL(v int) *OAuthAppUpsertBulk

SetRefreshTokenTTL sets the "refresh_token_ttl" field.

func (*OAuthAppUpsertBulk) SetRevokedAt

func (u *OAuthAppUpsertBulk) SetRevokedAt(v time.Time) *OAuthAppUpsertBulk

SetRevokedAt sets the "revoked_at" field.

func (*OAuthAppUpsertBulk) SetUpdatedAt

func (u *OAuthAppUpsertBulk) SetUpdatedAt(v time.Time) *OAuthAppUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*OAuthAppUpsertBulk) Update

func (u *OAuthAppUpsertBulk) Update(set func(*OAuthAppUpsert)) *OAuthAppUpsertBulk

Update allows overriding fields `UPDATE` values. See the OAuthAppCreateBulk.OnConflict documentation for more info.

func (*OAuthAppUpsertBulk) UpdateAccessTokenTTL

func (u *OAuthAppUpsertBulk) UpdateAccessTokenTTL() *OAuthAppUpsertBulk

UpdateAccessTokenTTL sets the "access_token_ttl" field to the value that was provided on create.

func (*OAuthAppUpsertBulk) UpdateActive

func (u *OAuthAppUpsertBulk) UpdateActive() *OAuthAppUpsertBulk

UpdateActive sets the "active" field to the value that was provided on create.

func (*OAuthAppUpsertBulk) UpdateAllowedGrants

func (u *OAuthAppUpsertBulk) UpdateAllowedGrants() *OAuthAppUpsertBulk

UpdateAllowedGrants sets the "allowed_grants" field to the value that was provided on create.

func (*OAuthAppUpsertBulk) UpdateAllowedResponseTypes

func (u *OAuthAppUpsertBulk) UpdateAllowedResponseTypes() *OAuthAppUpsertBulk

UpdateAllowedResponseTypes sets the "allowed_response_types" field to the value that was provided on create.

func (*OAuthAppUpsertBulk) UpdateAllowedScopes

func (u *OAuthAppUpsertBulk) UpdateAllowedScopes() *OAuthAppUpsertBulk

UpdateAllowedScopes sets the "allowed_scopes" field to the value that was provided on create.

func (*OAuthAppUpsertBulk) UpdateAppType

func (u *OAuthAppUpsertBulk) UpdateAppType() *OAuthAppUpsertBulk

UpdateAppType sets the "app_type" field to the value that was provided on create.

func (*OAuthAppUpsertBulk) UpdateDescription

func (u *OAuthAppUpsertBulk) UpdateDescription() *OAuthAppUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*OAuthAppUpsertBulk) UpdateFirstParty

func (u *OAuthAppUpsertBulk) UpdateFirstParty() *OAuthAppUpsertBulk

UpdateFirstParty sets the "first_party" field to the value that was provided on create.

func (*OAuthAppUpsertBulk) UpdateLogoURL

func (u *OAuthAppUpsertBulk) UpdateLogoURL() *OAuthAppUpsertBulk

UpdateLogoURL sets the "logo_url" field to the value that was provided on create.

func (*OAuthAppUpsertBulk) UpdateMetadata

func (u *OAuthAppUpsertBulk) UpdateMetadata() *OAuthAppUpsertBulk

UpdateMetadata sets the "metadata" field to the value that was provided on create.

func (*OAuthAppUpsertBulk) UpdateName

func (u *OAuthAppUpsertBulk) UpdateName() *OAuthAppUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*OAuthAppUpsertBulk) UpdateNewValues

func (u *OAuthAppUpsertBulk) UpdateNewValues() *OAuthAppUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.OAuthApp.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(oauthapp.FieldID)
		}),
	).
	Exec(ctx)

func (*OAuthAppUpsertBulk) UpdateOrganizationID

func (u *OAuthAppUpsertBulk) UpdateOrganizationID() *OAuthAppUpsertBulk

UpdateOrganizationID sets the "organization_id" field to the value that was provided on create.

func (*OAuthAppUpsertBulk) UpdateOwnerID

func (u *OAuthAppUpsertBulk) UpdateOwnerID() *OAuthAppUpsertBulk

UpdateOwnerID sets the "owner_id" field to the value that was provided on create.

func (*OAuthAppUpsertBulk) UpdatePublic

func (u *OAuthAppUpsertBulk) UpdatePublic() *OAuthAppUpsertBulk

UpdatePublic sets the "public" field to the value that was provided on create.

func (*OAuthAppUpsertBulk) UpdateRedirectUris

func (u *OAuthAppUpsertBulk) UpdateRedirectUris() *OAuthAppUpsertBulk

UpdateRedirectUris sets the "redirect_uris" field to the value that was provided on create.

func (*OAuthAppUpsertBulk) UpdateRefreshTokenRotation

func (u *OAuthAppUpsertBulk) UpdateRefreshTokenRotation() *OAuthAppUpsertBulk

UpdateRefreshTokenRotation sets the "refresh_token_rotation" field to the value that was provided on create.

func (*OAuthAppUpsertBulk) UpdateRefreshTokenTTL

func (u *OAuthAppUpsertBulk) UpdateRefreshTokenTTL() *OAuthAppUpsertBulk

UpdateRefreshTokenTTL sets the "refresh_token_ttl" field to the value that was provided on create.

func (*OAuthAppUpsertBulk) UpdateRevokedAt

func (u *OAuthAppUpsertBulk) UpdateRevokedAt() *OAuthAppUpsertBulk

UpdateRevokedAt sets the "revoked_at" field to the value that was provided on create.

func (*OAuthAppUpsertBulk) UpdateUpdatedAt

func (u *OAuthAppUpsertBulk) UpdateUpdatedAt() *OAuthAppUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type OAuthAppUpsertOne

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

OAuthAppUpsertOne is the builder for "upsert"-ing

one OAuthApp node.

func (*OAuthAppUpsertOne) AddAccessTokenTTL

func (u *OAuthAppUpsertOne) AddAccessTokenTTL(v int) *OAuthAppUpsertOne

AddAccessTokenTTL adds v to the "access_token_ttl" field.

func (*OAuthAppUpsertOne) AddRefreshTokenTTL

func (u *OAuthAppUpsertOne) AddRefreshTokenTTL(v int) *OAuthAppUpsertOne

AddRefreshTokenTTL adds v to the "refresh_token_ttl" field.

func (*OAuthAppUpsertOne) ClearDescription

func (u *OAuthAppUpsertOne) ClearDescription() *OAuthAppUpsertOne

ClearDescription clears the value of the "description" field.

func (*OAuthAppUpsertOne) ClearLogoURL

func (u *OAuthAppUpsertOne) ClearLogoURL() *OAuthAppUpsertOne

ClearLogoURL clears the value of the "logo_url" field.

func (*OAuthAppUpsertOne) ClearMetadata

func (u *OAuthAppUpsertOne) ClearMetadata() *OAuthAppUpsertOne

ClearMetadata clears the value of the "metadata" field.

func (*OAuthAppUpsertOne) ClearOrganizationID

func (u *OAuthAppUpsertOne) ClearOrganizationID() *OAuthAppUpsertOne

ClearOrganizationID clears the value of the "organization_id" field.

func (*OAuthAppUpsertOne) ClearRevokedAt

func (u *OAuthAppUpsertOne) ClearRevokedAt() *OAuthAppUpsertOne

ClearRevokedAt clears the value of the "revoked_at" field.

func (*OAuthAppUpsertOne) DoNothing

func (u *OAuthAppUpsertOne) DoNothing() *OAuthAppUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OAuthAppUpsertOne) Exec

func (u *OAuthAppUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*OAuthAppUpsertOne) ExecX

func (u *OAuthAppUpsertOne) ExecX(ctx context.Context)

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

func (*OAuthAppUpsertOne) ID

func (u *OAuthAppUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*OAuthAppUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*OAuthAppUpsertOne) Ignore

func (u *OAuthAppUpsertOne) Ignore() *OAuthAppUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OAuthApp.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*OAuthAppUpsertOne) SetAccessTokenTTL

func (u *OAuthAppUpsertOne) SetAccessTokenTTL(v int) *OAuthAppUpsertOne

SetAccessTokenTTL sets the "access_token_ttl" field.

func (*OAuthAppUpsertOne) SetActive

func (u *OAuthAppUpsertOne) SetActive(v bool) *OAuthAppUpsertOne

SetActive sets the "active" field.

func (*OAuthAppUpsertOne) SetAllowedGrants

func (u *OAuthAppUpsertOne) SetAllowedGrants(v []string) *OAuthAppUpsertOne

SetAllowedGrants sets the "allowed_grants" field.

func (*OAuthAppUpsertOne) SetAllowedResponseTypes

func (u *OAuthAppUpsertOne) SetAllowedResponseTypes(v []string) *OAuthAppUpsertOne

SetAllowedResponseTypes sets the "allowed_response_types" field.

func (*OAuthAppUpsertOne) SetAllowedScopes

func (u *OAuthAppUpsertOne) SetAllowedScopes(v []string) *OAuthAppUpsertOne

SetAllowedScopes sets the "allowed_scopes" field.

func (*OAuthAppUpsertOne) SetAppType

SetAppType sets the "app_type" field.

func (*OAuthAppUpsertOne) SetDescription

func (u *OAuthAppUpsertOne) SetDescription(v string) *OAuthAppUpsertOne

SetDescription sets the "description" field.

func (*OAuthAppUpsertOne) SetFirstParty

func (u *OAuthAppUpsertOne) SetFirstParty(v bool) *OAuthAppUpsertOne

SetFirstParty sets the "first_party" field.

func (*OAuthAppUpsertOne) SetLogoURL

func (u *OAuthAppUpsertOne) SetLogoURL(v string) *OAuthAppUpsertOne

SetLogoURL sets the "logo_url" field.

func (*OAuthAppUpsertOne) SetMetadata

func (u *OAuthAppUpsertOne) SetMetadata(v map[string]string) *OAuthAppUpsertOne

SetMetadata sets the "metadata" field.

func (*OAuthAppUpsertOne) SetName

SetName sets the "name" field.

func (*OAuthAppUpsertOne) SetOrganizationID

func (u *OAuthAppUpsertOne) SetOrganizationID(v uuid.UUID) *OAuthAppUpsertOne

SetOrganizationID sets the "organization_id" field.

func (*OAuthAppUpsertOne) SetOwnerID

func (u *OAuthAppUpsertOne) SetOwnerID(v uuid.UUID) *OAuthAppUpsertOne

SetOwnerID sets the "owner_id" field.

func (*OAuthAppUpsertOne) SetPublic

func (u *OAuthAppUpsertOne) SetPublic(v bool) *OAuthAppUpsertOne

SetPublic sets the "public" field.

func (*OAuthAppUpsertOne) SetRedirectUris

func (u *OAuthAppUpsertOne) SetRedirectUris(v []string) *OAuthAppUpsertOne

SetRedirectUris sets the "redirect_uris" field.

func (*OAuthAppUpsertOne) SetRefreshTokenRotation

func (u *OAuthAppUpsertOne) SetRefreshTokenRotation(v bool) *OAuthAppUpsertOne

SetRefreshTokenRotation sets the "refresh_token_rotation" field.

func (*OAuthAppUpsertOne) SetRefreshTokenTTL

func (u *OAuthAppUpsertOne) SetRefreshTokenTTL(v int) *OAuthAppUpsertOne

SetRefreshTokenTTL sets the "refresh_token_ttl" field.

func (*OAuthAppUpsertOne) SetRevokedAt

func (u *OAuthAppUpsertOne) SetRevokedAt(v time.Time) *OAuthAppUpsertOne

SetRevokedAt sets the "revoked_at" field.

func (*OAuthAppUpsertOne) SetUpdatedAt

func (u *OAuthAppUpsertOne) SetUpdatedAt(v time.Time) *OAuthAppUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*OAuthAppUpsertOne) Update

func (u *OAuthAppUpsertOne) Update(set func(*OAuthAppUpsert)) *OAuthAppUpsertOne

Update allows overriding fields `UPDATE` values. See the OAuthAppCreate.OnConflict documentation for more info.

func (*OAuthAppUpsertOne) UpdateAccessTokenTTL

func (u *OAuthAppUpsertOne) UpdateAccessTokenTTL() *OAuthAppUpsertOne

UpdateAccessTokenTTL sets the "access_token_ttl" field to the value that was provided on create.

func (*OAuthAppUpsertOne) UpdateActive

func (u *OAuthAppUpsertOne) UpdateActive() *OAuthAppUpsertOne

UpdateActive sets the "active" field to the value that was provided on create.

func (*OAuthAppUpsertOne) UpdateAllowedGrants

func (u *OAuthAppUpsertOne) UpdateAllowedGrants() *OAuthAppUpsertOne

UpdateAllowedGrants sets the "allowed_grants" field to the value that was provided on create.

func (*OAuthAppUpsertOne) UpdateAllowedResponseTypes

func (u *OAuthAppUpsertOne) UpdateAllowedResponseTypes() *OAuthAppUpsertOne

UpdateAllowedResponseTypes sets the "allowed_response_types" field to the value that was provided on create.

func (*OAuthAppUpsertOne) UpdateAllowedScopes

func (u *OAuthAppUpsertOne) UpdateAllowedScopes() *OAuthAppUpsertOne

UpdateAllowedScopes sets the "allowed_scopes" field to the value that was provided on create.

func (*OAuthAppUpsertOne) UpdateAppType

func (u *OAuthAppUpsertOne) UpdateAppType() *OAuthAppUpsertOne

UpdateAppType sets the "app_type" field to the value that was provided on create.

func (*OAuthAppUpsertOne) UpdateDescription

func (u *OAuthAppUpsertOne) UpdateDescription() *OAuthAppUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*OAuthAppUpsertOne) UpdateFirstParty

func (u *OAuthAppUpsertOne) UpdateFirstParty() *OAuthAppUpsertOne

UpdateFirstParty sets the "first_party" field to the value that was provided on create.

func (*OAuthAppUpsertOne) UpdateLogoURL

func (u *OAuthAppUpsertOne) UpdateLogoURL() *OAuthAppUpsertOne

UpdateLogoURL sets the "logo_url" field to the value that was provided on create.

func (*OAuthAppUpsertOne) UpdateMetadata

func (u *OAuthAppUpsertOne) UpdateMetadata() *OAuthAppUpsertOne

UpdateMetadata sets the "metadata" field to the value that was provided on create.

func (*OAuthAppUpsertOne) UpdateName

func (u *OAuthAppUpsertOne) UpdateName() *OAuthAppUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*OAuthAppUpsertOne) UpdateNewValues

func (u *OAuthAppUpsertOne) UpdateNewValues() *OAuthAppUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.OAuthApp.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(oauthapp.FieldID)
		}),
	).
	Exec(ctx)

func (*OAuthAppUpsertOne) UpdateOrganizationID

func (u *OAuthAppUpsertOne) UpdateOrganizationID() *OAuthAppUpsertOne

UpdateOrganizationID sets the "organization_id" field to the value that was provided on create.

func (*OAuthAppUpsertOne) UpdateOwnerID

func (u *OAuthAppUpsertOne) UpdateOwnerID() *OAuthAppUpsertOne

UpdateOwnerID sets the "owner_id" field to the value that was provided on create.

func (*OAuthAppUpsertOne) UpdatePublic

func (u *OAuthAppUpsertOne) UpdatePublic() *OAuthAppUpsertOne

UpdatePublic sets the "public" field to the value that was provided on create.

func (*OAuthAppUpsertOne) UpdateRedirectUris

func (u *OAuthAppUpsertOne) UpdateRedirectUris() *OAuthAppUpsertOne

UpdateRedirectUris sets the "redirect_uris" field to the value that was provided on create.

func (*OAuthAppUpsertOne) UpdateRefreshTokenRotation

func (u *OAuthAppUpsertOne) UpdateRefreshTokenRotation() *OAuthAppUpsertOne

UpdateRefreshTokenRotation sets the "refresh_token_rotation" field to the value that was provided on create.

func (*OAuthAppUpsertOne) UpdateRefreshTokenTTL

func (u *OAuthAppUpsertOne) UpdateRefreshTokenTTL() *OAuthAppUpsertOne

UpdateRefreshTokenTTL sets the "refresh_token_ttl" field to the value that was provided on create.

func (*OAuthAppUpsertOne) UpdateRevokedAt

func (u *OAuthAppUpsertOne) UpdateRevokedAt() *OAuthAppUpsertOne

UpdateRevokedAt sets the "revoked_at" field to the value that was provided on create.

func (*OAuthAppUpsertOne) UpdateUpdatedAt

func (u *OAuthAppUpsertOne) UpdateUpdatedAt() *OAuthAppUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type OAuthApps

type OAuthApps []*OAuthApp

OAuthApps is a parsable slice of OAuthApp.

type OAuthAuthCode

type OAuthAuthCode struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// SHA256 signature of the authorization code
	CodeSignature string `json:"code_signature,omitempty"`
	// OAuth app this code was issued to
	AppID uuid.UUID `json:"app_id,omitempty"`
	// User who authorized
	UserID uuid.UUID `json:"user_id,omitempty"`
	// PKCE code challenge
	CodeChallenge string `json:"code_challenge,omitempty"`
	// PKCE challenge method (S256)
	CodeChallengeMethod string `json:"code_challenge_method,omitempty"`
	// Redirect URI from authorization request
	RedirectURI string `json:"redirect_uri,omitempty"`
	// Requested scopes
	Scopes []string `json:"scopes,omitempty"`
	// State parameter from request
	State string `json:"state,omitempty"`
	// OIDC nonce
	Nonce string `json:"nonce,omitempty"`
	// Serialized Fosite request
	RequestData string `json:"request_data,omitempty"`
	// When this code expires (short-lived, ~10 min)
	ExpiresAt time.Time `json:"expires_at,omitempty"`
	// Whether code has been exchanged
	Used bool `json:"used,omitempty"`
	// UsedAt holds the value of the "used_at" field.
	UsedAt *time.Time `json:"used_at,omitempty"`
	// ClientIP holds the value of the "client_ip" field.
	ClientIP string `json:"client_ip,omitempty"`
	// UserAgent holds the value of the "user_agent" field.
	UserAgent string `json:"user_agent,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the OAuthAuthCodeQuery when eager-loading is set.
	Edges OAuthAuthCodeEdges `json:"edges"`
	// contains filtered or unexported fields
}

OAuthAuthCode is the model entity for the OAuthAuthCode schema.

func (*OAuthAuthCode) QueryApp

func (_m *OAuthAuthCode) QueryApp() *OAuthAppQuery

QueryApp queries the "app" edge of the OAuthAuthCode entity.

func (*OAuthAuthCode) QueryUser

func (_m *OAuthAuthCode) QueryUser() *UserQuery

QueryUser queries the "user" edge of the OAuthAuthCode entity.

func (*OAuthAuthCode) String

func (_m *OAuthAuthCode) String() string

String implements the fmt.Stringer.

func (*OAuthAuthCode) Unwrap

func (_m *OAuthAuthCode) Unwrap() *OAuthAuthCode

Unwrap unwraps the OAuthAuthCode 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 (*OAuthAuthCode) Update

func (_m *OAuthAuthCode) Update() *OAuthAuthCodeUpdateOne

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

func (*OAuthAuthCode) Value

func (_m *OAuthAuthCode) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the OAuthAuthCode. This includes values selected through modifiers, order, etc.

type OAuthAuthCodeClient

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

OAuthAuthCodeClient is a client for the OAuthAuthCode schema.

func NewOAuthAuthCodeClient

func NewOAuthAuthCodeClient(c config) *OAuthAuthCodeClient

NewOAuthAuthCodeClient returns a client for the OAuthAuthCode from the given config.

func (*OAuthAuthCodeClient) Create

Create returns a builder for creating a OAuthAuthCode entity.

func (*OAuthAuthCodeClient) CreateBulk

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

func (*OAuthAuthCodeClient) Delete

Delete returns a delete builder for OAuthAuthCode.

func (*OAuthAuthCodeClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OAuthAuthCodeClient) DeleteOneID

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

func (*OAuthAuthCodeClient) Get

Get returns a OAuthAuthCode entity by its id.

func (*OAuthAuthCodeClient) GetX

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

func (*OAuthAuthCodeClient) Hooks

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

Hooks returns the client hooks.

func (*OAuthAuthCodeClient) Intercept

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

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

func (*OAuthAuthCodeClient) Interceptors

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

Interceptors returns the client interceptors.

func (*OAuthAuthCodeClient) MapCreateBulk

func (c *OAuthAuthCodeClient) MapCreateBulk(slice any, setFunc func(*OAuthAuthCodeCreate, int)) *OAuthAuthCodeCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*OAuthAuthCodeClient) Query

Query returns a query builder for OAuthAuthCode.

func (*OAuthAuthCodeClient) QueryApp

QueryApp queries the app edge of a OAuthAuthCode.

func (*OAuthAuthCodeClient) QueryUser

func (c *OAuthAuthCodeClient) QueryUser(_m *OAuthAuthCode) *UserQuery

QueryUser queries the user edge of a OAuthAuthCode.

func (*OAuthAuthCodeClient) Update

Update returns an update builder for OAuthAuthCode.

func (*OAuthAuthCodeClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*OAuthAuthCodeClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*OAuthAuthCodeClient) Use

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

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

type OAuthAuthCodeCreate

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

OAuthAuthCodeCreate is the builder for creating a OAuthAuthCode entity.

func (*OAuthAuthCodeCreate) Exec

func (_c *OAuthAuthCodeCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OAuthAuthCodeCreate) ExecX

func (_c *OAuthAuthCodeCreate) ExecX(ctx context.Context)

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

func (*OAuthAuthCodeCreate) Mutation

Mutation returns the OAuthAuthCodeMutation object of the builder.

func (*OAuthAuthCodeCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OAuthAuthCode.Create().
	SetCodeSignature(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OAuthAuthCodeUpsert) {
		SetCodeSignature(v+v).
	}).
	Exec(ctx)

func (*OAuthAuthCodeCreate) OnConflictColumns

func (_c *OAuthAuthCodeCreate) OnConflictColumns(columns ...string) *OAuthAuthCodeUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OAuthAuthCode.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OAuthAuthCodeCreate) Save

Save creates the OAuthAuthCode in the database.

func (*OAuthAuthCodeCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*OAuthAuthCodeCreate) SetApp

SetApp sets the "app" edge to the OAuthApp entity.

func (*OAuthAuthCodeCreate) SetAppID

SetAppID sets the "app_id" field.

func (*OAuthAuthCodeCreate) SetClientIP

func (_c *OAuthAuthCodeCreate) SetClientIP(v string) *OAuthAuthCodeCreate

SetClientIP sets the "client_ip" field.

func (*OAuthAuthCodeCreate) SetCodeChallenge

func (_c *OAuthAuthCodeCreate) SetCodeChallenge(v string) *OAuthAuthCodeCreate

SetCodeChallenge sets the "code_challenge" field.

func (*OAuthAuthCodeCreate) SetCodeChallengeMethod

func (_c *OAuthAuthCodeCreate) SetCodeChallengeMethod(v string) *OAuthAuthCodeCreate

SetCodeChallengeMethod sets the "code_challenge_method" field.

func (*OAuthAuthCodeCreate) SetCodeSignature

func (_c *OAuthAuthCodeCreate) SetCodeSignature(v string) *OAuthAuthCodeCreate

SetCodeSignature sets the "code_signature" field.

func (*OAuthAuthCodeCreate) SetCreatedAt

func (_c *OAuthAuthCodeCreate) SetCreatedAt(v time.Time) *OAuthAuthCodeCreate

SetCreatedAt sets the "created_at" field.

func (*OAuthAuthCodeCreate) SetExpiresAt

func (_c *OAuthAuthCodeCreate) SetExpiresAt(v time.Time) *OAuthAuthCodeCreate

SetExpiresAt sets the "expires_at" field.

func (*OAuthAuthCodeCreate) SetID

SetID sets the "id" field.

func (*OAuthAuthCodeCreate) SetNillableClientIP

func (_c *OAuthAuthCodeCreate) SetNillableClientIP(v *string) *OAuthAuthCodeCreate

SetNillableClientIP sets the "client_ip" field if the given value is not nil.

func (*OAuthAuthCodeCreate) SetNillableCodeChallenge

func (_c *OAuthAuthCodeCreate) SetNillableCodeChallenge(v *string) *OAuthAuthCodeCreate

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

func (*OAuthAuthCodeCreate) SetNillableCodeChallengeMethod

func (_c *OAuthAuthCodeCreate) SetNillableCodeChallengeMethod(v *string) *OAuthAuthCodeCreate

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

func (*OAuthAuthCodeCreate) SetNillableCreatedAt

func (_c *OAuthAuthCodeCreate) SetNillableCreatedAt(v *time.Time) *OAuthAuthCodeCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*OAuthAuthCodeCreate) SetNillableID

func (_c *OAuthAuthCodeCreate) SetNillableID(v *uuid.UUID) *OAuthAuthCodeCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*OAuthAuthCodeCreate) SetNillableNonce

func (_c *OAuthAuthCodeCreate) SetNillableNonce(v *string) *OAuthAuthCodeCreate

SetNillableNonce sets the "nonce" field if the given value is not nil.

func (*OAuthAuthCodeCreate) SetNillableRequestData

func (_c *OAuthAuthCodeCreate) SetNillableRequestData(v *string) *OAuthAuthCodeCreate

SetNillableRequestData sets the "request_data" field if the given value is not nil.

func (*OAuthAuthCodeCreate) SetNillableState

func (_c *OAuthAuthCodeCreate) SetNillableState(v *string) *OAuthAuthCodeCreate

SetNillableState sets the "state" field if the given value is not nil.

func (*OAuthAuthCodeCreate) SetNillableUsed

func (_c *OAuthAuthCodeCreate) SetNillableUsed(v *bool) *OAuthAuthCodeCreate

SetNillableUsed sets the "used" field if the given value is not nil.

func (*OAuthAuthCodeCreate) SetNillableUsedAt

func (_c *OAuthAuthCodeCreate) SetNillableUsedAt(v *time.Time) *OAuthAuthCodeCreate

SetNillableUsedAt sets the "used_at" field if the given value is not nil.

func (*OAuthAuthCodeCreate) SetNillableUserAgent

func (_c *OAuthAuthCodeCreate) SetNillableUserAgent(v *string) *OAuthAuthCodeCreate

SetNillableUserAgent sets the "user_agent" field if the given value is not nil.

func (*OAuthAuthCodeCreate) SetNonce

SetNonce sets the "nonce" field.

func (*OAuthAuthCodeCreate) SetRedirectURI

func (_c *OAuthAuthCodeCreate) SetRedirectURI(v string) *OAuthAuthCodeCreate

SetRedirectURI sets the "redirect_uri" field.

func (*OAuthAuthCodeCreate) SetRequestData

func (_c *OAuthAuthCodeCreate) SetRequestData(v string) *OAuthAuthCodeCreate

SetRequestData sets the "request_data" field.

func (*OAuthAuthCodeCreate) SetScopes

func (_c *OAuthAuthCodeCreate) SetScopes(v []string) *OAuthAuthCodeCreate

SetScopes sets the "scopes" field.

func (*OAuthAuthCodeCreate) SetState

SetState sets the "state" field.

func (*OAuthAuthCodeCreate) SetUsed

SetUsed sets the "used" field.

func (*OAuthAuthCodeCreate) SetUsedAt

SetUsedAt sets the "used_at" field.

func (*OAuthAuthCodeCreate) SetUser

func (_c *OAuthAuthCodeCreate) SetUser(v *User) *OAuthAuthCodeCreate

SetUser sets the "user" edge to the User entity.

func (*OAuthAuthCodeCreate) SetUserAgent

func (_c *OAuthAuthCodeCreate) SetUserAgent(v string) *OAuthAuthCodeCreate

SetUserAgent sets the "user_agent" field.

func (*OAuthAuthCodeCreate) SetUserID

SetUserID sets the "user_id" field.

type OAuthAuthCodeCreateBulk

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

OAuthAuthCodeCreateBulk is the builder for creating many OAuthAuthCode entities in bulk.

func (*OAuthAuthCodeCreateBulk) Exec

Exec executes the query.

func (*OAuthAuthCodeCreateBulk) ExecX

func (_c *OAuthAuthCodeCreateBulk) ExecX(ctx context.Context)

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

func (*OAuthAuthCodeCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OAuthAuthCode.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OAuthAuthCodeUpsert) {
		SetCodeSignature(v+v).
	}).
	Exec(ctx)

func (*OAuthAuthCodeCreateBulk) OnConflictColumns

func (_c *OAuthAuthCodeCreateBulk) OnConflictColumns(columns ...string) *OAuthAuthCodeUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OAuthAuthCode.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OAuthAuthCodeCreateBulk) Save

Save creates the OAuthAuthCode entities in the database.

func (*OAuthAuthCodeCreateBulk) SaveX

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

type OAuthAuthCodeDelete

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

OAuthAuthCodeDelete is the builder for deleting a OAuthAuthCode entity.

func (*OAuthAuthCodeDelete) Exec

func (_d *OAuthAuthCodeDelete) Exec(ctx context.Context) (int, error)

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

func (*OAuthAuthCodeDelete) ExecX

func (_d *OAuthAuthCodeDelete) ExecX(ctx context.Context) int

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

func (*OAuthAuthCodeDelete) Where

Where appends a list predicates to the OAuthAuthCodeDelete builder.

type OAuthAuthCodeDeleteOne

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

OAuthAuthCodeDeleteOne is the builder for deleting a single OAuthAuthCode entity.

func (*OAuthAuthCodeDeleteOne) Exec

Exec executes the deletion query.

func (*OAuthAuthCodeDeleteOne) ExecX

func (_d *OAuthAuthCodeDeleteOne) ExecX(ctx context.Context)

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

func (*OAuthAuthCodeDeleteOne) Where

Where appends a list predicates to the OAuthAuthCodeDelete builder.

type OAuthAuthCodeEdges

type OAuthAuthCodeEdges struct {
	// App holds the value of the app edge.
	App *OAuthApp `json:"app,omitempty"`
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// contains filtered or unexported fields
}

OAuthAuthCodeEdges holds the relations/edges for other nodes in the graph.

func (OAuthAuthCodeEdges) AppOrErr

func (e OAuthAuthCodeEdges) AppOrErr() (*OAuthApp, error)

AppOrErr returns the App value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (OAuthAuthCodeEdges) UserOrErr

func (e OAuthAuthCodeEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type OAuthAuthCodeFilter

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

OAuthAuthCodeFilter provides a generic filtering capability at runtime for OAuthAuthCodeQuery.

func (*OAuthAuthCodeFilter) Where

func (f *OAuthAuthCodeFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*OAuthAuthCodeFilter) WhereAppID

func (f *OAuthAuthCodeFilter) WhereAppID(p entql.ValueP)

WhereAppID applies the entql [16]byte predicate on the app_id field.

func (*OAuthAuthCodeFilter) WhereClientIP

func (f *OAuthAuthCodeFilter) WhereClientIP(p entql.StringP)

WhereClientIP applies the entql string predicate on the client_ip field.

func (*OAuthAuthCodeFilter) WhereCodeChallenge

func (f *OAuthAuthCodeFilter) WhereCodeChallenge(p entql.StringP)

WhereCodeChallenge applies the entql string predicate on the code_challenge field.

func (*OAuthAuthCodeFilter) WhereCodeChallengeMethod

func (f *OAuthAuthCodeFilter) WhereCodeChallengeMethod(p entql.StringP)

WhereCodeChallengeMethod applies the entql string predicate on the code_challenge_method field.

func (*OAuthAuthCodeFilter) WhereCodeSignature

func (f *OAuthAuthCodeFilter) WhereCodeSignature(p entql.StringP)

WhereCodeSignature applies the entql string predicate on the code_signature field.

func (*OAuthAuthCodeFilter) WhereCreatedAt

func (f *OAuthAuthCodeFilter) WhereCreatedAt(p entql.TimeP)

WhereCreatedAt applies the entql time.Time predicate on the created_at field.

func (*OAuthAuthCodeFilter) WhereExpiresAt

func (f *OAuthAuthCodeFilter) WhereExpiresAt(p entql.TimeP)

WhereExpiresAt applies the entql time.Time predicate on the expires_at field.

func (*OAuthAuthCodeFilter) WhereHasApp

func (f *OAuthAuthCodeFilter) WhereHasApp()

WhereHasApp applies a predicate to check if query has an edge app.

func (*OAuthAuthCodeFilter) WhereHasAppWith

func (f *OAuthAuthCodeFilter) WhereHasAppWith(preds ...predicate.OAuthApp)

WhereHasAppWith applies a predicate to check if query has an edge app with a given conditions (other predicates).

func (*OAuthAuthCodeFilter) WhereHasUser

func (f *OAuthAuthCodeFilter) WhereHasUser()

WhereHasUser applies a predicate to check if query has an edge user.

func (*OAuthAuthCodeFilter) WhereHasUserWith

func (f *OAuthAuthCodeFilter) WhereHasUserWith(preds ...predicate.User)

WhereHasUserWith applies a predicate to check if query has an edge user with a given conditions (other predicates).

func (*OAuthAuthCodeFilter) WhereID

func (f *OAuthAuthCodeFilter) WhereID(p entql.ValueP)

WhereID applies the entql [16]byte predicate on the id field.

func (*OAuthAuthCodeFilter) WhereNonce

func (f *OAuthAuthCodeFilter) WhereNonce(p entql.StringP)

WhereNonce applies the entql string predicate on the nonce field.

func (*OAuthAuthCodeFilter) WhereRedirectURI

func (f *OAuthAuthCodeFilter) WhereRedirectURI(p entql.StringP)

WhereRedirectURI applies the entql string predicate on the redirect_uri field.

func (*OAuthAuthCodeFilter) WhereRequestData

func (f *OAuthAuthCodeFilter) WhereRequestData(p entql.StringP)

WhereRequestData applies the entql string predicate on the request_data field.

func (*OAuthAuthCodeFilter) WhereScopes

func (f *OAuthAuthCodeFilter) WhereScopes(p entql.BytesP)

WhereScopes applies the entql json.RawMessage predicate on the scopes field.

func (*OAuthAuthCodeFilter) WhereState

func (f *OAuthAuthCodeFilter) WhereState(p entql.StringP)

WhereState applies the entql string predicate on the state field.

func (*OAuthAuthCodeFilter) WhereUsed

func (f *OAuthAuthCodeFilter) WhereUsed(p entql.BoolP)

WhereUsed applies the entql bool predicate on the used field.

func (*OAuthAuthCodeFilter) WhereUsedAt

func (f *OAuthAuthCodeFilter) WhereUsedAt(p entql.TimeP)

WhereUsedAt applies the entql time.Time predicate on the used_at field.

func (*OAuthAuthCodeFilter) WhereUserAgent

func (f *OAuthAuthCodeFilter) WhereUserAgent(p entql.StringP)

WhereUserAgent applies the entql string predicate on the user_agent field.

func (*OAuthAuthCodeFilter) WhereUserID

func (f *OAuthAuthCodeFilter) WhereUserID(p entql.ValueP)

WhereUserID applies the entql [16]byte predicate on the user_id field.

type OAuthAuthCodeGroupBy

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

OAuthAuthCodeGroupBy is the group-by builder for OAuthAuthCode entities.

func (*OAuthAuthCodeGroupBy) Aggregate

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

func (*OAuthAuthCodeGroupBy) Bool

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

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

func (*OAuthAuthCodeGroupBy) BoolX

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

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

func (*OAuthAuthCodeGroupBy) Bools

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

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

func (*OAuthAuthCodeGroupBy) BoolsX

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

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

func (*OAuthAuthCodeGroupBy) Float64

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

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

func (*OAuthAuthCodeGroupBy) Float64X

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

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

func (*OAuthAuthCodeGroupBy) Float64s

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

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

func (*OAuthAuthCodeGroupBy) Float64sX

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

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

func (*OAuthAuthCodeGroupBy) Int

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

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

func (*OAuthAuthCodeGroupBy) IntX

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

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

func (*OAuthAuthCodeGroupBy) Ints

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

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

func (*OAuthAuthCodeGroupBy) IntsX

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

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

func (*OAuthAuthCodeGroupBy) Scan

func (_g *OAuthAuthCodeGroupBy) Scan(ctx context.Context, v any) error

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

func (*OAuthAuthCodeGroupBy) ScanX

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

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

func (*OAuthAuthCodeGroupBy) String

func (s *OAuthAuthCodeGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OAuthAuthCodeGroupBy) StringX

func (s *OAuthAuthCodeGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OAuthAuthCodeGroupBy) Strings

func (s *OAuthAuthCodeGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OAuthAuthCodeGroupBy) StringsX

func (s *OAuthAuthCodeGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OAuthAuthCodeMutation

type OAuthAuthCodeMutation struct {
	// contains filtered or unexported fields
}

OAuthAuthCodeMutation represents an operation that mutates the OAuthAuthCode nodes in the graph.

func (*OAuthAuthCodeMutation) AddField

func (m *OAuthAuthCodeMutation) 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 (*OAuthAuthCodeMutation) AddedEdges

func (m *OAuthAuthCodeMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*OAuthAuthCodeMutation) AddedField

func (m *OAuthAuthCodeMutation) 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 (*OAuthAuthCodeMutation) AddedFields

func (m *OAuthAuthCodeMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*OAuthAuthCodeMutation) AddedIDs

func (m *OAuthAuthCodeMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*OAuthAuthCodeMutation) AppCleared

func (m *OAuthAuthCodeMutation) AppCleared() bool

AppCleared reports if the "app" edge to the OAuthApp entity was cleared.

func (*OAuthAuthCodeMutation) AppID

func (m *OAuthAuthCodeMutation) AppID() (r uuid.UUID, exists bool)

AppID returns the value of the "app_id" field in the mutation.

func (*OAuthAuthCodeMutation) AppIDs

func (m *OAuthAuthCodeMutation) AppIDs() (ids []uuid.UUID)

AppIDs returns the "app" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AppID instead. It exists only for internal usage by the builders.

func (*OAuthAuthCodeMutation) AppendScopes

func (m *OAuthAuthCodeMutation) AppendScopes(s []string)

AppendScopes adds s to the "scopes" field.

func (*OAuthAuthCodeMutation) AppendedScopes

func (m *OAuthAuthCodeMutation) AppendedScopes() ([]string, bool)

AppendedScopes returns the list of values that were appended to the "scopes" field in this mutation.

func (*OAuthAuthCodeMutation) ClearApp

func (m *OAuthAuthCodeMutation) ClearApp()

ClearApp clears the "app" edge to the OAuthApp entity.

func (*OAuthAuthCodeMutation) ClearClientIP

func (m *OAuthAuthCodeMutation) ClearClientIP()

ClearClientIP clears the value of the "client_ip" field.

func (*OAuthAuthCodeMutation) ClearCodeChallenge

func (m *OAuthAuthCodeMutation) ClearCodeChallenge()

ClearCodeChallenge clears the value of the "code_challenge" field.

func (*OAuthAuthCodeMutation) ClearCodeChallengeMethod

func (m *OAuthAuthCodeMutation) ClearCodeChallengeMethod()

ClearCodeChallengeMethod clears the value of the "code_challenge_method" field.

func (*OAuthAuthCodeMutation) ClearEdge

func (m *OAuthAuthCodeMutation) 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 (*OAuthAuthCodeMutation) ClearField

func (m *OAuthAuthCodeMutation) 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 (*OAuthAuthCodeMutation) ClearNonce

func (m *OAuthAuthCodeMutation) ClearNonce()

ClearNonce clears the value of the "nonce" field.

func (*OAuthAuthCodeMutation) ClearRequestData

func (m *OAuthAuthCodeMutation) ClearRequestData()

ClearRequestData clears the value of the "request_data" field.

func (*OAuthAuthCodeMutation) ClearState

func (m *OAuthAuthCodeMutation) ClearState()

ClearState clears the value of the "state" field.

func (*OAuthAuthCodeMutation) ClearUsedAt

func (m *OAuthAuthCodeMutation) ClearUsedAt()

ClearUsedAt clears the value of the "used_at" field.

func (*OAuthAuthCodeMutation) ClearUser

func (m *OAuthAuthCodeMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*OAuthAuthCodeMutation) ClearUserAgent

func (m *OAuthAuthCodeMutation) ClearUserAgent()

ClearUserAgent clears the value of the "user_agent" field.

func (*OAuthAuthCodeMutation) ClearedEdges

func (m *OAuthAuthCodeMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*OAuthAuthCodeMutation) ClearedFields

func (m *OAuthAuthCodeMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (OAuthAuthCodeMutation) Client

func (m OAuthAuthCodeMutation) 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 (*OAuthAuthCodeMutation) ClientIP

func (m *OAuthAuthCodeMutation) ClientIP() (r string, exists bool)

ClientIP returns the value of the "client_ip" field in the mutation.

func (*OAuthAuthCodeMutation) ClientIPCleared

func (m *OAuthAuthCodeMutation) ClientIPCleared() bool

ClientIPCleared returns if the "client_ip" field was cleared in this mutation.

func (*OAuthAuthCodeMutation) CodeChallenge

func (m *OAuthAuthCodeMutation) CodeChallenge() (r string, exists bool)

CodeChallenge returns the value of the "code_challenge" field in the mutation.

func (*OAuthAuthCodeMutation) CodeChallengeCleared

func (m *OAuthAuthCodeMutation) CodeChallengeCleared() bool

CodeChallengeCleared returns if the "code_challenge" field was cleared in this mutation.

func (*OAuthAuthCodeMutation) CodeChallengeMethod

func (m *OAuthAuthCodeMutation) CodeChallengeMethod() (r string, exists bool)

CodeChallengeMethod returns the value of the "code_challenge_method" field in the mutation.

func (*OAuthAuthCodeMutation) CodeChallengeMethodCleared

func (m *OAuthAuthCodeMutation) CodeChallengeMethodCleared() bool

CodeChallengeMethodCleared returns if the "code_challenge_method" field was cleared in this mutation.

func (*OAuthAuthCodeMutation) CodeSignature

func (m *OAuthAuthCodeMutation) CodeSignature() (r string, exists bool)

CodeSignature returns the value of the "code_signature" field in the mutation.

func (*OAuthAuthCodeMutation) CreatedAt

func (m *OAuthAuthCodeMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*OAuthAuthCodeMutation) EdgeCleared

func (m *OAuthAuthCodeMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*OAuthAuthCodeMutation) ExpiresAt

func (m *OAuthAuthCodeMutation) ExpiresAt() (r time.Time, exists bool)

ExpiresAt returns the value of the "expires_at" field in the mutation.

func (*OAuthAuthCodeMutation) Field

func (m *OAuthAuthCodeMutation) 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 (*OAuthAuthCodeMutation) FieldCleared

func (m *OAuthAuthCodeMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*OAuthAuthCodeMutation) Fields

func (m *OAuthAuthCodeMutation) 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 (*OAuthAuthCodeMutation) Filter

Filter returns an entql.Where implementation to apply filters on the OAuthAuthCodeMutation builder.

func (*OAuthAuthCodeMutation) ID

func (m *OAuthAuthCodeMutation) ID() (id uuid.UUID, 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 (*OAuthAuthCodeMutation) 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 (*OAuthAuthCodeMutation) Nonce

func (m *OAuthAuthCodeMutation) Nonce() (r string, exists bool)

Nonce returns the value of the "nonce" field in the mutation.

func (*OAuthAuthCodeMutation) NonceCleared

func (m *OAuthAuthCodeMutation) NonceCleared() bool

NonceCleared returns if the "nonce" field was cleared in this mutation.

func (*OAuthAuthCodeMutation) OldAppID

func (m *OAuthAuthCodeMutation) OldAppID(ctx context.Context) (v uuid.UUID, err error)

OldAppID returns the old "app_id" field's value of the OAuthAuthCode entity. If the OAuthAuthCode 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 (*OAuthAuthCodeMutation) OldClientIP

func (m *OAuthAuthCodeMutation) OldClientIP(ctx context.Context) (v string, err error)

OldClientIP returns the old "client_ip" field's value of the OAuthAuthCode entity. If the OAuthAuthCode 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 (*OAuthAuthCodeMutation) OldCodeChallenge

func (m *OAuthAuthCodeMutation) OldCodeChallenge(ctx context.Context) (v string, err error)

OldCodeChallenge returns the old "code_challenge" field's value of the OAuthAuthCode entity. If the OAuthAuthCode 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 (*OAuthAuthCodeMutation) OldCodeChallengeMethod

func (m *OAuthAuthCodeMutation) OldCodeChallengeMethod(ctx context.Context) (v string, err error)

OldCodeChallengeMethod returns the old "code_challenge_method" field's value of the OAuthAuthCode entity. If the OAuthAuthCode 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 (*OAuthAuthCodeMutation) OldCodeSignature

func (m *OAuthAuthCodeMutation) OldCodeSignature(ctx context.Context) (v string, err error)

OldCodeSignature returns the old "code_signature" field's value of the OAuthAuthCode entity. If the OAuthAuthCode 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 (*OAuthAuthCodeMutation) OldCreatedAt

func (m *OAuthAuthCodeMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the OAuthAuthCode entity. If the OAuthAuthCode 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 (*OAuthAuthCodeMutation) OldExpiresAt

func (m *OAuthAuthCodeMutation) OldExpiresAt(ctx context.Context) (v time.Time, err error)

OldExpiresAt returns the old "expires_at" field's value of the OAuthAuthCode entity. If the OAuthAuthCode 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 (*OAuthAuthCodeMutation) OldField

func (m *OAuthAuthCodeMutation) 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 (*OAuthAuthCodeMutation) OldNonce

func (m *OAuthAuthCodeMutation) OldNonce(ctx context.Context) (v string, err error)

OldNonce returns the old "nonce" field's value of the OAuthAuthCode entity. If the OAuthAuthCode 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 (*OAuthAuthCodeMutation) OldRedirectURI

func (m *OAuthAuthCodeMutation) OldRedirectURI(ctx context.Context) (v string, err error)

OldRedirectURI returns the old "redirect_uri" field's value of the OAuthAuthCode entity. If the OAuthAuthCode 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 (*OAuthAuthCodeMutation) OldRequestData

func (m *OAuthAuthCodeMutation) OldRequestData(ctx context.Context) (v string, err error)

OldRequestData returns the old "request_data" field's value of the OAuthAuthCode entity. If the OAuthAuthCode 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 (*OAuthAuthCodeMutation) OldScopes

func (m *OAuthAuthCodeMutation) OldScopes(ctx context.Context) (v []string, err error)

OldScopes returns the old "scopes" field's value of the OAuthAuthCode entity. If the OAuthAuthCode 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 (*OAuthAuthCodeMutation) OldState

func (m *OAuthAuthCodeMutation) OldState(ctx context.Context) (v string, err error)

OldState returns the old "state" field's value of the OAuthAuthCode entity. If the OAuthAuthCode 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 (*OAuthAuthCodeMutation) OldUsed

func (m *OAuthAuthCodeMutation) OldUsed(ctx context.Context) (v bool, err error)

OldUsed returns the old "used" field's value of the OAuthAuthCode entity. If the OAuthAuthCode 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 (*OAuthAuthCodeMutation) OldUsedAt

func (m *OAuthAuthCodeMutation) OldUsedAt(ctx context.Context) (v *time.Time, err error)

OldUsedAt returns the old "used_at" field's value of the OAuthAuthCode entity. If the OAuthAuthCode 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 (*OAuthAuthCodeMutation) OldUserAgent

func (m *OAuthAuthCodeMutation) OldUserAgent(ctx context.Context) (v string, err error)

OldUserAgent returns the old "user_agent" field's value of the OAuthAuthCode entity. If the OAuthAuthCode 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 (*OAuthAuthCodeMutation) OldUserID

func (m *OAuthAuthCodeMutation) OldUserID(ctx context.Context) (v uuid.UUID, err error)

OldUserID returns the old "user_id" field's value of the OAuthAuthCode entity. If the OAuthAuthCode 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 (*OAuthAuthCodeMutation) Op

func (m *OAuthAuthCodeMutation) Op() Op

Op returns the operation name.

func (*OAuthAuthCodeMutation) RedirectURI

func (m *OAuthAuthCodeMutation) RedirectURI() (r string, exists bool)

RedirectURI returns the value of the "redirect_uri" field in the mutation.

func (*OAuthAuthCodeMutation) RemovedEdges

func (m *OAuthAuthCodeMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*OAuthAuthCodeMutation) RemovedIDs

func (m *OAuthAuthCodeMutation) 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 (*OAuthAuthCodeMutation) RequestData

func (m *OAuthAuthCodeMutation) RequestData() (r string, exists bool)

RequestData returns the value of the "request_data" field in the mutation.

func (*OAuthAuthCodeMutation) RequestDataCleared

func (m *OAuthAuthCodeMutation) RequestDataCleared() bool

RequestDataCleared returns if the "request_data" field was cleared in this mutation.

func (*OAuthAuthCodeMutation) ResetApp

func (m *OAuthAuthCodeMutation) ResetApp()

ResetApp resets all changes to the "app" edge.

func (*OAuthAuthCodeMutation) ResetAppID

func (m *OAuthAuthCodeMutation) ResetAppID()

ResetAppID resets all changes to the "app_id" field.

func (*OAuthAuthCodeMutation) ResetClientIP

func (m *OAuthAuthCodeMutation) ResetClientIP()

ResetClientIP resets all changes to the "client_ip" field.

func (*OAuthAuthCodeMutation) ResetCodeChallenge

func (m *OAuthAuthCodeMutation) ResetCodeChallenge()

ResetCodeChallenge resets all changes to the "code_challenge" field.

func (*OAuthAuthCodeMutation) ResetCodeChallengeMethod

func (m *OAuthAuthCodeMutation) ResetCodeChallengeMethod()

ResetCodeChallengeMethod resets all changes to the "code_challenge_method" field.

func (*OAuthAuthCodeMutation) ResetCodeSignature

func (m *OAuthAuthCodeMutation) ResetCodeSignature()

ResetCodeSignature resets all changes to the "code_signature" field.

func (*OAuthAuthCodeMutation) ResetCreatedAt

func (m *OAuthAuthCodeMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*OAuthAuthCodeMutation) ResetEdge

func (m *OAuthAuthCodeMutation) 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 (*OAuthAuthCodeMutation) ResetExpiresAt

func (m *OAuthAuthCodeMutation) ResetExpiresAt()

ResetExpiresAt resets all changes to the "expires_at" field.

func (*OAuthAuthCodeMutation) ResetField

func (m *OAuthAuthCodeMutation) 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 (*OAuthAuthCodeMutation) ResetNonce

func (m *OAuthAuthCodeMutation) ResetNonce()

ResetNonce resets all changes to the "nonce" field.

func (*OAuthAuthCodeMutation) ResetRedirectURI

func (m *OAuthAuthCodeMutation) ResetRedirectURI()

ResetRedirectURI resets all changes to the "redirect_uri" field.

func (*OAuthAuthCodeMutation) ResetRequestData

func (m *OAuthAuthCodeMutation) ResetRequestData()

ResetRequestData resets all changes to the "request_data" field.

func (*OAuthAuthCodeMutation) ResetScopes

func (m *OAuthAuthCodeMutation) ResetScopes()

ResetScopes resets all changes to the "scopes" field.

func (*OAuthAuthCodeMutation) ResetState

func (m *OAuthAuthCodeMutation) ResetState()

ResetState resets all changes to the "state" field.

func (*OAuthAuthCodeMutation) ResetUsed

func (m *OAuthAuthCodeMutation) ResetUsed()

ResetUsed resets all changes to the "used" field.

func (*OAuthAuthCodeMutation) ResetUsedAt

func (m *OAuthAuthCodeMutation) ResetUsedAt()

ResetUsedAt resets all changes to the "used_at" field.

func (*OAuthAuthCodeMutation) ResetUser

func (m *OAuthAuthCodeMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*OAuthAuthCodeMutation) ResetUserAgent

func (m *OAuthAuthCodeMutation) ResetUserAgent()

ResetUserAgent resets all changes to the "user_agent" field.

func (*OAuthAuthCodeMutation) ResetUserID

func (m *OAuthAuthCodeMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*OAuthAuthCodeMutation) Scopes

func (m *OAuthAuthCodeMutation) Scopes() (r []string, exists bool)

Scopes returns the value of the "scopes" field in the mutation.

func (*OAuthAuthCodeMutation) SetAppID

func (m *OAuthAuthCodeMutation) SetAppID(u uuid.UUID)

SetAppID sets the "app_id" field.

func (*OAuthAuthCodeMutation) SetClientIP

func (m *OAuthAuthCodeMutation) SetClientIP(s string)

SetClientIP sets the "client_ip" field.

func (*OAuthAuthCodeMutation) SetCodeChallenge

func (m *OAuthAuthCodeMutation) SetCodeChallenge(s string)

SetCodeChallenge sets the "code_challenge" field.

func (*OAuthAuthCodeMutation) SetCodeChallengeMethod

func (m *OAuthAuthCodeMutation) SetCodeChallengeMethod(s string)

SetCodeChallengeMethod sets the "code_challenge_method" field.

func (*OAuthAuthCodeMutation) SetCodeSignature

func (m *OAuthAuthCodeMutation) SetCodeSignature(s string)

SetCodeSignature sets the "code_signature" field.

func (*OAuthAuthCodeMutation) SetCreatedAt

func (m *OAuthAuthCodeMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*OAuthAuthCodeMutation) SetExpiresAt

func (m *OAuthAuthCodeMutation) SetExpiresAt(t time.Time)

SetExpiresAt sets the "expires_at" field.

func (*OAuthAuthCodeMutation) SetField

func (m *OAuthAuthCodeMutation) 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 (*OAuthAuthCodeMutation) SetID

func (m *OAuthAuthCodeMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of OAuthAuthCode entities.

func (*OAuthAuthCodeMutation) SetNonce

func (m *OAuthAuthCodeMutation) SetNonce(s string)

SetNonce sets the "nonce" field.

func (*OAuthAuthCodeMutation) SetOp

func (m *OAuthAuthCodeMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OAuthAuthCodeMutation) SetRedirectURI

func (m *OAuthAuthCodeMutation) SetRedirectURI(s string)

SetRedirectURI sets the "redirect_uri" field.

func (*OAuthAuthCodeMutation) SetRequestData

func (m *OAuthAuthCodeMutation) SetRequestData(s string)

SetRequestData sets the "request_data" field.

func (*OAuthAuthCodeMutation) SetScopes

func (m *OAuthAuthCodeMutation) SetScopes(s []string)

SetScopes sets the "scopes" field.

func (*OAuthAuthCodeMutation) SetState

func (m *OAuthAuthCodeMutation) SetState(s string)

SetState sets the "state" field.

func (*OAuthAuthCodeMutation) SetUsed

func (m *OAuthAuthCodeMutation) SetUsed(b bool)

SetUsed sets the "used" field.

func (*OAuthAuthCodeMutation) SetUsedAt

func (m *OAuthAuthCodeMutation) SetUsedAt(t time.Time)

SetUsedAt sets the "used_at" field.

func (*OAuthAuthCodeMutation) SetUserAgent

func (m *OAuthAuthCodeMutation) SetUserAgent(s string)

SetUserAgent sets the "user_agent" field.

func (*OAuthAuthCodeMutation) SetUserID

func (m *OAuthAuthCodeMutation) SetUserID(u uuid.UUID)

SetUserID sets the "user_id" field.

func (*OAuthAuthCodeMutation) State

func (m *OAuthAuthCodeMutation) State() (r string, exists bool)

State returns the value of the "state" field in the mutation.

func (*OAuthAuthCodeMutation) StateCleared

func (m *OAuthAuthCodeMutation) StateCleared() bool

StateCleared returns if the "state" field was cleared in this mutation.

func (OAuthAuthCodeMutation) Tx

func (m OAuthAuthCodeMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*OAuthAuthCodeMutation) Type

func (m *OAuthAuthCodeMutation) Type() string

Type returns the node type of this mutation (OAuthAuthCode).

func (*OAuthAuthCodeMutation) Used

func (m *OAuthAuthCodeMutation) Used() (r bool, exists bool)

Used returns the value of the "used" field in the mutation.

func (*OAuthAuthCodeMutation) UsedAt

func (m *OAuthAuthCodeMutation) UsedAt() (r time.Time, exists bool)

UsedAt returns the value of the "used_at" field in the mutation.

func (*OAuthAuthCodeMutation) UsedAtCleared

func (m *OAuthAuthCodeMutation) UsedAtCleared() bool

UsedAtCleared returns if the "used_at" field was cleared in this mutation.

func (*OAuthAuthCodeMutation) UserAgent

func (m *OAuthAuthCodeMutation) UserAgent() (r string, exists bool)

UserAgent returns the value of the "user_agent" field in the mutation.

func (*OAuthAuthCodeMutation) UserAgentCleared

func (m *OAuthAuthCodeMutation) UserAgentCleared() bool

UserAgentCleared returns if the "user_agent" field was cleared in this mutation.

func (*OAuthAuthCodeMutation) UserCleared

func (m *OAuthAuthCodeMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*OAuthAuthCodeMutation) UserID

func (m *OAuthAuthCodeMutation) UserID() (r uuid.UUID, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*OAuthAuthCodeMutation) UserIDs

func (m *OAuthAuthCodeMutation) UserIDs() (ids []uuid.UUID)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*OAuthAuthCodeMutation) Where

Where appends a list predicates to the OAuthAuthCodeMutation builder.

func (*OAuthAuthCodeMutation) WhereP

func (m *OAuthAuthCodeMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the OAuthAuthCodeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type OAuthAuthCodeQuery

type OAuthAuthCodeQuery struct {
	// contains filtered or unexported fields
}

OAuthAuthCodeQuery is the builder for querying OAuthAuthCode entities.

func (*OAuthAuthCodeQuery) Aggregate

func (_q *OAuthAuthCodeQuery) Aggregate(fns ...AggregateFunc) *OAuthAuthCodeSelect

Aggregate returns a OAuthAuthCodeSelect configured with the given aggregations.

func (*OAuthAuthCodeQuery) All

All executes the query and returns a list of OAuthAuthCodes.

func (*OAuthAuthCodeQuery) AllX

AllX is like All, but panics if an error occurs.

func (*OAuthAuthCodeQuery) Clone

Clone returns a duplicate of the OAuthAuthCodeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*OAuthAuthCodeQuery) Count

func (_q *OAuthAuthCodeQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OAuthAuthCodeQuery) CountX

func (_q *OAuthAuthCodeQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*OAuthAuthCodeQuery) Exist

func (_q *OAuthAuthCodeQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*OAuthAuthCodeQuery) ExistX

func (_q *OAuthAuthCodeQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*OAuthAuthCodeQuery) Filter

Filter returns a Filter implementation to apply filters on the OAuthAuthCodeQuery builder.

func (*OAuthAuthCodeQuery) First

First returns the first OAuthAuthCode entity from the query. Returns a *NotFoundError when no OAuthAuthCode was found.

func (*OAuthAuthCodeQuery) FirstID

func (_q *OAuthAuthCodeQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first OAuthAuthCode ID from the query. Returns a *NotFoundError when no OAuthAuthCode ID was found.

func (*OAuthAuthCodeQuery) FirstIDX

func (_q *OAuthAuthCodeQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*OAuthAuthCodeQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*OAuthAuthCodeQuery) GroupBy

func (_q *OAuthAuthCodeQuery) GroupBy(field string, fields ...string) *OAuthAuthCodeGroupBy

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 {
	CodeSignature string `json:"code_signature,omitempty"`
	Count int `json:"count,omitempty"`
}

client.OAuthAuthCode.Query().
	GroupBy(oauthauthcode.FieldCodeSignature).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OAuthAuthCodeQuery) IDs

func (_q *OAuthAuthCodeQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of OAuthAuthCode IDs.

func (*OAuthAuthCodeQuery) IDsX

func (_q *OAuthAuthCodeQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*OAuthAuthCodeQuery) Limit

func (_q *OAuthAuthCodeQuery) Limit(limit int) *OAuthAuthCodeQuery

Limit the number of records to be returned by this query.

func (*OAuthAuthCodeQuery) Offset

func (_q *OAuthAuthCodeQuery) Offset(offset int) *OAuthAuthCodeQuery

Offset to start from.

func (*OAuthAuthCodeQuery) Only

Only returns a single OAuthAuthCode entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OAuthAuthCode entity is found. Returns a *NotFoundError when no OAuthAuthCode entities are found.

func (*OAuthAuthCodeQuery) OnlyID

func (_q *OAuthAuthCodeQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only OAuthAuthCode ID in the query. Returns a *NotSingularError when more than one OAuthAuthCode ID is found. Returns a *NotFoundError when no entities are found.

func (*OAuthAuthCodeQuery) OnlyIDX

func (_q *OAuthAuthCodeQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*OAuthAuthCodeQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*OAuthAuthCodeQuery) Order

Order specifies how the records should be ordered.

func (*OAuthAuthCodeQuery) QueryApp

func (_q *OAuthAuthCodeQuery) QueryApp() *OAuthAppQuery

QueryApp chains the current query on the "app" edge.

func (*OAuthAuthCodeQuery) QueryUser

func (_q *OAuthAuthCodeQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*OAuthAuthCodeQuery) Select

func (_q *OAuthAuthCodeQuery) Select(fields ...string) *OAuthAuthCodeSelect

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 {
	CodeSignature string `json:"code_signature,omitempty"`
}

client.OAuthAuthCode.Query().
	Select(oauthauthcode.FieldCodeSignature).
	Scan(ctx, &v)

func (*OAuthAuthCodeQuery) Unique

func (_q *OAuthAuthCodeQuery) Unique(unique bool) *OAuthAuthCodeQuery

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 (*OAuthAuthCodeQuery) Where

Where adds a new predicate for the OAuthAuthCodeQuery builder.

func (*OAuthAuthCodeQuery) WithApp

func (_q *OAuthAuthCodeQuery) WithApp(opts ...func(*OAuthAppQuery)) *OAuthAuthCodeQuery

WithApp tells the query-builder to eager-load the nodes that are connected to the "app" edge. The optional arguments are used to configure the query builder of the edge.

func (*OAuthAuthCodeQuery) WithUser

func (_q *OAuthAuthCodeQuery) WithUser(opts ...func(*UserQuery)) *OAuthAuthCodeQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type OAuthAuthCodeSelect

type OAuthAuthCodeSelect struct {
	*OAuthAuthCodeQuery
	// contains filtered or unexported fields
}

OAuthAuthCodeSelect is the builder for selecting fields of OAuthAuthCode entities.

func (*OAuthAuthCodeSelect) Aggregate

func (_s *OAuthAuthCodeSelect) Aggregate(fns ...AggregateFunc) *OAuthAuthCodeSelect

Aggregate adds the given aggregation functions to the selector query.

func (*OAuthAuthCodeSelect) Bool

func (s *OAuthAuthCodeSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OAuthAuthCodeSelect) BoolX

func (s *OAuthAuthCodeSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OAuthAuthCodeSelect) Bools

func (s *OAuthAuthCodeSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OAuthAuthCodeSelect) BoolsX

func (s *OAuthAuthCodeSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OAuthAuthCodeSelect) Float64

func (s *OAuthAuthCodeSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OAuthAuthCodeSelect) Float64X

func (s *OAuthAuthCodeSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OAuthAuthCodeSelect) Float64s

func (s *OAuthAuthCodeSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OAuthAuthCodeSelect) Float64sX

func (s *OAuthAuthCodeSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OAuthAuthCodeSelect) Int

func (s *OAuthAuthCodeSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OAuthAuthCodeSelect) IntX

func (s *OAuthAuthCodeSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OAuthAuthCodeSelect) Ints

func (s *OAuthAuthCodeSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OAuthAuthCodeSelect) IntsX

func (s *OAuthAuthCodeSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OAuthAuthCodeSelect) Scan

func (_s *OAuthAuthCodeSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OAuthAuthCodeSelect) ScanX

func (s *OAuthAuthCodeSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OAuthAuthCodeSelect) String

func (s *OAuthAuthCodeSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OAuthAuthCodeSelect) StringX

func (s *OAuthAuthCodeSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OAuthAuthCodeSelect) Strings

func (s *OAuthAuthCodeSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OAuthAuthCodeSelect) StringsX

func (s *OAuthAuthCodeSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OAuthAuthCodeUpdate

type OAuthAuthCodeUpdate struct {
	// contains filtered or unexported fields
}

OAuthAuthCodeUpdate is the builder for updating OAuthAuthCode entities.

func (*OAuthAuthCodeUpdate) AppendScopes

func (_u *OAuthAuthCodeUpdate) AppendScopes(v []string) *OAuthAuthCodeUpdate

AppendScopes appends value to the "scopes" field.

func (*OAuthAuthCodeUpdate) ClearApp

func (_u *OAuthAuthCodeUpdate) ClearApp() *OAuthAuthCodeUpdate

ClearApp clears the "app" edge to the OAuthApp entity.

func (*OAuthAuthCodeUpdate) ClearClientIP

func (_u *OAuthAuthCodeUpdate) ClearClientIP() *OAuthAuthCodeUpdate

ClearClientIP clears the value of the "client_ip" field.

func (*OAuthAuthCodeUpdate) ClearCodeChallenge

func (_u *OAuthAuthCodeUpdate) ClearCodeChallenge() *OAuthAuthCodeUpdate

ClearCodeChallenge clears the value of the "code_challenge" field.

func (*OAuthAuthCodeUpdate) ClearCodeChallengeMethod

func (_u *OAuthAuthCodeUpdate) ClearCodeChallengeMethod() *OAuthAuthCodeUpdate

ClearCodeChallengeMethod clears the value of the "code_challenge_method" field.

func (*OAuthAuthCodeUpdate) ClearNonce

func (_u *OAuthAuthCodeUpdate) ClearNonce() *OAuthAuthCodeUpdate

ClearNonce clears the value of the "nonce" field.

func (*OAuthAuthCodeUpdate) ClearRequestData

func (_u *OAuthAuthCodeUpdate) ClearRequestData() *OAuthAuthCodeUpdate

ClearRequestData clears the value of the "request_data" field.

func (*OAuthAuthCodeUpdate) ClearState

func (_u *OAuthAuthCodeUpdate) ClearState() *OAuthAuthCodeUpdate

ClearState clears the value of the "state" field.

func (*OAuthAuthCodeUpdate) ClearUsedAt

func (_u *OAuthAuthCodeUpdate) ClearUsedAt() *OAuthAuthCodeUpdate

ClearUsedAt clears the value of the "used_at" field.

func (*OAuthAuthCodeUpdate) ClearUser

func (_u *OAuthAuthCodeUpdate) ClearUser() *OAuthAuthCodeUpdate

ClearUser clears the "user" edge to the User entity.

func (*OAuthAuthCodeUpdate) ClearUserAgent

func (_u *OAuthAuthCodeUpdate) ClearUserAgent() *OAuthAuthCodeUpdate

ClearUserAgent clears the value of the "user_agent" field.

func (*OAuthAuthCodeUpdate) Exec

func (_u *OAuthAuthCodeUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OAuthAuthCodeUpdate) ExecX

func (_u *OAuthAuthCodeUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OAuthAuthCodeUpdate) Mutation

Mutation returns the OAuthAuthCodeMutation object of the builder.

func (*OAuthAuthCodeUpdate) Save

func (_u *OAuthAuthCodeUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*OAuthAuthCodeUpdate) SaveX

func (_u *OAuthAuthCodeUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*OAuthAuthCodeUpdate) SetApp

SetApp sets the "app" edge to the OAuthApp entity.

func (*OAuthAuthCodeUpdate) SetAppID

SetAppID sets the "app_id" field.

func (*OAuthAuthCodeUpdate) SetClientIP

func (_u *OAuthAuthCodeUpdate) SetClientIP(v string) *OAuthAuthCodeUpdate

SetClientIP sets the "client_ip" field.

func (*OAuthAuthCodeUpdate) SetCodeChallenge

func (_u *OAuthAuthCodeUpdate) SetCodeChallenge(v string) *OAuthAuthCodeUpdate

SetCodeChallenge sets the "code_challenge" field.

func (*OAuthAuthCodeUpdate) SetCodeChallengeMethod

func (_u *OAuthAuthCodeUpdate) SetCodeChallengeMethod(v string) *OAuthAuthCodeUpdate

SetCodeChallengeMethod sets the "code_challenge_method" field.

func (*OAuthAuthCodeUpdate) SetCodeSignature

func (_u *OAuthAuthCodeUpdate) SetCodeSignature(v string) *OAuthAuthCodeUpdate

SetCodeSignature sets the "code_signature" field.

func (*OAuthAuthCodeUpdate) SetExpiresAt

func (_u *OAuthAuthCodeUpdate) SetExpiresAt(v time.Time) *OAuthAuthCodeUpdate

SetExpiresAt sets the "expires_at" field.

func (*OAuthAuthCodeUpdate) SetNillableAppID

func (_u *OAuthAuthCodeUpdate) SetNillableAppID(v *uuid.UUID) *OAuthAuthCodeUpdate

SetNillableAppID sets the "app_id" field if the given value is not nil.

func (*OAuthAuthCodeUpdate) SetNillableClientIP

func (_u *OAuthAuthCodeUpdate) SetNillableClientIP(v *string) *OAuthAuthCodeUpdate

SetNillableClientIP sets the "client_ip" field if the given value is not nil.

func (*OAuthAuthCodeUpdate) SetNillableCodeChallenge

func (_u *OAuthAuthCodeUpdate) SetNillableCodeChallenge(v *string) *OAuthAuthCodeUpdate

SetNillableCodeChallenge sets the "code_challenge" field if the given value is not nil.

func (*OAuthAuthCodeUpdate) SetNillableCodeChallengeMethod

func (_u *OAuthAuthCodeUpdate) SetNillableCodeChallengeMethod(v *string) *OAuthAuthCodeUpdate

SetNillableCodeChallengeMethod sets the "code_challenge_method" field if the given value is not nil.

func (*OAuthAuthCodeUpdate) SetNillableCodeSignature

func (_u *OAuthAuthCodeUpdate) SetNillableCodeSignature(v *string) *OAuthAuthCodeUpdate

SetNillableCodeSignature sets the "code_signature" field if the given value is not nil.

func (*OAuthAuthCodeUpdate) SetNillableExpiresAt

func (_u *OAuthAuthCodeUpdate) SetNillableExpiresAt(v *time.Time) *OAuthAuthCodeUpdate

SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.

func (*OAuthAuthCodeUpdate) SetNillableNonce

func (_u *OAuthAuthCodeUpdate) SetNillableNonce(v *string) *OAuthAuthCodeUpdate

SetNillableNonce sets the "nonce" field if the given value is not nil.

func (*OAuthAuthCodeUpdate) SetNillableRedirectURI

func (_u *OAuthAuthCodeUpdate) SetNillableRedirectURI(v *string) *OAuthAuthCodeUpdate

SetNillableRedirectURI sets the "redirect_uri" field if the given value is not nil.

func (*OAuthAuthCodeUpdate) SetNillableRequestData

func (_u *OAuthAuthCodeUpdate) SetNillableRequestData(v *string) *OAuthAuthCodeUpdate

SetNillableRequestData sets the "request_data" field if the given value is not nil.

func (*OAuthAuthCodeUpdate) SetNillableState

func (_u *OAuthAuthCodeUpdate) SetNillableState(v *string) *OAuthAuthCodeUpdate

SetNillableState sets the "state" field if the given value is not nil.

func (*OAuthAuthCodeUpdate) SetNillableUsed

func (_u *OAuthAuthCodeUpdate) SetNillableUsed(v *bool) *OAuthAuthCodeUpdate

SetNillableUsed sets the "used" field if the given value is not nil.

func (*OAuthAuthCodeUpdate) SetNillableUsedAt

func (_u *OAuthAuthCodeUpdate) SetNillableUsedAt(v *time.Time) *OAuthAuthCodeUpdate

SetNillableUsedAt sets the "used_at" field if the given value is not nil.

func (*OAuthAuthCodeUpdate) SetNillableUserAgent

func (_u *OAuthAuthCodeUpdate) SetNillableUserAgent(v *string) *OAuthAuthCodeUpdate

SetNillableUserAgent sets the "user_agent" field if the given value is not nil.

func (*OAuthAuthCodeUpdate) SetNillableUserID

func (_u *OAuthAuthCodeUpdate) SetNillableUserID(v *uuid.UUID) *OAuthAuthCodeUpdate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*OAuthAuthCodeUpdate) SetNonce

SetNonce sets the "nonce" field.

func (*OAuthAuthCodeUpdate) SetRedirectURI

func (_u *OAuthAuthCodeUpdate) SetRedirectURI(v string) *OAuthAuthCodeUpdate

SetRedirectURI sets the "redirect_uri" field.

func (*OAuthAuthCodeUpdate) SetRequestData

func (_u *OAuthAuthCodeUpdate) SetRequestData(v string) *OAuthAuthCodeUpdate

SetRequestData sets the "request_data" field.

func (*OAuthAuthCodeUpdate) SetScopes

func (_u *OAuthAuthCodeUpdate) SetScopes(v []string) *OAuthAuthCodeUpdate

SetScopes sets the "scopes" field.

func (*OAuthAuthCodeUpdate) SetState

SetState sets the "state" field.

func (*OAuthAuthCodeUpdate) SetUsed

SetUsed sets the "used" field.

func (*OAuthAuthCodeUpdate) SetUsedAt

SetUsedAt sets the "used_at" field.

func (*OAuthAuthCodeUpdate) SetUser

func (_u *OAuthAuthCodeUpdate) SetUser(v *User) *OAuthAuthCodeUpdate

SetUser sets the "user" edge to the User entity.

func (*OAuthAuthCodeUpdate) SetUserAgent

func (_u *OAuthAuthCodeUpdate) SetUserAgent(v string) *OAuthAuthCodeUpdate

SetUserAgent sets the "user_agent" field.

func (*OAuthAuthCodeUpdate) SetUserID

SetUserID sets the "user_id" field.

func (*OAuthAuthCodeUpdate) Where

Where appends a list predicates to the OAuthAuthCodeUpdate builder.

type OAuthAuthCodeUpdateOne

type OAuthAuthCodeUpdateOne struct {
	// contains filtered or unexported fields
}

OAuthAuthCodeUpdateOne is the builder for updating a single OAuthAuthCode entity.

func (*OAuthAuthCodeUpdateOne) AppendScopes

func (_u *OAuthAuthCodeUpdateOne) AppendScopes(v []string) *OAuthAuthCodeUpdateOne

AppendScopes appends value to the "scopes" field.

func (*OAuthAuthCodeUpdateOne) ClearApp

ClearApp clears the "app" edge to the OAuthApp entity.

func (*OAuthAuthCodeUpdateOne) ClearClientIP

func (_u *OAuthAuthCodeUpdateOne) ClearClientIP() *OAuthAuthCodeUpdateOne

ClearClientIP clears the value of the "client_ip" field.

func (*OAuthAuthCodeUpdateOne) ClearCodeChallenge

func (_u *OAuthAuthCodeUpdateOne) ClearCodeChallenge() *OAuthAuthCodeUpdateOne

ClearCodeChallenge clears the value of the "code_challenge" field.

func (*OAuthAuthCodeUpdateOne) ClearCodeChallengeMethod

func (_u *OAuthAuthCodeUpdateOne) ClearCodeChallengeMethod() *OAuthAuthCodeUpdateOne

ClearCodeChallengeMethod clears the value of the "code_challenge_method" field.

func (*OAuthAuthCodeUpdateOne) ClearNonce

ClearNonce clears the value of the "nonce" field.

func (*OAuthAuthCodeUpdateOne) ClearRequestData

func (_u *OAuthAuthCodeUpdateOne) ClearRequestData() *OAuthAuthCodeUpdateOne

ClearRequestData clears the value of the "request_data" field.

func (*OAuthAuthCodeUpdateOne) ClearState

ClearState clears the value of the "state" field.

func (*OAuthAuthCodeUpdateOne) ClearUsedAt

ClearUsedAt clears the value of the "used_at" field.

func (*OAuthAuthCodeUpdateOne) ClearUser

ClearUser clears the "user" edge to the User entity.

func (*OAuthAuthCodeUpdateOne) ClearUserAgent

func (_u *OAuthAuthCodeUpdateOne) ClearUserAgent() *OAuthAuthCodeUpdateOne

ClearUserAgent clears the value of the "user_agent" field.

func (*OAuthAuthCodeUpdateOne) Exec

Exec executes the query on the entity.

func (*OAuthAuthCodeUpdateOne) ExecX

func (_u *OAuthAuthCodeUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OAuthAuthCodeUpdateOne) Mutation

Mutation returns the OAuthAuthCodeMutation object of the builder.

func (*OAuthAuthCodeUpdateOne) Save

Save executes the query and returns the updated OAuthAuthCode entity.

func (*OAuthAuthCodeUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*OAuthAuthCodeUpdateOne) Select

func (_u *OAuthAuthCodeUpdateOne) Select(field string, fields ...string) *OAuthAuthCodeUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*OAuthAuthCodeUpdateOne) SetApp

SetApp sets the "app" edge to the OAuthApp entity.

func (*OAuthAuthCodeUpdateOne) SetAppID

SetAppID sets the "app_id" field.

func (*OAuthAuthCodeUpdateOne) SetClientIP

SetClientIP sets the "client_ip" field.

func (*OAuthAuthCodeUpdateOne) SetCodeChallenge

func (_u *OAuthAuthCodeUpdateOne) SetCodeChallenge(v string) *OAuthAuthCodeUpdateOne

SetCodeChallenge sets the "code_challenge" field.

func (*OAuthAuthCodeUpdateOne) SetCodeChallengeMethod

func (_u *OAuthAuthCodeUpdateOne) SetCodeChallengeMethod(v string) *OAuthAuthCodeUpdateOne

SetCodeChallengeMethod sets the "code_challenge_method" field.

func (*OAuthAuthCodeUpdateOne) SetCodeSignature

func (_u *OAuthAuthCodeUpdateOne) SetCodeSignature(v string) *OAuthAuthCodeUpdateOne

SetCodeSignature sets the "code_signature" field.

func (*OAuthAuthCodeUpdateOne) SetExpiresAt

SetExpiresAt sets the "expires_at" field.

func (*OAuthAuthCodeUpdateOne) SetNillableAppID

func (_u *OAuthAuthCodeUpdateOne) SetNillableAppID(v *uuid.UUID) *OAuthAuthCodeUpdateOne

SetNillableAppID sets the "app_id" field if the given value is not nil.

func (*OAuthAuthCodeUpdateOne) SetNillableClientIP

func (_u *OAuthAuthCodeUpdateOne) SetNillableClientIP(v *string) *OAuthAuthCodeUpdateOne

SetNillableClientIP sets the "client_ip" field if the given value is not nil.

func (*OAuthAuthCodeUpdateOne) SetNillableCodeChallenge

func (_u *OAuthAuthCodeUpdateOne) SetNillableCodeChallenge(v *string) *OAuthAuthCodeUpdateOne

SetNillableCodeChallenge sets the "code_challenge" field if the given value is not nil.

func (*OAuthAuthCodeUpdateOne) SetNillableCodeChallengeMethod

func (_u *OAuthAuthCodeUpdateOne) SetNillableCodeChallengeMethod(v *string) *OAuthAuthCodeUpdateOne

SetNillableCodeChallengeMethod sets the "code_challenge_method" field if the given value is not nil.

func (*OAuthAuthCodeUpdateOne) SetNillableCodeSignature

func (_u *OAuthAuthCodeUpdateOne) SetNillableCodeSignature(v *string) *OAuthAuthCodeUpdateOne

SetNillableCodeSignature sets the "code_signature" field if the given value is not nil.

func (*OAuthAuthCodeUpdateOne) SetNillableExpiresAt

func (_u *OAuthAuthCodeUpdateOne) SetNillableExpiresAt(v *time.Time) *OAuthAuthCodeUpdateOne

SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.

func (*OAuthAuthCodeUpdateOne) SetNillableNonce

func (_u *OAuthAuthCodeUpdateOne) SetNillableNonce(v *string) *OAuthAuthCodeUpdateOne

SetNillableNonce sets the "nonce" field if the given value is not nil.

func (*OAuthAuthCodeUpdateOne) SetNillableRedirectURI

func (_u *OAuthAuthCodeUpdateOne) SetNillableRedirectURI(v *string) *OAuthAuthCodeUpdateOne

SetNillableRedirectURI sets the "redirect_uri" field if the given value is not nil.

func (*OAuthAuthCodeUpdateOne) SetNillableRequestData

func (_u *OAuthAuthCodeUpdateOne) SetNillableRequestData(v *string) *OAuthAuthCodeUpdateOne

SetNillableRequestData sets the "request_data" field if the given value is not nil.

func (*OAuthAuthCodeUpdateOne) SetNillableState

func (_u *OAuthAuthCodeUpdateOne) SetNillableState(v *string) *OAuthAuthCodeUpdateOne

SetNillableState sets the "state" field if the given value is not nil.

func (*OAuthAuthCodeUpdateOne) SetNillableUsed

func (_u *OAuthAuthCodeUpdateOne) SetNillableUsed(v *bool) *OAuthAuthCodeUpdateOne

SetNillableUsed sets the "used" field if the given value is not nil.

func (*OAuthAuthCodeUpdateOne) SetNillableUsedAt

func (_u *OAuthAuthCodeUpdateOne) SetNillableUsedAt(v *time.Time) *OAuthAuthCodeUpdateOne

SetNillableUsedAt sets the "used_at" field if the given value is not nil.

func (*OAuthAuthCodeUpdateOne) SetNillableUserAgent

func (_u *OAuthAuthCodeUpdateOne) SetNillableUserAgent(v *string) *OAuthAuthCodeUpdateOne

SetNillableUserAgent sets the "user_agent" field if the given value is not nil.

func (*OAuthAuthCodeUpdateOne) SetNillableUserID

func (_u *OAuthAuthCodeUpdateOne) SetNillableUserID(v *uuid.UUID) *OAuthAuthCodeUpdateOne

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*OAuthAuthCodeUpdateOne) SetNonce

SetNonce sets the "nonce" field.

func (*OAuthAuthCodeUpdateOne) SetRedirectURI

func (_u *OAuthAuthCodeUpdateOne) SetRedirectURI(v string) *OAuthAuthCodeUpdateOne

SetRedirectURI sets the "redirect_uri" field.

func (*OAuthAuthCodeUpdateOne) SetRequestData

func (_u *OAuthAuthCodeUpdateOne) SetRequestData(v string) *OAuthAuthCodeUpdateOne

SetRequestData sets the "request_data" field.

func (*OAuthAuthCodeUpdateOne) SetScopes

SetScopes sets the "scopes" field.

func (*OAuthAuthCodeUpdateOne) SetState

SetState sets the "state" field.

func (*OAuthAuthCodeUpdateOne) SetUsed

SetUsed sets the "used" field.

func (*OAuthAuthCodeUpdateOne) SetUsedAt

SetUsedAt sets the "used_at" field.

func (*OAuthAuthCodeUpdateOne) SetUser

SetUser sets the "user" edge to the User entity.

func (*OAuthAuthCodeUpdateOne) SetUserAgent

SetUserAgent sets the "user_agent" field.

func (*OAuthAuthCodeUpdateOne) SetUserID

SetUserID sets the "user_id" field.

func (*OAuthAuthCodeUpdateOne) Where

Where appends a list predicates to the OAuthAuthCodeUpdate builder.

type OAuthAuthCodeUpsert

type OAuthAuthCodeUpsert struct {
	*sql.UpdateSet
}

OAuthAuthCodeUpsert is the "OnConflict" setter.

func (*OAuthAuthCodeUpsert) ClearClientIP

func (u *OAuthAuthCodeUpsert) ClearClientIP() *OAuthAuthCodeUpsert

ClearClientIP clears the value of the "client_ip" field.

func (*OAuthAuthCodeUpsert) ClearCodeChallenge

func (u *OAuthAuthCodeUpsert) ClearCodeChallenge() *OAuthAuthCodeUpsert

ClearCodeChallenge clears the value of the "code_challenge" field.

func (*OAuthAuthCodeUpsert) ClearCodeChallengeMethod

func (u *OAuthAuthCodeUpsert) ClearCodeChallengeMethod() *OAuthAuthCodeUpsert

ClearCodeChallengeMethod clears the value of the "code_challenge_method" field.

func (*OAuthAuthCodeUpsert) ClearNonce

func (u *OAuthAuthCodeUpsert) ClearNonce() *OAuthAuthCodeUpsert

ClearNonce clears the value of the "nonce" field.

func (*OAuthAuthCodeUpsert) ClearRequestData

func (u *OAuthAuthCodeUpsert) ClearRequestData() *OAuthAuthCodeUpsert

ClearRequestData clears the value of the "request_data" field.

func (*OAuthAuthCodeUpsert) ClearState

func (u *OAuthAuthCodeUpsert) ClearState() *OAuthAuthCodeUpsert

ClearState clears the value of the "state" field.

func (*OAuthAuthCodeUpsert) ClearUsedAt

func (u *OAuthAuthCodeUpsert) ClearUsedAt() *OAuthAuthCodeUpsert

ClearUsedAt clears the value of the "used_at" field.

func (*OAuthAuthCodeUpsert) ClearUserAgent

func (u *OAuthAuthCodeUpsert) ClearUserAgent() *OAuthAuthCodeUpsert

ClearUserAgent clears the value of the "user_agent" field.

func (*OAuthAuthCodeUpsert) SetAppID

SetAppID sets the "app_id" field.

func (*OAuthAuthCodeUpsert) SetClientIP

func (u *OAuthAuthCodeUpsert) SetClientIP(v string) *OAuthAuthCodeUpsert

SetClientIP sets the "client_ip" field.

func (*OAuthAuthCodeUpsert) SetCodeChallenge

func (u *OAuthAuthCodeUpsert) SetCodeChallenge(v string) *OAuthAuthCodeUpsert

SetCodeChallenge sets the "code_challenge" field.

func (*OAuthAuthCodeUpsert) SetCodeChallengeMethod

func (u *OAuthAuthCodeUpsert) SetCodeChallengeMethod(v string) *OAuthAuthCodeUpsert

SetCodeChallengeMethod sets the "code_challenge_method" field.

func (*OAuthAuthCodeUpsert) SetCodeSignature

func (u *OAuthAuthCodeUpsert) SetCodeSignature(v string) *OAuthAuthCodeUpsert

SetCodeSignature sets the "code_signature" field.

func (*OAuthAuthCodeUpsert) SetExpiresAt

func (u *OAuthAuthCodeUpsert) SetExpiresAt(v time.Time) *OAuthAuthCodeUpsert

SetExpiresAt sets the "expires_at" field.

func (*OAuthAuthCodeUpsert) SetNonce

SetNonce sets the "nonce" field.

func (*OAuthAuthCodeUpsert) SetRedirectURI

func (u *OAuthAuthCodeUpsert) SetRedirectURI(v string) *OAuthAuthCodeUpsert

SetRedirectURI sets the "redirect_uri" field.

func (*OAuthAuthCodeUpsert) SetRequestData

func (u *OAuthAuthCodeUpsert) SetRequestData(v string) *OAuthAuthCodeUpsert

SetRequestData sets the "request_data" field.

func (*OAuthAuthCodeUpsert) SetScopes

func (u *OAuthAuthCodeUpsert) SetScopes(v []string) *OAuthAuthCodeUpsert

SetScopes sets the "scopes" field.

func (*OAuthAuthCodeUpsert) SetState

SetState sets the "state" field.

func (*OAuthAuthCodeUpsert) SetUsed

SetUsed sets the "used" field.

func (*OAuthAuthCodeUpsert) SetUsedAt

SetUsedAt sets the "used_at" field.

func (*OAuthAuthCodeUpsert) SetUserAgent

func (u *OAuthAuthCodeUpsert) SetUserAgent(v string) *OAuthAuthCodeUpsert

SetUserAgent sets the "user_agent" field.

func (*OAuthAuthCodeUpsert) SetUserID

SetUserID sets the "user_id" field.

func (*OAuthAuthCodeUpsert) UpdateAppID

func (u *OAuthAuthCodeUpsert) UpdateAppID() *OAuthAuthCodeUpsert

UpdateAppID sets the "app_id" field to the value that was provided on create.

func (*OAuthAuthCodeUpsert) UpdateClientIP

func (u *OAuthAuthCodeUpsert) UpdateClientIP() *OAuthAuthCodeUpsert

UpdateClientIP sets the "client_ip" field to the value that was provided on create.

func (*OAuthAuthCodeUpsert) UpdateCodeChallenge

func (u *OAuthAuthCodeUpsert) UpdateCodeChallenge() *OAuthAuthCodeUpsert

UpdateCodeChallenge sets the "code_challenge" field to the value that was provided on create.

func (*OAuthAuthCodeUpsert) UpdateCodeChallengeMethod

func (u *OAuthAuthCodeUpsert) UpdateCodeChallengeMethod() *OAuthAuthCodeUpsert

UpdateCodeChallengeMethod sets the "code_challenge_method" field to the value that was provided on create.

func (*OAuthAuthCodeUpsert) UpdateCodeSignature

func (u *OAuthAuthCodeUpsert) UpdateCodeSignature() *OAuthAuthCodeUpsert

UpdateCodeSignature sets the "code_signature" field to the value that was provided on create.

func (*OAuthAuthCodeUpsert) UpdateExpiresAt

func (u *OAuthAuthCodeUpsert) UpdateExpiresAt() *OAuthAuthCodeUpsert

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*OAuthAuthCodeUpsert) UpdateNonce

func (u *OAuthAuthCodeUpsert) UpdateNonce() *OAuthAuthCodeUpsert

UpdateNonce sets the "nonce" field to the value that was provided on create.

func (*OAuthAuthCodeUpsert) UpdateRedirectURI

func (u *OAuthAuthCodeUpsert) UpdateRedirectURI() *OAuthAuthCodeUpsert

UpdateRedirectURI sets the "redirect_uri" field to the value that was provided on create.

func (*OAuthAuthCodeUpsert) UpdateRequestData

func (u *OAuthAuthCodeUpsert) UpdateRequestData() *OAuthAuthCodeUpsert

UpdateRequestData sets the "request_data" field to the value that was provided on create.

func (*OAuthAuthCodeUpsert) UpdateScopes

func (u *OAuthAuthCodeUpsert) UpdateScopes() *OAuthAuthCodeUpsert

UpdateScopes sets the "scopes" field to the value that was provided on create.

func (*OAuthAuthCodeUpsert) UpdateState

func (u *OAuthAuthCodeUpsert) UpdateState() *OAuthAuthCodeUpsert

UpdateState sets the "state" field to the value that was provided on create.

func (*OAuthAuthCodeUpsert) UpdateUsed

func (u *OAuthAuthCodeUpsert) UpdateUsed() *OAuthAuthCodeUpsert

UpdateUsed sets the "used" field to the value that was provided on create.

func (*OAuthAuthCodeUpsert) UpdateUsedAt

func (u *OAuthAuthCodeUpsert) UpdateUsedAt() *OAuthAuthCodeUpsert

UpdateUsedAt sets the "used_at" field to the value that was provided on create.

func (*OAuthAuthCodeUpsert) UpdateUserAgent

func (u *OAuthAuthCodeUpsert) UpdateUserAgent() *OAuthAuthCodeUpsert

UpdateUserAgent sets the "user_agent" field to the value that was provided on create.

func (*OAuthAuthCodeUpsert) UpdateUserID

func (u *OAuthAuthCodeUpsert) UpdateUserID() *OAuthAuthCodeUpsert

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OAuthAuthCodeUpsertBulk

type OAuthAuthCodeUpsertBulk struct {
	// contains filtered or unexported fields
}

OAuthAuthCodeUpsertBulk is the builder for "upsert"-ing a bulk of OAuthAuthCode nodes.

func (*OAuthAuthCodeUpsertBulk) ClearClientIP

ClearClientIP clears the value of the "client_ip" field.

func (*OAuthAuthCodeUpsertBulk) ClearCodeChallenge

func (u *OAuthAuthCodeUpsertBulk) ClearCodeChallenge() *OAuthAuthCodeUpsertBulk

ClearCodeChallenge clears the value of the "code_challenge" field.

func (*OAuthAuthCodeUpsertBulk) ClearCodeChallengeMethod

func (u *OAuthAuthCodeUpsertBulk) ClearCodeChallengeMethod() *OAuthAuthCodeUpsertBulk

ClearCodeChallengeMethod clears the value of the "code_challenge_method" field.

func (*OAuthAuthCodeUpsertBulk) ClearNonce

ClearNonce clears the value of the "nonce" field.

func (*OAuthAuthCodeUpsertBulk) ClearRequestData

func (u *OAuthAuthCodeUpsertBulk) ClearRequestData() *OAuthAuthCodeUpsertBulk

ClearRequestData clears the value of the "request_data" field.

func (*OAuthAuthCodeUpsertBulk) ClearState

ClearState clears the value of the "state" field.

func (*OAuthAuthCodeUpsertBulk) ClearUsedAt

ClearUsedAt clears the value of the "used_at" field.

func (*OAuthAuthCodeUpsertBulk) ClearUserAgent

func (u *OAuthAuthCodeUpsertBulk) ClearUserAgent() *OAuthAuthCodeUpsertBulk

ClearUserAgent clears the value of the "user_agent" field.

func (*OAuthAuthCodeUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OAuthAuthCodeUpsertBulk) Exec

Exec executes the query.

func (*OAuthAuthCodeUpsertBulk) ExecX

func (u *OAuthAuthCodeUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OAuthAuthCodeUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OAuthAuthCode.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*OAuthAuthCodeUpsertBulk) SetAppID

SetAppID sets the "app_id" field.

func (*OAuthAuthCodeUpsertBulk) SetClientIP

SetClientIP sets the "client_ip" field.

func (*OAuthAuthCodeUpsertBulk) SetCodeChallenge

func (u *OAuthAuthCodeUpsertBulk) SetCodeChallenge(v string) *OAuthAuthCodeUpsertBulk

SetCodeChallenge sets the "code_challenge" field.

func (*OAuthAuthCodeUpsertBulk) SetCodeChallengeMethod

func (u *OAuthAuthCodeUpsertBulk) SetCodeChallengeMethod(v string) *OAuthAuthCodeUpsertBulk

SetCodeChallengeMethod sets the "code_challenge_method" field.

func (*OAuthAuthCodeUpsertBulk) SetCodeSignature

func (u *OAuthAuthCodeUpsertBulk) SetCodeSignature(v string) *OAuthAuthCodeUpsertBulk

SetCodeSignature sets the "code_signature" field.

func (*OAuthAuthCodeUpsertBulk) SetExpiresAt

SetExpiresAt sets the "expires_at" field.

func (*OAuthAuthCodeUpsertBulk) SetNonce

SetNonce sets the "nonce" field.

func (*OAuthAuthCodeUpsertBulk) SetRedirectURI

SetRedirectURI sets the "redirect_uri" field.

func (*OAuthAuthCodeUpsertBulk) SetRequestData

SetRequestData sets the "request_data" field.

func (*OAuthAuthCodeUpsertBulk) SetScopes

SetScopes sets the "scopes" field.

func (*OAuthAuthCodeUpsertBulk) SetState

SetState sets the "state" field.

func (*OAuthAuthCodeUpsertBulk) SetUsed

SetUsed sets the "used" field.

func (*OAuthAuthCodeUpsertBulk) SetUsedAt

SetUsedAt sets the "used_at" field.

func (*OAuthAuthCodeUpsertBulk) SetUserAgent

SetUserAgent sets the "user_agent" field.

func (*OAuthAuthCodeUpsertBulk) SetUserID

SetUserID sets the "user_id" field.

func (*OAuthAuthCodeUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the OAuthAuthCodeCreateBulk.OnConflict documentation for more info.

func (*OAuthAuthCodeUpsertBulk) UpdateAppID

UpdateAppID sets the "app_id" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertBulk) UpdateClientIP

func (u *OAuthAuthCodeUpsertBulk) UpdateClientIP() *OAuthAuthCodeUpsertBulk

UpdateClientIP sets the "client_ip" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertBulk) UpdateCodeChallenge

func (u *OAuthAuthCodeUpsertBulk) UpdateCodeChallenge() *OAuthAuthCodeUpsertBulk

UpdateCodeChallenge sets the "code_challenge" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertBulk) UpdateCodeChallengeMethod

func (u *OAuthAuthCodeUpsertBulk) UpdateCodeChallengeMethod() *OAuthAuthCodeUpsertBulk

UpdateCodeChallengeMethod sets the "code_challenge_method" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertBulk) UpdateCodeSignature

func (u *OAuthAuthCodeUpsertBulk) UpdateCodeSignature() *OAuthAuthCodeUpsertBulk

UpdateCodeSignature sets the "code_signature" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertBulk) UpdateExpiresAt

func (u *OAuthAuthCodeUpsertBulk) UpdateExpiresAt() *OAuthAuthCodeUpsertBulk

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertBulk) UpdateNewValues

func (u *OAuthAuthCodeUpsertBulk) UpdateNewValues() *OAuthAuthCodeUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.OAuthAuthCode.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(oauthauthcode.FieldID)
		}),
	).
	Exec(ctx)

func (*OAuthAuthCodeUpsertBulk) UpdateNonce

UpdateNonce sets the "nonce" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertBulk) UpdateRedirectURI

func (u *OAuthAuthCodeUpsertBulk) UpdateRedirectURI() *OAuthAuthCodeUpsertBulk

UpdateRedirectURI sets the "redirect_uri" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertBulk) UpdateRequestData

func (u *OAuthAuthCodeUpsertBulk) UpdateRequestData() *OAuthAuthCodeUpsertBulk

UpdateRequestData sets the "request_data" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertBulk) UpdateScopes

UpdateScopes sets the "scopes" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertBulk) UpdateState

UpdateState sets the "state" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertBulk) UpdateUsed

UpdateUsed sets the "used" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertBulk) UpdateUsedAt

UpdateUsedAt sets the "used_at" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertBulk) UpdateUserAgent

func (u *OAuthAuthCodeUpsertBulk) UpdateUserAgent() *OAuthAuthCodeUpsertBulk

UpdateUserAgent sets the "user_agent" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertBulk) UpdateUserID

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OAuthAuthCodeUpsertOne

type OAuthAuthCodeUpsertOne struct {
	// contains filtered or unexported fields
}

OAuthAuthCodeUpsertOne is the builder for "upsert"-ing

one OAuthAuthCode node.

func (*OAuthAuthCodeUpsertOne) ClearClientIP

func (u *OAuthAuthCodeUpsertOne) ClearClientIP() *OAuthAuthCodeUpsertOne

ClearClientIP clears the value of the "client_ip" field.

func (*OAuthAuthCodeUpsertOne) ClearCodeChallenge

func (u *OAuthAuthCodeUpsertOne) ClearCodeChallenge() *OAuthAuthCodeUpsertOne

ClearCodeChallenge clears the value of the "code_challenge" field.

func (*OAuthAuthCodeUpsertOne) ClearCodeChallengeMethod

func (u *OAuthAuthCodeUpsertOne) ClearCodeChallengeMethod() *OAuthAuthCodeUpsertOne

ClearCodeChallengeMethod clears the value of the "code_challenge_method" field.

func (*OAuthAuthCodeUpsertOne) ClearNonce

ClearNonce clears the value of the "nonce" field.

func (*OAuthAuthCodeUpsertOne) ClearRequestData

func (u *OAuthAuthCodeUpsertOne) ClearRequestData() *OAuthAuthCodeUpsertOne

ClearRequestData clears the value of the "request_data" field.

func (*OAuthAuthCodeUpsertOne) ClearState

ClearState clears the value of the "state" field.

func (*OAuthAuthCodeUpsertOne) ClearUsedAt

ClearUsedAt clears the value of the "used_at" field.

func (*OAuthAuthCodeUpsertOne) ClearUserAgent

func (u *OAuthAuthCodeUpsertOne) ClearUserAgent() *OAuthAuthCodeUpsertOne

ClearUserAgent clears the value of the "user_agent" field.

func (*OAuthAuthCodeUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OAuthAuthCodeUpsertOne) Exec

Exec executes the query.

func (*OAuthAuthCodeUpsertOne) ExecX

func (u *OAuthAuthCodeUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OAuthAuthCodeUpsertOne) ID

func (u *OAuthAuthCodeUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*OAuthAuthCodeUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*OAuthAuthCodeUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OAuthAuthCode.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*OAuthAuthCodeUpsertOne) SetAppID

SetAppID sets the "app_id" field.

func (*OAuthAuthCodeUpsertOne) SetClientIP

SetClientIP sets the "client_ip" field.

func (*OAuthAuthCodeUpsertOne) SetCodeChallenge

func (u *OAuthAuthCodeUpsertOne) SetCodeChallenge(v string) *OAuthAuthCodeUpsertOne

SetCodeChallenge sets the "code_challenge" field.

func (*OAuthAuthCodeUpsertOne) SetCodeChallengeMethod

func (u *OAuthAuthCodeUpsertOne) SetCodeChallengeMethod(v string) *OAuthAuthCodeUpsertOne

SetCodeChallengeMethod sets the "code_challenge_method" field.

func (*OAuthAuthCodeUpsertOne) SetCodeSignature

func (u *OAuthAuthCodeUpsertOne) SetCodeSignature(v string) *OAuthAuthCodeUpsertOne

SetCodeSignature sets the "code_signature" field.

func (*OAuthAuthCodeUpsertOne) SetExpiresAt

SetExpiresAt sets the "expires_at" field.

func (*OAuthAuthCodeUpsertOne) SetNonce

SetNonce sets the "nonce" field.

func (*OAuthAuthCodeUpsertOne) SetRedirectURI

SetRedirectURI sets the "redirect_uri" field.

func (*OAuthAuthCodeUpsertOne) SetRequestData

SetRequestData sets the "request_data" field.

func (*OAuthAuthCodeUpsertOne) SetScopes

SetScopes sets the "scopes" field.

func (*OAuthAuthCodeUpsertOne) SetState

SetState sets the "state" field.

func (*OAuthAuthCodeUpsertOne) SetUsed

SetUsed sets the "used" field.

func (*OAuthAuthCodeUpsertOne) SetUsedAt

SetUsedAt sets the "used_at" field.

func (*OAuthAuthCodeUpsertOne) SetUserAgent

SetUserAgent sets the "user_agent" field.

func (*OAuthAuthCodeUpsertOne) SetUserID

SetUserID sets the "user_id" field.

func (*OAuthAuthCodeUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the OAuthAuthCodeCreate.OnConflict documentation for more info.

func (*OAuthAuthCodeUpsertOne) UpdateAppID

UpdateAppID sets the "app_id" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertOne) UpdateClientIP

func (u *OAuthAuthCodeUpsertOne) UpdateClientIP() *OAuthAuthCodeUpsertOne

UpdateClientIP sets the "client_ip" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertOne) UpdateCodeChallenge

func (u *OAuthAuthCodeUpsertOne) UpdateCodeChallenge() *OAuthAuthCodeUpsertOne

UpdateCodeChallenge sets the "code_challenge" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertOne) UpdateCodeChallengeMethod

func (u *OAuthAuthCodeUpsertOne) UpdateCodeChallengeMethod() *OAuthAuthCodeUpsertOne

UpdateCodeChallengeMethod sets the "code_challenge_method" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertOne) UpdateCodeSignature

func (u *OAuthAuthCodeUpsertOne) UpdateCodeSignature() *OAuthAuthCodeUpsertOne

UpdateCodeSignature sets the "code_signature" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertOne) UpdateExpiresAt

func (u *OAuthAuthCodeUpsertOne) UpdateExpiresAt() *OAuthAuthCodeUpsertOne

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertOne) UpdateNewValues

func (u *OAuthAuthCodeUpsertOne) UpdateNewValues() *OAuthAuthCodeUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.OAuthAuthCode.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(oauthauthcode.FieldID)
		}),
	).
	Exec(ctx)

func (*OAuthAuthCodeUpsertOne) UpdateNonce

UpdateNonce sets the "nonce" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertOne) UpdateRedirectURI

func (u *OAuthAuthCodeUpsertOne) UpdateRedirectURI() *OAuthAuthCodeUpsertOne

UpdateRedirectURI sets the "redirect_uri" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertOne) UpdateRequestData

func (u *OAuthAuthCodeUpsertOne) UpdateRequestData() *OAuthAuthCodeUpsertOne

UpdateRequestData sets the "request_data" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertOne) UpdateScopes

UpdateScopes sets the "scopes" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertOne) UpdateState

UpdateState sets the "state" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertOne) UpdateUsed

UpdateUsed sets the "used" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertOne) UpdateUsedAt

UpdateUsedAt sets the "used_at" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertOne) UpdateUserAgent

func (u *OAuthAuthCodeUpsertOne) UpdateUserAgent() *OAuthAuthCodeUpsertOne

UpdateUserAgent sets the "user_agent" field to the value that was provided on create.

func (*OAuthAuthCodeUpsertOne) UpdateUserID

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OAuthAuthCodes

type OAuthAuthCodes []*OAuthAuthCode

OAuthAuthCodes is a parsable slice of OAuthAuthCode.

type OAuthConsent

type OAuthConsent struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// User who granted consent
	UserID uuid.UUID `json:"user_id,omitempty"`
	// OAuth app that received consent
	AppID uuid.UUID `json:"app_id,omitempty"`
	// Scopes the user consented to
	Scopes []string `json:"scopes,omitempty"`
	// Whether consent is currently active
	Granted bool `json:"granted,omitempty"`
	// When consent was first granted
	GrantedAt time.Time `json:"granted_at,omitempty"`
	// Last time this consent was used for authorization
	LastUsedAt *time.Time `json:"last_used_at,omitempty"`
	// Revoked holds the value of the "revoked" field.
	Revoked bool `json:"revoked,omitempty"`
	// RevokedAt holds the value of the "revoked_at" field.
	RevokedAt *time.Time `json:"revoked_at,omitempty"`
	// user_initiated, admin_revoked, app_deleted, etc.
	RevokedReason string `json:"revoked_reason,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the OAuthConsentQuery when eager-loading is set.
	Edges OAuthConsentEdges `json:"edges"`
	// contains filtered or unexported fields
}

OAuthConsent is the model entity for the OAuthConsent schema.

func (*OAuthConsent) QueryApp

func (_m *OAuthConsent) QueryApp() *OAuthAppQuery

QueryApp queries the "app" edge of the OAuthConsent entity.

func (*OAuthConsent) QueryUser

func (_m *OAuthConsent) QueryUser() *UserQuery

QueryUser queries the "user" edge of the OAuthConsent entity.

func (*OAuthConsent) String

func (_m *OAuthConsent) String() string

String implements the fmt.Stringer.

func (*OAuthConsent) Unwrap

func (_m *OAuthConsent) Unwrap() *OAuthConsent

Unwrap unwraps the OAuthConsent 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 (*OAuthConsent) Update

func (_m *OAuthConsent) Update() *OAuthConsentUpdateOne

Update returns a builder for updating this OAuthConsent. Note that you need to call OAuthConsent.Unwrap() before calling this method if this OAuthConsent was returned from a transaction, and the transaction was committed or rolled back.

func (*OAuthConsent) Value

func (_m *OAuthConsent) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the OAuthConsent. This includes values selected through modifiers, order, etc.

type OAuthConsentClient

type OAuthConsentClient struct {
	// contains filtered or unexported fields
}

OAuthConsentClient is a client for the OAuthConsent schema.

func NewOAuthConsentClient

func NewOAuthConsentClient(c config) *OAuthConsentClient

NewOAuthConsentClient returns a client for the OAuthConsent from the given config.

func (*OAuthConsentClient) Create

Create returns a builder for creating a OAuthConsent entity.

func (*OAuthConsentClient) CreateBulk

func (c *OAuthConsentClient) CreateBulk(builders ...*OAuthConsentCreate) *OAuthConsentCreateBulk

CreateBulk returns a builder for creating a bulk of OAuthConsent entities.

func (*OAuthConsentClient) Delete

Delete returns a delete builder for OAuthConsent.

func (*OAuthConsentClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OAuthConsentClient) DeleteOneID

func (c *OAuthConsentClient) DeleteOneID(id uuid.UUID) *OAuthConsentDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*OAuthConsentClient) Get

Get returns a OAuthConsent entity by its id.

func (*OAuthConsentClient) GetX

GetX is like Get, but panics if an error occurs.

func (*OAuthConsentClient) Hooks

func (c *OAuthConsentClient) Hooks() []Hook

Hooks returns the client hooks.

func (*OAuthConsentClient) Intercept

func (c *OAuthConsentClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `oauthconsent.Intercept(f(g(h())))`.

func (*OAuthConsentClient) Interceptors

func (c *OAuthConsentClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*OAuthConsentClient) MapCreateBulk

func (c *OAuthConsentClient) MapCreateBulk(slice any, setFunc func(*OAuthConsentCreate, int)) *OAuthConsentCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*OAuthConsentClient) Query

Query returns a query builder for OAuthConsent.

func (*OAuthConsentClient) QueryApp

func (c *OAuthConsentClient) QueryApp(_m *OAuthConsent) *OAuthAppQuery

QueryApp queries the app edge of a OAuthConsent.

func (*OAuthConsentClient) QueryUser

func (c *OAuthConsentClient) QueryUser(_m *OAuthConsent) *UserQuery

QueryUser queries the user edge of a OAuthConsent.

func (*OAuthConsentClient) Update

Update returns an update builder for OAuthConsent.

func (*OAuthConsentClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*OAuthConsentClient) UpdateOneID

func (c *OAuthConsentClient) UpdateOneID(id uuid.UUID) *OAuthConsentUpdateOne

UpdateOneID returns an update builder for the given id.

func (*OAuthConsentClient) Use

func (c *OAuthConsentClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `oauthconsent.Hooks(f(g(h())))`.

type OAuthConsentCreate

type OAuthConsentCreate struct {
	// contains filtered or unexported fields
}

OAuthConsentCreate is the builder for creating a OAuthConsent entity.

func (*OAuthConsentCreate) Exec

func (_c *OAuthConsentCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OAuthConsentCreate) ExecX

func (_c *OAuthConsentCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OAuthConsentCreate) Mutation

func (_c *OAuthConsentCreate) Mutation() *OAuthConsentMutation

Mutation returns the OAuthConsentMutation object of the builder.

func (*OAuthConsentCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OAuthConsent.Create().
	SetUserID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OAuthConsentUpsert) {
		SetUserID(v+v).
	}).
	Exec(ctx)

func (*OAuthConsentCreate) OnConflictColumns

func (_c *OAuthConsentCreate) OnConflictColumns(columns ...string) *OAuthConsentUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OAuthConsent.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OAuthConsentCreate) Save

Save creates the OAuthConsent in the database.

func (*OAuthConsentCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*OAuthConsentCreate) SetApp

SetApp sets the "app" edge to the OAuthApp entity.

func (*OAuthConsentCreate) SetAppID

SetAppID sets the "app_id" field.

func (*OAuthConsentCreate) SetCreatedAt

func (_c *OAuthConsentCreate) SetCreatedAt(v time.Time) *OAuthConsentCreate

SetCreatedAt sets the "created_at" field.

func (*OAuthConsentCreate) SetGranted

func (_c *OAuthConsentCreate) SetGranted(v bool) *OAuthConsentCreate

SetGranted sets the "granted" field.

func (*OAuthConsentCreate) SetGrantedAt

func (_c *OAuthConsentCreate) SetGrantedAt(v time.Time) *OAuthConsentCreate

SetGrantedAt sets the "granted_at" field.

func (*OAuthConsentCreate) SetID

SetID sets the "id" field.

func (*OAuthConsentCreate) SetLastUsedAt

func (_c *OAuthConsentCreate) SetLastUsedAt(v time.Time) *OAuthConsentCreate

SetLastUsedAt sets the "last_used_at" field.

func (*OAuthConsentCreate) SetNillableCreatedAt

func (_c *OAuthConsentCreate) SetNillableCreatedAt(v *time.Time) *OAuthConsentCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*OAuthConsentCreate) SetNillableGranted

func (_c *OAuthConsentCreate) SetNillableGranted(v *bool) *OAuthConsentCreate

SetNillableGranted sets the "granted" field if the given value is not nil.

func (*OAuthConsentCreate) SetNillableGrantedAt

func (_c *OAuthConsentCreate) SetNillableGrantedAt(v *time.Time) *OAuthConsentCreate

SetNillableGrantedAt sets the "granted_at" field if the given value is not nil.

func (*OAuthConsentCreate) SetNillableID

func (_c *OAuthConsentCreate) SetNillableID(v *uuid.UUID) *OAuthConsentCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*OAuthConsentCreate) SetNillableLastUsedAt

func (_c *OAuthConsentCreate) SetNillableLastUsedAt(v *time.Time) *OAuthConsentCreate

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*OAuthConsentCreate) SetNillableRevoked

func (_c *OAuthConsentCreate) SetNillableRevoked(v *bool) *OAuthConsentCreate

SetNillableRevoked sets the "revoked" field if the given value is not nil.

func (*OAuthConsentCreate) SetNillableRevokedAt

func (_c *OAuthConsentCreate) SetNillableRevokedAt(v *time.Time) *OAuthConsentCreate

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*OAuthConsentCreate) SetNillableRevokedReason

func (_c *OAuthConsentCreate) SetNillableRevokedReason(v *string) *OAuthConsentCreate

SetNillableRevokedReason sets the "revoked_reason" field if the given value is not nil.

func (*OAuthConsentCreate) SetNillableUpdatedAt

func (_c *OAuthConsentCreate) SetNillableUpdatedAt(v *time.Time) *OAuthConsentCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OAuthConsentCreate) SetRevoked

func (_c *OAuthConsentCreate) SetRevoked(v bool) *OAuthConsentCreate

SetRevoked sets the "revoked" field.

func (*OAuthConsentCreate) SetRevokedAt

func (_c *OAuthConsentCreate) SetRevokedAt(v time.Time) *OAuthConsentCreate

SetRevokedAt sets the "revoked_at" field.

func (*OAuthConsentCreate) SetRevokedReason

func (_c *OAuthConsentCreate) SetRevokedReason(v string) *OAuthConsentCreate

SetRevokedReason sets the "revoked_reason" field.

func (*OAuthConsentCreate) SetScopes

func (_c *OAuthConsentCreate) SetScopes(v []string) *OAuthConsentCreate

SetScopes sets the "scopes" field.

func (*OAuthConsentCreate) SetUpdatedAt

func (_c *OAuthConsentCreate) SetUpdatedAt(v time.Time) *OAuthConsentCreate

SetUpdatedAt sets the "updated_at" field.

func (*OAuthConsentCreate) SetUser

func (_c *OAuthConsentCreate) SetUser(v *User) *OAuthConsentCreate

SetUser sets the "user" edge to the User entity.

func (*OAuthConsentCreate) SetUserID

func (_c *OAuthConsentCreate) SetUserID(v uuid.UUID) *OAuthConsentCreate

SetUserID sets the "user_id" field.

type OAuthConsentCreateBulk

type OAuthConsentCreateBulk struct {
	// contains filtered or unexported fields
}

OAuthConsentCreateBulk is the builder for creating many OAuthConsent entities in bulk.

func (*OAuthConsentCreateBulk) Exec

Exec executes the query.

func (*OAuthConsentCreateBulk) ExecX

func (_c *OAuthConsentCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OAuthConsentCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OAuthConsent.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OAuthConsentUpsert) {
		SetUserID(v+v).
	}).
	Exec(ctx)

func (*OAuthConsentCreateBulk) OnConflictColumns

func (_c *OAuthConsentCreateBulk) OnConflictColumns(columns ...string) *OAuthConsentUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OAuthConsent.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OAuthConsentCreateBulk) Save

Save creates the OAuthConsent entities in the database.

func (*OAuthConsentCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type OAuthConsentDelete

type OAuthConsentDelete struct {
	// contains filtered or unexported fields
}

OAuthConsentDelete is the builder for deleting a OAuthConsent entity.

func (*OAuthConsentDelete) Exec

func (_d *OAuthConsentDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*OAuthConsentDelete) ExecX

func (_d *OAuthConsentDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OAuthConsentDelete) Where

Where appends a list predicates to the OAuthConsentDelete builder.

type OAuthConsentDeleteOne

type OAuthConsentDeleteOne struct {
	// contains filtered or unexported fields
}

OAuthConsentDeleteOne is the builder for deleting a single OAuthConsent entity.

func (*OAuthConsentDeleteOne) Exec

Exec executes the deletion query.

func (*OAuthConsentDeleteOne) ExecX

func (_d *OAuthConsentDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OAuthConsentDeleteOne) Where

Where appends a list predicates to the OAuthConsentDelete builder.

type OAuthConsentEdges

type OAuthConsentEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// App holds the value of the app edge.
	App *OAuthApp `json:"app,omitempty"`
	// contains filtered or unexported fields
}

OAuthConsentEdges holds the relations/edges for other nodes in the graph.

func (OAuthConsentEdges) AppOrErr

func (e OAuthConsentEdges) AppOrErr() (*OAuthApp, error)

AppOrErr returns the App value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (OAuthConsentEdges) UserOrErr

func (e OAuthConsentEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type OAuthConsentFilter

type OAuthConsentFilter struct {
	// contains filtered or unexported fields
}

OAuthConsentFilter provides a generic filtering capability at runtime for OAuthConsentQuery.

func (*OAuthConsentFilter) Where

func (f *OAuthConsentFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*OAuthConsentFilter) WhereAppID

func (f *OAuthConsentFilter) WhereAppID(p entql.ValueP)

WhereAppID applies the entql [16]byte predicate on the app_id field.

func (*OAuthConsentFilter) WhereCreatedAt

func (f *OAuthConsentFilter) WhereCreatedAt(p entql.TimeP)

WhereCreatedAt applies the entql time.Time predicate on the created_at field.

func (*OAuthConsentFilter) WhereGranted

func (f *OAuthConsentFilter) WhereGranted(p entql.BoolP)

WhereGranted applies the entql bool predicate on the granted field.

func (*OAuthConsentFilter) WhereGrantedAt

func (f *OAuthConsentFilter) WhereGrantedAt(p entql.TimeP)

WhereGrantedAt applies the entql time.Time predicate on the granted_at field.

func (*OAuthConsentFilter) WhereHasApp

func (f *OAuthConsentFilter) WhereHasApp()

WhereHasApp applies a predicate to check if query has an edge app.

func (*OAuthConsentFilter) WhereHasAppWith

func (f *OAuthConsentFilter) WhereHasAppWith(preds ...predicate.OAuthApp)

WhereHasAppWith applies a predicate to check if query has an edge app with a given conditions (other predicates).

func (*OAuthConsentFilter) WhereHasUser

func (f *OAuthConsentFilter) WhereHasUser()

WhereHasUser applies a predicate to check if query has an edge user.

func (*OAuthConsentFilter) WhereHasUserWith

func (f *OAuthConsentFilter) WhereHasUserWith(preds ...predicate.User)

WhereHasUserWith applies a predicate to check if query has an edge user with a given conditions (other predicates).

func (*OAuthConsentFilter) WhereID

func (f *OAuthConsentFilter) WhereID(p entql.ValueP)

WhereID applies the entql [16]byte predicate on the id field.

func (*OAuthConsentFilter) WhereLastUsedAt

func (f *OAuthConsentFilter) WhereLastUsedAt(p entql.TimeP)

WhereLastUsedAt applies the entql time.Time predicate on the last_used_at field.

func (*OAuthConsentFilter) WhereRevoked

func (f *OAuthConsentFilter) WhereRevoked(p entql.BoolP)

WhereRevoked applies the entql bool predicate on the revoked field.

func (*OAuthConsentFilter) WhereRevokedAt

func (f *OAuthConsentFilter) WhereRevokedAt(p entql.TimeP)

WhereRevokedAt applies the entql time.Time predicate on the revoked_at field.

func (*OAuthConsentFilter) WhereRevokedReason

func (f *OAuthConsentFilter) WhereRevokedReason(p entql.StringP)

WhereRevokedReason applies the entql string predicate on the revoked_reason field.

func (*OAuthConsentFilter) WhereScopes

func (f *OAuthConsentFilter) WhereScopes(p entql.BytesP)

WhereScopes applies the entql json.RawMessage predicate on the scopes field.

func (*OAuthConsentFilter) WhereUpdatedAt

func (f *OAuthConsentFilter) WhereUpdatedAt(p entql.TimeP)

WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.

func (*OAuthConsentFilter) WhereUserID

func (f *OAuthConsentFilter) WhereUserID(p entql.ValueP)

WhereUserID applies the entql [16]byte predicate on the user_id field.

type OAuthConsentGroupBy

type OAuthConsentGroupBy struct {
	// contains filtered or unexported fields
}

OAuthConsentGroupBy is the group-by builder for OAuthConsent entities.

func (*OAuthConsentGroupBy) Aggregate

func (_g *OAuthConsentGroupBy) Aggregate(fns ...AggregateFunc) *OAuthConsentGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*OAuthConsentGroupBy) Bool

func (s *OAuthConsentGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OAuthConsentGroupBy) BoolX

func (s *OAuthConsentGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OAuthConsentGroupBy) Bools

func (s *OAuthConsentGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OAuthConsentGroupBy) BoolsX

func (s *OAuthConsentGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OAuthConsentGroupBy) Float64

func (s *OAuthConsentGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OAuthConsentGroupBy) Float64X

func (s *OAuthConsentGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OAuthConsentGroupBy) Float64s

func (s *OAuthConsentGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OAuthConsentGroupBy) Float64sX

func (s *OAuthConsentGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OAuthConsentGroupBy) Int

func (s *OAuthConsentGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OAuthConsentGroupBy) IntX

func (s *OAuthConsentGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OAuthConsentGroupBy) Ints

func (s *OAuthConsentGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OAuthConsentGroupBy) IntsX

func (s *OAuthConsentGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OAuthConsentGroupBy) Scan

func (_g *OAuthConsentGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OAuthConsentGroupBy) ScanX

func (s *OAuthConsentGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OAuthConsentGroupBy) String

func (s *OAuthConsentGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OAuthConsentGroupBy) StringX

func (s *OAuthConsentGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OAuthConsentGroupBy) Strings

func (s *OAuthConsentGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OAuthConsentGroupBy) StringsX

func (s *OAuthConsentGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OAuthConsentMutation

type OAuthConsentMutation struct {
	// contains filtered or unexported fields
}

OAuthConsentMutation represents an operation that mutates the OAuthConsent nodes in the graph.

func (*OAuthConsentMutation) AddField

func (m *OAuthConsentMutation) 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 (*OAuthConsentMutation) AddedEdges

func (m *OAuthConsentMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*OAuthConsentMutation) AddedField

func (m *OAuthConsentMutation) 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 (*OAuthConsentMutation) AddedFields

func (m *OAuthConsentMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*OAuthConsentMutation) AddedIDs

func (m *OAuthConsentMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*OAuthConsentMutation) AppCleared

func (m *OAuthConsentMutation) AppCleared() bool

AppCleared reports if the "app" edge to the OAuthApp entity was cleared.

func (*OAuthConsentMutation) AppID

func (m *OAuthConsentMutation) AppID() (r uuid.UUID, exists bool)

AppID returns the value of the "app_id" field in the mutation.

func (*OAuthConsentMutation) AppIDs

func (m *OAuthConsentMutation) AppIDs() (ids []uuid.UUID)

AppIDs returns the "app" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AppID instead. It exists only for internal usage by the builders.

func (*OAuthConsentMutation) AppendScopes

func (m *OAuthConsentMutation) AppendScopes(s []string)

AppendScopes adds s to the "scopes" field.

func (*OAuthConsentMutation) AppendedScopes

func (m *OAuthConsentMutation) AppendedScopes() ([]string, bool)

AppendedScopes returns the list of values that were appended to the "scopes" field in this mutation.

func (*OAuthConsentMutation) ClearApp

func (m *OAuthConsentMutation) ClearApp()

ClearApp clears the "app" edge to the OAuthApp entity.

func (*OAuthConsentMutation) ClearEdge

func (m *OAuthConsentMutation) 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 (*OAuthConsentMutation) ClearField

func (m *OAuthConsentMutation) 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 (*OAuthConsentMutation) ClearLastUsedAt

func (m *OAuthConsentMutation) ClearLastUsedAt()

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*OAuthConsentMutation) ClearRevokedAt

func (m *OAuthConsentMutation) ClearRevokedAt()

ClearRevokedAt clears the value of the "revoked_at" field.

func (*OAuthConsentMutation) ClearRevokedReason

func (m *OAuthConsentMutation) ClearRevokedReason()

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*OAuthConsentMutation) ClearUser

func (m *OAuthConsentMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*OAuthConsentMutation) ClearedEdges

func (m *OAuthConsentMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*OAuthConsentMutation) ClearedFields

func (m *OAuthConsentMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (OAuthConsentMutation) Client

func (m OAuthConsentMutation) 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 (*OAuthConsentMutation) CreatedAt

func (m *OAuthConsentMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*OAuthConsentMutation) EdgeCleared

func (m *OAuthConsentMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*OAuthConsentMutation) Field

func (m *OAuthConsentMutation) 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 (*OAuthConsentMutation) FieldCleared

func (m *OAuthConsentMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*OAuthConsentMutation) Fields

func (m *OAuthConsentMutation) 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 (*OAuthConsentMutation) Filter

Filter returns an entql.Where implementation to apply filters on the OAuthConsentMutation builder.

func (*OAuthConsentMutation) Granted

func (m *OAuthConsentMutation) Granted() (r bool, exists bool)

Granted returns the value of the "granted" field in the mutation.

func (*OAuthConsentMutation) GrantedAt

func (m *OAuthConsentMutation) GrantedAt() (r time.Time, exists bool)

GrantedAt returns the value of the "granted_at" field in the mutation.

func (*OAuthConsentMutation) ID

func (m *OAuthConsentMutation) ID() (id uuid.UUID, 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 (*OAuthConsentMutation) 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 (*OAuthConsentMutation) LastUsedAt

func (m *OAuthConsentMutation) LastUsedAt() (r time.Time, exists bool)

LastUsedAt returns the value of the "last_used_at" field in the mutation.

func (*OAuthConsentMutation) LastUsedAtCleared

func (m *OAuthConsentMutation) LastUsedAtCleared() bool

LastUsedAtCleared returns if the "last_used_at" field was cleared in this mutation.

func (*OAuthConsentMutation) OldAppID

func (m *OAuthConsentMutation) OldAppID(ctx context.Context) (v uuid.UUID, err error)

OldAppID returns the old "app_id" field's value of the OAuthConsent entity. If the OAuthConsent 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 (*OAuthConsentMutation) OldCreatedAt

func (m *OAuthConsentMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the OAuthConsent entity. If the OAuthConsent 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 (*OAuthConsentMutation) OldField

func (m *OAuthConsentMutation) 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 (*OAuthConsentMutation) OldGranted

func (m *OAuthConsentMutation) OldGranted(ctx context.Context) (v bool, err error)

OldGranted returns the old "granted" field's value of the OAuthConsent entity. If the OAuthConsent 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 (*OAuthConsentMutation) OldGrantedAt

func (m *OAuthConsentMutation) OldGrantedAt(ctx context.Context) (v time.Time, err error)

OldGrantedAt returns the old "granted_at" field's value of the OAuthConsent entity. If the OAuthConsent 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 (*OAuthConsentMutation) OldLastUsedAt

func (m *OAuthConsentMutation) OldLastUsedAt(ctx context.Context) (v *time.Time, err error)

OldLastUsedAt returns the old "last_used_at" field's value of the OAuthConsent entity. If the OAuthConsent 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 (*OAuthConsentMutation) OldRevoked

func (m *OAuthConsentMutation) OldRevoked(ctx context.Context) (v bool, err error)

OldRevoked returns the old "revoked" field's value of the OAuthConsent entity. If the OAuthConsent 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 (*OAuthConsentMutation) OldRevokedAt

func (m *OAuthConsentMutation) OldRevokedAt(ctx context.Context) (v *time.Time, err error)

OldRevokedAt returns the old "revoked_at" field's value of the OAuthConsent entity. If the OAuthConsent 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 (*OAuthConsentMutation) OldRevokedReason

func (m *OAuthConsentMutation) OldRevokedReason(ctx context.Context) (v string, err error)

OldRevokedReason returns the old "revoked_reason" field's value of the OAuthConsent entity. If the OAuthConsent 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 (*OAuthConsentMutation) OldScopes

func (m *OAuthConsentMutation) OldScopes(ctx context.Context) (v []string, err error)

OldScopes returns the old "scopes" field's value of the OAuthConsent entity. If the OAuthConsent 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 (*OAuthConsentMutation) OldUpdatedAt

func (m *OAuthConsentMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the OAuthConsent entity. If the OAuthConsent 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 (*OAuthConsentMutation) OldUserID

func (m *OAuthConsentMutation) OldUserID(ctx context.Context) (v uuid.UUID, err error)

OldUserID returns the old "user_id" field's value of the OAuthConsent entity. If the OAuthConsent 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 (*OAuthConsentMutation) Op

func (m *OAuthConsentMutation) Op() Op

Op returns the operation name.

func (*OAuthConsentMutation) RemovedEdges

func (m *OAuthConsentMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*OAuthConsentMutation) RemovedIDs

func (m *OAuthConsentMutation) 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 (*OAuthConsentMutation) ResetApp

func (m *OAuthConsentMutation) ResetApp()

ResetApp resets all changes to the "app" edge.

func (*OAuthConsentMutation) ResetAppID

func (m *OAuthConsentMutation) ResetAppID()

ResetAppID resets all changes to the "app_id" field.

func (*OAuthConsentMutation) ResetCreatedAt

func (m *OAuthConsentMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*OAuthConsentMutation) ResetEdge

func (m *OAuthConsentMutation) 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 (*OAuthConsentMutation) ResetField

func (m *OAuthConsentMutation) 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 (*OAuthConsentMutation) ResetGranted

func (m *OAuthConsentMutation) ResetGranted()

ResetGranted resets all changes to the "granted" field.

func (*OAuthConsentMutation) ResetGrantedAt

func (m *OAuthConsentMutation) ResetGrantedAt()

ResetGrantedAt resets all changes to the "granted_at" field.

func (*OAuthConsentMutation) ResetLastUsedAt

func (m *OAuthConsentMutation) ResetLastUsedAt()

ResetLastUsedAt resets all changes to the "last_used_at" field.

func (*OAuthConsentMutation) ResetRevoked

func (m *OAuthConsentMutation) ResetRevoked()

ResetRevoked resets all changes to the "revoked" field.

func (*OAuthConsentMutation) ResetRevokedAt

func (m *OAuthConsentMutation) ResetRevokedAt()

ResetRevokedAt resets all changes to the "revoked_at" field.

func (*OAuthConsentMutation) ResetRevokedReason

func (m *OAuthConsentMutation) ResetRevokedReason()

ResetRevokedReason resets all changes to the "revoked_reason" field.

func (*OAuthConsentMutation) ResetScopes

func (m *OAuthConsentMutation) ResetScopes()

ResetScopes resets all changes to the "scopes" field.

func (*OAuthConsentMutation) ResetUpdatedAt

func (m *OAuthConsentMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*OAuthConsentMutation) ResetUser

func (m *OAuthConsentMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*OAuthConsentMutation) ResetUserID

func (m *OAuthConsentMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*OAuthConsentMutation) Revoked

func (m *OAuthConsentMutation) Revoked() (r bool, exists bool)

Revoked returns the value of the "revoked" field in the mutation.

func (*OAuthConsentMutation) RevokedAt

func (m *OAuthConsentMutation) RevokedAt() (r time.Time, exists bool)

RevokedAt returns the value of the "revoked_at" field in the mutation.

func (*OAuthConsentMutation) RevokedAtCleared

func (m *OAuthConsentMutation) RevokedAtCleared() bool

RevokedAtCleared returns if the "revoked_at" field was cleared in this mutation.

func (*OAuthConsentMutation) RevokedReason

func (m *OAuthConsentMutation) RevokedReason() (r string, exists bool)

RevokedReason returns the value of the "revoked_reason" field in the mutation.

func (*OAuthConsentMutation) RevokedReasonCleared

func (m *OAuthConsentMutation) RevokedReasonCleared() bool

RevokedReasonCleared returns if the "revoked_reason" field was cleared in this mutation.

func (*OAuthConsentMutation) Scopes

func (m *OAuthConsentMutation) Scopes() (r []string, exists bool)

Scopes returns the value of the "scopes" field in the mutation.

func (*OAuthConsentMutation) SetAppID

func (m *OAuthConsentMutation) SetAppID(u uuid.UUID)

SetAppID sets the "app_id" field.

func (*OAuthConsentMutation) SetCreatedAt

func (m *OAuthConsentMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*OAuthConsentMutation) SetField

func (m *OAuthConsentMutation) 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 (*OAuthConsentMutation) SetGranted

func (m *OAuthConsentMutation) SetGranted(b bool)

SetGranted sets the "granted" field.

func (*OAuthConsentMutation) SetGrantedAt

func (m *OAuthConsentMutation) SetGrantedAt(t time.Time)

SetGrantedAt sets the "granted_at" field.

func (*OAuthConsentMutation) SetID

func (m *OAuthConsentMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of OAuthConsent entities.

func (*OAuthConsentMutation) SetLastUsedAt

func (m *OAuthConsentMutation) SetLastUsedAt(t time.Time)

SetLastUsedAt sets the "last_used_at" field.

func (*OAuthConsentMutation) SetOp

func (m *OAuthConsentMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OAuthConsentMutation) SetRevoked

func (m *OAuthConsentMutation) SetRevoked(b bool)

SetRevoked sets the "revoked" field.

func (*OAuthConsentMutation) SetRevokedAt

func (m *OAuthConsentMutation) SetRevokedAt(t time.Time)

SetRevokedAt sets the "revoked_at" field.

func (*OAuthConsentMutation) SetRevokedReason

func (m *OAuthConsentMutation) SetRevokedReason(s string)

SetRevokedReason sets the "revoked_reason" field.

func (*OAuthConsentMutation) SetScopes

func (m *OAuthConsentMutation) SetScopes(s []string)

SetScopes sets the "scopes" field.

func (*OAuthConsentMutation) SetUpdatedAt

func (m *OAuthConsentMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*OAuthConsentMutation) SetUserID

func (m *OAuthConsentMutation) SetUserID(u uuid.UUID)

SetUserID sets the "user_id" field.

func (OAuthConsentMutation) Tx

func (m OAuthConsentMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*OAuthConsentMutation) Type

func (m *OAuthConsentMutation) Type() string

Type returns the node type of this mutation (OAuthConsent).

func (*OAuthConsentMutation) UpdatedAt

func (m *OAuthConsentMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*OAuthConsentMutation) UserCleared

func (m *OAuthConsentMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*OAuthConsentMutation) UserID

func (m *OAuthConsentMutation) UserID() (r uuid.UUID, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*OAuthConsentMutation) UserIDs

func (m *OAuthConsentMutation) UserIDs() (ids []uuid.UUID)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*OAuthConsentMutation) Where

Where appends a list predicates to the OAuthConsentMutation builder.

func (*OAuthConsentMutation) WhereP

func (m *OAuthConsentMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the OAuthConsentMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type OAuthConsentQuery

type OAuthConsentQuery struct {
	// contains filtered or unexported fields
}

OAuthConsentQuery is the builder for querying OAuthConsent entities.

func (*OAuthConsentQuery) Aggregate

func (_q *OAuthConsentQuery) Aggregate(fns ...AggregateFunc) *OAuthConsentSelect

Aggregate returns a OAuthConsentSelect configured with the given aggregations.

func (*OAuthConsentQuery) All

func (_q *OAuthConsentQuery) All(ctx context.Context) ([]*OAuthConsent, error)

All executes the query and returns a list of OAuthConsents.

func (*OAuthConsentQuery) AllX

func (_q *OAuthConsentQuery) AllX(ctx context.Context) []*OAuthConsent

AllX is like All, but panics if an error occurs.

func (*OAuthConsentQuery) Clone

func (_q *OAuthConsentQuery) Clone() *OAuthConsentQuery

Clone returns a duplicate of the OAuthConsentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*OAuthConsentQuery) Count

func (_q *OAuthConsentQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OAuthConsentQuery) CountX

func (_q *OAuthConsentQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*OAuthConsentQuery) Exist

func (_q *OAuthConsentQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*OAuthConsentQuery) ExistX

func (_q *OAuthConsentQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*OAuthConsentQuery) Filter

func (_q *OAuthConsentQuery) Filter() *OAuthConsentFilter

Filter returns a Filter implementation to apply filters on the OAuthConsentQuery builder.

func (*OAuthConsentQuery) First

func (_q *OAuthConsentQuery) First(ctx context.Context) (*OAuthConsent, error)

First returns the first OAuthConsent entity from the query. Returns a *NotFoundError when no OAuthConsent was found.

func (*OAuthConsentQuery) FirstID

func (_q *OAuthConsentQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first OAuthConsent ID from the query. Returns a *NotFoundError when no OAuthConsent ID was found.

func (*OAuthConsentQuery) FirstIDX

func (_q *OAuthConsentQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*OAuthConsentQuery) FirstX

func (_q *OAuthConsentQuery) FirstX(ctx context.Context) *OAuthConsent

FirstX is like First, but panics if an error occurs.

func (*OAuthConsentQuery) GroupBy

func (_q *OAuthConsentQuery) GroupBy(field string, fields ...string) *OAuthConsentGroupBy

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 uuid.UUID `json:"user_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.OAuthConsent.Query().
	GroupBy(oauthconsent.FieldUserID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OAuthConsentQuery) IDs

func (_q *OAuthConsentQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of OAuthConsent IDs.

func (*OAuthConsentQuery) IDsX

func (_q *OAuthConsentQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*OAuthConsentQuery) Limit

func (_q *OAuthConsentQuery) Limit(limit int) *OAuthConsentQuery

Limit the number of records to be returned by this query.

func (*OAuthConsentQuery) Offset

func (_q *OAuthConsentQuery) Offset(offset int) *OAuthConsentQuery

Offset to start from.

func (*OAuthConsentQuery) Only

Only returns a single OAuthConsent entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OAuthConsent entity is found. Returns a *NotFoundError when no OAuthConsent entities are found.

func (*OAuthConsentQuery) OnlyID

func (_q *OAuthConsentQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only OAuthConsent ID in the query. Returns a *NotSingularError when more than one OAuthConsent ID is found. Returns a *NotFoundError when no entities are found.

func (*OAuthConsentQuery) OnlyIDX

func (_q *OAuthConsentQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*OAuthConsentQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*OAuthConsentQuery) Order

Order specifies how the records should be ordered.

func (*OAuthConsentQuery) QueryApp

func (_q *OAuthConsentQuery) QueryApp() *OAuthAppQuery

QueryApp chains the current query on the "app" edge.

func (*OAuthConsentQuery) QueryUser

func (_q *OAuthConsentQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*OAuthConsentQuery) Select

func (_q *OAuthConsentQuery) Select(fields ...string) *OAuthConsentSelect

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 uuid.UUID `json:"user_id,omitempty"`
}

client.OAuthConsent.Query().
	Select(oauthconsent.FieldUserID).
	Scan(ctx, &v)

func (*OAuthConsentQuery) Unique

func (_q *OAuthConsentQuery) Unique(unique bool) *OAuthConsentQuery

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 (*OAuthConsentQuery) Where

Where adds a new predicate for the OAuthConsentQuery builder.

func (*OAuthConsentQuery) WithApp

func (_q *OAuthConsentQuery) WithApp(opts ...func(*OAuthAppQuery)) *OAuthConsentQuery

WithApp tells the query-builder to eager-load the nodes that are connected to the "app" edge. The optional arguments are used to configure the query builder of the edge.

func (*OAuthConsentQuery) WithUser

func (_q *OAuthConsentQuery) WithUser(opts ...func(*UserQuery)) *OAuthConsentQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type OAuthConsentSelect

type OAuthConsentSelect struct {
	*OAuthConsentQuery
	// contains filtered or unexported fields
}

OAuthConsentSelect is the builder for selecting fields of OAuthConsent entities.

func (*OAuthConsentSelect) Aggregate

func (_s *OAuthConsentSelect) Aggregate(fns ...AggregateFunc) *OAuthConsentSelect

Aggregate adds the given aggregation functions to the selector query.

func (*OAuthConsentSelect) Bool

func (s *OAuthConsentSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OAuthConsentSelect) BoolX

func (s *OAuthConsentSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OAuthConsentSelect) Bools

func (s *OAuthConsentSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OAuthConsentSelect) BoolsX

func (s *OAuthConsentSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OAuthConsentSelect) Float64

func (s *OAuthConsentSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OAuthConsentSelect) Float64X

func (s *OAuthConsentSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OAuthConsentSelect) Float64s

func (s *OAuthConsentSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OAuthConsentSelect) Float64sX

func (s *OAuthConsentSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OAuthConsentSelect) Int

func (s *OAuthConsentSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OAuthConsentSelect) IntX

func (s *OAuthConsentSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OAuthConsentSelect) Ints

func (s *OAuthConsentSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OAuthConsentSelect) IntsX

func (s *OAuthConsentSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OAuthConsentSelect) Scan

func (_s *OAuthConsentSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OAuthConsentSelect) ScanX

func (s *OAuthConsentSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OAuthConsentSelect) String

func (s *OAuthConsentSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OAuthConsentSelect) StringX

func (s *OAuthConsentSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OAuthConsentSelect) Strings

func (s *OAuthConsentSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OAuthConsentSelect) StringsX

func (s *OAuthConsentSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OAuthConsentUpdate

type OAuthConsentUpdate struct {
	// contains filtered or unexported fields
}

OAuthConsentUpdate is the builder for updating OAuthConsent entities.

func (*OAuthConsentUpdate) AppendScopes

func (_u *OAuthConsentUpdate) AppendScopes(v []string) *OAuthConsentUpdate

AppendScopes appends value to the "scopes" field.

func (*OAuthConsentUpdate) ClearApp

func (_u *OAuthConsentUpdate) ClearApp() *OAuthConsentUpdate

ClearApp clears the "app" edge to the OAuthApp entity.

func (*OAuthConsentUpdate) ClearLastUsedAt

func (_u *OAuthConsentUpdate) ClearLastUsedAt() *OAuthConsentUpdate

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*OAuthConsentUpdate) ClearRevokedAt

func (_u *OAuthConsentUpdate) ClearRevokedAt() *OAuthConsentUpdate

ClearRevokedAt clears the value of the "revoked_at" field.

func (*OAuthConsentUpdate) ClearRevokedReason

func (_u *OAuthConsentUpdate) ClearRevokedReason() *OAuthConsentUpdate

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*OAuthConsentUpdate) ClearUser

func (_u *OAuthConsentUpdate) ClearUser() *OAuthConsentUpdate

ClearUser clears the "user" edge to the User entity.

func (*OAuthConsentUpdate) Exec

func (_u *OAuthConsentUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OAuthConsentUpdate) ExecX

func (_u *OAuthConsentUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OAuthConsentUpdate) Mutation

func (_u *OAuthConsentUpdate) Mutation() *OAuthConsentMutation

Mutation returns the OAuthConsentMutation object of the builder.

func (*OAuthConsentUpdate) Save

func (_u *OAuthConsentUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*OAuthConsentUpdate) SaveX

func (_u *OAuthConsentUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*OAuthConsentUpdate) SetApp

SetApp sets the "app" edge to the OAuthApp entity.

func (*OAuthConsentUpdate) SetAppID

SetAppID sets the "app_id" field.

func (*OAuthConsentUpdate) SetGranted

func (_u *OAuthConsentUpdate) SetGranted(v bool) *OAuthConsentUpdate

SetGranted sets the "granted" field.

func (*OAuthConsentUpdate) SetGrantedAt

func (_u *OAuthConsentUpdate) SetGrantedAt(v time.Time) *OAuthConsentUpdate

SetGrantedAt sets the "granted_at" field.

func (*OAuthConsentUpdate) SetLastUsedAt

func (_u *OAuthConsentUpdate) SetLastUsedAt(v time.Time) *OAuthConsentUpdate

SetLastUsedAt sets the "last_used_at" field.

func (*OAuthConsentUpdate) SetNillableAppID

func (_u *OAuthConsentUpdate) SetNillableAppID(v *uuid.UUID) *OAuthConsentUpdate

SetNillableAppID sets the "app_id" field if the given value is not nil.

func (*OAuthConsentUpdate) SetNillableGranted

func (_u *OAuthConsentUpdate) SetNillableGranted(v *bool) *OAuthConsentUpdate

SetNillableGranted sets the "granted" field if the given value is not nil.

func (*OAuthConsentUpdate) SetNillableGrantedAt

func (_u *OAuthConsentUpdate) SetNillableGrantedAt(v *time.Time) *OAuthConsentUpdate

SetNillableGrantedAt sets the "granted_at" field if the given value is not nil.

func (*OAuthConsentUpdate) SetNillableLastUsedAt

func (_u *OAuthConsentUpdate) SetNillableLastUsedAt(v *time.Time) *OAuthConsentUpdate

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*OAuthConsentUpdate) SetNillableRevoked

func (_u *OAuthConsentUpdate) SetNillableRevoked(v *bool) *OAuthConsentUpdate

SetNillableRevoked sets the "revoked" field if the given value is not nil.

func (*OAuthConsentUpdate) SetNillableRevokedAt

func (_u *OAuthConsentUpdate) SetNillableRevokedAt(v *time.Time) *OAuthConsentUpdate

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*OAuthConsentUpdate) SetNillableRevokedReason

func (_u *OAuthConsentUpdate) SetNillableRevokedReason(v *string) *OAuthConsentUpdate

SetNillableRevokedReason sets the "revoked_reason" field if the given value is not nil.

func (*OAuthConsentUpdate) SetNillableUserID

func (_u *OAuthConsentUpdate) SetNillableUserID(v *uuid.UUID) *OAuthConsentUpdate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*OAuthConsentUpdate) SetRevoked

func (_u *OAuthConsentUpdate) SetRevoked(v bool) *OAuthConsentUpdate

SetRevoked sets the "revoked" field.

func (*OAuthConsentUpdate) SetRevokedAt

func (_u *OAuthConsentUpdate) SetRevokedAt(v time.Time) *OAuthConsentUpdate

SetRevokedAt sets the "revoked_at" field.

func (*OAuthConsentUpdate) SetRevokedReason

func (_u *OAuthConsentUpdate) SetRevokedReason(v string) *OAuthConsentUpdate

SetRevokedReason sets the "revoked_reason" field.

func (*OAuthConsentUpdate) SetScopes

func (_u *OAuthConsentUpdate) SetScopes(v []string) *OAuthConsentUpdate

SetScopes sets the "scopes" field.

func (*OAuthConsentUpdate) SetUpdatedAt

func (_u *OAuthConsentUpdate) SetUpdatedAt(v time.Time) *OAuthConsentUpdate

SetUpdatedAt sets the "updated_at" field.

func (*OAuthConsentUpdate) SetUser

func (_u *OAuthConsentUpdate) SetUser(v *User) *OAuthConsentUpdate

SetUser sets the "user" edge to the User entity.

func (*OAuthConsentUpdate) SetUserID

func (_u *OAuthConsentUpdate) SetUserID(v uuid.UUID) *OAuthConsentUpdate

SetUserID sets the "user_id" field.

func (*OAuthConsentUpdate) Where

Where appends a list predicates to the OAuthConsentUpdate builder.

type OAuthConsentUpdateOne

type OAuthConsentUpdateOne struct {
	// contains filtered or unexported fields
}

OAuthConsentUpdateOne is the builder for updating a single OAuthConsent entity.

func (*OAuthConsentUpdateOne) AppendScopes

func (_u *OAuthConsentUpdateOne) AppendScopes(v []string) *OAuthConsentUpdateOne

AppendScopes appends value to the "scopes" field.

func (*OAuthConsentUpdateOne) ClearApp

ClearApp clears the "app" edge to the OAuthApp entity.

func (*OAuthConsentUpdateOne) ClearLastUsedAt

func (_u *OAuthConsentUpdateOne) ClearLastUsedAt() *OAuthConsentUpdateOne

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*OAuthConsentUpdateOne) ClearRevokedAt

func (_u *OAuthConsentUpdateOne) ClearRevokedAt() *OAuthConsentUpdateOne

ClearRevokedAt clears the value of the "revoked_at" field.

func (*OAuthConsentUpdateOne) ClearRevokedReason

func (_u *OAuthConsentUpdateOne) ClearRevokedReason() *OAuthConsentUpdateOne

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*OAuthConsentUpdateOne) ClearUser

ClearUser clears the "user" edge to the User entity.

func (*OAuthConsentUpdateOne) Exec

Exec executes the query on the entity.

func (*OAuthConsentUpdateOne) ExecX

func (_u *OAuthConsentUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OAuthConsentUpdateOne) Mutation

Mutation returns the OAuthConsentMutation object of the builder.

func (*OAuthConsentUpdateOne) Save

Save executes the query and returns the updated OAuthConsent entity.

func (*OAuthConsentUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*OAuthConsentUpdateOne) Select

func (_u *OAuthConsentUpdateOne) Select(field string, fields ...string) *OAuthConsentUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*OAuthConsentUpdateOne) SetApp

SetApp sets the "app" edge to the OAuthApp entity.

func (*OAuthConsentUpdateOne) SetAppID

SetAppID sets the "app_id" field.

func (*OAuthConsentUpdateOne) SetGranted

SetGranted sets the "granted" field.

func (*OAuthConsentUpdateOne) SetGrantedAt

SetGrantedAt sets the "granted_at" field.

func (*OAuthConsentUpdateOne) SetLastUsedAt

func (_u *OAuthConsentUpdateOne) SetLastUsedAt(v time.Time) *OAuthConsentUpdateOne

SetLastUsedAt sets the "last_used_at" field.

func (*OAuthConsentUpdateOne) SetNillableAppID

func (_u *OAuthConsentUpdateOne) SetNillableAppID(v *uuid.UUID) *OAuthConsentUpdateOne

SetNillableAppID sets the "app_id" field if the given value is not nil.

func (*OAuthConsentUpdateOne) SetNillableGranted

func (_u *OAuthConsentUpdateOne) SetNillableGranted(v *bool) *OAuthConsentUpdateOne

SetNillableGranted sets the "granted" field if the given value is not nil.

func (*OAuthConsentUpdateOne) SetNillableGrantedAt

func (_u *OAuthConsentUpdateOne) SetNillableGrantedAt(v *time.Time) *OAuthConsentUpdateOne

SetNillableGrantedAt sets the "granted_at" field if the given value is not nil.

func (*OAuthConsentUpdateOne) SetNillableLastUsedAt

func (_u *OAuthConsentUpdateOne) SetNillableLastUsedAt(v *time.Time) *OAuthConsentUpdateOne

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*OAuthConsentUpdateOne) SetNillableRevoked

func (_u *OAuthConsentUpdateOne) SetNillableRevoked(v *bool) *OAuthConsentUpdateOne

SetNillableRevoked sets the "revoked" field if the given value is not nil.

func (*OAuthConsentUpdateOne) SetNillableRevokedAt

func (_u *OAuthConsentUpdateOne) SetNillableRevokedAt(v *time.Time) *OAuthConsentUpdateOne

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*OAuthConsentUpdateOne) SetNillableRevokedReason

func (_u *OAuthConsentUpdateOne) SetNillableRevokedReason(v *string) *OAuthConsentUpdateOne

SetNillableRevokedReason sets the "revoked_reason" field if the given value is not nil.

func (*OAuthConsentUpdateOne) SetNillableUserID

func (_u *OAuthConsentUpdateOne) SetNillableUserID(v *uuid.UUID) *OAuthConsentUpdateOne

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*OAuthConsentUpdateOne) SetRevoked

SetRevoked sets the "revoked" field.

func (*OAuthConsentUpdateOne) SetRevokedAt

SetRevokedAt sets the "revoked_at" field.

func (*OAuthConsentUpdateOne) SetRevokedReason

func (_u *OAuthConsentUpdateOne) SetRevokedReason(v string) *OAuthConsentUpdateOne

SetRevokedReason sets the "revoked_reason" field.

func (*OAuthConsentUpdateOne) SetScopes

SetScopes sets the "scopes" field.

func (*OAuthConsentUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*OAuthConsentUpdateOne) SetUser

SetUser sets the "user" edge to the User entity.

func (*OAuthConsentUpdateOne) SetUserID

SetUserID sets the "user_id" field.

func (*OAuthConsentUpdateOne) Where

Where appends a list predicates to the OAuthConsentUpdate builder.

type OAuthConsentUpsert

type OAuthConsentUpsert struct {
	*sql.UpdateSet
}

OAuthConsentUpsert is the "OnConflict" setter.

func (*OAuthConsentUpsert) ClearLastUsedAt

func (u *OAuthConsentUpsert) ClearLastUsedAt() *OAuthConsentUpsert

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*OAuthConsentUpsert) ClearRevokedAt

func (u *OAuthConsentUpsert) ClearRevokedAt() *OAuthConsentUpsert

ClearRevokedAt clears the value of the "revoked_at" field.

func (*OAuthConsentUpsert) ClearRevokedReason

func (u *OAuthConsentUpsert) ClearRevokedReason() *OAuthConsentUpsert

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*OAuthConsentUpsert) SetAppID

SetAppID sets the "app_id" field.

func (*OAuthConsentUpsert) SetGranted

func (u *OAuthConsentUpsert) SetGranted(v bool) *OAuthConsentUpsert

SetGranted sets the "granted" field.

func (*OAuthConsentUpsert) SetGrantedAt

func (u *OAuthConsentUpsert) SetGrantedAt(v time.Time) *OAuthConsentUpsert

SetGrantedAt sets the "granted_at" field.

func (*OAuthConsentUpsert) SetLastUsedAt

func (u *OAuthConsentUpsert) SetLastUsedAt(v time.Time) *OAuthConsentUpsert

SetLastUsedAt sets the "last_used_at" field.

func (*OAuthConsentUpsert) SetRevoked

func (u *OAuthConsentUpsert) SetRevoked(v bool) *OAuthConsentUpsert

SetRevoked sets the "revoked" field.

func (*OAuthConsentUpsert) SetRevokedAt

func (u *OAuthConsentUpsert) SetRevokedAt(v time.Time) *OAuthConsentUpsert

SetRevokedAt sets the "revoked_at" field.

func (*OAuthConsentUpsert) SetRevokedReason

func (u *OAuthConsentUpsert) SetRevokedReason(v string) *OAuthConsentUpsert

SetRevokedReason sets the "revoked_reason" field.

func (*OAuthConsentUpsert) SetScopes

func (u *OAuthConsentUpsert) SetScopes(v []string) *OAuthConsentUpsert

SetScopes sets the "scopes" field.

func (*OAuthConsentUpsert) SetUpdatedAt

func (u *OAuthConsentUpsert) SetUpdatedAt(v time.Time) *OAuthConsentUpsert

SetUpdatedAt sets the "updated_at" field.

func (*OAuthConsentUpsert) SetUserID

SetUserID sets the "user_id" field.

func (*OAuthConsentUpsert) UpdateAppID

func (u *OAuthConsentUpsert) UpdateAppID() *OAuthConsentUpsert

UpdateAppID sets the "app_id" field to the value that was provided on create.

func (*OAuthConsentUpsert) UpdateGranted

func (u *OAuthConsentUpsert) UpdateGranted() *OAuthConsentUpsert

UpdateGranted sets the "granted" field to the value that was provided on create.

func (*OAuthConsentUpsert) UpdateGrantedAt

func (u *OAuthConsentUpsert) UpdateGrantedAt() *OAuthConsentUpsert

UpdateGrantedAt sets the "granted_at" field to the value that was provided on create.

func (*OAuthConsentUpsert) UpdateLastUsedAt

func (u *OAuthConsentUpsert) UpdateLastUsedAt() *OAuthConsentUpsert

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*OAuthConsentUpsert) UpdateRevoked

func (u *OAuthConsentUpsert) UpdateRevoked() *OAuthConsentUpsert

UpdateRevoked sets the "revoked" field to the value that was provided on create.

func (*OAuthConsentUpsert) UpdateRevokedAt

func (u *OAuthConsentUpsert) UpdateRevokedAt() *OAuthConsentUpsert

UpdateRevokedAt sets the "revoked_at" field to the value that was provided on create.

func (*OAuthConsentUpsert) UpdateRevokedReason

func (u *OAuthConsentUpsert) UpdateRevokedReason() *OAuthConsentUpsert

UpdateRevokedReason sets the "revoked_reason" field to the value that was provided on create.

func (*OAuthConsentUpsert) UpdateScopes

func (u *OAuthConsentUpsert) UpdateScopes() *OAuthConsentUpsert

UpdateScopes sets the "scopes" field to the value that was provided on create.

func (*OAuthConsentUpsert) UpdateUpdatedAt

func (u *OAuthConsentUpsert) UpdateUpdatedAt() *OAuthConsentUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OAuthConsentUpsert) UpdateUserID

func (u *OAuthConsentUpsert) UpdateUserID() *OAuthConsentUpsert

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OAuthConsentUpsertBulk

type OAuthConsentUpsertBulk struct {
	// contains filtered or unexported fields
}

OAuthConsentUpsertBulk is the builder for "upsert"-ing a bulk of OAuthConsent nodes.

func (*OAuthConsentUpsertBulk) ClearLastUsedAt

func (u *OAuthConsentUpsertBulk) ClearLastUsedAt() *OAuthConsentUpsertBulk

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*OAuthConsentUpsertBulk) ClearRevokedAt

func (u *OAuthConsentUpsertBulk) ClearRevokedAt() *OAuthConsentUpsertBulk

ClearRevokedAt clears the value of the "revoked_at" field.

func (*OAuthConsentUpsertBulk) ClearRevokedReason

func (u *OAuthConsentUpsertBulk) ClearRevokedReason() *OAuthConsentUpsertBulk

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*OAuthConsentUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OAuthConsentUpsertBulk) Exec

Exec executes the query.

func (*OAuthConsentUpsertBulk) ExecX

func (u *OAuthConsentUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OAuthConsentUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OAuthConsent.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*OAuthConsentUpsertBulk) SetAppID

SetAppID sets the "app_id" field.

func (*OAuthConsentUpsertBulk) SetGranted

SetGranted sets the "granted" field.

func (*OAuthConsentUpsertBulk) SetGrantedAt

SetGrantedAt sets the "granted_at" field.

func (*OAuthConsentUpsertBulk) SetLastUsedAt

SetLastUsedAt sets the "last_used_at" field.

func (*OAuthConsentUpsertBulk) SetRevoked

SetRevoked sets the "revoked" field.

func (*OAuthConsentUpsertBulk) SetRevokedAt

SetRevokedAt sets the "revoked_at" field.

func (*OAuthConsentUpsertBulk) SetRevokedReason

func (u *OAuthConsentUpsertBulk) SetRevokedReason(v string) *OAuthConsentUpsertBulk

SetRevokedReason sets the "revoked_reason" field.

func (*OAuthConsentUpsertBulk) SetScopes

SetScopes sets the "scopes" field.

func (*OAuthConsentUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*OAuthConsentUpsertBulk) SetUserID

SetUserID sets the "user_id" field.

func (*OAuthConsentUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the OAuthConsentCreateBulk.OnConflict documentation for more info.

func (*OAuthConsentUpsertBulk) UpdateAppID

UpdateAppID sets the "app_id" field to the value that was provided on create.

func (*OAuthConsentUpsertBulk) UpdateGranted

func (u *OAuthConsentUpsertBulk) UpdateGranted() *OAuthConsentUpsertBulk

UpdateGranted sets the "granted" field to the value that was provided on create.

func (*OAuthConsentUpsertBulk) UpdateGrantedAt

func (u *OAuthConsentUpsertBulk) UpdateGrantedAt() *OAuthConsentUpsertBulk

UpdateGrantedAt sets the "granted_at" field to the value that was provided on create.

func (*OAuthConsentUpsertBulk) UpdateLastUsedAt

func (u *OAuthConsentUpsertBulk) UpdateLastUsedAt() *OAuthConsentUpsertBulk

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*OAuthConsentUpsertBulk) UpdateNewValues

func (u *OAuthConsentUpsertBulk) UpdateNewValues() *OAuthConsentUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.OAuthConsent.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(oauthconsent.FieldID)
		}),
	).
	Exec(ctx)

func (*OAuthConsentUpsertBulk) UpdateRevoked

func (u *OAuthConsentUpsertBulk) UpdateRevoked() *OAuthConsentUpsertBulk

UpdateRevoked sets the "revoked" field to the value that was provided on create.

func (*OAuthConsentUpsertBulk) UpdateRevokedAt

func (u *OAuthConsentUpsertBulk) UpdateRevokedAt() *OAuthConsentUpsertBulk

UpdateRevokedAt sets the "revoked_at" field to the value that was provided on create.

func (*OAuthConsentUpsertBulk) UpdateRevokedReason

func (u *OAuthConsentUpsertBulk) UpdateRevokedReason() *OAuthConsentUpsertBulk

UpdateRevokedReason sets the "revoked_reason" field to the value that was provided on create.

func (*OAuthConsentUpsertBulk) UpdateScopes

UpdateScopes sets the "scopes" field to the value that was provided on create.

func (*OAuthConsentUpsertBulk) UpdateUpdatedAt

func (u *OAuthConsentUpsertBulk) UpdateUpdatedAt() *OAuthConsentUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OAuthConsentUpsertBulk) UpdateUserID

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OAuthConsentUpsertOne

type OAuthConsentUpsertOne struct {
	// contains filtered or unexported fields
}

OAuthConsentUpsertOne is the builder for "upsert"-ing

one OAuthConsent node.

func (*OAuthConsentUpsertOne) ClearLastUsedAt

func (u *OAuthConsentUpsertOne) ClearLastUsedAt() *OAuthConsentUpsertOne

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*OAuthConsentUpsertOne) ClearRevokedAt

func (u *OAuthConsentUpsertOne) ClearRevokedAt() *OAuthConsentUpsertOne

ClearRevokedAt clears the value of the "revoked_at" field.

func (*OAuthConsentUpsertOne) ClearRevokedReason

func (u *OAuthConsentUpsertOne) ClearRevokedReason() *OAuthConsentUpsertOne

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*OAuthConsentUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OAuthConsentUpsertOne) Exec

Exec executes the query.

func (*OAuthConsentUpsertOne) ExecX

func (u *OAuthConsentUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OAuthConsentUpsertOne) ID

func (u *OAuthConsentUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*OAuthConsentUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*OAuthConsentUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OAuthConsent.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*OAuthConsentUpsertOne) SetAppID

SetAppID sets the "app_id" field.

func (*OAuthConsentUpsertOne) SetGranted

SetGranted sets the "granted" field.

func (*OAuthConsentUpsertOne) SetGrantedAt

SetGrantedAt sets the "granted_at" field.

func (*OAuthConsentUpsertOne) SetLastUsedAt

SetLastUsedAt sets the "last_used_at" field.

func (*OAuthConsentUpsertOne) SetRevoked

SetRevoked sets the "revoked" field.

func (*OAuthConsentUpsertOne) SetRevokedAt

SetRevokedAt sets the "revoked_at" field.

func (*OAuthConsentUpsertOne) SetRevokedReason

func (u *OAuthConsentUpsertOne) SetRevokedReason(v string) *OAuthConsentUpsertOne

SetRevokedReason sets the "revoked_reason" field.

func (*OAuthConsentUpsertOne) SetScopes

SetScopes sets the "scopes" field.

func (*OAuthConsentUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*OAuthConsentUpsertOne) SetUserID

SetUserID sets the "user_id" field.

func (*OAuthConsentUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the OAuthConsentCreate.OnConflict documentation for more info.

func (*OAuthConsentUpsertOne) UpdateAppID

func (u *OAuthConsentUpsertOne) UpdateAppID() *OAuthConsentUpsertOne

UpdateAppID sets the "app_id" field to the value that was provided on create.

func (*OAuthConsentUpsertOne) UpdateGranted

func (u *OAuthConsentUpsertOne) UpdateGranted() *OAuthConsentUpsertOne

UpdateGranted sets the "granted" field to the value that was provided on create.

func (*OAuthConsentUpsertOne) UpdateGrantedAt

func (u *OAuthConsentUpsertOne) UpdateGrantedAt() *OAuthConsentUpsertOne

UpdateGrantedAt sets the "granted_at" field to the value that was provided on create.

func (*OAuthConsentUpsertOne) UpdateLastUsedAt

func (u *OAuthConsentUpsertOne) UpdateLastUsedAt() *OAuthConsentUpsertOne

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*OAuthConsentUpsertOne) UpdateNewValues

func (u *OAuthConsentUpsertOne) UpdateNewValues() *OAuthConsentUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.OAuthConsent.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(oauthconsent.FieldID)
		}),
	).
	Exec(ctx)

func (*OAuthConsentUpsertOne) UpdateRevoked

func (u *OAuthConsentUpsertOne) UpdateRevoked() *OAuthConsentUpsertOne

UpdateRevoked sets the "revoked" field to the value that was provided on create.

func (*OAuthConsentUpsertOne) UpdateRevokedAt

func (u *OAuthConsentUpsertOne) UpdateRevokedAt() *OAuthConsentUpsertOne

UpdateRevokedAt sets the "revoked_at" field to the value that was provided on create.

func (*OAuthConsentUpsertOne) UpdateRevokedReason

func (u *OAuthConsentUpsertOne) UpdateRevokedReason() *OAuthConsentUpsertOne

UpdateRevokedReason sets the "revoked_reason" field to the value that was provided on create.

func (*OAuthConsentUpsertOne) UpdateScopes

func (u *OAuthConsentUpsertOne) UpdateScopes() *OAuthConsentUpsertOne

UpdateScopes sets the "scopes" field to the value that was provided on create.

func (*OAuthConsentUpsertOne) UpdateUpdatedAt

func (u *OAuthConsentUpsertOne) UpdateUpdatedAt() *OAuthConsentUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OAuthConsentUpsertOne) UpdateUserID

func (u *OAuthConsentUpsertOne) UpdateUserID() *OAuthConsentUpsertOne

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OAuthConsents

type OAuthConsents []*OAuthConsent

OAuthConsents is a parsable slice of OAuthConsent.

type OAuthToken

type OAuthToken struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// OAuth app that issued this token
	AppID uuid.UUID `json:"app_id,omitempty"`
	// User this token represents (nil for client_credentials)
	UserID *uuid.UUID `json:"user_id,omitempty"`
	// Service account (for JWT bearer grant)
	ServiceAccountID *uuid.UUID `json:"service_account_id,omitempty"`
	// SHA256 signature of access token
	AccessTokenSignature string `json:"access_token_signature,omitempty"`
	// SHA256 signature of refresh token
	RefreshTokenSignature *string `json:"refresh_token_signature,omitempty"`
	// Token family for refresh rotation
	FamilyID uuid.UUID `json:"family_id,omitempty"`
	// Granted scopes
	Scopes []string `json:"scopes,omitempty"`
	// Token audience
	Audience []string `json:"audience,omitempty"`
	// BFF session ID if applicable
	SessionID string `json:"session_id,omitempty"`
	// Serialized Fosite request for introspection
	RequestData string `json:"request_data,omitempty"`
	// When access token expires
	AccessExpiresAt time.Time `json:"access_expires_at,omitempty"`
	// When refresh token expires
	RefreshExpiresAt *time.Time `json:"refresh_expires_at,omitempty"`
	// Revoked holds the value of the "revoked" field.
	Revoked bool `json:"revoked,omitempty"`
	// RevokedAt holds the value of the "revoked_at" field.
	RevokedAt *time.Time `json:"revoked_at,omitempty"`
	// RevokedReason holds the value of the "revoked_reason" field.
	RevokedReason string `json:"revoked_reason,omitempty"`
	// ClientIP holds the value of the "client_ip" field.
	ClientIP string `json:"client_ip,omitempty"`
	// UserAgent holds the value of the "user_agent" field.
	UserAgent string `json:"user_agent,omitempty"`
	// LastUsedAt holds the value of the "last_used_at" field.
	LastUsedAt *time.Time `json:"last_used_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the OAuthTokenQuery when eager-loading is set.
	Edges OAuthTokenEdges `json:"edges"`
	// contains filtered or unexported fields
}

OAuthToken is the model entity for the OAuthToken schema.

func (*OAuthToken) QueryApp

func (_m *OAuthToken) QueryApp() *OAuthAppQuery

QueryApp queries the "app" edge of the OAuthToken entity.

func (*OAuthToken) QueryUser

func (_m *OAuthToken) QueryUser() *UserQuery

QueryUser queries the "user" edge of the OAuthToken entity.

func (*OAuthToken) String

func (_m *OAuthToken) String() string

String implements the fmt.Stringer.

func (*OAuthToken) Unwrap

func (_m *OAuthToken) Unwrap() *OAuthToken

Unwrap unwraps the OAuthToken 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 (*OAuthToken) Update

func (_m *OAuthToken) Update() *OAuthTokenUpdateOne

Update returns a builder for updating this OAuthToken. Note that you need to call OAuthToken.Unwrap() before calling this method if this OAuthToken was returned from a transaction, and the transaction was committed or rolled back.

func (*OAuthToken) Value

func (_m *OAuthToken) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the OAuthToken. This includes values selected through modifiers, order, etc.

type OAuthTokenClient

type OAuthTokenClient struct {
	// contains filtered or unexported fields
}

OAuthTokenClient is a client for the OAuthToken schema.

func NewOAuthTokenClient

func NewOAuthTokenClient(c config) *OAuthTokenClient

NewOAuthTokenClient returns a client for the OAuthToken from the given config.

func (*OAuthTokenClient) Create

func (c *OAuthTokenClient) Create() *OAuthTokenCreate

Create returns a builder for creating a OAuthToken entity.

func (*OAuthTokenClient) CreateBulk

func (c *OAuthTokenClient) CreateBulk(builders ...*OAuthTokenCreate) *OAuthTokenCreateBulk

CreateBulk returns a builder for creating a bulk of OAuthToken entities.

func (*OAuthTokenClient) Delete

func (c *OAuthTokenClient) Delete() *OAuthTokenDelete

Delete returns a delete builder for OAuthToken.

func (*OAuthTokenClient) DeleteOne

func (c *OAuthTokenClient) DeleteOne(_m *OAuthToken) *OAuthTokenDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OAuthTokenClient) DeleteOneID

func (c *OAuthTokenClient) DeleteOneID(id uuid.UUID) *OAuthTokenDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*OAuthTokenClient) Get

Get returns a OAuthToken entity by its id.

func (*OAuthTokenClient) GetX

func (c *OAuthTokenClient) GetX(ctx context.Context, id uuid.UUID) *OAuthToken

GetX is like Get, but panics if an error occurs.

func (*OAuthTokenClient) Hooks

func (c *OAuthTokenClient) Hooks() []Hook

Hooks returns the client hooks.

func (*OAuthTokenClient) Intercept

func (c *OAuthTokenClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `oauthtoken.Intercept(f(g(h())))`.

func (*OAuthTokenClient) Interceptors

func (c *OAuthTokenClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*OAuthTokenClient) MapCreateBulk

func (c *OAuthTokenClient) MapCreateBulk(slice any, setFunc func(*OAuthTokenCreate, int)) *OAuthTokenCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*OAuthTokenClient) Query

func (c *OAuthTokenClient) Query() *OAuthTokenQuery

Query returns a query builder for OAuthToken.

func (*OAuthTokenClient) QueryApp

func (c *OAuthTokenClient) QueryApp(_m *OAuthToken) *OAuthAppQuery

QueryApp queries the app edge of a OAuthToken.

func (*OAuthTokenClient) QueryUser

func (c *OAuthTokenClient) QueryUser(_m *OAuthToken) *UserQuery

QueryUser queries the user edge of a OAuthToken.

func (*OAuthTokenClient) Update

func (c *OAuthTokenClient) Update() *OAuthTokenUpdate

Update returns an update builder for OAuthToken.

func (*OAuthTokenClient) UpdateOne

func (c *OAuthTokenClient) UpdateOne(_m *OAuthToken) *OAuthTokenUpdateOne

UpdateOne returns an update builder for the given entity.

func (*OAuthTokenClient) UpdateOneID

func (c *OAuthTokenClient) UpdateOneID(id uuid.UUID) *OAuthTokenUpdateOne

UpdateOneID returns an update builder for the given id.

func (*OAuthTokenClient) Use

func (c *OAuthTokenClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `oauthtoken.Hooks(f(g(h())))`.

type OAuthTokenCreate

type OAuthTokenCreate struct {
	// contains filtered or unexported fields
}

OAuthTokenCreate is the builder for creating a OAuthToken entity.

func (*OAuthTokenCreate) Exec

func (_c *OAuthTokenCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OAuthTokenCreate) ExecX

func (_c *OAuthTokenCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OAuthTokenCreate) Mutation

func (_c *OAuthTokenCreate) Mutation() *OAuthTokenMutation

Mutation returns the OAuthTokenMutation object of the builder.

func (*OAuthTokenCreate) OnConflict

func (_c *OAuthTokenCreate) OnConflict(opts ...sql.ConflictOption) *OAuthTokenUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OAuthToken.Create().
	SetAppID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OAuthTokenUpsert) {
		SetAppID(v+v).
	}).
	Exec(ctx)

func (*OAuthTokenCreate) OnConflictColumns

func (_c *OAuthTokenCreate) OnConflictColumns(columns ...string) *OAuthTokenUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OAuthToken.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OAuthTokenCreate) Save

func (_c *OAuthTokenCreate) Save(ctx context.Context) (*OAuthToken, error)

Save creates the OAuthToken in the database.

func (*OAuthTokenCreate) SaveX

func (_c *OAuthTokenCreate) SaveX(ctx context.Context) *OAuthToken

SaveX calls Save and panics if Save returns an error.

func (*OAuthTokenCreate) SetAccessExpiresAt

func (_c *OAuthTokenCreate) SetAccessExpiresAt(v time.Time) *OAuthTokenCreate

SetAccessExpiresAt sets the "access_expires_at" field.

func (*OAuthTokenCreate) SetAccessTokenSignature

func (_c *OAuthTokenCreate) SetAccessTokenSignature(v string) *OAuthTokenCreate

SetAccessTokenSignature sets the "access_token_signature" field.

func (*OAuthTokenCreate) SetApp

func (_c *OAuthTokenCreate) SetApp(v *OAuthApp) *OAuthTokenCreate

SetApp sets the "app" edge to the OAuthApp entity.

func (*OAuthTokenCreate) SetAppID

func (_c *OAuthTokenCreate) SetAppID(v uuid.UUID) *OAuthTokenCreate

SetAppID sets the "app_id" field.

func (*OAuthTokenCreate) SetAudience

func (_c *OAuthTokenCreate) SetAudience(v []string) *OAuthTokenCreate

SetAudience sets the "audience" field.

func (*OAuthTokenCreate) SetClientIP

func (_c *OAuthTokenCreate) SetClientIP(v string) *OAuthTokenCreate

SetClientIP sets the "client_ip" field.

func (*OAuthTokenCreate) SetCreatedAt

func (_c *OAuthTokenCreate) SetCreatedAt(v time.Time) *OAuthTokenCreate

SetCreatedAt sets the "created_at" field.

func (*OAuthTokenCreate) SetFamilyID

func (_c *OAuthTokenCreate) SetFamilyID(v uuid.UUID) *OAuthTokenCreate

SetFamilyID sets the "family_id" field.

func (*OAuthTokenCreate) SetID

SetID sets the "id" field.

func (*OAuthTokenCreate) SetLastUsedAt

func (_c *OAuthTokenCreate) SetLastUsedAt(v time.Time) *OAuthTokenCreate

SetLastUsedAt sets the "last_used_at" field.

func (*OAuthTokenCreate) SetNillableClientIP

func (_c *OAuthTokenCreate) SetNillableClientIP(v *string) *OAuthTokenCreate

SetNillableClientIP sets the "client_ip" field if the given value is not nil.

func (*OAuthTokenCreate) SetNillableCreatedAt

func (_c *OAuthTokenCreate) SetNillableCreatedAt(v *time.Time) *OAuthTokenCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*OAuthTokenCreate) SetNillableFamilyID

func (_c *OAuthTokenCreate) SetNillableFamilyID(v *uuid.UUID) *OAuthTokenCreate

SetNillableFamilyID sets the "family_id" field if the given value is not nil.

func (*OAuthTokenCreate) SetNillableID

func (_c *OAuthTokenCreate) SetNillableID(v *uuid.UUID) *OAuthTokenCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*OAuthTokenCreate) SetNillableLastUsedAt

func (_c *OAuthTokenCreate) SetNillableLastUsedAt(v *time.Time) *OAuthTokenCreate

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*OAuthTokenCreate) SetNillableRefreshExpiresAt

func (_c *OAuthTokenCreate) SetNillableRefreshExpiresAt(v *time.Time) *OAuthTokenCreate

SetNillableRefreshExpiresAt sets the "refresh_expires_at" field if the given value is not nil.

func (*OAuthTokenCreate) SetNillableRefreshTokenSignature

func (_c *OAuthTokenCreate) SetNillableRefreshTokenSignature(v *string) *OAuthTokenCreate

SetNillableRefreshTokenSignature sets the "refresh_token_signature" field if the given value is not nil.

func (*OAuthTokenCreate) SetNillableRequestData

func (_c *OAuthTokenCreate) SetNillableRequestData(v *string) *OAuthTokenCreate

SetNillableRequestData sets the "request_data" field if the given value is not nil.

func (*OAuthTokenCreate) SetNillableRevoked

func (_c *OAuthTokenCreate) SetNillableRevoked(v *bool) *OAuthTokenCreate

SetNillableRevoked sets the "revoked" field if the given value is not nil.

func (*OAuthTokenCreate) SetNillableRevokedAt

func (_c *OAuthTokenCreate) SetNillableRevokedAt(v *time.Time) *OAuthTokenCreate

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*OAuthTokenCreate) SetNillableRevokedReason

func (_c *OAuthTokenCreate) SetNillableRevokedReason(v *string) *OAuthTokenCreate

SetNillableRevokedReason sets the "revoked_reason" field if the given value is not nil.

func (*OAuthTokenCreate) SetNillableServiceAccountID

func (_c *OAuthTokenCreate) SetNillableServiceAccountID(v *uuid.UUID) *OAuthTokenCreate

SetNillableServiceAccountID sets the "service_account_id" field if the given value is not nil.

func (*OAuthTokenCreate) SetNillableSessionID

func (_c *OAuthTokenCreate) SetNillableSessionID(v *string) *OAuthTokenCreate

SetNillableSessionID sets the "session_id" field if the given value is not nil.

func (*OAuthTokenCreate) SetNillableUserAgent

func (_c *OAuthTokenCreate) SetNillableUserAgent(v *string) *OAuthTokenCreate

SetNillableUserAgent sets the "user_agent" field if the given value is not nil.

func (*OAuthTokenCreate) SetNillableUserID

func (_c *OAuthTokenCreate) SetNillableUserID(v *uuid.UUID) *OAuthTokenCreate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*OAuthTokenCreate) SetRefreshExpiresAt

func (_c *OAuthTokenCreate) SetRefreshExpiresAt(v time.Time) *OAuthTokenCreate

SetRefreshExpiresAt sets the "refresh_expires_at" field.

func (*OAuthTokenCreate) SetRefreshTokenSignature

func (_c *OAuthTokenCreate) SetRefreshTokenSignature(v string) *OAuthTokenCreate

SetRefreshTokenSignature sets the "refresh_token_signature" field.

func (*OAuthTokenCreate) SetRequestData

func (_c *OAuthTokenCreate) SetRequestData(v string) *OAuthTokenCreate

SetRequestData sets the "request_data" field.

func (*OAuthTokenCreate) SetRevoked

func (_c *OAuthTokenCreate) SetRevoked(v bool) *OAuthTokenCreate

SetRevoked sets the "revoked" field.

func (*OAuthTokenCreate) SetRevokedAt

func (_c *OAuthTokenCreate) SetRevokedAt(v time.Time) *OAuthTokenCreate

SetRevokedAt sets the "revoked_at" field.

func (*OAuthTokenCreate) SetRevokedReason

func (_c *OAuthTokenCreate) SetRevokedReason(v string) *OAuthTokenCreate

SetRevokedReason sets the "revoked_reason" field.

func (*OAuthTokenCreate) SetScopes

func (_c *OAuthTokenCreate) SetScopes(v []string) *OAuthTokenCreate

SetScopes sets the "scopes" field.

func (*OAuthTokenCreate) SetServiceAccountID

func (_c *OAuthTokenCreate) SetServiceAccountID(v uuid.UUID) *OAuthTokenCreate

SetServiceAccountID sets the "service_account_id" field.

func (*OAuthTokenCreate) SetSessionID

func (_c *OAuthTokenCreate) SetSessionID(v string) *OAuthTokenCreate

SetSessionID sets the "session_id" field.

func (*OAuthTokenCreate) SetUser

func (_c *OAuthTokenCreate) SetUser(v *User) *OAuthTokenCreate

SetUser sets the "user" edge to the User entity.

func (*OAuthTokenCreate) SetUserAgent

func (_c *OAuthTokenCreate) SetUserAgent(v string) *OAuthTokenCreate

SetUserAgent sets the "user_agent" field.

func (*OAuthTokenCreate) SetUserID

func (_c *OAuthTokenCreate) SetUserID(v uuid.UUID) *OAuthTokenCreate

SetUserID sets the "user_id" field.

type OAuthTokenCreateBulk

type OAuthTokenCreateBulk struct {
	// contains filtered or unexported fields
}

OAuthTokenCreateBulk is the builder for creating many OAuthToken entities in bulk.

func (*OAuthTokenCreateBulk) Exec

func (_c *OAuthTokenCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*OAuthTokenCreateBulk) ExecX

func (_c *OAuthTokenCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OAuthTokenCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OAuthToken.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OAuthTokenUpsert) {
		SetAppID(v+v).
	}).
	Exec(ctx)

func (*OAuthTokenCreateBulk) OnConflictColumns

func (_c *OAuthTokenCreateBulk) OnConflictColumns(columns ...string) *OAuthTokenUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OAuthToken.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OAuthTokenCreateBulk) Save

func (_c *OAuthTokenCreateBulk) Save(ctx context.Context) ([]*OAuthToken, error)

Save creates the OAuthToken entities in the database.

func (*OAuthTokenCreateBulk) SaveX

func (_c *OAuthTokenCreateBulk) SaveX(ctx context.Context) []*OAuthToken

SaveX is like Save, but panics if an error occurs.

type OAuthTokenDelete

type OAuthTokenDelete struct {
	// contains filtered or unexported fields
}

OAuthTokenDelete is the builder for deleting a OAuthToken entity.

func (*OAuthTokenDelete) Exec

func (_d *OAuthTokenDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*OAuthTokenDelete) ExecX

func (_d *OAuthTokenDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OAuthTokenDelete) Where

Where appends a list predicates to the OAuthTokenDelete builder.

type OAuthTokenDeleteOne

type OAuthTokenDeleteOne struct {
	// contains filtered or unexported fields
}

OAuthTokenDeleteOne is the builder for deleting a single OAuthToken entity.

func (*OAuthTokenDeleteOne) Exec

func (_d *OAuthTokenDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*OAuthTokenDeleteOne) ExecX

func (_d *OAuthTokenDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OAuthTokenDeleteOne) Where

Where appends a list predicates to the OAuthTokenDelete builder.

type OAuthTokenEdges

type OAuthTokenEdges struct {
	// App holds the value of the app edge.
	App *OAuthApp `json:"app,omitempty"`
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// contains filtered or unexported fields
}

OAuthTokenEdges holds the relations/edges for other nodes in the graph.

func (OAuthTokenEdges) AppOrErr

func (e OAuthTokenEdges) AppOrErr() (*OAuthApp, error)

AppOrErr returns the App value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (OAuthTokenEdges) UserOrErr

func (e OAuthTokenEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type OAuthTokenFilter

type OAuthTokenFilter struct {
	// contains filtered or unexported fields
}

OAuthTokenFilter provides a generic filtering capability at runtime for OAuthTokenQuery.

func (*OAuthTokenFilter) Where

func (f *OAuthTokenFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*OAuthTokenFilter) WhereAccessExpiresAt

func (f *OAuthTokenFilter) WhereAccessExpiresAt(p entql.TimeP)

WhereAccessExpiresAt applies the entql time.Time predicate on the access_expires_at field.

func (*OAuthTokenFilter) WhereAccessTokenSignature

func (f *OAuthTokenFilter) WhereAccessTokenSignature(p entql.StringP)

WhereAccessTokenSignature applies the entql string predicate on the access_token_signature field.

func (*OAuthTokenFilter) WhereAppID

func (f *OAuthTokenFilter) WhereAppID(p entql.ValueP)

WhereAppID applies the entql [16]byte predicate on the app_id field.

func (*OAuthTokenFilter) WhereAudience

func (f *OAuthTokenFilter) WhereAudience(p entql.BytesP)

WhereAudience applies the entql json.RawMessage predicate on the audience field.

func (*OAuthTokenFilter) WhereClientIP

func (f *OAuthTokenFilter) WhereClientIP(p entql.StringP)

WhereClientIP applies the entql string predicate on the client_ip field.

func (*OAuthTokenFilter) WhereCreatedAt

func (f *OAuthTokenFilter) WhereCreatedAt(p entql.TimeP)

WhereCreatedAt applies the entql time.Time predicate on the created_at field.

func (*OAuthTokenFilter) WhereFamilyID

func (f *OAuthTokenFilter) WhereFamilyID(p entql.ValueP)

WhereFamilyID applies the entql [16]byte predicate on the family_id field.

func (*OAuthTokenFilter) WhereHasApp

func (f *OAuthTokenFilter) WhereHasApp()

WhereHasApp applies a predicate to check if query has an edge app.

func (*OAuthTokenFilter) WhereHasAppWith

func (f *OAuthTokenFilter) WhereHasAppWith(preds ...predicate.OAuthApp)

WhereHasAppWith applies a predicate to check if query has an edge app with a given conditions (other predicates).

func (*OAuthTokenFilter) WhereHasUser

func (f *OAuthTokenFilter) WhereHasUser()

WhereHasUser applies a predicate to check if query has an edge user.

func (*OAuthTokenFilter) WhereHasUserWith

func (f *OAuthTokenFilter) WhereHasUserWith(preds ...predicate.User)

WhereHasUserWith applies a predicate to check if query has an edge user with a given conditions (other predicates).

func (*OAuthTokenFilter) WhereID

func (f *OAuthTokenFilter) WhereID(p entql.ValueP)

WhereID applies the entql [16]byte predicate on the id field.

func (*OAuthTokenFilter) WhereLastUsedAt

func (f *OAuthTokenFilter) WhereLastUsedAt(p entql.TimeP)

WhereLastUsedAt applies the entql time.Time predicate on the last_used_at field.

func (*OAuthTokenFilter) WhereRefreshExpiresAt

func (f *OAuthTokenFilter) WhereRefreshExpiresAt(p entql.TimeP)

WhereRefreshExpiresAt applies the entql time.Time predicate on the refresh_expires_at field.

func (*OAuthTokenFilter) WhereRefreshTokenSignature

func (f *OAuthTokenFilter) WhereRefreshTokenSignature(p entql.StringP)

WhereRefreshTokenSignature applies the entql string predicate on the refresh_token_signature field.

func (*OAuthTokenFilter) WhereRequestData

func (f *OAuthTokenFilter) WhereRequestData(p entql.StringP)

WhereRequestData applies the entql string predicate on the request_data field.

func (*OAuthTokenFilter) WhereRevoked

func (f *OAuthTokenFilter) WhereRevoked(p entql.BoolP)

WhereRevoked applies the entql bool predicate on the revoked field.

func (*OAuthTokenFilter) WhereRevokedAt

func (f *OAuthTokenFilter) WhereRevokedAt(p entql.TimeP)

WhereRevokedAt applies the entql time.Time predicate on the revoked_at field.

func (*OAuthTokenFilter) WhereRevokedReason

func (f *OAuthTokenFilter) WhereRevokedReason(p entql.StringP)

WhereRevokedReason applies the entql string predicate on the revoked_reason field.

func (*OAuthTokenFilter) WhereScopes

func (f *OAuthTokenFilter) WhereScopes(p entql.BytesP)

WhereScopes applies the entql json.RawMessage predicate on the scopes field.

func (*OAuthTokenFilter) WhereServiceAccountID

func (f *OAuthTokenFilter) WhereServiceAccountID(p entql.ValueP)

WhereServiceAccountID applies the entql [16]byte predicate on the service_account_id field.

func (*OAuthTokenFilter) WhereSessionID

func (f *OAuthTokenFilter) WhereSessionID(p entql.StringP)

WhereSessionID applies the entql string predicate on the session_id field.

func (*OAuthTokenFilter) WhereUserAgent

func (f *OAuthTokenFilter) WhereUserAgent(p entql.StringP)

WhereUserAgent applies the entql string predicate on the user_agent field.

func (*OAuthTokenFilter) WhereUserID

func (f *OAuthTokenFilter) WhereUserID(p entql.ValueP)

WhereUserID applies the entql [16]byte predicate on the user_id field.

type OAuthTokenGroupBy

type OAuthTokenGroupBy struct {
	// contains filtered or unexported fields
}

OAuthTokenGroupBy is the group-by builder for OAuthToken entities.

func (*OAuthTokenGroupBy) Aggregate

func (_g *OAuthTokenGroupBy) Aggregate(fns ...AggregateFunc) *OAuthTokenGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*OAuthTokenGroupBy) Bool

func (s *OAuthTokenGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OAuthTokenGroupBy) BoolX

func (s *OAuthTokenGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OAuthTokenGroupBy) Bools

func (s *OAuthTokenGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OAuthTokenGroupBy) BoolsX

func (s *OAuthTokenGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OAuthTokenGroupBy) Float64

func (s *OAuthTokenGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OAuthTokenGroupBy) Float64X

func (s *OAuthTokenGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OAuthTokenGroupBy) Float64s

func (s *OAuthTokenGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OAuthTokenGroupBy) Float64sX

func (s *OAuthTokenGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OAuthTokenGroupBy) Int

func (s *OAuthTokenGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OAuthTokenGroupBy) IntX

func (s *OAuthTokenGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OAuthTokenGroupBy) Ints

func (s *OAuthTokenGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OAuthTokenGroupBy) IntsX

func (s *OAuthTokenGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OAuthTokenGroupBy) Scan

func (_g *OAuthTokenGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OAuthTokenGroupBy) ScanX

func (s *OAuthTokenGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OAuthTokenGroupBy) String

func (s *OAuthTokenGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OAuthTokenGroupBy) StringX

func (s *OAuthTokenGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OAuthTokenGroupBy) Strings

func (s *OAuthTokenGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OAuthTokenGroupBy) StringsX

func (s *OAuthTokenGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OAuthTokenMutation

type OAuthTokenMutation struct {
	// contains filtered or unexported fields
}

OAuthTokenMutation represents an operation that mutates the OAuthToken nodes in the graph.

func (*OAuthTokenMutation) AccessExpiresAt

func (m *OAuthTokenMutation) AccessExpiresAt() (r time.Time, exists bool)

AccessExpiresAt returns the value of the "access_expires_at" field in the mutation.

func (*OAuthTokenMutation) AccessTokenSignature

func (m *OAuthTokenMutation) AccessTokenSignature() (r string, exists bool)

AccessTokenSignature returns the value of the "access_token_signature" field in the mutation.

func (*OAuthTokenMutation) AddField

func (m *OAuthTokenMutation) 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 (*OAuthTokenMutation) AddedEdges

func (m *OAuthTokenMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*OAuthTokenMutation) AddedField

func (m *OAuthTokenMutation) 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 (*OAuthTokenMutation) AddedFields

func (m *OAuthTokenMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*OAuthTokenMutation) AddedIDs

func (m *OAuthTokenMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*OAuthTokenMutation) AppCleared

func (m *OAuthTokenMutation) AppCleared() bool

AppCleared reports if the "app" edge to the OAuthApp entity was cleared.

func (*OAuthTokenMutation) AppID

func (m *OAuthTokenMutation) AppID() (r uuid.UUID, exists bool)

AppID returns the value of the "app_id" field in the mutation.

func (*OAuthTokenMutation) AppIDs

func (m *OAuthTokenMutation) AppIDs() (ids []uuid.UUID)

AppIDs returns the "app" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AppID instead. It exists only for internal usage by the builders.

func (*OAuthTokenMutation) AppendAudience

func (m *OAuthTokenMutation) AppendAudience(s []string)

AppendAudience adds s to the "audience" field.

func (*OAuthTokenMutation) AppendScopes

func (m *OAuthTokenMutation) AppendScopes(s []string)

AppendScopes adds s to the "scopes" field.

func (*OAuthTokenMutation) AppendedAudience

func (m *OAuthTokenMutation) AppendedAudience() ([]string, bool)

AppendedAudience returns the list of values that were appended to the "audience" field in this mutation.

func (*OAuthTokenMutation) AppendedScopes

func (m *OAuthTokenMutation) AppendedScopes() ([]string, bool)

AppendedScopes returns the list of values that were appended to the "scopes" field in this mutation.

func (*OAuthTokenMutation) Audience

func (m *OAuthTokenMutation) Audience() (r []string, exists bool)

Audience returns the value of the "audience" field in the mutation.

func (*OAuthTokenMutation) ClearApp

func (m *OAuthTokenMutation) ClearApp()

ClearApp clears the "app" edge to the OAuthApp entity.

func (*OAuthTokenMutation) ClearClientIP

func (m *OAuthTokenMutation) ClearClientIP()

ClearClientIP clears the value of the "client_ip" field.

func (*OAuthTokenMutation) ClearEdge

func (m *OAuthTokenMutation) 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 (*OAuthTokenMutation) ClearField

func (m *OAuthTokenMutation) 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 (*OAuthTokenMutation) ClearLastUsedAt

func (m *OAuthTokenMutation) ClearLastUsedAt()

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*OAuthTokenMutation) ClearRefreshExpiresAt

func (m *OAuthTokenMutation) ClearRefreshExpiresAt()

ClearRefreshExpiresAt clears the value of the "refresh_expires_at" field.

func (*OAuthTokenMutation) ClearRefreshTokenSignature

func (m *OAuthTokenMutation) ClearRefreshTokenSignature()

ClearRefreshTokenSignature clears the value of the "refresh_token_signature" field.

func (*OAuthTokenMutation) ClearRequestData

func (m *OAuthTokenMutation) ClearRequestData()

ClearRequestData clears the value of the "request_data" field.

func (*OAuthTokenMutation) ClearRevokedAt

func (m *OAuthTokenMutation) ClearRevokedAt()

ClearRevokedAt clears the value of the "revoked_at" field.

func (*OAuthTokenMutation) ClearRevokedReason

func (m *OAuthTokenMutation) ClearRevokedReason()

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*OAuthTokenMutation) ClearServiceAccountID

func (m *OAuthTokenMutation) ClearServiceAccountID()

ClearServiceAccountID clears the value of the "service_account_id" field.

func (*OAuthTokenMutation) ClearSessionID

func (m *OAuthTokenMutation) ClearSessionID()

ClearSessionID clears the value of the "session_id" field.

func (*OAuthTokenMutation) ClearUser

func (m *OAuthTokenMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*OAuthTokenMutation) ClearUserAgent

func (m *OAuthTokenMutation) ClearUserAgent()

ClearUserAgent clears the value of the "user_agent" field.

func (*OAuthTokenMutation) ClearUserID

func (m *OAuthTokenMutation) ClearUserID()

ClearUserID clears the value of the "user_id" field.

func (*OAuthTokenMutation) ClearedEdges

func (m *OAuthTokenMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*OAuthTokenMutation) ClearedFields

func (m *OAuthTokenMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (OAuthTokenMutation) Client

func (m OAuthTokenMutation) 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 (*OAuthTokenMutation) ClientIP

func (m *OAuthTokenMutation) ClientIP() (r string, exists bool)

ClientIP returns the value of the "client_ip" field in the mutation.

func (*OAuthTokenMutation) ClientIPCleared

func (m *OAuthTokenMutation) ClientIPCleared() bool

ClientIPCleared returns if the "client_ip" field was cleared in this mutation.

func (*OAuthTokenMutation) CreatedAt

func (m *OAuthTokenMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*OAuthTokenMutation) EdgeCleared

func (m *OAuthTokenMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*OAuthTokenMutation) FamilyID

func (m *OAuthTokenMutation) FamilyID() (r uuid.UUID, exists bool)

FamilyID returns the value of the "family_id" field in the mutation.

func (*OAuthTokenMutation) Field

func (m *OAuthTokenMutation) 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 (*OAuthTokenMutation) FieldCleared

func (m *OAuthTokenMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*OAuthTokenMutation) Fields

func (m *OAuthTokenMutation) 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 (*OAuthTokenMutation) Filter

func (m *OAuthTokenMutation) Filter() *OAuthTokenFilter

Filter returns an entql.Where implementation to apply filters on the OAuthTokenMutation builder.

func (*OAuthTokenMutation) ID

func (m *OAuthTokenMutation) ID() (id uuid.UUID, 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 (*OAuthTokenMutation) IDs

func (m *OAuthTokenMutation) IDs(ctx context.Context) ([]uuid.UUID, 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 (*OAuthTokenMutation) LastUsedAt

func (m *OAuthTokenMutation) LastUsedAt() (r time.Time, exists bool)

LastUsedAt returns the value of the "last_used_at" field in the mutation.

func (*OAuthTokenMutation) LastUsedAtCleared

func (m *OAuthTokenMutation) LastUsedAtCleared() bool

LastUsedAtCleared returns if the "last_used_at" field was cleared in this mutation.

func (*OAuthTokenMutation) OldAccessExpiresAt

func (m *OAuthTokenMutation) OldAccessExpiresAt(ctx context.Context) (v time.Time, err error)

OldAccessExpiresAt returns the old "access_expires_at" field's value of the OAuthToken entity. If the OAuthToken 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 (*OAuthTokenMutation) OldAccessTokenSignature

func (m *OAuthTokenMutation) OldAccessTokenSignature(ctx context.Context) (v string, err error)

OldAccessTokenSignature returns the old "access_token_signature" field's value of the OAuthToken entity. If the OAuthToken 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 (*OAuthTokenMutation) OldAppID

func (m *OAuthTokenMutation) OldAppID(ctx context.Context) (v uuid.UUID, err error)

OldAppID returns the old "app_id" field's value of the OAuthToken entity. If the OAuthToken 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 (*OAuthTokenMutation) OldAudience

func (m *OAuthTokenMutation) OldAudience(ctx context.Context) (v []string, err error)

OldAudience returns the old "audience" field's value of the OAuthToken entity. If the OAuthToken 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 (*OAuthTokenMutation) OldClientIP

func (m *OAuthTokenMutation) OldClientIP(ctx context.Context) (v string, err error)

OldClientIP returns the old "client_ip" field's value of the OAuthToken entity. If the OAuthToken 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 (*OAuthTokenMutation) OldCreatedAt

func (m *OAuthTokenMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the OAuthToken entity. If the OAuthToken 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 (*OAuthTokenMutation) OldFamilyID

func (m *OAuthTokenMutation) OldFamilyID(ctx context.Context) (v uuid.UUID, err error)

OldFamilyID returns the old "family_id" field's value of the OAuthToken entity. If the OAuthToken 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 (*OAuthTokenMutation) OldField

func (m *OAuthTokenMutation) 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 (*OAuthTokenMutation) OldLastUsedAt

func (m *OAuthTokenMutation) OldLastUsedAt(ctx context.Context) (v *time.Time, err error)

OldLastUsedAt returns the old "last_used_at" field's value of the OAuthToken entity. If the OAuthToken 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 (*OAuthTokenMutation) OldRefreshExpiresAt

func (m *OAuthTokenMutation) OldRefreshExpiresAt(ctx context.Context) (v *time.Time, err error)

OldRefreshExpiresAt returns the old "refresh_expires_at" field's value of the OAuthToken entity. If the OAuthToken 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 (*OAuthTokenMutation) OldRefreshTokenSignature

func (m *OAuthTokenMutation) OldRefreshTokenSignature(ctx context.Context) (v *string, err error)

OldRefreshTokenSignature returns the old "refresh_token_signature" field's value of the OAuthToken entity. If the OAuthToken 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 (*OAuthTokenMutation) OldRequestData

func (m *OAuthTokenMutation) OldRequestData(ctx context.Context) (v string, err error)

OldRequestData returns the old "request_data" field's value of the OAuthToken entity. If the OAuthToken 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 (*OAuthTokenMutation) OldRevoked

func (m *OAuthTokenMutation) OldRevoked(ctx context.Context) (v bool, err error)

OldRevoked returns the old "revoked" field's value of the OAuthToken entity. If the OAuthToken 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 (*OAuthTokenMutation) OldRevokedAt

func (m *OAuthTokenMutation) OldRevokedAt(ctx context.Context) (v *time.Time, err error)

OldRevokedAt returns the old "revoked_at" field's value of the OAuthToken entity. If the OAuthToken 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 (*OAuthTokenMutation) OldRevokedReason

func (m *OAuthTokenMutation) OldRevokedReason(ctx context.Context) (v string, err error)

OldRevokedReason returns the old "revoked_reason" field's value of the OAuthToken entity. If the OAuthToken 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 (*OAuthTokenMutation) OldScopes

func (m *OAuthTokenMutation) OldScopes(ctx context.Context) (v []string, err error)

OldScopes returns the old "scopes" field's value of the OAuthToken entity. If the OAuthToken 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 (*OAuthTokenMutation) OldServiceAccountID

func (m *OAuthTokenMutation) OldServiceAccountID(ctx context.Context) (v *uuid.UUID, err error)

OldServiceAccountID returns the old "service_account_id" field's value of the OAuthToken entity. If the OAuthToken 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 (*OAuthTokenMutation) OldSessionID

func (m *OAuthTokenMutation) OldSessionID(ctx context.Context) (v string, err error)

OldSessionID returns the old "session_id" field's value of the OAuthToken entity. If the OAuthToken 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 (*OAuthTokenMutation) OldUserAgent

func (m *OAuthTokenMutation) OldUserAgent(ctx context.Context) (v string, err error)

OldUserAgent returns the old "user_agent" field's value of the OAuthToken entity. If the OAuthToken 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 (*OAuthTokenMutation) OldUserID

func (m *OAuthTokenMutation) OldUserID(ctx context.Context) (v *uuid.UUID, err error)

OldUserID returns the old "user_id" field's value of the OAuthToken entity. If the OAuthToken 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 (*OAuthTokenMutation) Op

func (m *OAuthTokenMutation) Op() Op

Op returns the operation name.

func (*OAuthTokenMutation) RefreshExpiresAt

func (m *OAuthTokenMutation) RefreshExpiresAt() (r time.Time, exists bool)

RefreshExpiresAt returns the value of the "refresh_expires_at" field in the mutation.

func (*OAuthTokenMutation) RefreshExpiresAtCleared

func (m *OAuthTokenMutation) RefreshExpiresAtCleared() bool

RefreshExpiresAtCleared returns if the "refresh_expires_at" field was cleared in this mutation.

func (*OAuthTokenMutation) RefreshTokenSignature

func (m *OAuthTokenMutation) RefreshTokenSignature() (r string, exists bool)

RefreshTokenSignature returns the value of the "refresh_token_signature" field in the mutation.

func (*OAuthTokenMutation) RefreshTokenSignatureCleared

func (m *OAuthTokenMutation) RefreshTokenSignatureCleared() bool

RefreshTokenSignatureCleared returns if the "refresh_token_signature" field was cleared in this mutation.

func (*OAuthTokenMutation) RemovedEdges

func (m *OAuthTokenMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*OAuthTokenMutation) RemovedIDs

func (m *OAuthTokenMutation) 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 (*OAuthTokenMutation) RequestData

func (m *OAuthTokenMutation) RequestData() (r string, exists bool)

RequestData returns the value of the "request_data" field in the mutation.

func (*OAuthTokenMutation) RequestDataCleared

func (m *OAuthTokenMutation) RequestDataCleared() bool

RequestDataCleared returns if the "request_data" field was cleared in this mutation.

func (*OAuthTokenMutation) ResetAccessExpiresAt

func (m *OAuthTokenMutation) ResetAccessExpiresAt()

ResetAccessExpiresAt resets all changes to the "access_expires_at" field.

func (*OAuthTokenMutation) ResetAccessTokenSignature

func (m *OAuthTokenMutation) ResetAccessTokenSignature()

ResetAccessTokenSignature resets all changes to the "access_token_signature" field.

func (*OAuthTokenMutation) ResetApp

func (m *OAuthTokenMutation) ResetApp()

ResetApp resets all changes to the "app" edge.

func (*OAuthTokenMutation) ResetAppID

func (m *OAuthTokenMutation) ResetAppID()

ResetAppID resets all changes to the "app_id" field.

func (*OAuthTokenMutation) ResetAudience

func (m *OAuthTokenMutation) ResetAudience()

ResetAudience resets all changes to the "audience" field.

func (*OAuthTokenMutation) ResetClientIP

func (m *OAuthTokenMutation) ResetClientIP()

ResetClientIP resets all changes to the "client_ip" field.

func (*OAuthTokenMutation) ResetCreatedAt

func (m *OAuthTokenMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*OAuthTokenMutation) ResetEdge

func (m *OAuthTokenMutation) 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 (*OAuthTokenMutation) ResetFamilyID

func (m *OAuthTokenMutation) ResetFamilyID()

ResetFamilyID resets all changes to the "family_id" field.

func (*OAuthTokenMutation) ResetField

func (m *OAuthTokenMutation) 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 (*OAuthTokenMutation) ResetLastUsedAt

func (m *OAuthTokenMutation) ResetLastUsedAt()

ResetLastUsedAt resets all changes to the "last_used_at" field.

func (*OAuthTokenMutation) ResetRefreshExpiresAt

func (m *OAuthTokenMutation) ResetRefreshExpiresAt()

ResetRefreshExpiresAt resets all changes to the "refresh_expires_at" field.

func (*OAuthTokenMutation) ResetRefreshTokenSignature

func (m *OAuthTokenMutation) ResetRefreshTokenSignature()

ResetRefreshTokenSignature resets all changes to the "refresh_token_signature" field.

func (*OAuthTokenMutation) ResetRequestData

func (m *OAuthTokenMutation) ResetRequestData()

ResetRequestData resets all changes to the "request_data" field.

func (*OAuthTokenMutation) ResetRevoked

func (m *OAuthTokenMutation) ResetRevoked()

ResetRevoked resets all changes to the "revoked" field.

func (*OAuthTokenMutation) ResetRevokedAt

func (m *OAuthTokenMutation) ResetRevokedAt()

ResetRevokedAt resets all changes to the "revoked_at" field.

func (*OAuthTokenMutation) ResetRevokedReason

func (m *OAuthTokenMutation) ResetRevokedReason()

ResetRevokedReason resets all changes to the "revoked_reason" field.

func (*OAuthTokenMutation) ResetScopes

func (m *OAuthTokenMutation) ResetScopes()

ResetScopes resets all changes to the "scopes" field.

func (*OAuthTokenMutation) ResetServiceAccountID

func (m *OAuthTokenMutation) ResetServiceAccountID()

ResetServiceAccountID resets all changes to the "service_account_id" field.

func (*OAuthTokenMutation) ResetSessionID

func (m *OAuthTokenMutation) ResetSessionID()

ResetSessionID resets all changes to the "session_id" field.

func (*OAuthTokenMutation) ResetUser

func (m *OAuthTokenMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*OAuthTokenMutation) ResetUserAgent

func (m *OAuthTokenMutation) ResetUserAgent()

ResetUserAgent resets all changes to the "user_agent" field.

func (*OAuthTokenMutation) ResetUserID

func (m *OAuthTokenMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*OAuthTokenMutation) Revoked

func (m *OAuthTokenMutation) Revoked() (r bool, exists bool)

Revoked returns the value of the "revoked" field in the mutation.

func (*OAuthTokenMutation) RevokedAt

func (m *OAuthTokenMutation) RevokedAt() (r time.Time, exists bool)

RevokedAt returns the value of the "revoked_at" field in the mutation.

func (*OAuthTokenMutation) RevokedAtCleared

func (m *OAuthTokenMutation) RevokedAtCleared() bool

RevokedAtCleared returns if the "revoked_at" field was cleared in this mutation.

func (*OAuthTokenMutation) RevokedReason

func (m *OAuthTokenMutation) RevokedReason() (r string, exists bool)

RevokedReason returns the value of the "revoked_reason" field in the mutation.

func (*OAuthTokenMutation) RevokedReasonCleared

func (m *OAuthTokenMutation) RevokedReasonCleared() bool

RevokedReasonCleared returns if the "revoked_reason" field was cleared in this mutation.

func (*OAuthTokenMutation) Scopes

func (m *OAuthTokenMutation) Scopes() (r []string, exists bool)

Scopes returns the value of the "scopes" field in the mutation.

func (*OAuthTokenMutation) ServiceAccountID

func (m *OAuthTokenMutation) ServiceAccountID() (r uuid.UUID, exists bool)

ServiceAccountID returns the value of the "service_account_id" field in the mutation.

func (*OAuthTokenMutation) ServiceAccountIDCleared

func (m *OAuthTokenMutation) ServiceAccountIDCleared() bool

ServiceAccountIDCleared returns if the "service_account_id" field was cleared in this mutation.

func (*OAuthTokenMutation) SessionID

func (m *OAuthTokenMutation) SessionID() (r string, exists bool)

SessionID returns the value of the "session_id" field in the mutation.

func (*OAuthTokenMutation) SessionIDCleared

func (m *OAuthTokenMutation) SessionIDCleared() bool

SessionIDCleared returns if the "session_id" field was cleared in this mutation.

func (*OAuthTokenMutation) SetAccessExpiresAt

func (m *OAuthTokenMutation) SetAccessExpiresAt(t time.Time)

SetAccessExpiresAt sets the "access_expires_at" field.

func (*OAuthTokenMutation) SetAccessTokenSignature

func (m *OAuthTokenMutation) SetAccessTokenSignature(s string)

SetAccessTokenSignature sets the "access_token_signature" field.

func (*OAuthTokenMutation) SetAppID

func (m *OAuthTokenMutation) SetAppID(u uuid.UUID)

SetAppID sets the "app_id" field.

func (*OAuthTokenMutation) SetAudience

func (m *OAuthTokenMutation) SetAudience(s []string)

SetAudience sets the "audience" field.

func (*OAuthTokenMutation) SetClientIP

func (m *OAuthTokenMutation) SetClientIP(s string)

SetClientIP sets the "client_ip" field.

func (*OAuthTokenMutation) SetCreatedAt

func (m *OAuthTokenMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*OAuthTokenMutation) SetFamilyID

func (m *OAuthTokenMutation) SetFamilyID(u uuid.UUID)

SetFamilyID sets the "family_id" field.

func (*OAuthTokenMutation) SetField

func (m *OAuthTokenMutation) 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 (*OAuthTokenMutation) SetID

func (m *OAuthTokenMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of OAuthToken entities.

func (*OAuthTokenMutation) SetLastUsedAt

func (m *OAuthTokenMutation) SetLastUsedAt(t time.Time)

SetLastUsedAt sets the "last_used_at" field.

func (*OAuthTokenMutation) SetOp

func (m *OAuthTokenMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OAuthTokenMutation) SetRefreshExpiresAt

func (m *OAuthTokenMutation) SetRefreshExpiresAt(t time.Time)

SetRefreshExpiresAt sets the "refresh_expires_at" field.

func (*OAuthTokenMutation) SetRefreshTokenSignature

func (m *OAuthTokenMutation) SetRefreshTokenSignature(s string)

SetRefreshTokenSignature sets the "refresh_token_signature" field.

func (*OAuthTokenMutation) SetRequestData

func (m *OAuthTokenMutation) SetRequestData(s string)

SetRequestData sets the "request_data" field.

func (*OAuthTokenMutation) SetRevoked

func (m *OAuthTokenMutation) SetRevoked(b bool)

SetRevoked sets the "revoked" field.

func (*OAuthTokenMutation) SetRevokedAt

func (m *OAuthTokenMutation) SetRevokedAt(t time.Time)

SetRevokedAt sets the "revoked_at" field.

func (*OAuthTokenMutation) SetRevokedReason

func (m *OAuthTokenMutation) SetRevokedReason(s string)

SetRevokedReason sets the "revoked_reason" field.

func (*OAuthTokenMutation) SetScopes

func (m *OAuthTokenMutation) SetScopes(s []string)

SetScopes sets the "scopes" field.

func (*OAuthTokenMutation) SetServiceAccountID

func (m *OAuthTokenMutation) SetServiceAccountID(u uuid.UUID)

SetServiceAccountID sets the "service_account_id" field.

func (*OAuthTokenMutation) SetSessionID

func (m *OAuthTokenMutation) SetSessionID(s string)

SetSessionID sets the "session_id" field.

func (*OAuthTokenMutation) SetUserAgent

func (m *OAuthTokenMutation) SetUserAgent(s string)

SetUserAgent sets the "user_agent" field.

func (*OAuthTokenMutation) SetUserID

func (m *OAuthTokenMutation) SetUserID(u uuid.UUID)

SetUserID sets the "user_id" field.

func (OAuthTokenMutation) Tx

func (m OAuthTokenMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*OAuthTokenMutation) Type

func (m *OAuthTokenMutation) Type() string

Type returns the node type of this mutation (OAuthToken).

func (*OAuthTokenMutation) UserAgent

func (m *OAuthTokenMutation) UserAgent() (r string, exists bool)

UserAgent returns the value of the "user_agent" field in the mutation.

func (*OAuthTokenMutation) UserAgentCleared

func (m *OAuthTokenMutation) UserAgentCleared() bool

UserAgentCleared returns if the "user_agent" field was cleared in this mutation.

func (*OAuthTokenMutation) UserCleared

func (m *OAuthTokenMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*OAuthTokenMutation) UserID

func (m *OAuthTokenMutation) UserID() (r uuid.UUID, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*OAuthTokenMutation) UserIDCleared

func (m *OAuthTokenMutation) UserIDCleared() bool

UserIDCleared returns if the "user_id" field was cleared in this mutation.

func (*OAuthTokenMutation) UserIDs

func (m *OAuthTokenMutation) UserIDs() (ids []uuid.UUID)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*OAuthTokenMutation) Where

func (m *OAuthTokenMutation) Where(ps ...predicate.OAuthToken)

Where appends a list predicates to the OAuthTokenMutation builder.

func (*OAuthTokenMutation) WhereP

func (m *OAuthTokenMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the OAuthTokenMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type OAuthTokenQuery

type OAuthTokenQuery struct {
	// contains filtered or unexported fields
}

OAuthTokenQuery is the builder for querying OAuthToken entities.

func (*OAuthTokenQuery) Aggregate

func (_q *OAuthTokenQuery) Aggregate(fns ...AggregateFunc) *OAuthTokenSelect

Aggregate returns a OAuthTokenSelect configured with the given aggregations.

func (*OAuthTokenQuery) All

func (_q *OAuthTokenQuery) All(ctx context.Context) ([]*OAuthToken, error)

All executes the query and returns a list of OAuthTokens.

func (*OAuthTokenQuery) AllX

func (_q *OAuthTokenQuery) AllX(ctx context.Context) []*OAuthToken

AllX is like All, but panics if an error occurs.

func (*OAuthTokenQuery) Clone

func (_q *OAuthTokenQuery) Clone() *OAuthTokenQuery

Clone returns a duplicate of the OAuthTokenQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*OAuthTokenQuery) Count

func (_q *OAuthTokenQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OAuthTokenQuery) CountX

func (_q *OAuthTokenQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*OAuthTokenQuery) Exist

func (_q *OAuthTokenQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*OAuthTokenQuery) ExistX

func (_q *OAuthTokenQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*OAuthTokenQuery) Filter

func (_q *OAuthTokenQuery) Filter() *OAuthTokenFilter

Filter returns a Filter implementation to apply filters on the OAuthTokenQuery builder.

func (*OAuthTokenQuery) First

func (_q *OAuthTokenQuery) First(ctx context.Context) (*OAuthToken, error)

First returns the first OAuthToken entity from the query. Returns a *NotFoundError when no OAuthToken was found.

func (*OAuthTokenQuery) FirstID

func (_q *OAuthTokenQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first OAuthToken ID from the query. Returns a *NotFoundError when no OAuthToken ID was found.

func (*OAuthTokenQuery) FirstIDX

func (_q *OAuthTokenQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*OAuthTokenQuery) FirstX

func (_q *OAuthTokenQuery) FirstX(ctx context.Context) *OAuthToken

FirstX is like First, but panics if an error occurs.

func (*OAuthTokenQuery) GroupBy

func (_q *OAuthTokenQuery) GroupBy(field string, fields ...string) *OAuthTokenGroupBy

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 {
	AppID uuid.UUID `json:"app_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.OAuthToken.Query().
	GroupBy(oauthtoken.FieldAppID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OAuthTokenQuery) IDs

func (_q *OAuthTokenQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of OAuthToken IDs.

func (*OAuthTokenQuery) IDsX

func (_q *OAuthTokenQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*OAuthTokenQuery) Limit

func (_q *OAuthTokenQuery) Limit(limit int) *OAuthTokenQuery

Limit the number of records to be returned by this query.

func (*OAuthTokenQuery) Offset

func (_q *OAuthTokenQuery) Offset(offset int) *OAuthTokenQuery

Offset to start from.

func (*OAuthTokenQuery) Only

func (_q *OAuthTokenQuery) Only(ctx context.Context) (*OAuthToken, error)

Only returns a single OAuthToken entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OAuthToken entity is found. Returns a *NotFoundError when no OAuthToken entities are found.

func (*OAuthTokenQuery) OnlyID

func (_q *OAuthTokenQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only OAuthToken ID in the query. Returns a *NotSingularError when more than one OAuthToken ID is found. Returns a *NotFoundError when no entities are found.

func (*OAuthTokenQuery) OnlyIDX

func (_q *OAuthTokenQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*OAuthTokenQuery) OnlyX

func (_q *OAuthTokenQuery) OnlyX(ctx context.Context) *OAuthToken

OnlyX is like Only, but panics if an error occurs.

func (*OAuthTokenQuery) Order

Order specifies how the records should be ordered.

func (*OAuthTokenQuery) QueryApp

func (_q *OAuthTokenQuery) QueryApp() *OAuthAppQuery

QueryApp chains the current query on the "app" edge.

func (*OAuthTokenQuery) QueryUser

func (_q *OAuthTokenQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*OAuthTokenQuery) Select

func (_q *OAuthTokenQuery) Select(fields ...string) *OAuthTokenSelect

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 {
	AppID uuid.UUID `json:"app_id,omitempty"`
}

client.OAuthToken.Query().
	Select(oauthtoken.FieldAppID).
	Scan(ctx, &v)

func (*OAuthTokenQuery) Unique

func (_q *OAuthTokenQuery) Unique(unique bool) *OAuthTokenQuery

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 (*OAuthTokenQuery) Where

Where adds a new predicate for the OAuthTokenQuery builder.

func (*OAuthTokenQuery) WithApp

func (_q *OAuthTokenQuery) WithApp(opts ...func(*OAuthAppQuery)) *OAuthTokenQuery

WithApp tells the query-builder to eager-load the nodes that are connected to the "app" edge. The optional arguments are used to configure the query builder of the edge.

func (*OAuthTokenQuery) WithUser

func (_q *OAuthTokenQuery) WithUser(opts ...func(*UserQuery)) *OAuthTokenQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type OAuthTokenSelect

type OAuthTokenSelect struct {
	*OAuthTokenQuery
	// contains filtered or unexported fields
}

OAuthTokenSelect is the builder for selecting fields of OAuthToken entities.

func (*OAuthTokenSelect) Aggregate

func (_s *OAuthTokenSelect) Aggregate(fns ...AggregateFunc) *OAuthTokenSelect

Aggregate adds the given aggregation functions to the selector query.

func (*OAuthTokenSelect) Bool

func (s *OAuthTokenSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OAuthTokenSelect) BoolX

func (s *OAuthTokenSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OAuthTokenSelect) Bools

func (s *OAuthTokenSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OAuthTokenSelect) BoolsX

func (s *OAuthTokenSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OAuthTokenSelect) Float64

func (s *OAuthTokenSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OAuthTokenSelect) Float64X

func (s *OAuthTokenSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OAuthTokenSelect) Float64s

func (s *OAuthTokenSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OAuthTokenSelect) Float64sX

func (s *OAuthTokenSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OAuthTokenSelect) Int

func (s *OAuthTokenSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OAuthTokenSelect) IntX

func (s *OAuthTokenSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OAuthTokenSelect) Ints

func (s *OAuthTokenSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OAuthTokenSelect) IntsX

func (s *OAuthTokenSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OAuthTokenSelect) Scan

func (_s *OAuthTokenSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OAuthTokenSelect) ScanX

func (s *OAuthTokenSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OAuthTokenSelect) String

func (s *OAuthTokenSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OAuthTokenSelect) StringX

func (s *OAuthTokenSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OAuthTokenSelect) Strings

func (s *OAuthTokenSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OAuthTokenSelect) StringsX

func (s *OAuthTokenSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OAuthTokenUpdate

type OAuthTokenUpdate struct {
	// contains filtered or unexported fields
}

OAuthTokenUpdate is the builder for updating OAuthToken entities.

func (*OAuthTokenUpdate) AppendAudience

func (_u *OAuthTokenUpdate) AppendAudience(v []string) *OAuthTokenUpdate

AppendAudience appends value to the "audience" field.

func (*OAuthTokenUpdate) AppendScopes

func (_u *OAuthTokenUpdate) AppendScopes(v []string) *OAuthTokenUpdate

AppendScopes appends value to the "scopes" field.

func (*OAuthTokenUpdate) ClearApp

func (_u *OAuthTokenUpdate) ClearApp() *OAuthTokenUpdate

ClearApp clears the "app" edge to the OAuthApp entity.

func (*OAuthTokenUpdate) ClearClientIP

func (_u *OAuthTokenUpdate) ClearClientIP() *OAuthTokenUpdate

ClearClientIP clears the value of the "client_ip" field.

func (*OAuthTokenUpdate) ClearLastUsedAt

func (_u *OAuthTokenUpdate) ClearLastUsedAt() *OAuthTokenUpdate

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*OAuthTokenUpdate) ClearRefreshExpiresAt

func (_u *OAuthTokenUpdate) ClearRefreshExpiresAt() *OAuthTokenUpdate

ClearRefreshExpiresAt clears the value of the "refresh_expires_at" field.

func (*OAuthTokenUpdate) ClearRefreshTokenSignature

func (_u *OAuthTokenUpdate) ClearRefreshTokenSignature() *OAuthTokenUpdate

ClearRefreshTokenSignature clears the value of the "refresh_token_signature" field.

func (*OAuthTokenUpdate) ClearRequestData

func (_u *OAuthTokenUpdate) ClearRequestData() *OAuthTokenUpdate

ClearRequestData clears the value of the "request_data" field.

func (*OAuthTokenUpdate) ClearRevokedAt

func (_u *OAuthTokenUpdate) ClearRevokedAt() *OAuthTokenUpdate

ClearRevokedAt clears the value of the "revoked_at" field.

func (*OAuthTokenUpdate) ClearRevokedReason

func (_u *OAuthTokenUpdate) ClearRevokedReason() *OAuthTokenUpdate

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*OAuthTokenUpdate) ClearServiceAccountID

func (_u *OAuthTokenUpdate) ClearServiceAccountID() *OAuthTokenUpdate

ClearServiceAccountID clears the value of the "service_account_id" field.

func (*OAuthTokenUpdate) ClearSessionID

func (_u *OAuthTokenUpdate) ClearSessionID() *OAuthTokenUpdate

ClearSessionID clears the value of the "session_id" field.

func (*OAuthTokenUpdate) ClearUser

func (_u *OAuthTokenUpdate) ClearUser() *OAuthTokenUpdate

ClearUser clears the "user" edge to the User entity.

func (*OAuthTokenUpdate) ClearUserAgent

func (_u *OAuthTokenUpdate) ClearUserAgent() *OAuthTokenUpdate

ClearUserAgent clears the value of the "user_agent" field.

func (*OAuthTokenUpdate) ClearUserID

func (_u *OAuthTokenUpdate) ClearUserID() *OAuthTokenUpdate

ClearUserID clears the value of the "user_id" field.

func (*OAuthTokenUpdate) Exec

func (_u *OAuthTokenUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OAuthTokenUpdate) ExecX

func (_u *OAuthTokenUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OAuthTokenUpdate) Mutation

func (_u *OAuthTokenUpdate) Mutation() *OAuthTokenMutation

Mutation returns the OAuthTokenMutation object of the builder.

func (*OAuthTokenUpdate) Save

func (_u *OAuthTokenUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*OAuthTokenUpdate) SaveX

func (_u *OAuthTokenUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*OAuthTokenUpdate) SetAccessExpiresAt

func (_u *OAuthTokenUpdate) SetAccessExpiresAt(v time.Time) *OAuthTokenUpdate

SetAccessExpiresAt sets the "access_expires_at" field.

func (*OAuthTokenUpdate) SetAccessTokenSignature

func (_u *OAuthTokenUpdate) SetAccessTokenSignature(v string) *OAuthTokenUpdate

SetAccessTokenSignature sets the "access_token_signature" field.

func (*OAuthTokenUpdate) SetApp

func (_u *OAuthTokenUpdate) SetApp(v *OAuthApp) *OAuthTokenUpdate

SetApp sets the "app" edge to the OAuthApp entity.

func (*OAuthTokenUpdate) SetAppID

func (_u *OAuthTokenUpdate) SetAppID(v uuid.UUID) *OAuthTokenUpdate

SetAppID sets the "app_id" field.

func (*OAuthTokenUpdate) SetAudience

func (_u *OAuthTokenUpdate) SetAudience(v []string) *OAuthTokenUpdate

SetAudience sets the "audience" field.

func (*OAuthTokenUpdate) SetClientIP

func (_u *OAuthTokenUpdate) SetClientIP(v string) *OAuthTokenUpdate

SetClientIP sets the "client_ip" field.

func (*OAuthTokenUpdate) SetFamilyID

func (_u *OAuthTokenUpdate) SetFamilyID(v uuid.UUID) *OAuthTokenUpdate

SetFamilyID sets the "family_id" field.

func (*OAuthTokenUpdate) SetLastUsedAt

func (_u *OAuthTokenUpdate) SetLastUsedAt(v time.Time) *OAuthTokenUpdate

SetLastUsedAt sets the "last_used_at" field.

func (*OAuthTokenUpdate) SetNillableAccessExpiresAt

func (_u *OAuthTokenUpdate) SetNillableAccessExpiresAt(v *time.Time) *OAuthTokenUpdate

SetNillableAccessExpiresAt sets the "access_expires_at" field if the given value is not nil.

func (*OAuthTokenUpdate) SetNillableAccessTokenSignature

func (_u *OAuthTokenUpdate) SetNillableAccessTokenSignature(v *string) *OAuthTokenUpdate

SetNillableAccessTokenSignature sets the "access_token_signature" field if the given value is not nil.

func (*OAuthTokenUpdate) SetNillableAppID

func (_u *OAuthTokenUpdate) SetNillableAppID(v *uuid.UUID) *OAuthTokenUpdate

SetNillableAppID sets the "app_id" field if the given value is not nil.

func (*OAuthTokenUpdate) SetNillableClientIP

func (_u *OAuthTokenUpdate) SetNillableClientIP(v *string) *OAuthTokenUpdate

SetNillableClientIP sets the "client_ip" field if the given value is not nil.

func (*OAuthTokenUpdate) SetNillableFamilyID

func (_u *OAuthTokenUpdate) SetNillableFamilyID(v *uuid.UUID) *OAuthTokenUpdate

SetNillableFamilyID sets the "family_id" field if the given value is not nil.

func (*OAuthTokenUpdate) SetNillableLastUsedAt

func (_u *OAuthTokenUpdate) SetNillableLastUsedAt(v *time.Time) *OAuthTokenUpdate

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*OAuthTokenUpdate) SetNillableRefreshExpiresAt

func (_u *OAuthTokenUpdate) SetNillableRefreshExpiresAt(v *time.Time) *OAuthTokenUpdate

SetNillableRefreshExpiresAt sets the "refresh_expires_at" field if the given value is not nil.

func (*OAuthTokenUpdate) SetNillableRefreshTokenSignature

func (_u *OAuthTokenUpdate) SetNillableRefreshTokenSignature(v *string) *OAuthTokenUpdate

SetNillableRefreshTokenSignature sets the "refresh_token_signature" field if the given value is not nil.

func (*OAuthTokenUpdate) SetNillableRequestData

func (_u *OAuthTokenUpdate) SetNillableRequestData(v *string) *OAuthTokenUpdate

SetNillableRequestData sets the "request_data" field if the given value is not nil.

func (*OAuthTokenUpdate) SetNillableRevoked

func (_u *OAuthTokenUpdate) SetNillableRevoked(v *bool) *OAuthTokenUpdate

SetNillableRevoked sets the "revoked" field if the given value is not nil.

func (*OAuthTokenUpdate) SetNillableRevokedAt

func (_u *OAuthTokenUpdate) SetNillableRevokedAt(v *time.Time) *OAuthTokenUpdate

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*OAuthTokenUpdate) SetNillableRevokedReason

func (_u *OAuthTokenUpdate) SetNillableRevokedReason(v *string) *OAuthTokenUpdate

SetNillableRevokedReason sets the "revoked_reason" field if the given value is not nil.

func (*OAuthTokenUpdate) SetNillableServiceAccountID

func (_u *OAuthTokenUpdate) SetNillableServiceAccountID(v *uuid.UUID) *OAuthTokenUpdate

SetNillableServiceAccountID sets the "service_account_id" field if the given value is not nil.

func (*OAuthTokenUpdate) SetNillableSessionID

func (_u *OAuthTokenUpdate) SetNillableSessionID(v *string) *OAuthTokenUpdate

SetNillableSessionID sets the "session_id" field if the given value is not nil.

func (*OAuthTokenUpdate) SetNillableUserAgent

func (_u *OAuthTokenUpdate) SetNillableUserAgent(v *string) *OAuthTokenUpdate

SetNillableUserAgent sets the "user_agent" field if the given value is not nil.

func (*OAuthTokenUpdate) SetNillableUserID

func (_u *OAuthTokenUpdate) SetNillableUserID(v *uuid.UUID) *OAuthTokenUpdate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*OAuthTokenUpdate) SetRefreshExpiresAt

func (_u *OAuthTokenUpdate) SetRefreshExpiresAt(v time.Time) *OAuthTokenUpdate

SetRefreshExpiresAt sets the "refresh_expires_at" field.

func (*OAuthTokenUpdate) SetRefreshTokenSignature

func (_u *OAuthTokenUpdate) SetRefreshTokenSignature(v string) *OAuthTokenUpdate

SetRefreshTokenSignature sets the "refresh_token_signature" field.

func (*OAuthTokenUpdate) SetRequestData

func (_u *OAuthTokenUpdate) SetRequestData(v string) *OAuthTokenUpdate

SetRequestData sets the "request_data" field.

func (*OAuthTokenUpdate) SetRevoked

func (_u *OAuthTokenUpdate) SetRevoked(v bool) *OAuthTokenUpdate

SetRevoked sets the "revoked" field.

func (*OAuthTokenUpdate) SetRevokedAt

func (_u *OAuthTokenUpdate) SetRevokedAt(v time.Time) *OAuthTokenUpdate

SetRevokedAt sets the "revoked_at" field.

func (*OAuthTokenUpdate) SetRevokedReason

func (_u *OAuthTokenUpdate) SetRevokedReason(v string) *OAuthTokenUpdate

SetRevokedReason sets the "revoked_reason" field.

func (*OAuthTokenUpdate) SetScopes

func (_u *OAuthTokenUpdate) SetScopes(v []string) *OAuthTokenUpdate

SetScopes sets the "scopes" field.

func (*OAuthTokenUpdate) SetServiceAccountID

func (_u *OAuthTokenUpdate) SetServiceAccountID(v uuid.UUID) *OAuthTokenUpdate

SetServiceAccountID sets the "service_account_id" field.

func (*OAuthTokenUpdate) SetSessionID

func (_u *OAuthTokenUpdate) SetSessionID(v string) *OAuthTokenUpdate

SetSessionID sets the "session_id" field.

func (*OAuthTokenUpdate) SetUser

func (_u *OAuthTokenUpdate) SetUser(v *User) *OAuthTokenUpdate

SetUser sets the "user" edge to the User entity.

func (*OAuthTokenUpdate) SetUserAgent

func (_u *OAuthTokenUpdate) SetUserAgent(v string) *OAuthTokenUpdate

SetUserAgent sets the "user_agent" field.

func (*OAuthTokenUpdate) SetUserID

func (_u *OAuthTokenUpdate) SetUserID(v uuid.UUID) *OAuthTokenUpdate

SetUserID sets the "user_id" field.

func (*OAuthTokenUpdate) Where

Where appends a list predicates to the OAuthTokenUpdate builder.

type OAuthTokenUpdateOne

type OAuthTokenUpdateOne struct {
	// contains filtered or unexported fields
}

OAuthTokenUpdateOne is the builder for updating a single OAuthToken entity.

func (*OAuthTokenUpdateOne) AppendAudience

func (_u *OAuthTokenUpdateOne) AppendAudience(v []string) *OAuthTokenUpdateOne

AppendAudience appends value to the "audience" field.

func (*OAuthTokenUpdateOne) AppendScopes

func (_u *OAuthTokenUpdateOne) AppendScopes(v []string) *OAuthTokenUpdateOne

AppendScopes appends value to the "scopes" field.

func (*OAuthTokenUpdateOne) ClearApp

func (_u *OAuthTokenUpdateOne) ClearApp() *OAuthTokenUpdateOne

ClearApp clears the "app" edge to the OAuthApp entity.

func (*OAuthTokenUpdateOne) ClearClientIP

func (_u *OAuthTokenUpdateOne) ClearClientIP() *OAuthTokenUpdateOne

ClearClientIP clears the value of the "client_ip" field.

func (*OAuthTokenUpdateOne) ClearLastUsedAt

func (_u *OAuthTokenUpdateOne) ClearLastUsedAt() *OAuthTokenUpdateOne

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*OAuthTokenUpdateOne) ClearRefreshExpiresAt

func (_u *OAuthTokenUpdateOne) ClearRefreshExpiresAt() *OAuthTokenUpdateOne

ClearRefreshExpiresAt clears the value of the "refresh_expires_at" field.

func (*OAuthTokenUpdateOne) ClearRefreshTokenSignature

func (_u *OAuthTokenUpdateOne) ClearRefreshTokenSignature() *OAuthTokenUpdateOne

ClearRefreshTokenSignature clears the value of the "refresh_token_signature" field.

func (*OAuthTokenUpdateOne) ClearRequestData

func (_u *OAuthTokenUpdateOne) ClearRequestData() *OAuthTokenUpdateOne

ClearRequestData clears the value of the "request_data" field.

func (*OAuthTokenUpdateOne) ClearRevokedAt

func (_u *OAuthTokenUpdateOne) ClearRevokedAt() *OAuthTokenUpdateOne

ClearRevokedAt clears the value of the "revoked_at" field.

func (*OAuthTokenUpdateOne) ClearRevokedReason

func (_u *OAuthTokenUpdateOne) ClearRevokedReason() *OAuthTokenUpdateOne

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*OAuthTokenUpdateOne) ClearServiceAccountID

func (_u *OAuthTokenUpdateOne) ClearServiceAccountID() *OAuthTokenUpdateOne

ClearServiceAccountID clears the value of the "service_account_id" field.

func (*OAuthTokenUpdateOne) ClearSessionID

func (_u *OAuthTokenUpdateOne) ClearSessionID() *OAuthTokenUpdateOne

ClearSessionID clears the value of the "session_id" field.

func (*OAuthTokenUpdateOne) ClearUser

func (_u *OAuthTokenUpdateOne) ClearUser() *OAuthTokenUpdateOne

ClearUser clears the "user" edge to the User entity.

func (*OAuthTokenUpdateOne) ClearUserAgent

func (_u *OAuthTokenUpdateOne) ClearUserAgent() *OAuthTokenUpdateOne

ClearUserAgent clears the value of the "user_agent" field.

func (*OAuthTokenUpdateOne) ClearUserID

func (_u *OAuthTokenUpdateOne) ClearUserID() *OAuthTokenUpdateOne

ClearUserID clears the value of the "user_id" field.

func (*OAuthTokenUpdateOne) Exec

func (_u *OAuthTokenUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*OAuthTokenUpdateOne) ExecX

func (_u *OAuthTokenUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OAuthTokenUpdateOne) Mutation

func (_u *OAuthTokenUpdateOne) Mutation() *OAuthTokenMutation

Mutation returns the OAuthTokenMutation object of the builder.

func (*OAuthTokenUpdateOne) Save

Save executes the query and returns the updated OAuthToken entity.

func (*OAuthTokenUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*OAuthTokenUpdateOne) Select

func (_u *OAuthTokenUpdateOne) Select(field string, fields ...string) *OAuthTokenUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*OAuthTokenUpdateOne) SetAccessExpiresAt

func (_u *OAuthTokenUpdateOne) SetAccessExpiresAt(v time.Time) *OAuthTokenUpdateOne

SetAccessExpiresAt sets the "access_expires_at" field.

func (*OAuthTokenUpdateOne) SetAccessTokenSignature

func (_u *OAuthTokenUpdateOne) SetAccessTokenSignature(v string) *OAuthTokenUpdateOne

SetAccessTokenSignature sets the "access_token_signature" field.

func (*OAuthTokenUpdateOne) SetApp

SetApp sets the "app" edge to the OAuthApp entity.

func (*OAuthTokenUpdateOne) SetAppID

SetAppID sets the "app_id" field.

func (*OAuthTokenUpdateOne) SetAudience

func (_u *OAuthTokenUpdateOne) SetAudience(v []string) *OAuthTokenUpdateOne

SetAudience sets the "audience" field.

func (*OAuthTokenUpdateOne) SetClientIP

func (_u *OAuthTokenUpdateOne) SetClientIP(v string) *OAuthTokenUpdateOne

SetClientIP sets the "client_ip" field.

func (*OAuthTokenUpdateOne) SetFamilyID

func (_u *OAuthTokenUpdateOne) SetFamilyID(v uuid.UUID) *OAuthTokenUpdateOne

SetFamilyID sets the "family_id" field.

func (*OAuthTokenUpdateOne) SetLastUsedAt

func (_u *OAuthTokenUpdateOne) SetLastUsedAt(v time.Time) *OAuthTokenUpdateOne

SetLastUsedAt sets the "last_used_at" field.

func (*OAuthTokenUpdateOne) SetNillableAccessExpiresAt

func (_u *OAuthTokenUpdateOne) SetNillableAccessExpiresAt(v *time.Time) *OAuthTokenUpdateOne

SetNillableAccessExpiresAt sets the "access_expires_at" field if the given value is not nil.

func (*OAuthTokenUpdateOne) SetNillableAccessTokenSignature

func (_u *OAuthTokenUpdateOne) SetNillableAccessTokenSignature(v *string) *OAuthTokenUpdateOne

SetNillableAccessTokenSignature sets the "access_token_signature" field if the given value is not nil.

func (*OAuthTokenUpdateOne) SetNillableAppID

func (_u *OAuthTokenUpdateOne) SetNillableAppID(v *uuid.UUID) *OAuthTokenUpdateOne

SetNillableAppID sets the "app_id" field if the given value is not nil.

func (*OAuthTokenUpdateOne) SetNillableClientIP

func (_u *OAuthTokenUpdateOne) SetNillableClientIP(v *string) *OAuthTokenUpdateOne

SetNillableClientIP sets the "client_ip" field if the given value is not nil.

func (*OAuthTokenUpdateOne) SetNillableFamilyID

func (_u *OAuthTokenUpdateOne) SetNillableFamilyID(v *uuid.UUID) *OAuthTokenUpdateOne

SetNillableFamilyID sets the "family_id" field if the given value is not nil.

func (*OAuthTokenUpdateOne) SetNillableLastUsedAt

func (_u *OAuthTokenUpdateOne) SetNillableLastUsedAt(v *time.Time) *OAuthTokenUpdateOne

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*OAuthTokenUpdateOne) SetNillableRefreshExpiresAt

func (_u *OAuthTokenUpdateOne) SetNillableRefreshExpiresAt(v *time.Time) *OAuthTokenUpdateOne

SetNillableRefreshExpiresAt sets the "refresh_expires_at" field if the given value is not nil.

func (*OAuthTokenUpdateOne) SetNillableRefreshTokenSignature

func (_u *OAuthTokenUpdateOne) SetNillableRefreshTokenSignature(v *string) *OAuthTokenUpdateOne

SetNillableRefreshTokenSignature sets the "refresh_token_signature" field if the given value is not nil.

func (*OAuthTokenUpdateOne) SetNillableRequestData

func (_u *OAuthTokenUpdateOne) SetNillableRequestData(v *string) *OAuthTokenUpdateOne

SetNillableRequestData sets the "request_data" field if the given value is not nil.

func (*OAuthTokenUpdateOne) SetNillableRevoked

func (_u *OAuthTokenUpdateOne) SetNillableRevoked(v *bool) *OAuthTokenUpdateOne

SetNillableRevoked sets the "revoked" field if the given value is not nil.

func (*OAuthTokenUpdateOne) SetNillableRevokedAt

func (_u *OAuthTokenUpdateOne) SetNillableRevokedAt(v *time.Time) *OAuthTokenUpdateOne

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*OAuthTokenUpdateOne) SetNillableRevokedReason

func (_u *OAuthTokenUpdateOne) SetNillableRevokedReason(v *string) *OAuthTokenUpdateOne

SetNillableRevokedReason sets the "revoked_reason" field if the given value is not nil.

func (*OAuthTokenUpdateOne) SetNillableServiceAccountID

func (_u *OAuthTokenUpdateOne) SetNillableServiceAccountID(v *uuid.UUID) *OAuthTokenUpdateOne

SetNillableServiceAccountID sets the "service_account_id" field if the given value is not nil.

func (*OAuthTokenUpdateOne) SetNillableSessionID

func (_u *OAuthTokenUpdateOne) SetNillableSessionID(v *string) *OAuthTokenUpdateOne

SetNillableSessionID sets the "session_id" field if the given value is not nil.

func (*OAuthTokenUpdateOne) SetNillableUserAgent

func (_u *OAuthTokenUpdateOne) SetNillableUserAgent(v *string) *OAuthTokenUpdateOne

SetNillableUserAgent sets the "user_agent" field if the given value is not nil.

func (*OAuthTokenUpdateOne) SetNillableUserID

func (_u *OAuthTokenUpdateOne) SetNillableUserID(v *uuid.UUID) *OAuthTokenUpdateOne

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*OAuthTokenUpdateOne) SetRefreshExpiresAt

func (_u *OAuthTokenUpdateOne) SetRefreshExpiresAt(v time.Time) *OAuthTokenUpdateOne

SetRefreshExpiresAt sets the "refresh_expires_at" field.

func (*OAuthTokenUpdateOne) SetRefreshTokenSignature

func (_u *OAuthTokenUpdateOne) SetRefreshTokenSignature(v string) *OAuthTokenUpdateOne

SetRefreshTokenSignature sets the "refresh_token_signature" field.

func (*OAuthTokenUpdateOne) SetRequestData

func (_u *OAuthTokenUpdateOne) SetRequestData(v string) *OAuthTokenUpdateOne

SetRequestData sets the "request_data" field.

func (*OAuthTokenUpdateOne) SetRevoked

func (_u *OAuthTokenUpdateOne) SetRevoked(v bool) *OAuthTokenUpdateOne

SetRevoked sets the "revoked" field.

func (*OAuthTokenUpdateOne) SetRevokedAt

func (_u *OAuthTokenUpdateOne) SetRevokedAt(v time.Time) *OAuthTokenUpdateOne

SetRevokedAt sets the "revoked_at" field.

func (*OAuthTokenUpdateOne) SetRevokedReason

func (_u *OAuthTokenUpdateOne) SetRevokedReason(v string) *OAuthTokenUpdateOne

SetRevokedReason sets the "revoked_reason" field.

func (*OAuthTokenUpdateOne) SetScopes

func (_u *OAuthTokenUpdateOne) SetScopes(v []string) *OAuthTokenUpdateOne

SetScopes sets the "scopes" field.

func (*OAuthTokenUpdateOne) SetServiceAccountID

func (_u *OAuthTokenUpdateOne) SetServiceAccountID(v uuid.UUID) *OAuthTokenUpdateOne

SetServiceAccountID sets the "service_account_id" field.

func (*OAuthTokenUpdateOne) SetSessionID

func (_u *OAuthTokenUpdateOne) SetSessionID(v string) *OAuthTokenUpdateOne

SetSessionID sets the "session_id" field.

func (*OAuthTokenUpdateOne) SetUser

func (_u *OAuthTokenUpdateOne) SetUser(v *User) *OAuthTokenUpdateOne

SetUser sets the "user" edge to the User entity.

func (*OAuthTokenUpdateOne) SetUserAgent

func (_u *OAuthTokenUpdateOne) SetUserAgent(v string) *OAuthTokenUpdateOne

SetUserAgent sets the "user_agent" field.

func (*OAuthTokenUpdateOne) SetUserID

SetUserID sets the "user_id" field.

func (*OAuthTokenUpdateOne) Where

Where appends a list predicates to the OAuthTokenUpdate builder.

type OAuthTokenUpsert

type OAuthTokenUpsert struct {
	*sql.UpdateSet
}

OAuthTokenUpsert is the "OnConflict" setter.

func (*OAuthTokenUpsert) ClearClientIP

func (u *OAuthTokenUpsert) ClearClientIP() *OAuthTokenUpsert

ClearClientIP clears the value of the "client_ip" field.

func (*OAuthTokenUpsert) ClearLastUsedAt

func (u *OAuthTokenUpsert) ClearLastUsedAt() *OAuthTokenUpsert

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*OAuthTokenUpsert) ClearRefreshExpiresAt

func (u *OAuthTokenUpsert) ClearRefreshExpiresAt() *OAuthTokenUpsert

ClearRefreshExpiresAt clears the value of the "refresh_expires_at" field.

func (*OAuthTokenUpsert) ClearRefreshTokenSignature

func (u *OAuthTokenUpsert) ClearRefreshTokenSignature() *OAuthTokenUpsert

ClearRefreshTokenSignature clears the value of the "refresh_token_signature" field.

func (*OAuthTokenUpsert) ClearRequestData

func (u *OAuthTokenUpsert) ClearRequestData() *OAuthTokenUpsert

ClearRequestData clears the value of the "request_data" field.

func (*OAuthTokenUpsert) ClearRevokedAt

func (u *OAuthTokenUpsert) ClearRevokedAt() *OAuthTokenUpsert

ClearRevokedAt clears the value of the "revoked_at" field.

func (*OAuthTokenUpsert) ClearRevokedReason

func (u *OAuthTokenUpsert) ClearRevokedReason() *OAuthTokenUpsert

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*OAuthTokenUpsert) ClearServiceAccountID

func (u *OAuthTokenUpsert) ClearServiceAccountID() *OAuthTokenUpsert

ClearServiceAccountID clears the value of the "service_account_id" field.

func (*OAuthTokenUpsert) ClearSessionID

func (u *OAuthTokenUpsert) ClearSessionID() *OAuthTokenUpsert

ClearSessionID clears the value of the "session_id" field.

func (*OAuthTokenUpsert) ClearUserAgent

func (u *OAuthTokenUpsert) ClearUserAgent() *OAuthTokenUpsert

ClearUserAgent clears the value of the "user_agent" field.

func (*OAuthTokenUpsert) ClearUserID

func (u *OAuthTokenUpsert) ClearUserID() *OAuthTokenUpsert

ClearUserID clears the value of the "user_id" field.

func (*OAuthTokenUpsert) SetAccessExpiresAt

func (u *OAuthTokenUpsert) SetAccessExpiresAt(v time.Time) *OAuthTokenUpsert

SetAccessExpiresAt sets the "access_expires_at" field.

func (*OAuthTokenUpsert) SetAccessTokenSignature

func (u *OAuthTokenUpsert) SetAccessTokenSignature(v string) *OAuthTokenUpsert

SetAccessTokenSignature sets the "access_token_signature" field.

func (*OAuthTokenUpsert) SetAppID

func (u *OAuthTokenUpsert) SetAppID(v uuid.UUID) *OAuthTokenUpsert

SetAppID sets the "app_id" field.

func (*OAuthTokenUpsert) SetAudience

func (u *OAuthTokenUpsert) SetAudience(v []string) *OAuthTokenUpsert

SetAudience sets the "audience" field.

func (*OAuthTokenUpsert) SetClientIP

func (u *OAuthTokenUpsert) SetClientIP(v string) *OAuthTokenUpsert

SetClientIP sets the "client_ip" field.

func (*OAuthTokenUpsert) SetFamilyID

func (u *OAuthTokenUpsert) SetFamilyID(v uuid.UUID) *OAuthTokenUpsert

SetFamilyID sets the "family_id" field.

func (*OAuthTokenUpsert) SetLastUsedAt

func (u *OAuthTokenUpsert) SetLastUsedAt(v time.Time) *OAuthTokenUpsert

SetLastUsedAt sets the "last_used_at" field.

func (*OAuthTokenUpsert) SetRefreshExpiresAt

func (u *OAuthTokenUpsert) SetRefreshExpiresAt(v time.Time) *OAuthTokenUpsert

SetRefreshExpiresAt sets the "refresh_expires_at" field.

func (*OAuthTokenUpsert) SetRefreshTokenSignature

func (u *OAuthTokenUpsert) SetRefreshTokenSignature(v string) *OAuthTokenUpsert

SetRefreshTokenSignature sets the "refresh_token_signature" field.

func (*OAuthTokenUpsert) SetRequestData

func (u *OAuthTokenUpsert) SetRequestData(v string) *OAuthTokenUpsert

SetRequestData sets the "request_data" field.

func (*OAuthTokenUpsert) SetRevoked

func (u *OAuthTokenUpsert) SetRevoked(v bool) *OAuthTokenUpsert

SetRevoked sets the "revoked" field.

func (*OAuthTokenUpsert) SetRevokedAt

func (u *OAuthTokenUpsert) SetRevokedAt(v time.Time) *OAuthTokenUpsert

SetRevokedAt sets the "revoked_at" field.

func (*OAuthTokenUpsert) SetRevokedReason

func (u *OAuthTokenUpsert) SetRevokedReason(v string) *OAuthTokenUpsert

SetRevokedReason sets the "revoked_reason" field.

func (*OAuthTokenUpsert) SetScopes

func (u *OAuthTokenUpsert) SetScopes(v []string) *OAuthTokenUpsert

SetScopes sets the "scopes" field.

func (*OAuthTokenUpsert) SetServiceAccountID

func (u *OAuthTokenUpsert) SetServiceAccountID(v uuid.UUID) *OAuthTokenUpsert

SetServiceAccountID sets the "service_account_id" field.

func (*OAuthTokenUpsert) SetSessionID

func (u *OAuthTokenUpsert) SetSessionID(v string) *OAuthTokenUpsert

SetSessionID sets the "session_id" field.

func (*OAuthTokenUpsert) SetUserAgent

func (u *OAuthTokenUpsert) SetUserAgent(v string) *OAuthTokenUpsert

SetUserAgent sets the "user_agent" field.

func (*OAuthTokenUpsert) SetUserID

func (u *OAuthTokenUpsert) SetUserID(v uuid.UUID) *OAuthTokenUpsert

SetUserID sets the "user_id" field.

func (*OAuthTokenUpsert) UpdateAccessExpiresAt

func (u *OAuthTokenUpsert) UpdateAccessExpiresAt() *OAuthTokenUpsert

UpdateAccessExpiresAt sets the "access_expires_at" field to the value that was provided on create.

func (*OAuthTokenUpsert) UpdateAccessTokenSignature

func (u *OAuthTokenUpsert) UpdateAccessTokenSignature() *OAuthTokenUpsert

UpdateAccessTokenSignature sets the "access_token_signature" field to the value that was provided on create.

func (*OAuthTokenUpsert) UpdateAppID

func (u *OAuthTokenUpsert) UpdateAppID() *OAuthTokenUpsert

UpdateAppID sets the "app_id" field to the value that was provided on create.

func (*OAuthTokenUpsert) UpdateAudience

func (u *OAuthTokenUpsert) UpdateAudience() *OAuthTokenUpsert

UpdateAudience sets the "audience" field to the value that was provided on create.

func (*OAuthTokenUpsert) UpdateClientIP

func (u *OAuthTokenUpsert) UpdateClientIP() *OAuthTokenUpsert

UpdateClientIP sets the "client_ip" field to the value that was provided on create.

func (*OAuthTokenUpsert) UpdateFamilyID

func (u *OAuthTokenUpsert) UpdateFamilyID() *OAuthTokenUpsert

UpdateFamilyID sets the "family_id" field to the value that was provided on create.

func (*OAuthTokenUpsert) UpdateLastUsedAt

func (u *OAuthTokenUpsert) UpdateLastUsedAt() *OAuthTokenUpsert

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*OAuthTokenUpsert) UpdateRefreshExpiresAt

func (u *OAuthTokenUpsert) UpdateRefreshExpiresAt() *OAuthTokenUpsert

UpdateRefreshExpiresAt sets the "refresh_expires_at" field to the value that was provided on create.

func (*OAuthTokenUpsert) UpdateRefreshTokenSignature

func (u *OAuthTokenUpsert) UpdateRefreshTokenSignature() *OAuthTokenUpsert

UpdateRefreshTokenSignature sets the "refresh_token_signature" field to the value that was provided on create.

func (*OAuthTokenUpsert) UpdateRequestData

func (u *OAuthTokenUpsert) UpdateRequestData() *OAuthTokenUpsert

UpdateRequestData sets the "request_data" field to the value that was provided on create.

func (*OAuthTokenUpsert) UpdateRevoked

func (u *OAuthTokenUpsert) UpdateRevoked() *OAuthTokenUpsert

UpdateRevoked sets the "revoked" field to the value that was provided on create.

func (*OAuthTokenUpsert) UpdateRevokedAt

func (u *OAuthTokenUpsert) UpdateRevokedAt() *OAuthTokenUpsert

UpdateRevokedAt sets the "revoked_at" field to the value that was provided on create.

func (*OAuthTokenUpsert) UpdateRevokedReason

func (u *OAuthTokenUpsert) UpdateRevokedReason() *OAuthTokenUpsert

UpdateRevokedReason sets the "revoked_reason" field to the value that was provided on create.

func (*OAuthTokenUpsert) UpdateScopes

func (u *OAuthTokenUpsert) UpdateScopes() *OAuthTokenUpsert

UpdateScopes sets the "scopes" field to the value that was provided on create.

func (*OAuthTokenUpsert) UpdateServiceAccountID

func (u *OAuthTokenUpsert) UpdateServiceAccountID() *OAuthTokenUpsert

UpdateServiceAccountID sets the "service_account_id" field to the value that was provided on create.

func (*OAuthTokenUpsert) UpdateSessionID

func (u *OAuthTokenUpsert) UpdateSessionID() *OAuthTokenUpsert

UpdateSessionID sets the "session_id" field to the value that was provided on create.

func (*OAuthTokenUpsert) UpdateUserAgent

func (u *OAuthTokenUpsert) UpdateUserAgent() *OAuthTokenUpsert

UpdateUserAgent sets the "user_agent" field to the value that was provided on create.

func (*OAuthTokenUpsert) UpdateUserID

func (u *OAuthTokenUpsert) UpdateUserID() *OAuthTokenUpsert

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OAuthTokenUpsertBulk

type OAuthTokenUpsertBulk struct {
	// contains filtered or unexported fields
}

OAuthTokenUpsertBulk is the builder for "upsert"-ing a bulk of OAuthToken nodes.

func (*OAuthTokenUpsertBulk) ClearClientIP

func (u *OAuthTokenUpsertBulk) ClearClientIP() *OAuthTokenUpsertBulk

ClearClientIP clears the value of the "client_ip" field.

func (*OAuthTokenUpsertBulk) ClearLastUsedAt

func (u *OAuthTokenUpsertBulk) ClearLastUsedAt() *OAuthTokenUpsertBulk

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*OAuthTokenUpsertBulk) ClearRefreshExpiresAt

func (u *OAuthTokenUpsertBulk) ClearRefreshExpiresAt() *OAuthTokenUpsertBulk

ClearRefreshExpiresAt clears the value of the "refresh_expires_at" field.

func (*OAuthTokenUpsertBulk) ClearRefreshTokenSignature

func (u *OAuthTokenUpsertBulk) ClearRefreshTokenSignature() *OAuthTokenUpsertBulk

ClearRefreshTokenSignature clears the value of the "refresh_token_signature" field.

func (*OAuthTokenUpsertBulk) ClearRequestData

func (u *OAuthTokenUpsertBulk) ClearRequestData() *OAuthTokenUpsertBulk

ClearRequestData clears the value of the "request_data" field.

func (*OAuthTokenUpsertBulk) ClearRevokedAt

func (u *OAuthTokenUpsertBulk) ClearRevokedAt() *OAuthTokenUpsertBulk

ClearRevokedAt clears the value of the "revoked_at" field.

func (*OAuthTokenUpsertBulk) ClearRevokedReason

func (u *OAuthTokenUpsertBulk) ClearRevokedReason() *OAuthTokenUpsertBulk

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*OAuthTokenUpsertBulk) ClearServiceAccountID

func (u *OAuthTokenUpsertBulk) ClearServiceAccountID() *OAuthTokenUpsertBulk

ClearServiceAccountID clears the value of the "service_account_id" field.

func (*OAuthTokenUpsertBulk) ClearSessionID

func (u *OAuthTokenUpsertBulk) ClearSessionID() *OAuthTokenUpsertBulk

ClearSessionID clears the value of the "session_id" field.

func (*OAuthTokenUpsertBulk) ClearUserAgent

func (u *OAuthTokenUpsertBulk) ClearUserAgent() *OAuthTokenUpsertBulk

ClearUserAgent clears the value of the "user_agent" field.

func (*OAuthTokenUpsertBulk) ClearUserID

func (u *OAuthTokenUpsertBulk) ClearUserID() *OAuthTokenUpsertBulk

ClearUserID clears the value of the "user_id" field.

func (*OAuthTokenUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OAuthTokenUpsertBulk) Exec

Exec executes the query.

func (*OAuthTokenUpsertBulk) ExecX

func (u *OAuthTokenUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OAuthTokenUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OAuthToken.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*OAuthTokenUpsertBulk) SetAccessExpiresAt

func (u *OAuthTokenUpsertBulk) SetAccessExpiresAt(v time.Time) *OAuthTokenUpsertBulk

SetAccessExpiresAt sets the "access_expires_at" field.

func (*OAuthTokenUpsertBulk) SetAccessTokenSignature

func (u *OAuthTokenUpsertBulk) SetAccessTokenSignature(v string) *OAuthTokenUpsertBulk

SetAccessTokenSignature sets the "access_token_signature" field.

func (*OAuthTokenUpsertBulk) SetAppID

SetAppID sets the "app_id" field.

func (*OAuthTokenUpsertBulk) SetAudience

func (u *OAuthTokenUpsertBulk) SetAudience(v []string) *OAuthTokenUpsertBulk

SetAudience sets the "audience" field.

func (*OAuthTokenUpsertBulk) SetClientIP

SetClientIP sets the "client_ip" field.

func (*OAuthTokenUpsertBulk) SetFamilyID

SetFamilyID sets the "family_id" field.

func (*OAuthTokenUpsertBulk) SetLastUsedAt

func (u *OAuthTokenUpsertBulk) SetLastUsedAt(v time.Time) *OAuthTokenUpsertBulk

SetLastUsedAt sets the "last_used_at" field.

func (*OAuthTokenUpsertBulk) SetRefreshExpiresAt

func (u *OAuthTokenUpsertBulk) SetRefreshExpiresAt(v time.Time) *OAuthTokenUpsertBulk

SetRefreshExpiresAt sets the "refresh_expires_at" field.

func (*OAuthTokenUpsertBulk) SetRefreshTokenSignature

func (u *OAuthTokenUpsertBulk) SetRefreshTokenSignature(v string) *OAuthTokenUpsertBulk

SetRefreshTokenSignature sets the "refresh_token_signature" field.

func (*OAuthTokenUpsertBulk) SetRequestData

func (u *OAuthTokenUpsertBulk) SetRequestData(v string) *OAuthTokenUpsertBulk

SetRequestData sets the "request_data" field.

func (*OAuthTokenUpsertBulk) SetRevoked

SetRevoked sets the "revoked" field.

func (*OAuthTokenUpsertBulk) SetRevokedAt

func (u *OAuthTokenUpsertBulk) SetRevokedAt(v time.Time) *OAuthTokenUpsertBulk

SetRevokedAt sets the "revoked_at" field.

func (*OAuthTokenUpsertBulk) SetRevokedReason

func (u *OAuthTokenUpsertBulk) SetRevokedReason(v string) *OAuthTokenUpsertBulk

SetRevokedReason sets the "revoked_reason" field.

func (*OAuthTokenUpsertBulk) SetScopes

SetScopes sets the "scopes" field.

func (*OAuthTokenUpsertBulk) SetServiceAccountID

func (u *OAuthTokenUpsertBulk) SetServiceAccountID(v uuid.UUID) *OAuthTokenUpsertBulk

SetServiceAccountID sets the "service_account_id" field.

func (*OAuthTokenUpsertBulk) SetSessionID

func (u *OAuthTokenUpsertBulk) SetSessionID(v string) *OAuthTokenUpsertBulk

SetSessionID sets the "session_id" field.

func (*OAuthTokenUpsertBulk) SetUserAgent

func (u *OAuthTokenUpsertBulk) SetUserAgent(v string) *OAuthTokenUpsertBulk

SetUserAgent sets the "user_agent" field.

func (*OAuthTokenUpsertBulk) SetUserID

SetUserID sets the "user_id" field.

func (*OAuthTokenUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the OAuthTokenCreateBulk.OnConflict documentation for more info.

func (*OAuthTokenUpsertBulk) UpdateAccessExpiresAt

func (u *OAuthTokenUpsertBulk) UpdateAccessExpiresAt() *OAuthTokenUpsertBulk

UpdateAccessExpiresAt sets the "access_expires_at" field to the value that was provided on create.

func (*OAuthTokenUpsertBulk) UpdateAccessTokenSignature

func (u *OAuthTokenUpsertBulk) UpdateAccessTokenSignature() *OAuthTokenUpsertBulk

UpdateAccessTokenSignature sets the "access_token_signature" field to the value that was provided on create.

func (*OAuthTokenUpsertBulk) UpdateAppID

func (u *OAuthTokenUpsertBulk) UpdateAppID() *OAuthTokenUpsertBulk

UpdateAppID sets the "app_id" field to the value that was provided on create.

func (*OAuthTokenUpsertBulk) UpdateAudience

func (u *OAuthTokenUpsertBulk) UpdateAudience() *OAuthTokenUpsertBulk

UpdateAudience sets the "audience" field to the value that was provided on create.

func (*OAuthTokenUpsertBulk) UpdateClientIP

func (u *OAuthTokenUpsertBulk) UpdateClientIP() *OAuthTokenUpsertBulk

UpdateClientIP sets the "client_ip" field to the value that was provided on create.

func (*OAuthTokenUpsertBulk) UpdateFamilyID

func (u *OAuthTokenUpsertBulk) UpdateFamilyID() *OAuthTokenUpsertBulk

UpdateFamilyID sets the "family_id" field to the value that was provided on create.

func (*OAuthTokenUpsertBulk) UpdateLastUsedAt

func (u *OAuthTokenUpsertBulk) UpdateLastUsedAt() *OAuthTokenUpsertBulk

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*OAuthTokenUpsertBulk) UpdateNewValues

func (u *OAuthTokenUpsertBulk) UpdateNewValues() *OAuthTokenUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.OAuthToken.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(oauthtoken.FieldID)
		}),
	).
	Exec(ctx)

func (*OAuthTokenUpsertBulk) UpdateRefreshExpiresAt

func (u *OAuthTokenUpsertBulk) UpdateRefreshExpiresAt() *OAuthTokenUpsertBulk

UpdateRefreshExpiresAt sets the "refresh_expires_at" field to the value that was provided on create.

func (*OAuthTokenUpsertBulk) UpdateRefreshTokenSignature

func (u *OAuthTokenUpsertBulk) UpdateRefreshTokenSignature() *OAuthTokenUpsertBulk

UpdateRefreshTokenSignature sets the "refresh_token_signature" field to the value that was provided on create.

func (*OAuthTokenUpsertBulk) UpdateRequestData

func (u *OAuthTokenUpsertBulk) UpdateRequestData() *OAuthTokenUpsertBulk

UpdateRequestData sets the "request_data" field to the value that was provided on create.

func (*OAuthTokenUpsertBulk) UpdateRevoked

func (u *OAuthTokenUpsertBulk) UpdateRevoked() *OAuthTokenUpsertBulk

UpdateRevoked sets the "revoked" field to the value that was provided on create.

func (*OAuthTokenUpsertBulk) UpdateRevokedAt

func (u *OAuthTokenUpsertBulk) UpdateRevokedAt() *OAuthTokenUpsertBulk

UpdateRevokedAt sets the "revoked_at" field to the value that was provided on create.

func (*OAuthTokenUpsertBulk) UpdateRevokedReason

func (u *OAuthTokenUpsertBulk) UpdateRevokedReason() *OAuthTokenUpsertBulk

UpdateRevokedReason sets the "revoked_reason" field to the value that was provided on create.

func (*OAuthTokenUpsertBulk) UpdateScopes

func (u *OAuthTokenUpsertBulk) UpdateScopes() *OAuthTokenUpsertBulk

UpdateScopes sets the "scopes" field to the value that was provided on create.

func (*OAuthTokenUpsertBulk) UpdateServiceAccountID

func (u *OAuthTokenUpsertBulk) UpdateServiceAccountID() *OAuthTokenUpsertBulk

UpdateServiceAccountID sets the "service_account_id" field to the value that was provided on create.

func (*OAuthTokenUpsertBulk) UpdateSessionID

func (u *OAuthTokenUpsertBulk) UpdateSessionID() *OAuthTokenUpsertBulk

UpdateSessionID sets the "session_id" field to the value that was provided on create.

func (*OAuthTokenUpsertBulk) UpdateUserAgent

func (u *OAuthTokenUpsertBulk) UpdateUserAgent() *OAuthTokenUpsertBulk

UpdateUserAgent sets the "user_agent" field to the value that was provided on create.

func (*OAuthTokenUpsertBulk) UpdateUserID

func (u *OAuthTokenUpsertBulk) UpdateUserID() *OAuthTokenUpsertBulk

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OAuthTokenUpsertOne

type OAuthTokenUpsertOne struct {
	// contains filtered or unexported fields
}

OAuthTokenUpsertOne is the builder for "upsert"-ing

one OAuthToken node.

func (*OAuthTokenUpsertOne) ClearClientIP

func (u *OAuthTokenUpsertOne) ClearClientIP() *OAuthTokenUpsertOne

ClearClientIP clears the value of the "client_ip" field.

func (*OAuthTokenUpsertOne) ClearLastUsedAt

func (u *OAuthTokenUpsertOne) ClearLastUsedAt() *OAuthTokenUpsertOne

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*OAuthTokenUpsertOne) ClearRefreshExpiresAt

func (u *OAuthTokenUpsertOne) ClearRefreshExpiresAt() *OAuthTokenUpsertOne

ClearRefreshExpiresAt clears the value of the "refresh_expires_at" field.

func (*OAuthTokenUpsertOne) ClearRefreshTokenSignature

func (u *OAuthTokenUpsertOne) ClearRefreshTokenSignature() *OAuthTokenUpsertOne

ClearRefreshTokenSignature clears the value of the "refresh_token_signature" field.

func (*OAuthTokenUpsertOne) ClearRequestData

func (u *OAuthTokenUpsertOne) ClearRequestData() *OAuthTokenUpsertOne

ClearRequestData clears the value of the "request_data" field.

func (*OAuthTokenUpsertOne) ClearRevokedAt

func (u *OAuthTokenUpsertOne) ClearRevokedAt() *OAuthTokenUpsertOne

ClearRevokedAt clears the value of the "revoked_at" field.

func (*OAuthTokenUpsertOne) ClearRevokedReason

func (u *OAuthTokenUpsertOne) ClearRevokedReason() *OAuthTokenUpsertOne

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*OAuthTokenUpsertOne) ClearServiceAccountID

func (u *OAuthTokenUpsertOne) ClearServiceAccountID() *OAuthTokenUpsertOne

ClearServiceAccountID clears the value of the "service_account_id" field.

func (*OAuthTokenUpsertOne) ClearSessionID

func (u *OAuthTokenUpsertOne) ClearSessionID() *OAuthTokenUpsertOne

ClearSessionID clears the value of the "session_id" field.

func (*OAuthTokenUpsertOne) ClearUserAgent

func (u *OAuthTokenUpsertOne) ClearUserAgent() *OAuthTokenUpsertOne

ClearUserAgent clears the value of the "user_agent" field.

func (*OAuthTokenUpsertOne) ClearUserID

func (u *OAuthTokenUpsertOne) ClearUserID() *OAuthTokenUpsertOne

ClearUserID clears the value of the "user_id" field.

func (*OAuthTokenUpsertOne) DoNothing

func (u *OAuthTokenUpsertOne) DoNothing() *OAuthTokenUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OAuthTokenUpsertOne) Exec

Exec executes the query.

func (*OAuthTokenUpsertOne) ExecX

func (u *OAuthTokenUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OAuthTokenUpsertOne) ID

func (u *OAuthTokenUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*OAuthTokenUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*OAuthTokenUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OAuthToken.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*OAuthTokenUpsertOne) SetAccessExpiresAt

func (u *OAuthTokenUpsertOne) SetAccessExpiresAt(v time.Time) *OAuthTokenUpsertOne

SetAccessExpiresAt sets the "access_expires_at" field.

func (*OAuthTokenUpsertOne) SetAccessTokenSignature

func (u *OAuthTokenUpsertOne) SetAccessTokenSignature(v string) *OAuthTokenUpsertOne

SetAccessTokenSignature sets the "access_token_signature" field.

func (*OAuthTokenUpsertOne) SetAppID

SetAppID sets the "app_id" field.

func (*OAuthTokenUpsertOne) SetAudience

func (u *OAuthTokenUpsertOne) SetAudience(v []string) *OAuthTokenUpsertOne

SetAudience sets the "audience" field.

func (*OAuthTokenUpsertOne) SetClientIP

func (u *OAuthTokenUpsertOne) SetClientIP(v string) *OAuthTokenUpsertOne

SetClientIP sets the "client_ip" field.

func (*OAuthTokenUpsertOne) SetFamilyID

func (u *OAuthTokenUpsertOne) SetFamilyID(v uuid.UUID) *OAuthTokenUpsertOne

SetFamilyID sets the "family_id" field.

func (*OAuthTokenUpsertOne) SetLastUsedAt

func (u *OAuthTokenUpsertOne) SetLastUsedAt(v time.Time) *OAuthTokenUpsertOne

SetLastUsedAt sets the "last_used_at" field.

func (*OAuthTokenUpsertOne) SetRefreshExpiresAt

func (u *OAuthTokenUpsertOne) SetRefreshExpiresAt(v time.Time) *OAuthTokenUpsertOne

SetRefreshExpiresAt sets the "refresh_expires_at" field.

func (*OAuthTokenUpsertOne) SetRefreshTokenSignature

func (u *OAuthTokenUpsertOne) SetRefreshTokenSignature(v string) *OAuthTokenUpsertOne

SetRefreshTokenSignature sets the "refresh_token_signature" field.

func (*OAuthTokenUpsertOne) SetRequestData

func (u *OAuthTokenUpsertOne) SetRequestData(v string) *OAuthTokenUpsertOne

SetRequestData sets the "request_data" field.

func (*OAuthTokenUpsertOne) SetRevoked

func (u *OAuthTokenUpsertOne) SetRevoked(v bool) *OAuthTokenUpsertOne

SetRevoked sets the "revoked" field.

func (*OAuthTokenUpsertOne) SetRevokedAt

func (u *OAuthTokenUpsertOne) SetRevokedAt(v time.Time) *OAuthTokenUpsertOne

SetRevokedAt sets the "revoked_at" field.

func (*OAuthTokenUpsertOne) SetRevokedReason

func (u *OAuthTokenUpsertOne) SetRevokedReason(v string) *OAuthTokenUpsertOne

SetRevokedReason sets the "revoked_reason" field.

func (*OAuthTokenUpsertOne) SetScopes

func (u *OAuthTokenUpsertOne) SetScopes(v []string) *OAuthTokenUpsertOne

SetScopes sets the "scopes" field.

func (*OAuthTokenUpsertOne) SetServiceAccountID

func (u *OAuthTokenUpsertOne) SetServiceAccountID(v uuid.UUID) *OAuthTokenUpsertOne

SetServiceAccountID sets the "service_account_id" field.

func (*OAuthTokenUpsertOne) SetSessionID

func (u *OAuthTokenUpsertOne) SetSessionID(v string) *OAuthTokenUpsertOne

SetSessionID sets the "session_id" field.

func (*OAuthTokenUpsertOne) SetUserAgent

func (u *OAuthTokenUpsertOne) SetUserAgent(v string) *OAuthTokenUpsertOne

SetUserAgent sets the "user_agent" field.

func (*OAuthTokenUpsertOne) SetUserID

SetUserID sets the "user_id" field.

func (*OAuthTokenUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the OAuthTokenCreate.OnConflict documentation for more info.

func (*OAuthTokenUpsertOne) UpdateAccessExpiresAt

func (u *OAuthTokenUpsertOne) UpdateAccessExpiresAt() *OAuthTokenUpsertOne

UpdateAccessExpiresAt sets the "access_expires_at" field to the value that was provided on create.

func (*OAuthTokenUpsertOne) UpdateAccessTokenSignature

func (u *OAuthTokenUpsertOne) UpdateAccessTokenSignature() *OAuthTokenUpsertOne

UpdateAccessTokenSignature sets the "access_token_signature" field to the value that was provided on create.

func (*OAuthTokenUpsertOne) UpdateAppID

func (u *OAuthTokenUpsertOne) UpdateAppID() *OAuthTokenUpsertOne

UpdateAppID sets the "app_id" field to the value that was provided on create.

func (*OAuthTokenUpsertOne) UpdateAudience

func (u *OAuthTokenUpsertOne) UpdateAudience() *OAuthTokenUpsertOne

UpdateAudience sets the "audience" field to the value that was provided on create.

func (*OAuthTokenUpsertOne) UpdateClientIP

func (u *OAuthTokenUpsertOne) UpdateClientIP() *OAuthTokenUpsertOne

UpdateClientIP sets the "client_ip" field to the value that was provided on create.

func (*OAuthTokenUpsertOne) UpdateFamilyID

func (u *OAuthTokenUpsertOne) UpdateFamilyID() *OAuthTokenUpsertOne

UpdateFamilyID sets the "family_id" field to the value that was provided on create.

func (*OAuthTokenUpsertOne) UpdateLastUsedAt

func (u *OAuthTokenUpsertOne) UpdateLastUsedAt() *OAuthTokenUpsertOne

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*OAuthTokenUpsertOne) UpdateNewValues

func (u *OAuthTokenUpsertOne) UpdateNewValues() *OAuthTokenUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.OAuthToken.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(oauthtoken.FieldID)
		}),
	).
	Exec(ctx)

func (*OAuthTokenUpsertOne) UpdateRefreshExpiresAt

func (u *OAuthTokenUpsertOne) UpdateRefreshExpiresAt() *OAuthTokenUpsertOne

UpdateRefreshExpiresAt sets the "refresh_expires_at" field to the value that was provided on create.

func (*OAuthTokenUpsertOne) UpdateRefreshTokenSignature

func (u *OAuthTokenUpsertOne) UpdateRefreshTokenSignature() *OAuthTokenUpsertOne

UpdateRefreshTokenSignature sets the "refresh_token_signature" field to the value that was provided on create.

func (*OAuthTokenUpsertOne) UpdateRequestData

func (u *OAuthTokenUpsertOne) UpdateRequestData() *OAuthTokenUpsertOne

UpdateRequestData sets the "request_data" field to the value that was provided on create.

func (*OAuthTokenUpsertOne) UpdateRevoked

func (u *OAuthTokenUpsertOne) UpdateRevoked() *OAuthTokenUpsertOne

UpdateRevoked sets the "revoked" field to the value that was provided on create.

func (*OAuthTokenUpsertOne) UpdateRevokedAt

func (u *OAuthTokenUpsertOne) UpdateRevokedAt() *OAuthTokenUpsertOne

UpdateRevokedAt sets the "revoked_at" field to the value that was provided on create.

func (*OAuthTokenUpsertOne) UpdateRevokedReason

func (u *OAuthTokenUpsertOne) UpdateRevokedReason() *OAuthTokenUpsertOne

UpdateRevokedReason sets the "revoked_reason" field to the value that was provided on create.

func (*OAuthTokenUpsertOne) UpdateScopes

func (u *OAuthTokenUpsertOne) UpdateScopes() *OAuthTokenUpsertOne

UpdateScopes sets the "scopes" field to the value that was provided on create.

func (*OAuthTokenUpsertOne) UpdateServiceAccountID

func (u *OAuthTokenUpsertOne) UpdateServiceAccountID() *OAuthTokenUpsertOne

UpdateServiceAccountID sets the "service_account_id" field to the value that was provided on create.

func (*OAuthTokenUpsertOne) UpdateSessionID

func (u *OAuthTokenUpsertOne) UpdateSessionID() *OAuthTokenUpsertOne

UpdateSessionID sets the "session_id" field to the value that was provided on create.

func (*OAuthTokenUpsertOne) UpdateUserAgent

func (u *OAuthTokenUpsertOne) UpdateUserAgent() *OAuthTokenUpsertOne

UpdateUserAgent sets the "user_agent" field to the value that was provided on create.

func (*OAuthTokenUpsertOne) UpdateUserID

func (u *OAuthTokenUpsertOne) UpdateUserID() *OAuthTokenUpsertOne

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OAuthTokens

type OAuthTokens []*OAuthToken

OAuthTokens is a parsable slice of OAuthToken.

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. Deprecated: Use Asc/Desc functions or the package builders instead.

type Organization

type Organization struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// URL-safe identifier
	Slug string `json:"slug,omitempty"`
	// LogoURL holds the value of the "logo_url" field.
	LogoURL *string `json:"logo_url,omitempty"`
	// App-specific configuration
	Settings map[string]interface{} `json:"settings,omitempty"`
	// Plan holds the value of the "plan" field.
	Plan organization.Plan `json:"plan,omitempty"`
	// Active holds the value of the "active" field.
	Active bool `json:"active,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the OrganizationQuery when eager-loading is set.
	Edges OrganizationEdges `json:"edges"`
	// contains filtered or unexported fields
}

Organization is the model entity for the Organization schema.

func (*Organization) QueryAPIKeys

func (_m *Organization) QueryAPIKeys() *APIKeyQuery

QueryAPIKeys queries the "api_keys" edge of the Organization entity.

func (*Organization) QueryMemberships

func (_m *Organization) QueryMemberships() *MembershipQuery

QueryMemberships queries the "memberships" edge of the Organization entity.

func (*Organization) QueryOauthApps

func (_m *Organization) QueryOauthApps() *OAuthAppQuery

QueryOauthApps queries the "oauth_apps" edge of the Organization entity.

func (*Organization) QueryServiceAccounts

func (_m *Organization) QueryServiceAccounts() *ServiceAccountQuery

QueryServiceAccounts queries the "service_accounts" edge of the Organization entity.

func (*Organization) String

func (_m *Organization) String() string

String implements the fmt.Stringer.

func (*Organization) Unwrap

func (_m *Organization) Unwrap() *Organization

Unwrap unwraps the Organization 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 (*Organization) Update

func (_m *Organization) Update() *OrganizationUpdateOne

Update returns a builder for updating this Organization. Note that you need to call Organization.Unwrap() before calling this method if this Organization was returned from a transaction, and the transaction was committed or rolled back.

func (*Organization) Value

func (_m *Organization) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Organization. This includes values selected through modifiers, order, etc.

type OrganizationClient

type OrganizationClient struct {
	// contains filtered or unexported fields
}

OrganizationClient is a client for the Organization schema.

func NewOrganizationClient

func NewOrganizationClient(c config) *OrganizationClient

NewOrganizationClient returns a client for the Organization from the given config.

func (*OrganizationClient) Create

Create returns a builder for creating a Organization entity.

func (*OrganizationClient) CreateBulk

func (c *OrganizationClient) CreateBulk(builders ...*OrganizationCreate) *OrganizationCreateBulk

CreateBulk returns a builder for creating a bulk of Organization entities.

func (*OrganizationClient) Delete

Delete returns a delete builder for Organization.

func (*OrganizationClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OrganizationClient) DeleteOneID

func (c *OrganizationClient) DeleteOneID(id uuid.UUID) *OrganizationDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*OrganizationClient) Get

Get returns a Organization entity by its id.

func (*OrganizationClient) GetX

GetX is like Get, but panics if an error occurs.

func (*OrganizationClient) Hooks

func (c *OrganizationClient) Hooks() []Hook

Hooks returns the client hooks.

func (*OrganizationClient) Intercept

func (c *OrganizationClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `organization.Intercept(f(g(h())))`.

func (*OrganizationClient) Interceptors

func (c *OrganizationClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*OrganizationClient) MapCreateBulk

func (c *OrganizationClient) MapCreateBulk(slice any, setFunc func(*OrganizationCreate, int)) *OrganizationCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*OrganizationClient) Query

Query returns a query builder for Organization.

func (*OrganizationClient) QueryAPIKeys

func (c *OrganizationClient) QueryAPIKeys(_m *Organization) *APIKeyQuery

QueryAPIKeys queries the api_keys edge of a Organization.

func (*OrganizationClient) QueryMemberships

func (c *OrganizationClient) QueryMemberships(_m *Organization) *MembershipQuery

QueryMemberships queries the memberships edge of a Organization.

func (*OrganizationClient) QueryOauthApps

func (c *OrganizationClient) QueryOauthApps(_m *Organization) *OAuthAppQuery

QueryOauthApps queries the oauth_apps edge of a Organization.

func (*OrganizationClient) QueryServiceAccounts

func (c *OrganizationClient) QueryServiceAccounts(_m *Organization) *ServiceAccountQuery

QueryServiceAccounts queries the service_accounts edge of a Organization.

func (*OrganizationClient) Update

Update returns an update builder for Organization.

func (*OrganizationClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*OrganizationClient) UpdateOneID

func (c *OrganizationClient) UpdateOneID(id uuid.UUID) *OrganizationUpdateOne

UpdateOneID returns an update builder for the given id.

func (*OrganizationClient) Use

func (c *OrganizationClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `organization.Hooks(f(g(h())))`.

type OrganizationCreate

type OrganizationCreate struct {
	// contains filtered or unexported fields
}

OrganizationCreate is the builder for creating a Organization entity.

func (*OrganizationCreate) AddAPIKeyIDs

func (_c *OrganizationCreate) AddAPIKeyIDs(ids ...uuid.UUID) *OrganizationCreate

AddAPIKeyIDs adds the "api_keys" edge to the APIKey entity by IDs.

func (*OrganizationCreate) AddAPIKeys

func (_c *OrganizationCreate) AddAPIKeys(v ...*APIKey) *OrganizationCreate

AddAPIKeys adds the "api_keys" edges to the APIKey entity.

func (*OrganizationCreate) AddMembershipIDs

func (_c *OrganizationCreate) AddMembershipIDs(ids ...uuid.UUID) *OrganizationCreate

AddMembershipIDs adds the "memberships" edge to the Membership entity by IDs.

func (*OrganizationCreate) AddMemberships

func (_c *OrganizationCreate) AddMemberships(v ...*Membership) *OrganizationCreate

AddMemberships adds the "memberships" edges to the Membership entity.

func (*OrganizationCreate) AddOauthAppIDs

func (_c *OrganizationCreate) AddOauthAppIDs(ids ...uuid.UUID) *OrganizationCreate

AddOauthAppIDs adds the "oauth_apps" edge to the OAuthApp entity by IDs.

func (*OrganizationCreate) AddOauthApps

func (_c *OrganizationCreate) AddOauthApps(v ...*OAuthApp) *OrganizationCreate

AddOauthApps adds the "oauth_apps" edges to the OAuthApp entity.

func (*OrganizationCreate) AddServiceAccountIDs

func (_c *OrganizationCreate) AddServiceAccountIDs(ids ...uuid.UUID) *OrganizationCreate

AddServiceAccountIDs adds the "service_accounts" edge to the ServiceAccount entity by IDs.

func (*OrganizationCreate) AddServiceAccounts

func (_c *OrganizationCreate) AddServiceAccounts(v ...*ServiceAccount) *OrganizationCreate

AddServiceAccounts adds the "service_accounts" edges to the ServiceAccount entity.

func (*OrganizationCreate) Exec

func (_c *OrganizationCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrganizationCreate) ExecX

func (_c *OrganizationCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrganizationCreate) Mutation

func (_c *OrganizationCreate) Mutation() *OrganizationMutation

Mutation returns the OrganizationMutation object of the builder.

func (*OrganizationCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Organization.Create().
	SetCreatedAt(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OrganizationUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*OrganizationCreate) OnConflictColumns

func (_c *OrganizationCreate) OnConflictColumns(columns ...string) *OrganizationUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Organization.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OrganizationCreate) Save

Save creates the Organization in the database.

func (*OrganizationCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*OrganizationCreate) SetActive

func (_c *OrganizationCreate) SetActive(v bool) *OrganizationCreate

SetActive sets the "active" field.

func (*OrganizationCreate) SetCreatedAt

func (_c *OrganizationCreate) SetCreatedAt(v time.Time) *OrganizationCreate

SetCreatedAt sets the "created_at" field.

func (*OrganizationCreate) SetID

SetID sets the "id" field.

func (*OrganizationCreate) SetLogoURL

func (_c *OrganizationCreate) SetLogoURL(v string) *OrganizationCreate

SetLogoURL sets the "logo_url" field.

func (*OrganizationCreate) SetName

SetName sets the "name" field.

func (*OrganizationCreate) SetNillableActive

func (_c *OrganizationCreate) SetNillableActive(v *bool) *OrganizationCreate

SetNillableActive sets the "active" field if the given value is not nil.

func (*OrganizationCreate) SetNillableCreatedAt

func (_c *OrganizationCreate) SetNillableCreatedAt(v *time.Time) *OrganizationCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*OrganizationCreate) SetNillableID

func (_c *OrganizationCreate) SetNillableID(v *uuid.UUID) *OrganizationCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*OrganizationCreate) SetNillableLogoURL

func (_c *OrganizationCreate) SetNillableLogoURL(v *string) *OrganizationCreate

SetNillableLogoURL sets the "logo_url" field if the given value is not nil.

func (*OrganizationCreate) SetNillablePlan

func (_c *OrganizationCreate) SetNillablePlan(v *organization.Plan) *OrganizationCreate

SetNillablePlan sets the "plan" field if the given value is not nil.

func (*OrganizationCreate) SetNillableUpdatedAt

func (_c *OrganizationCreate) SetNillableUpdatedAt(v *time.Time) *OrganizationCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OrganizationCreate) SetPlan

SetPlan sets the "plan" field.

func (*OrganizationCreate) SetSettings

func (_c *OrganizationCreate) SetSettings(v map[string]interface{}) *OrganizationCreate

SetSettings sets the "settings" field.

func (*OrganizationCreate) SetSlug

SetSlug sets the "slug" field.

func (*OrganizationCreate) SetUpdatedAt

func (_c *OrganizationCreate) SetUpdatedAt(v time.Time) *OrganizationCreate

SetUpdatedAt sets the "updated_at" field.

type OrganizationCreateBulk

type OrganizationCreateBulk struct {
	// contains filtered or unexported fields
}

OrganizationCreateBulk is the builder for creating many Organization entities in bulk.

func (*OrganizationCreateBulk) Exec

Exec executes the query.

func (*OrganizationCreateBulk) ExecX

func (_c *OrganizationCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrganizationCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Organization.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OrganizationUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*OrganizationCreateBulk) OnConflictColumns

func (_c *OrganizationCreateBulk) OnConflictColumns(columns ...string) *OrganizationUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Organization.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OrganizationCreateBulk) Save

Save creates the Organization entities in the database.

func (*OrganizationCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type OrganizationDelete

type OrganizationDelete struct {
	// contains filtered or unexported fields
}

OrganizationDelete is the builder for deleting a Organization entity.

func (*OrganizationDelete) Exec

func (_d *OrganizationDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*OrganizationDelete) ExecX

func (_d *OrganizationDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OrganizationDelete) Where

Where appends a list predicates to the OrganizationDelete builder.

type OrganizationDeleteOne

type OrganizationDeleteOne struct {
	// contains filtered or unexported fields
}

OrganizationDeleteOne is the builder for deleting a single Organization entity.

func (*OrganizationDeleteOne) Exec

Exec executes the deletion query.

func (*OrganizationDeleteOne) ExecX

func (_d *OrganizationDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrganizationDeleteOne) Where

Where appends a list predicates to the OrganizationDelete builder.

type OrganizationEdges

type OrganizationEdges struct {
	// Memberships holds the value of the memberships edge.
	Memberships []*Membership `json:"memberships,omitempty"`
	// APIKeys holds the value of the api_keys edge.
	APIKeys []*APIKey `json:"api_keys,omitempty"`
	// OauthApps holds the value of the oauth_apps edge.
	OauthApps []*OAuthApp `json:"oauth_apps,omitempty"`
	// ServiceAccounts holds the value of the service_accounts edge.
	ServiceAccounts []*ServiceAccount `json:"service_accounts,omitempty"`
	// contains filtered or unexported fields
}

OrganizationEdges holds the relations/edges for other nodes in the graph.

func (OrganizationEdges) APIKeysOrErr

func (e OrganizationEdges) APIKeysOrErr() ([]*APIKey, error)

APIKeysOrErr returns the APIKeys value or an error if the edge was not loaded in eager-loading.

func (OrganizationEdges) MembershipsOrErr

func (e OrganizationEdges) MembershipsOrErr() ([]*Membership, error)

MembershipsOrErr returns the Memberships value or an error if the edge was not loaded in eager-loading.

func (OrganizationEdges) OauthAppsOrErr

func (e OrganizationEdges) OauthAppsOrErr() ([]*OAuthApp, error)

OauthAppsOrErr returns the OauthApps value or an error if the edge was not loaded in eager-loading.

func (OrganizationEdges) ServiceAccountsOrErr

func (e OrganizationEdges) ServiceAccountsOrErr() ([]*ServiceAccount, error)

ServiceAccountsOrErr returns the ServiceAccounts value or an error if the edge was not loaded in eager-loading.

type OrganizationFilter

type OrganizationFilter struct {
	// contains filtered or unexported fields
}

OrganizationFilter provides a generic filtering capability at runtime for OrganizationQuery.

func (*OrganizationFilter) Where

func (f *OrganizationFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*OrganizationFilter) WhereActive

func (f *OrganizationFilter) WhereActive(p entql.BoolP)

WhereActive applies the entql bool predicate on the active field.

func (*OrganizationFilter) WhereCreatedAt

func (f *OrganizationFilter) WhereCreatedAt(p entql.TimeP)

WhereCreatedAt applies the entql time.Time predicate on the created_at field.

func (*OrganizationFilter) WhereHasAPIKeys

func (f *OrganizationFilter) WhereHasAPIKeys()

WhereHasAPIKeys applies a predicate to check if query has an edge api_keys.

func (*OrganizationFilter) WhereHasAPIKeysWith

func (f *OrganizationFilter) WhereHasAPIKeysWith(preds ...predicate.APIKey)

WhereHasAPIKeysWith applies a predicate to check if query has an edge api_keys with a given conditions (other predicates).

func (*OrganizationFilter) WhereHasMemberships

func (f *OrganizationFilter) WhereHasMemberships()

WhereHasMemberships applies a predicate to check if query has an edge memberships.

func (*OrganizationFilter) WhereHasMembershipsWith

func (f *OrganizationFilter) WhereHasMembershipsWith(preds ...predicate.Membership)

WhereHasMembershipsWith applies a predicate to check if query has an edge memberships with a given conditions (other predicates).

func (*OrganizationFilter) WhereHasOauthApps

func (f *OrganizationFilter) WhereHasOauthApps()

WhereHasOauthApps applies a predicate to check if query has an edge oauth_apps.

func (*OrganizationFilter) WhereHasOauthAppsWith

func (f *OrganizationFilter) WhereHasOauthAppsWith(preds ...predicate.OAuthApp)

WhereHasOauthAppsWith applies a predicate to check if query has an edge oauth_apps with a given conditions (other predicates).

func (*OrganizationFilter) WhereHasServiceAccounts

func (f *OrganizationFilter) WhereHasServiceAccounts()

WhereHasServiceAccounts applies a predicate to check if query has an edge service_accounts.

func (*OrganizationFilter) WhereHasServiceAccountsWith

func (f *OrganizationFilter) WhereHasServiceAccountsWith(preds ...predicate.ServiceAccount)

WhereHasServiceAccountsWith applies a predicate to check if query has an edge service_accounts with a given conditions (other predicates).

func (*OrganizationFilter) WhereID

func (f *OrganizationFilter) WhereID(p entql.ValueP)

WhereID applies the entql [16]byte predicate on the id field.

func (*OrganizationFilter) WhereLogoURL

func (f *OrganizationFilter) WhereLogoURL(p entql.StringP)

WhereLogoURL applies the entql string predicate on the logo_url field.

func (*OrganizationFilter) WhereName

func (f *OrganizationFilter) WhereName(p entql.StringP)

WhereName applies the entql string predicate on the name field.

func (*OrganizationFilter) WherePlan

func (f *OrganizationFilter) WherePlan(p entql.StringP)

WherePlan applies the entql string predicate on the plan field.

func (*OrganizationFilter) WhereSettings

func (f *OrganizationFilter) WhereSettings(p entql.BytesP)

WhereSettings applies the entql json.RawMessage predicate on the settings field.

func (*OrganizationFilter) WhereSlug

func (f *OrganizationFilter) WhereSlug(p entql.StringP)

WhereSlug applies the entql string predicate on the slug field.

func (*OrganizationFilter) WhereUpdatedAt

func (f *OrganizationFilter) WhereUpdatedAt(p entql.TimeP)

WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.

type OrganizationGroupBy

type OrganizationGroupBy struct {
	// contains filtered or unexported fields
}

OrganizationGroupBy is the group-by builder for Organization entities.

func (*OrganizationGroupBy) Aggregate

func (_g *OrganizationGroupBy) Aggregate(fns ...AggregateFunc) *OrganizationGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*OrganizationGroupBy) Bool

func (s *OrganizationGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrganizationGroupBy) BoolX

func (s *OrganizationGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrganizationGroupBy) Bools

func (s *OrganizationGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrganizationGroupBy) BoolsX

func (s *OrganizationGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrganizationGroupBy) Float64

func (s *OrganizationGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrganizationGroupBy) Float64X

func (s *OrganizationGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrganizationGroupBy) Float64s

func (s *OrganizationGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrganizationGroupBy) Float64sX

func (s *OrganizationGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrganizationGroupBy) Int

func (s *OrganizationGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrganizationGroupBy) IntX

func (s *OrganizationGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrganizationGroupBy) Ints

func (s *OrganizationGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrganizationGroupBy) IntsX

func (s *OrganizationGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrganizationGroupBy) Scan

func (_g *OrganizationGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrganizationGroupBy) ScanX

func (s *OrganizationGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrganizationGroupBy) String

func (s *OrganizationGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrganizationGroupBy) StringX

func (s *OrganizationGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrganizationGroupBy) Strings

func (s *OrganizationGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrganizationGroupBy) StringsX

func (s *OrganizationGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrganizationMutation

type OrganizationMutation struct {
	// contains filtered or unexported fields
}

OrganizationMutation represents an operation that mutates the Organization nodes in the graph.

func (*OrganizationMutation) APIKeysCleared

func (m *OrganizationMutation) APIKeysCleared() bool

APIKeysCleared reports if the "api_keys" edge to the APIKey entity was cleared.

func (*OrganizationMutation) APIKeysIDs

func (m *OrganizationMutation) APIKeysIDs() (ids []uuid.UUID)

APIKeysIDs returns the "api_keys" edge IDs in the mutation.

func (*OrganizationMutation) Active

func (m *OrganizationMutation) Active() (r bool, exists bool)

Active returns the value of the "active" field in the mutation.

func (*OrganizationMutation) AddAPIKeyIDs

func (m *OrganizationMutation) AddAPIKeyIDs(ids ...uuid.UUID)

AddAPIKeyIDs adds the "api_keys" edge to the APIKey entity by ids.

func (*OrganizationMutation) AddField

func (m *OrganizationMutation) 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 (*OrganizationMutation) AddMembershipIDs

func (m *OrganizationMutation) AddMembershipIDs(ids ...uuid.UUID)

AddMembershipIDs adds the "memberships" edge to the Membership entity by ids.

func (*OrganizationMutation) AddOauthAppIDs

func (m *OrganizationMutation) AddOauthAppIDs(ids ...uuid.UUID)

AddOauthAppIDs adds the "oauth_apps" edge to the OAuthApp entity by ids.

func (*OrganizationMutation) AddServiceAccountIDs

func (m *OrganizationMutation) AddServiceAccountIDs(ids ...uuid.UUID)

AddServiceAccountIDs adds the "service_accounts" edge to the ServiceAccount entity by ids.

func (*OrganizationMutation) AddedEdges

func (m *OrganizationMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*OrganizationMutation) AddedField

func (m *OrganizationMutation) 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 (*OrganizationMutation) AddedFields

func (m *OrganizationMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*OrganizationMutation) AddedIDs

func (m *OrganizationMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*OrganizationMutation) ClearAPIKeys

func (m *OrganizationMutation) ClearAPIKeys()

ClearAPIKeys clears the "api_keys" edge to the APIKey entity.

func (*OrganizationMutation) ClearEdge

func (m *OrganizationMutation) 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 (*OrganizationMutation) ClearField

func (m *OrganizationMutation) 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 (*OrganizationMutation) ClearLogoURL

func (m *OrganizationMutation) ClearLogoURL()

ClearLogoURL clears the value of the "logo_url" field.

func (*OrganizationMutation) ClearMemberships

func (m *OrganizationMutation) ClearMemberships()

ClearMemberships clears the "memberships" edge to the Membership entity.

func (*OrganizationMutation) ClearOauthApps

func (m *OrganizationMutation) ClearOauthApps()

ClearOauthApps clears the "oauth_apps" edge to the OAuthApp entity.

func (*OrganizationMutation) ClearServiceAccounts

func (m *OrganizationMutation) ClearServiceAccounts()

ClearServiceAccounts clears the "service_accounts" edge to the ServiceAccount entity.

func (*OrganizationMutation) ClearSettings

func (m *OrganizationMutation) ClearSettings()

ClearSettings clears the value of the "settings" field.

func (*OrganizationMutation) ClearedEdges

func (m *OrganizationMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*OrganizationMutation) ClearedFields

func (m *OrganizationMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (OrganizationMutation) Client

func (m OrganizationMutation) 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 (*OrganizationMutation) CreatedAt

func (m *OrganizationMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*OrganizationMutation) EdgeCleared

func (m *OrganizationMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*OrganizationMutation) Field

func (m *OrganizationMutation) 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 (*OrganizationMutation) FieldCleared

func (m *OrganizationMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*OrganizationMutation) Fields

func (m *OrganizationMutation) 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 (*OrganizationMutation) Filter

Filter returns an entql.Where implementation to apply filters on the OrganizationMutation builder.

func (*OrganizationMutation) ID

func (m *OrganizationMutation) ID() (id uuid.UUID, 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 (*OrganizationMutation) 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 (*OrganizationMutation) LogoURL

func (m *OrganizationMutation) LogoURL() (r string, exists bool)

LogoURL returns the value of the "logo_url" field in the mutation.

func (*OrganizationMutation) LogoURLCleared

func (m *OrganizationMutation) LogoURLCleared() bool

LogoURLCleared returns if the "logo_url" field was cleared in this mutation.

func (*OrganizationMutation) MembershipsCleared

func (m *OrganizationMutation) MembershipsCleared() bool

MembershipsCleared reports if the "memberships" edge to the Membership entity was cleared.

func (*OrganizationMutation) MembershipsIDs

func (m *OrganizationMutation) MembershipsIDs() (ids []uuid.UUID)

MembershipsIDs returns the "memberships" edge IDs in the mutation.

func (*OrganizationMutation) Name

func (m *OrganizationMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*OrganizationMutation) OauthAppsCleared

func (m *OrganizationMutation) OauthAppsCleared() bool

OauthAppsCleared reports if the "oauth_apps" edge to the OAuthApp entity was cleared.

func (*OrganizationMutation) OauthAppsIDs

func (m *OrganizationMutation) OauthAppsIDs() (ids []uuid.UUID)

OauthAppsIDs returns the "oauth_apps" edge IDs in the mutation.

func (*OrganizationMutation) OldActive

func (m *OrganizationMutation) OldActive(ctx context.Context) (v bool, err error)

OldActive returns the old "active" field's value of the Organization entity. If the Organization 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 (*OrganizationMutation) OldCreatedAt

func (m *OrganizationMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Organization entity. If the Organization 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 (*OrganizationMutation) OldField

func (m *OrganizationMutation) 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 (*OrganizationMutation) OldLogoURL

func (m *OrganizationMutation) OldLogoURL(ctx context.Context) (v *string, err error)

OldLogoURL returns the old "logo_url" field's value of the Organization entity. If the Organization 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 (*OrganizationMutation) OldName

func (m *OrganizationMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Organization entity. If the Organization 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 (*OrganizationMutation) OldPlan

func (m *OrganizationMutation) OldPlan(ctx context.Context) (v organization.Plan, err error)

OldPlan returns the old "plan" field's value of the Organization entity. If the Organization 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 (*OrganizationMutation) OldSettings

func (m *OrganizationMutation) OldSettings(ctx context.Context) (v map[string]interface{}, err error)

OldSettings returns the old "settings" field's value of the Organization entity. If the Organization 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 (*OrganizationMutation) OldSlug

func (m *OrganizationMutation) OldSlug(ctx context.Context) (v string, err error)

OldSlug returns the old "slug" field's value of the Organization entity. If the Organization 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 (*OrganizationMutation) OldUpdatedAt

func (m *OrganizationMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Organization entity. If the Organization 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 (*OrganizationMutation) Op

func (m *OrganizationMutation) Op() Op

Op returns the operation name.

func (*OrganizationMutation) Plan

func (m *OrganizationMutation) Plan() (r organization.Plan, exists bool)

Plan returns the value of the "plan" field in the mutation.

func (*OrganizationMutation) RemoveAPIKeyIDs

func (m *OrganizationMutation) RemoveAPIKeyIDs(ids ...uuid.UUID)

RemoveAPIKeyIDs removes the "api_keys" edge to the APIKey entity by IDs.

func (*OrganizationMutation) RemoveMembershipIDs

func (m *OrganizationMutation) RemoveMembershipIDs(ids ...uuid.UUID)

RemoveMembershipIDs removes the "memberships" edge to the Membership entity by IDs.

func (*OrganizationMutation) RemoveOauthAppIDs

func (m *OrganizationMutation) RemoveOauthAppIDs(ids ...uuid.UUID)

RemoveOauthAppIDs removes the "oauth_apps" edge to the OAuthApp entity by IDs.

func (*OrganizationMutation) RemoveServiceAccountIDs

func (m *OrganizationMutation) RemoveServiceAccountIDs(ids ...uuid.UUID)

RemoveServiceAccountIDs removes the "service_accounts" edge to the ServiceAccount entity by IDs.

func (*OrganizationMutation) RemovedAPIKeysIDs

func (m *OrganizationMutation) RemovedAPIKeysIDs() (ids []uuid.UUID)

RemovedAPIKeys returns the removed IDs of the "api_keys" edge to the APIKey entity.

func (*OrganizationMutation) RemovedEdges

func (m *OrganizationMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*OrganizationMutation) RemovedIDs

func (m *OrganizationMutation) 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 (*OrganizationMutation) RemovedMembershipsIDs

func (m *OrganizationMutation) RemovedMembershipsIDs() (ids []uuid.UUID)

RemovedMemberships returns the removed IDs of the "memberships" edge to the Membership entity.

func (*OrganizationMutation) RemovedOauthAppsIDs

func (m *OrganizationMutation) RemovedOauthAppsIDs() (ids []uuid.UUID)

RemovedOauthApps returns the removed IDs of the "oauth_apps" edge to the OAuthApp entity.

func (*OrganizationMutation) RemovedServiceAccountsIDs

func (m *OrganizationMutation) RemovedServiceAccountsIDs() (ids []uuid.UUID)

RemovedServiceAccounts returns the removed IDs of the "service_accounts" edge to the ServiceAccount entity.

func (*OrganizationMutation) ResetAPIKeys

func (m *OrganizationMutation) ResetAPIKeys()

ResetAPIKeys resets all changes to the "api_keys" edge.

func (*OrganizationMutation) ResetActive

func (m *OrganizationMutation) ResetActive()

ResetActive resets all changes to the "active" field.

func (*OrganizationMutation) ResetCreatedAt

func (m *OrganizationMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*OrganizationMutation) ResetEdge

func (m *OrganizationMutation) 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 (*OrganizationMutation) ResetField

func (m *OrganizationMutation) 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 (*OrganizationMutation) ResetLogoURL

func (m *OrganizationMutation) ResetLogoURL()

ResetLogoURL resets all changes to the "logo_url" field.

func (*OrganizationMutation) ResetMemberships

func (m *OrganizationMutation) ResetMemberships()

ResetMemberships resets all changes to the "memberships" edge.

func (*OrganizationMutation) ResetName

func (m *OrganizationMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*OrganizationMutation) ResetOauthApps

func (m *OrganizationMutation) ResetOauthApps()

ResetOauthApps resets all changes to the "oauth_apps" edge.

func (*OrganizationMutation) ResetPlan

func (m *OrganizationMutation) ResetPlan()

ResetPlan resets all changes to the "plan" field.

func (*OrganizationMutation) ResetServiceAccounts

func (m *OrganizationMutation) ResetServiceAccounts()

ResetServiceAccounts resets all changes to the "service_accounts" edge.

func (*OrganizationMutation) ResetSettings

func (m *OrganizationMutation) ResetSettings()

ResetSettings resets all changes to the "settings" field.

func (*OrganizationMutation) ResetSlug

func (m *OrganizationMutation) ResetSlug()

ResetSlug resets all changes to the "slug" field.

func (*OrganizationMutation) ResetUpdatedAt

func (m *OrganizationMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*OrganizationMutation) ServiceAccountsCleared

func (m *OrganizationMutation) ServiceAccountsCleared() bool

ServiceAccountsCleared reports if the "service_accounts" edge to the ServiceAccount entity was cleared.

func (*OrganizationMutation) ServiceAccountsIDs

func (m *OrganizationMutation) ServiceAccountsIDs() (ids []uuid.UUID)

ServiceAccountsIDs returns the "service_accounts" edge IDs in the mutation.

func (*OrganizationMutation) SetActive

func (m *OrganizationMutation) SetActive(b bool)

SetActive sets the "active" field.

func (*OrganizationMutation) SetCreatedAt

func (m *OrganizationMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*OrganizationMutation) SetField

func (m *OrganizationMutation) 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 (*OrganizationMutation) SetID

func (m *OrganizationMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Organization entities.

func (*OrganizationMutation) SetLogoURL

func (m *OrganizationMutation) SetLogoURL(s string)

SetLogoURL sets the "logo_url" field.

func (*OrganizationMutation) SetName

func (m *OrganizationMutation) SetName(s string)

SetName sets the "name" field.

func (*OrganizationMutation) SetOp

func (m *OrganizationMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OrganizationMutation) SetPlan

func (m *OrganizationMutation) SetPlan(o organization.Plan)

SetPlan sets the "plan" field.

func (*OrganizationMutation) SetSettings

func (m *OrganizationMutation) SetSettings(value map[string]interface{})

SetSettings sets the "settings" field.

func (*OrganizationMutation) SetSlug

func (m *OrganizationMutation) SetSlug(s string)

SetSlug sets the "slug" field.

func (*OrganizationMutation) SetUpdatedAt

func (m *OrganizationMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*OrganizationMutation) Settings

func (m *OrganizationMutation) Settings() (r map[string]interface{}, exists bool)

Settings returns the value of the "settings" field in the mutation.

func (*OrganizationMutation) SettingsCleared

func (m *OrganizationMutation) SettingsCleared() bool

SettingsCleared returns if the "settings" field was cleared in this mutation.

func (*OrganizationMutation) Slug

func (m *OrganizationMutation) Slug() (r string, exists bool)

Slug returns the value of the "slug" field in the mutation.

func (OrganizationMutation) Tx

func (m OrganizationMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*OrganizationMutation) Type

func (m *OrganizationMutation) Type() string

Type returns the node type of this mutation (Organization).

func (*OrganizationMutation) UpdatedAt

func (m *OrganizationMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*OrganizationMutation) Where

Where appends a list predicates to the OrganizationMutation builder.

func (*OrganizationMutation) WhereP

func (m *OrganizationMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the OrganizationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type OrganizationQuery

type OrganizationQuery struct {
	// contains filtered or unexported fields
}

OrganizationQuery is the builder for querying Organization entities.

func (*OrganizationQuery) Aggregate

func (_q *OrganizationQuery) Aggregate(fns ...AggregateFunc) *OrganizationSelect

Aggregate returns a OrganizationSelect configured with the given aggregations.

func (*OrganizationQuery) All

func (_q *OrganizationQuery) All(ctx context.Context) ([]*Organization, error)

All executes the query and returns a list of Organizations.

func (*OrganizationQuery) AllX

func (_q *OrganizationQuery) AllX(ctx context.Context) []*Organization

AllX is like All, but panics if an error occurs.

func (*OrganizationQuery) Clone

func (_q *OrganizationQuery) Clone() *OrganizationQuery

Clone returns a duplicate of the OrganizationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*OrganizationQuery) Count

func (_q *OrganizationQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OrganizationQuery) CountX

func (_q *OrganizationQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*OrganizationQuery) Exist

func (_q *OrganizationQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*OrganizationQuery) ExistX

func (_q *OrganizationQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*OrganizationQuery) Filter

func (_q *OrganizationQuery) Filter() *OrganizationFilter

Filter returns a Filter implementation to apply filters on the OrganizationQuery builder.

func (*OrganizationQuery) First

func (_q *OrganizationQuery) First(ctx context.Context) (*Organization, error)

First returns the first Organization entity from the query. Returns a *NotFoundError when no Organization was found.

func (*OrganizationQuery) FirstID

func (_q *OrganizationQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Organization ID from the query. Returns a *NotFoundError when no Organization ID was found.

func (*OrganizationQuery) FirstIDX

func (_q *OrganizationQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*OrganizationQuery) FirstX

func (_q *OrganizationQuery) FirstX(ctx context.Context) *Organization

FirstX is like First, but panics if an error occurs.

func (*OrganizationQuery) GroupBy

func (_q *OrganizationQuery) GroupBy(field string, fields ...string) *OrganizationGroupBy

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 {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Organization.Query().
	GroupBy(organization.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OrganizationQuery) IDs

func (_q *OrganizationQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of Organization IDs.

func (*OrganizationQuery) IDsX

func (_q *OrganizationQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*OrganizationQuery) Limit

func (_q *OrganizationQuery) Limit(limit int) *OrganizationQuery

Limit the number of records to be returned by this query.

func (*OrganizationQuery) Offset

func (_q *OrganizationQuery) Offset(offset int) *OrganizationQuery

Offset to start from.

func (*OrganizationQuery) Only

Only returns a single Organization entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Organization entity is found. Returns a *NotFoundError when no Organization entities are found.

func (*OrganizationQuery) OnlyID

func (_q *OrganizationQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Organization ID in the query. Returns a *NotSingularError when more than one Organization ID is found. Returns a *NotFoundError when no entities are found.

func (*OrganizationQuery) OnlyIDX

func (_q *OrganizationQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*OrganizationQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*OrganizationQuery) Order

Order specifies how the records should be ordered.

func (*OrganizationQuery) QueryAPIKeys

func (_q *OrganizationQuery) QueryAPIKeys() *APIKeyQuery

QueryAPIKeys chains the current query on the "api_keys" edge.

func (*OrganizationQuery) QueryMemberships

func (_q *OrganizationQuery) QueryMemberships() *MembershipQuery

QueryMemberships chains the current query on the "memberships" edge.

func (*OrganizationQuery) QueryOauthApps

func (_q *OrganizationQuery) QueryOauthApps() *OAuthAppQuery

QueryOauthApps chains the current query on the "oauth_apps" edge.

func (*OrganizationQuery) QueryServiceAccounts

func (_q *OrganizationQuery) QueryServiceAccounts() *ServiceAccountQuery

QueryServiceAccounts chains the current query on the "service_accounts" edge.

func (*OrganizationQuery) Select

func (_q *OrganizationQuery) Select(fields ...string) *OrganizationSelect

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 {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.Organization.Query().
	Select(organization.FieldCreatedAt).
	Scan(ctx, &v)

func (*OrganizationQuery) Unique

func (_q *OrganizationQuery) Unique(unique bool) *OrganizationQuery

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 (*OrganizationQuery) Where

Where adds a new predicate for the OrganizationQuery builder.

func (*OrganizationQuery) WithAPIKeys

func (_q *OrganizationQuery) WithAPIKeys(opts ...func(*APIKeyQuery)) *OrganizationQuery

WithAPIKeys tells the query-builder to eager-load the nodes that are connected to the "api_keys" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrganizationQuery) WithMemberships

func (_q *OrganizationQuery) WithMemberships(opts ...func(*MembershipQuery)) *OrganizationQuery

WithMemberships tells the query-builder to eager-load the nodes that are connected to the "memberships" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrganizationQuery) WithOauthApps

func (_q *OrganizationQuery) WithOauthApps(opts ...func(*OAuthAppQuery)) *OrganizationQuery

WithOauthApps tells the query-builder to eager-load the nodes that are connected to the "oauth_apps" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrganizationQuery) WithServiceAccounts

func (_q *OrganizationQuery) WithServiceAccounts(opts ...func(*ServiceAccountQuery)) *OrganizationQuery

WithServiceAccounts tells the query-builder to eager-load the nodes that are connected to the "service_accounts" edge. The optional arguments are used to configure the query builder of the edge.

type OrganizationSelect

type OrganizationSelect struct {
	*OrganizationQuery
	// contains filtered or unexported fields
}

OrganizationSelect is the builder for selecting fields of Organization entities.

func (*OrganizationSelect) Aggregate

func (_s *OrganizationSelect) Aggregate(fns ...AggregateFunc) *OrganizationSelect

Aggregate adds the given aggregation functions to the selector query.

func (*OrganizationSelect) Bool

func (s *OrganizationSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrganizationSelect) BoolX

func (s *OrganizationSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrganizationSelect) Bools

func (s *OrganizationSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrganizationSelect) BoolsX

func (s *OrganizationSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrganizationSelect) Float64

func (s *OrganizationSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrganizationSelect) Float64X

func (s *OrganizationSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrganizationSelect) Float64s

func (s *OrganizationSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrganizationSelect) Float64sX

func (s *OrganizationSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrganizationSelect) Int

func (s *OrganizationSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrganizationSelect) IntX

func (s *OrganizationSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrganizationSelect) Ints

func (s *OrganizationSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrganizationSelect) IntsX

func (s *OrganizationSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrganizationSelect) Scan

func (_s *OrganizationSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrganizationSelect) ScanX

func (s *OrganizationSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrganizationSelect) String

func (s *OrganizationSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrganizationSelect) StringX

func (s *OrganizationSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrganizationSelect) Strings

func (s *OrganizationSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrganizationSelect) StringsX

func (s *OrganizationSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrganizationUpdate

type OrganizationUpdate struct {
	// contains filtered or unexported fields
}

OrganizationUpdate is the builder for updating Organization entities.

func (*OrganizationUpdate) AddAPIKeyIDs

func (_u *OrganizationUpdate) AddAPIKeyIDs(ids ...uuid.UUID) *OrganizationUpdate

AddAPIKeyIDs adds the "api_keys" edge to the APIKey entity by IDs.

func (*OrganizationUpdate) AddAPIKeys

func (_u *OrganizationUpdate) AddAPIKeys(v ...*APIKey) *OrganizationUpdate

AddAPIKeys adds the "api_keys" edges to the APIKey entity.

func (*OrganizationUpdate) AddMembershipIDs

func (_u *OrganizationUpdate) AddMembershipIDs(ids ...uuid.UUID) *OrganizationUpdate

AddMembershipIDs adds the "memberships" edge to the Membership entity by IDs.

func (*OrganizationUpdate) AddMemberships

func (_u *OrganizationUpdate) AddMemberships(v ...*Membership) *OrganizationUpdate

AddMemberships adds the "memberships" edges to the Membership entity.

func (*OrganizationUpdate) AddOauthAppIDs

func (_u *OrganizationUpdate) AddOauthAppIDs(ids ...uuid.UUID) *OrganizationUpdate

AddOauthAppIDs adds the "oauth_apps" edge to the OAuthApp entity by IDs.

func (*OrganizationUpdate) AddOauthApps

func (_u *OrganizationUpdate) AddOauthApps(v ...*OAuthApp) *OrganizationUpdate

AddOauthApps adds the "oauth_apps" edges to the OAuthApp entity.

func (*OrganizationUpdate) AddServiceAccountIDs

func (_u *OrganizationUpdate) AddServiceAccountIDs(ids ...uuid.UUID) *OrganizationUpdate

AddServiceAccountIDs adds the "service_accounts" edge to the ServiceAccount entity by IDs.

func (*OrganizationUpdate) AddServiceAccounts

func (_u *OrganizationUpdate) AddServiceAccounts(v ...*ServiceAccount) *OrganizationUpdate

AddServiceAccounts adds the "service_accounts" edges to the ServiceAccount entity.

func (*OrganizationUpdate) ClearAPIKeys

func (_u *OrganizationUpdate) ClearAPIKeys() *OrganizationUpdate

ClearAPIKeys clears all "api_keys" edges to the APIKey entity.

func (*OrganizationUpdate) ClearLogoURL

func (_u *OrganizationUpdate) ClearLogoURL() *OrganizationUpdate

ClearLogoURL clears the value of the "logo_url" field.

func (*OrganizationUpdate) ClearMemberships

func (_u *OrganizationUpdate) ClearMemberships() *OrganizationUpdate

ClearMemberships clears all "memberships" edges to the Membership entity.

func (*OrganizationUpdate) ClearOauthApps

func (_u *OrganizationUpdate) ClearOauthApps() *OrganizationUpdate

ClearOauthApps clears all "oauth_apps" edges to the OAuthApp entity.

func (*OrganizationUpdate) ClearServiceAccounts

func (_u *OrganizationUpdate) ClearServiceAccounts() *OrganizationUpdate

ClearServiceAccounts clears all "service_accounts" edges to the ServiceAccount entity.

func (*OrganizationUpdate) ClearSettings

func (_u *OrganizationUpdate) ClearSettings() *OrganizationUpdate

ClearSettings clears the value of the "settings" field.

func (*OrganizationUpdate) Exec

func (_u *OrganizationUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrganizationUpdate) ExecX

func (_u *OrganizationUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrganizationUpdate) Mutation

func (_u *OrganizationUpdate) Mutation() *OrganizationMutation

Mutation returns the OrganizationMutation object of the builder.

func (*OrganizationUpdate) RemoveAPIKeyIDs

func (_u *OrganizationUpdate) RemoveAPIKeyIDs(ids ...uuid.UUID) *OrganizationUpdate

RemoveAPIKeyIDs removes the "api_keys" edge to APIKey entities by IDs.

func (*OrganizationUpdate) RemoveAPIKeys

func (_u *OrganizationUpdate) RemoveAPIKeys(v ...*APIKey) *OrganizationUpdate

RemoveAPIKeys removes "api_keys" edges to APIKey entities.

func (*OrganizationUpdate) RemoveMembershipIDs

func (_u *OrganizationUpdate) RemoveMembershipIDs(ids ...uuid.UUID) *OrganizationUpdate

RemoveMembershipIDs removes the "memberships" edge to Membership entities by IDs.

func (*OrganizationUpdate) RemoveMemberships

func (_u *OrganizationUpdate) RemoveMemberships(v ...*Membership) *OrganizationUpdate

RemoveMemberships removes "memberships" edges to Membership entities.

func (*OrganizationUpdate) RemoveOauthAppIDs

func (_u *OrganizationUpdate) RemoveOauthAppIDs(ids ...uuid.UUID) *OrganizationUpdate

RemoveOauthAppIDs removes the "oauth_apps" edge to OAuthApp entities by IDs.

func (*OrganizationUpdate) RemoveOauthApps

func (_u *OrganizationUpdate) RemoveOauthApps(v ...*OAuthApp) *OrganizationUpdate

RemoveOauthApps removes "oauth_apps" edges to OAuthApp entities.

func (*OrganizationUpdate) RemoveServiceAccountIDs

func (_u *OrganizationUpdate) RemoveServiceAccountIDs(ids ...uuid.UUID) *OrganizationUpdate

RemoveServiceAccountIDs removes the "service_accounts" edge to ServiceAccount entities by IDs.

func (*OrganizationUpdate) RemoveServiceAccounts

func (_u *OrganizationUpdate) RemoveServiceAccounts(v ...*ServiceAccount) *OrganizationUpdate

RemoveServiceAccounts removes "service_accounts" edges to ServiceAccount entities.

func (*OrganizationUpdate) Save

func (_u *OrganizationUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*OrganizationUpdate) SaveX

func (_u *OrganizationUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*OrganizationUpdate) SetActive

func (_u *OrganizationUpdate) SetActive(v bool) *OrganizationUpdate

SetActive sets the "active" field.

func (*OrganizationUpdate) SetLogoURL

func (_u *OrganizationUpdate) SetLogoURL(v string) *OrganizationUpdate

SetLogoURL sets the "logo_url" field.

func (*OrganizationUpdate) SetName

SetName sets the "name" field.

func (*OrganizationUpdate) SetNillableActive

func (_u *OrganizationUpdate) SetNillableActive(v *bool) *OrganizationUpdate

SetNillableActive sets the "active" field if the given value is not nil.

func (*OrganizationUpdate) SetNillableLogoURL

func (_u *OrganizationUpdate) SetNillableLogoURL(v *string) *OrganizationUpdate

SetNillableLogoURL sets the "logo_url" field if the given value is not nil.

func (*OrganizationUpdate) SetNillableName

func (_u *OrganizationUpdate) SetNillableName(v *string) *OrganizationUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*OrganizationUpdate) SetNillablePlan

func (_u *OrganizationUpdate) SetNillablePlan(v *organization.Plan) *OrganizationUpdate

SetNillablePlan sets the "plan" field if the given value is not nil.

func (*OrganizationUpdate) SetNillableSlug

func (_u *OrganizationUpdate) SetNillableSlug(v *string) *OrganizationUpdate

SetNillableSlug sets the "slug" field if the given value is not nil.

func (*OrganizationUpdate) SetPlan

SetPlan sets the "plan" field.

func (*OrganizationUpdate) SetSettings

func (_u *OrganizationUpdate) SetSettings(v map[string]interface{}) *OrganizationUpdate

SetSettings sets the "settings" field.

func (*OrganizationUpdate) SetSlug

SetSlug sets the "slug" field.

func (*OrganizationUpdate) SetUpdatedAt

func (_u *OrganizationUpdate) SetUpdatedAt(v time.Time) *OrganizationUpdate

SetUpdatedAt sets the "updated_at" field.

func (*OrganizationUpdate) Where

Where appends a list predicates to the OrganizationUpdate builder.

type OrganizationUpdateOne

type OrganizationUpdateOne struct {
	// contains filtered or unexported fields
}

OrganizationUpdateOne is the builder for updating a single Organization entity.

func (*OrganizationUpdateOne) AddAPIKeyIDs

func (_u *OrganizationUpdateOne) AddAPIKeyIDs(ids ...uuid.UUID) *OrganizationUpdateOne

AddAPIKeyIDs adds the "api_keys" edge to the APIKey entity by IDs.

func (*OrganizationUpdateOne) AddAPIKeys

func (_u *OrganizationUpdateOne) AddAPIKeys(v ...*APIKey) *OrganizationUpdateOne

AddAPIKeys adds the "api_keys" edges to the APIKey entity.

func (*OrganizationUpdateOne) AddMembershipIDs

func (_u *OrganizationUpdateOne) AddMembershipIDs(ids ...uuid.UUID) *OrganizationUpdateOne

AddMembershipIDs adds the "memberships" edge to the Membership entity by IDs.

func (*OrganizationUpdateOne) AddMemberships

func (_u *OrganizationUpdateOne) AddMemberships(v ...*Membership) *OrganizationUpdateOne

AddMemberships adds the "memberships" edges to the Membership entity.

func (*OrganizationUpdateOne) AddOauthAppIDs

func (_u *OrganizationUpdateOne) AddOauthAppIDs(ids ...uuid.UUID) *OrganizationUpdateOne

AddOauthAppIDs adds the "oauth_apps" edge to the OAuthApp entity by IDs.

func (*OrganizationUpdateOne) AddOauthApps

func (_u *OrganizationUpdateOne) AddOauthApps(v ...*OAuthApp) *OrganizationUpdateOne

AddOauthApps adds the "oauth_apps" edges to the OAuthApp entity.

func (*OrganizationUpdateOne) AddServiceAccountIDs

func (_u *OrganizationUpdateOne) AddServiceAccountIDs(ids ...uuid.UUID) *OrganizationUpdateOne

AddServiceAccountIDs adds the "service_accounts" edge to the ServiceAccount entity by IDs.

func (*OrganizationUpdateOne) AddServiceAccounts

func (_u *OrganizationUpdateOne) AddServiceAccounts(v ...*ServiceAccount) *OrganizationUpdateOne

AddServiceAccounts adds the "service_accounts" edges to the ServiceAccount entity.

func (*OrganizationUpdateOne) ClearAPIKeys

func (_u *OrganizationUpdateOne) ClearAPIKeys() *OrganizationUpdateOne

ClearAPIKeys clears all "api_keys" edges to the APIKey entity.

func (*OrganizationUpdateOne) ClearLogoURL

func (_u *OrganizationUpdateOne) ClearLogoURL() *OrganizationUpdateOne

ClearLogoURL clears the value of the "logo_url" field.

func (*OrganizationUpdateOne) ClearMemberships

func (_u *OrganizationUpdateOne) ClearMemberships() *OrganizationUpdateOne

ClearMemberships clears all "memberships" edges to the Membership entity.

func (*OrganizationUpdateOne) ClearOauthApps

func (_u *OrganizationUpdateOne) ClearOauthApps() *OrganizationUpdateOne

ClearOauthApps clears all "oauth_apps" edges to the OAuthApp entity.

func (*OrganizationUpdateOne) ClearServiceAccounts

func (_u *OrganizationUpdateOne) ClearServiceAccounts() *OrganizationUpdateOne

ClearServiceAccounts clears all "service_accounts" edges to the ServiceAccount entity.

func (*OrganizationUpdateOne) ClearSettings

func (_u *OrganizationUpdateOne) ClearSettings() *OrganizationUpdateOne

ClearSettings clears the value of the "settings" field.

func (*OrganizationUpdateOne) Exec

Exec executes the query on the entity.

func (*OrganizationUpdateOne) ExecX

func (_u *OrganizationUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrganizationUpdateOne) Mutation

Mutation returns the OrganizationMutation object of the builder.

func (*OrganizationUpdateOne) RemoveAPIKeyIDs

func (_u *OrganizationUpdateOne) RemoveAPIKeyIDs(ids ...uuid.UUID) *OrganizationUpdateOne

RemoveAPIKeyIDs removes the "api_keys" edge to APIKey entities by IDs.

func (*OrganizationUpdateOne) RemoveAPIKeys

func (_u *OrganizationUpdateOne) RemoveAPIKeys(v ...*APIKey) *OrganizationUpdateOne

RemoveAPIKeys removes "api_keys" edges to APIKey entities.

func (*OrganizationUpdateOne) RemoveMembershipIDs

func (_u *OrganizationUpdateOne) RemoveMembershipIDs(ids ...uuid.UUID) *OrganizationUpdateOne

RemoveMembershipIDs removes the "memberships" edge to Membership entities by IDs.

func (*OrganizationUpdateOne) RemoveMemberships

func (_u *OrganizationUpdateOne) RemoveMemberships(v ...*Membership) *OrganizationUpdateOne

RemoveMemberships removes "memberships" edges to Membership entities.

func (*OrganizationUpdateOne) RemoveOauthAppIDs

func (_u *OrganizationUpdateOne) RemoveOauthAppIDs(ids ...uuid.UUID) *OrganizationUpdateOne

RemoveOauthAppIDs removes the "oauth_apps" edge to OAuthApp entities by IDs.

func (*OrganizationUpdateOne) RemoveOauthApps

func (_u *OrganizationUpdateOne) RemoveOauthApps(v ...*OAuthApp) *OrganizationUpdateOne

RemoveOauthApps removes "oauth_apps" edges to OAuthApp entities.

func (*OrganizationUpdateOne) RemoveServiceAccountIDs

func (_u *OrganizationUpdateOne) RemoveServiceAccountIDs(ids ...uuid.UUID) *OrganizationUpdateOne

RemoveServiceAccountIDs removes the "service_accounts" edge to ServiceAccount entities by IDs.

func (*OrganizationUpdateOne) RemoveServiceAccounts

func (_u *OrganizationUpdateOne) RemoveServiceAccounts(v ...*ServiceAccount) *OrganizationUpdateOne

RemoveServiceAccounts removes "service_accounts" edges to ServiceAccount entities.

func (*OrganizationUpdateOne) Save

Save executes the query and returns the updated Organization entity.

func (*OrganizationUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*OrganizationUpdateOne) Select

func (_u *OrganizationUpdateOne) Select(field string, fields ...string) *OrganizationUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*OrganizationUpdateOne) SetActive

SetActive sets the "active" field.

func (*OrganizationUpdateOne) SetLogoURL

SetLogoURL sets the "logo_url" field.

func (*OrganizationUpdateOne) SetName

SetName sets the "name" field.

func (*OrganizationUpdateOne) SetNillableActive

func (_u *OrganizationUpdateOne) SetNillableActive(v *bool) *OrganizationUpdateOne

SetNillableActive sets the "active" field if the given value is not nil.

func (*OrganizationUpdateOne) SetNillableLogoURL

func (_u *OrganizationUpdateOne) SetNillableLogoURL(v *string) *OrganizationUpdateOne

SetNillableLogoURL sets the "logo_url" field if the given value is not nil.

func (*OrganizationUpdateOne) SetNillableName

func (_u *OrganizationUpdateOne) SetNillableName(v *string) *OrganizationUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*OrganizationUpdateOne) SetNillablePlan

SetNillablePlan sets the "plan" field if the given value is not nil.

func (*OrganizationUpdateOne) SetNillableSlug

func (_u *OrganizationUpdateOne) SetNillableSlug(v *string) *OrganizationUpdateOne

SetNillableSlug sets the "slug" field if the given value is not nil.

func (*OrganizationUpdateOne) SetPlan

SetPlan sets the "plan" field.

func (*OrganizationUpdateOne) SetSettings

func (_u *OrganizationUpdateOne) SetSettings(v map[string]interface{}) *OrganizationUpdateOne

SetSettings sets the "settings" field.

func (*OrganizationUpdateOne) SetSlug

SetSlug sets the "slug" field.

func (*OrganizationUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*OrganizationUpdateOne) Where

Where appends a list predicates to the OrganizationUpdate builder.

type OrganizationUpsert

type OrganizationUpsert struct {
	*sql.UpdateSet
}

OrganizationUpsert is the "OnConflict" setter.

func (*OrganizationUpsert) ClearLogoURL

func (u *OrganizationUpsert) ClearLogoURL() *OrganizationUpsert

ClearLogoURL clears the value of the "logo_url" field.

func (*OrganizationUpsert) ClearSettings

func (u *OrganizationUpsert) ClearSettings() *OrganizationUpsert

ClearSettings clears the value of the "settings" field.

func (*OrganizationUpsert) SetActive

func (u *OrganizationUpsert) SetActive(v bool) *OrganizationUpsert

SetActive sets the "active" field.

func (*OrganizationUpsert) SetLogoURL

func (u *OrganizationUpsert) SetLogoURL(v string) *OrganizationUpsert

SetLogoURL sets the "logo_url" field.

func (*OrganizationUpsert) SetName

SetName sets the "name" field.

func (*OrganizationUpsert) SetPlan

SetPlan sets the "plan" field.

func (*OrganizationUpsert) SetSettings

func (u *OrganizationUpsert) SetSettings(v map[string]interface{}) *OrganizationUpsert

SetSettings sets the "settings" field.

func (*OrganizationUpsert) SetSlug

SetSlug sets the "slug" field.

func (*OrganizationUpsert) SetUpdatedAt

func (u *OrganizationUpsert) SetUpdatedAt(v time.Time) *OrganizationUpsert

SetUpdatedAt sets the "updated_at" field.

func (*OrganizationUpsert) UpdateActive

func (u *OrganizationUpsert) UpdateActive() *OrganizationUpsert

UpdateActive sets the "active" field to the value that was provided on create.

func (*OrganizationUpsert) UpdateLogoURL

func (u *OrganizationUpsert) UpdateLogoURL() *OrganizationUpsert

UpdateLogoURL sets the "logo_url" field to the value that was provided on create.

func (*OrganizationUpsert) UpdateName

func (u *OrganizationUpsert) UpdateName() *OrganizationUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*OrganizationUpsert) UpdatePlan

func (u *OrganizationUpsert) UpdatePlan() *OrganizationUpsert

UpdatePlan sets the "plan" field to the value that was provided on create.

func (*OrganizationUpsert) UpdateSettings

func (u *OrganizationUpsert) UpdateSettings() *OrganizationUpsert

UpdateSettings sets the "settings" field to the value that was provided on create.

func (*OrganizationUpsert) UpdateSlug

func (u *OrganizationUpsert) UpdateSlug() *OrganizationUpsert

UpdateSlug sets the "slug" field to the value that was provided on create.

func (*OrganizationUpsert) UpdateUpdatedAt

func (u *OrganizationUpsert) UpdateUpdatedAt() *OrganizationUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type OrganizationUpsertBulk

type OrganizationUpsertBulk struct {
	// contains filtered or unexported fields
}

OrganizationUpsertBulk is the builder for "upsert"-ing a bulk of Organization nodes.

func (*OrganizationUpsertBulk) ClearLogoURL

ClearLogoURL clears the value of the "logo_url" field.

func (*OrganizationUpsertBulk) ClearSettings

func (u *OrganizationUpsertBulk) ClearSettings() *OrganizationUpsertBulk

ClearSettings clears the value of the "settings" field.

func (*OrganizationUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrganizationUpsertBulk) Exec

Exec executes the query.

func (*OrganizationUpsertBulk) ExecX

func (u *OrganizationUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrganizationUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Organization.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*OrganizationUpsertBulk) SetActive

SetActive sets the "active" field.

func (*OrganizationUpsertBulk) SetLogoURL

SetLogoURL sets the "logo_url" field.

func (*OrganizationUpsertBulk) SetName

SetName sets the "name" field.

func (*OrganizationUpsertBulk) SetPlan

SetPlan sets the "plan" field.

func (*OrganizationUpsertBulk) SetSettings

func (u *OrganizationUpsertBulk) SetSettings(v map[string]interface{}) *OrganizationUpsertBulk

SetSettings sets the "settings" field.

func (*OrganizationUpsertBulk) SetSlug

SetSlug sets the "slug" field.

func (*OrganizationUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*OrganizationUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the OrganizationCreateBulk.OnConflict documentation for more info.

func (*OrganizationUpsertBulk) UpdateActive

UpdateActive sets the "active" field to the value that was provided on create.

func (*OrganizationUpsertBulk) UpdateLogoURL

func (u *OrganizationUpsertBulk) UpdateLogoURL() *OrganizationUpsertBulk

UpdateLogoURL sets the "logo_url" field to the value that was provided on create.

func (*OrganizationUpsertBulk) UpdateName

UpdateName sets the "name" field to the value that was provided on create.

func (*OrganizationUpsertBulk) UpdateNewValues

func (u *OrganizationUpsertBulk) UpdateNewValues() *OrganizationUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Organization.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(organization.FieldID)
		}),
	).
	Exec(ctx)

func (*OrganizationUpsertBulk) UpdatePlan

UpdatePlan sets the "plan" field to the value that was provided on create.

func (*OrganizationUpsertBulk) UpdateSettings

func (u *OrganizationUpsertBulk) UpdateSettings() *OrganizationUpsertBulk

UpdateSettings sets the "settings" field to the value that was provided on create.

func (*OrganizationUpsertBulk) UpdateSlug

UpdateSlug sets the "slug" field to the value that was provided on create.

func (*OrganizationUpsertBulk) UpdateUpdatedAt

func (u *OrganizationUpsertBulk) UpdateUpdatedAt() *OrganizationUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type OrganizationUpsertOne

type OrganizationUpsertOne struct {
	// contains filtered or unexported fields
}

OrganizationUpsertOne is the builder for "upsert"-ing

one Organization node.

func (*OrganizationUpsertOne) ClearLogoURL

func (u *OrganizationUpsertOne) ClearLogoURL() *OrganizationUpsertOne

ClearLogoURL clears the value of the "logo_url" field.

func (*OrganizationUpsertOne) ClearSettings

func (u *OrganizationUpsertOne) ClearSettings() *OrganizationUpsertOne

ClearSettings clears the value of the "settings" field.

func (*OrganizationUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrganizationUpsertOne) Exec

Exec executes the query.

func (*OrganizationUpsertOne) ExecX

func (u *OrganizationUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrganizationUpsertOne) ID

func (u *OrganizationUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*OrganizationUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*OrganizationUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Organization.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*OrganizationUpsertOne) SetActive

SetActive sets the "active" field.

func (*OrganizationUpsertOne) SetLogoURL

SetLogoURL sets the "logo_url" field.

func (*OrganizationUpsertOne) SetName

SetName sets the "name" field.

func (*OrganizationUpsertOne) SetPlan

SetPlan sets the "plan" field.

func (*OrganizationUpsertOne) SetSettings

func (u *OrganizationUpsertOne) SetSettings(v map[string]interface{}) *OrganizationUpsertOne

SetSettings sets the "settings" field.

func (*OrganizationUpsertOne) SetSlug

SetSlug sets the "slug" field.

func (*OrganizationUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*OrganizationUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the OrganizationCreate.OnConflict documentation for more info.

func (*OrganizationUpsertOne) UpdateActive

func (u *OrganizationUpsertOne) UpdateActive() *OrganizationUpsertOne

UpdateActive sets the "active" field to the value that was provided on create.

func (*OrganizationUpsertOne) UpdateLogoURL

func (u *OrganizationUpsertOne) UpdateLogoURL() *OrganizationUpsertOne

UpdateLogoURL sets the "logo_url" field to the value that was provided on create.

func (*OrganizationUpsertOne) UpdateName

UpdateName sets the "name" field to the value that was provided on create.

func (*OrganizationUpsertOne) UpdateNewValues

func (u *OrganizationUpsertOne) UpdateNewValues() *OrganizationUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Organization.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(organization.FieldID)
		}),
	).
	Exec(ctx)

func (*OrganizationUpsertOne) UpdatePlan

UpdatePlan sets the "plan" field to the value that was provided on create.

func (*OrganizationUpsertOne) UpdateSettings

func (u *OrganizationUpsertOne) UpdateSettings() *OrganizationUpsertOne

UpdateSettings sets the "settings" field to the value that was provided on create.

func (*OrganizationUpsertOne) UpdateSlug

UpdateSlug sets the "slug" field to the value that was provided on create.

func (*OrganizationUpsertOne) UpdateUpdatedAt

func (u *OrganizationUpsertOne) UpdateUpdatedAt() *OrganizationUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type Organizations

type Organizations []*Organization

Organizations is a parsable slice of Organization.

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 uuid.UUID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// UserID holds the value of the "user_id" field.
	UserID uuid.UUID `json:"user_id,omitempty"`
	// Opaque refresh token value
	Token string `json:"-"`
	// Token family for rotation tracking
	Family string `json:"family,omitempty"`
	// Token expiration time
	ExpiresAt time.Time `json:"expires_at,omitempty"`
	// Whether the token has been revoked
	Revoked bool `json:"revoked,omitempty"`
	// Client user agent for audit
	UserAgent string `json:"user_agent,omitempty"`
	// Client IP address for audit
	IPAddress string `json:"ip_address,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the RefreshTokenQuery when eager-loading is set.
	Edges RefreshTokenEdges `json:"edges"`
	// contains filtered or unexported fields
}

RefreshToken is the model entity for the RefreshToken schema.

func (*RefreshToken) QueryUser

func (_m *RefreshToken) QueryUser() *UserQuery

QueryUser queries the "user" edge of the RefreshToken entity.

func (*RefreshToken) String

func (_m *RefreshToken) String() string

String implements the fmt.Stringer.

func (*RefreshToken) Unwrap

func (_m *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 (_m *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.

func (*RefreshToken) Value

func (_m *RefreshToken) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the RefreshToken. This includes values selected through modifiers, order, etc.

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 uuid.UUID) *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) MapCreateBulk

func (c *RefreshTokenClient) MapCreateBulk(slice any, setFunc func(*RefreshTokenCreate, int)) *RefreshTokenCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*RefreshTokenClient) Query

Query returns a query builder for RefreshToken.

func (*RefreshTokenClient) QueryUser

func (c *RefreshTokenClient) QueryUser(_m *RefreshToken) *UserQuery

QueryUser queries the user edge of a 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 uuid.UUID) *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 (_c *RefreshTokenCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*RefreshTokenCreate) ExecX

func (_c *RefreshTokenCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RefreshTokenCreate) Mutation

func (_c *RefreshTokenCreate) Mutation() *RefreshTokenMutation

Mutation returns the RefreshTokenMutation object of the builder.

func (*RefreshTokenCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.RefreshToken.Create().
	SetCreatedAt(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.RefreshTokenUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*RefreshTokenCreate) OnConflictColumns

func (_c *RefreshTokenCreate) OnConflictColumns(columns ...string) *RefreshTokenUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.RefreshToken.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

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) SetCreatedAt

func (_c *RefreshTokenCreate) SetCreatedAt(v time.Time) *RefreshTokenCreate

SetCreatedAt sets the "created_at" field.

func (*RefreshTokenCreate) SetExpiresAt

func (_c *RefreshTokenCreate) SetExpiresAt(v time.Time) *RefreshTokenCreate

SetExpiresAt sets the "expires_at" field.

func (*RefreshTokenCreate) SetFamily

func (_c *RefreshTokenCreate) SetFamily(v string) *RefreshTokenCreate

SetFamily sets the "family" field.

func (*RefreshTokenCreate) SetID

SetID sets the "id" field.

func (*RefreshTokenCreate) SetIPAddress

func (_c *RefreshTokenCreate) SetIPAddress(v string) *RefreshTokenCreate

SetIPAddress sets the "ip_address" field.

func (*RefreshTokenCreate) SetNillableCreatedAt

func (_c *RefreshTokenCreate) SetNillableCreatedAt(v *time.Time) *RefreshTokenCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*RefreshTokenCreate) SetNillableID

func (_c *RefreshTokenCreate) SetNillableID(v *uuid.UUID) *RefreshTokenCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*RefreshTokenCreate) SetNillableIPAddress

func (_c *RefreshTokenCreate) SetNillableIPAddress(v *string) *RefreshTokenCreate

SetNillableIPAddress sets the "ip_address" field if the given value is not nil.

func (*RefreshTokenCreate) SetNillableRevoked

func (_c *RefreshTokenCreate) SetNillableRevoked(v *bool) *RefreshTokenCreate

SetNillableRevoked sets the "revoked" field if the given value is not nil.

func (*RefreshTokenCreate) SetNillableUpdatedAt

func (_c *RefreshTokenCreate) SetNillableUpdatedAt(v *time.Time) *RefreshTokenCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*RefreshTokenCreate) SetNillableUserAgent

func (_c *RefreshTokenCreate) SetNillableUserAgent(v *string) *RefreshTokenCreate

SetNillableUserAgent sets the "user_agent" field if the given value is not nil.

func (*RefreshTokenCreate) SetRevoked

func (_c *RefreshTokenCreate) SetRevoked(v bool) *RefreshTokenCreate

SetRevoked sets the "revoked" field.

func (*RefreshTokenCreate) SetToken

func (_c *RefreshTokenCreate) SetToken(v string) *RefreshTokenCreate

SetToken sets the "token" field.

func (*RefreshTokenCreate) SetUpdatedAt

func (_c *RefreshTokenCreate) SetUpdatedAt(v time.Time) *RefreshTokenCreate

SetUpdatedAt sets the "updated_at" field.

func (*RefreshTokenCreate) SetUser

func (_c *RefreshTokenCreate) SetUser(v *User) *RefreshTokenCreate

SetUser sets the "user" edge to the User entity.

func (*RefreshTokenCreate) SetUserAgent

func (_c *RefreshTokenCreate) SetUserAgent(v string) *RefreshTokenCreate

SetUserAgent sets the "user_agent" field.

func (*RefreshTokenCreate) SetUserID

func (_c *RefreshTokenCreate) SetUserID(v uuid.UUID) *RefreshTokenCreate

SetUserID sets the "user_id" 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

Exec executes the query.

func (*RefreshTokenCreateBulk) ExecX

func (_c *RefreshTokenCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RefreshTokenCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.RefreshToken.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.RefreshTokenUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*RefreshTokenCreateBulk) OnConflictColumns

func (_c *RefreshTokenCreateBulk) OnConflictColumns(columns ...string) *RefreshTokenUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.RefreshToken.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*RefreshTokenCreateBulk) Save

Save creates the RefreshToken entities in the database.

func (*RefreshTokenCreateBulk) SaveX

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 (_d *RefreshTokenDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*RefreshTokenDelete) ExecX

func (_d *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

Exec executes the deletion query.

func (*RefreshTokenDeleteOne) ExecX

func (_d *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 RefreshTokenEdges

type RefreshTokenEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// contains filtered or unexported fields
}

RefreshTokenEdges holds the relations/edges for other nodes in the graph.

func (RefreshTokenEdges) UserOrErr

func (e RefreshTokenEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type RefreshTokenFilter

type RefreshTokenFilter struct {
	// contains filtered or unexported fields
}

RefreshTokenFilter provides a generic filtering capability at runtime for RefreshTokenQuery.

func (*RefreshTokenFilter) Where

func (f *RefreshTokenFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*RefreshTokenFilter) WhereCreatedAt

func (f *RefreshTokenFilter) WhereCreatedAt(p entql.TimeP)

WhereCreatedAt applies the entql time.Time predicate on the created_at field.

func (*RefreshTokenFilter) WhereExpiresAt

func (f *RefreshTokenFilter) WhereExpiresAt(p entql.TimeP)

WhereExpiresAt applies the entql time.Time predicate on the expires_at field.

func (*RefreshTokenFilter) WhereFamily

func (f *RefreshTokenFilter) WhereFamily(p entql.StringP)

WhereFamily applies the entql string predicate on the family field.

func (*RefreshTokenFilter) WhereHasUser

func (f *RefreshTokenFilter) WhereHasUser()

WhereHasUser applies a predicate to check if query has an edge user.

func (*RefreshTokenFilter) WhereHasUserWith

func (f *RefreshTokenFilter) WhereHasUserWith(preds ...predicate.User)

WhereHasUserWith applies a predicate to check if query has an edge user with a given conditions (other predicates).

func (*RefreshTokenFilter) WhereID

func (f *RefreshTokenFilter) WhereID(p entql.ValueP)

WhereID applies the entql [16]byte predicate on the id field.

func (*RefreshTokenFilter) WhereIPAddress

func (f *RefreshTokenFilter) WhereIPAddress(p entql.StringP)

WhereIPAddress applies the entql string predicate on the ip_address field.

func (*RefreshTokenFilter) WhereRevoked

func (f *RefreshTokenFilter) WhereRevoked(p entql.BoolP)

WhereRevoked applies the entql bool predicate on the revoked field.

func (*RefreshTokenFilter) WhereToken

func (f *RefreshTokenFilter) WhereToken(p entql.StringP)

WhereToken applies the entql string predicate on the token field.

func (*RefreshTokenFilter) WhereUpdatedAt

func (f *RefreshTokenFilter) WhereUpdatedAt(p entql.TimeP)

WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.

func (*RefreshTokenFilter) WhereUserAgent

func (f *RefreshTokenFilter) WhereUserAgent(p entql.StringP)

WhereUserAgent applies the entql string predicate on the user_agent field.

func (*RefreshTokenFilter) WhereUserID

func (f *RefreshTokenFilter) WhereUserID(p entql.ValueP)

WhereUserID applies the entql [16]byte predicate on the user_id field.

type RefreshTokenGroupBy

type RefreshTokenGroupBy struct {
	// contains filtered or unexported fields
}

RefreshTokenGroupBy is the group-by builder for RefreshToken entities.

func (*RefreshTokenGroupBy) Aggregate

func (_g *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 (_g *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) 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) ClearIPAddress

func (m *RefreshTokenMutation) ClearIPAddress()

ClearIPAddress clears the value of the "ip_address" field.

func (*RefreshTokenMutation) ClearUser

func (m *RefreshTokenMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*RefreshTokenMutation) ClearUserAgent

func (m *RefreshTokenMutation) ClearUserAgent()

ClearUserAgent clears the value of the "user_agent" 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) 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) ExpiresAt

func (m *RefreshTokenMutation) ExpiresAt() (r time.Time, exists bool)

ExpiresAt returns the value of the "expires_at" field in the mutation.

func (*RefreshTokenMutation) Family

func (m *RefreshTokenMutation) Family() (r string, exists bool)

Family returns the value of the "family" field in the 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) Filter

Filter returns an entql.Where implementation to apply filters on the RefreshTokenMutation builder.

func (*RefreshTokenMutation) ID

func (m *RefreshTokenMutation) ID() (id uuid.UUID, 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

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) IPAddress

func (m *RefreshTokenMutation) IPAddress() (r string, exists bool)

IPAddress returns the value of the "ip_address" field in the mutation.

func (*RefreshTokenMutation) IPAddressCleared

func (m *RefreshTokenMutation) IPAddressCleared() bool

IPAddressCleared returns if the "ip_address" field was cleared in this mutation.

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) OldExpiresAt

func (m *RefreshTokenMutation) OldExpiresAt(ctx context.Context) (v time.Time, err error)

OldExpiresAt returns the old "expires_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) OldFamily

func (m *RefreshTokenMutation) OldFamily(ctx context.Context) (v string, err error)

OldFamily returns the old "family" 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) OldIPAddress

func (m *RefreshTokenMutation) OldIPAddress(ctx context.Context) (v string, err error)

OldIPAddress returns the old "ip_address" 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) OldRevoked

func (m *RefreshTokenMutation) OldRevoked(ctx context.Context) (v bool, err error)

OldRevoked returns the old "revoked" 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) OldUpdatedAt

func (m *RefreshTokenMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_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) OldUserAgent

func (m *RefreshTokenMutation) OldUserAgent(ctx context.Context) (v string, err error)

OldUserAgent returns the old "user_agent" 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) OldUserID

func (m *RefreshTokenMutation) OldUserID(ctx context.Context) (v uuid.UUID, err error)

OldUserID returns the old "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) 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) 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) ResetExpiresAt

func (m *RefreshTokenMutation) ResetExpiresAt()

ResetExpiresAt resets all changes to the "expires_at" field.

func (*RefreshTokenMutation) ResetFamily

func (m *RefreshTokenMutation) ResetFamily()

ResetFamily resets all changes to the "family" field.

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) ResetIPAddress

func (m *RefreshTokenMutation) ResetIPAddress()

ResetIPAddress resets all changes to the "ip_address" field.

func (*RefreshTokenMutation) ResetRevoked

func (m *RefreshTokenMutation) ResetRevoked()

ResetRevoked resets all changes to the "revoked" field.

func (*RefreshTokenMutation) ResetToken

func (m *RefreshTokenMutation) ResetToken()

ResetToken resets all changes to the "token" field.

func (*RefreshTokenMutation) ResetUpdatedAt

func (m *RefreshTokenMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*RefreshTokenMutation) ResetUser

func (m *RefreshTokenMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*RefreshTokenMutation) ResetUserAgent

func (m *RefreshTokenMutation) ResetUserAgent()

ResetUserAgent resets all changes to the "user_agent" field.

func (*RefreshTokenMutation) ResetUserID

func (m *RefreshTokenMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*RefreshTokenMutation) Revoked

func (m *RefreshTokenMutation) Revoked() (r bool, exists bool)

Revoked returns the value of the "revoked" field in the mutation.

func (*RefreshTokenMutation) SetCreatedAt

func (m *RefreshTokenMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*RefreshTokenMutation) SetExpiresAt

func (m *RefreshTokenMutation) SetExpiresAt(t time.Time)

SetExpiresAt sets the "expires_at" field.

func (*RefreshTokenMutation) SetFamily

func (m *RefreshTokenMutation) SetFamily(s string)

SetFamily sets the "family" 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 uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of RefreshToken entities.

func (*RefreshTokenMutation) SetIPAddress

func (m *RefreshTokenMutation) SetIPAddress(s string)

SetIPAddress sets the "ip_address" field.

func (*RefreshTokenMutation) SetOp

func (m *RefreshTokenMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*RefreshTokenMutation) SetRevoked

func (m *RefreshTokenMutation) SetRevoked(b bool)

SetRevoked sets the "revoked" field.

func (*RefreshTokenMutation) SetToken

func (m *RefreshTokenMutation) SetToken(s string)

SetToken sets the "token" field.

func (*RefreshTokenMutation) SetUpdatedAt

func (m *RefreshTokenMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*RefreshTokenMutation) SetUserAgent

func (m *RefreshTokenMutation) SetUserAgent(s string)

SetUserAgent sets the "user_agent" field.

func (*RefreshTokenMutation) SetUserID

func (m *RefreshTokenMutation) SetUserID(u uuid.UUID)

SetUserID sets the "user_id" 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) UpdatedAt

func (m *RefreshTokenMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*RefreshTokenMutation) UserAgent

func (m *RefreshTokenMutation) UserAgent() (r string, exists bool)

UserAgent returns the value of the "user_agent" field in the mutation.

func (*RefreshTokenMutation) UserAgentCleared

func (m *RefreshTokenMutation) UserAgentCleared() bool

UserAgentCleared returns if the "user_agent" field was cleared in this mutation.

func (*RefreshTokenMutation) UserCleared

func (m *RefreshTokenMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*RefreshTokenMutation) UserID

func (m *RefreshTokenMutation) UserID() (r uuid.UUID, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*RefreshTokenMutation) UserIDs

func (m *RefreshTokenMutation) UserIDs() (ids []uuid.UUID)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

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 (_q *RefreshTokenQuery) Aggregate(fns ...AggregateFunc) *RefreshTokenSelect

Aggregate returns a RefreshTokenSelect configured with the given aggregations.

func (*RefreshTokenQuery) All

func (_q *RefreshTokenQuery) All(ctx context.Context) ([]*RefreshToken, error)

All executes the query and returns a list of RefreshTokens.

func (*RefreshTokenQuery) AllX

func (_q *RefreshTokenQuery) AllX(ctx context.Context) []*RefreshToken

AllX is like All, but panics if an error occurs.

func (*RefreshTokenQuery) Clone

func (_q *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 (_q *RefreshTokenQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*RefreshTokenQuery) CountX

func (_q *RefreshTokenQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*RefreshTokenQuery) Exist

func (_q *RefreshTokenQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*RefreshTokenQuery) ExistX

func (_q *RefreshTokenQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*RefreshTokenQuery) Filter

func (_q *RefreshTokenQuery) Filter() *RefreshTokenFilter

Filter returns a Filter implementation to apply filters on the RefreshTokenQuery builder.

func (*RefreshTokenQuery) First

func (_q *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 (_q *RefreshTokenQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first RefreshToken ID from the query. Returns a *NotFoundError when no RefreshToken ID was found.

func (*RefreshTokenQuery) FirstIDX

func (_q *RefreshTokenQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*RefreshTokenQuery) FirstX

func (_q *RefreshTokenQuery) FirstX(ctx context.Context) *RefreshToken

FirstX is like First, but panics if an error occurs.

func (*RefreshTokenQuery) GroupBy

func (_q *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 {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.RefreshToken.Query().
	GroupBy(refreshtoken.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*RefreshTokenQuery) IDs

func (_q *RefreshTokenQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of RefreshToken IDs.

func (*RefreshTokenQuery) IDsX

func (_q *RefreshTokenQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*RefreshTokenQuery) Limit

func (_q *RefreshTokenQuery) Limit(limit int) *RefreshTokenQuery

Limit the number of records to be returned by this query.

func (*RefreshTokenQuery) Offset

func (_q *RefreshTokenQuery) Offset(offset int) *RefreshTokenQuery

Offset to start from.

func (*RefreshTokenQuery) Only

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 (_q *RefreshTokenQuery) OnlyID(ctx context.Context) (id uuid.UUID, 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 (_q *RefreshTokenQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*RefreshTokenQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*RefreshTokenQuery) Order

Order specifies how the records should be ordered.

func (*RefreshTokenQuery) QueryUser

func (_q *RefreshTokenQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*RefreshTokenQuery) Select

func (_q *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 {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.RefreshToken.Query().
	Select(refreshtoken.FieldCreatedAt).
	Scan(ctx, &v)

func (*RefreshTokenQuery) Unique

func (_q *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.

func (*RefreshTokenQuery) WithUser

func (_q *RefreshTokenQuery) WithUser(opts ...func(*UserQuery)) *RefreshTokenQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

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 (_s *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 (_s *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) ClearIPAddress

func (_u *RefreshTokenUpdate) ClearIPAddress() *RefreshTokenUpdate

ClearIPAddress clears the value of the "ip_address" field.

func (*RefreshTokenUpdate) ClearUser

func (_u *RefreshTokenUpdate) ClearUser() *RefreshTokenUpdate

ClearUser clears the "user" edge to the User entity.

func (*RefreshTokenUpdate) ClearUserAgent

func (_u *RefreshTokenUpdate) ClearUserAgent() *RefreshTokenUpdate

ClearUserAgent clears the value of the "user_agent" field.

func (*RefreshTokenUpdate) Exec

func (_u *RefreshTokenUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*RefreshTokenUpdate) ExecX

func (_u *RefreshTokenUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RefreshTokenUpdate) Mutation

func (_u *RefreshTokenUpdate) Mutation() *RefreshTokenMutation

Mutation returns the RefreshTokenMutation object of the builder.

func (*RefreshTokenUpdate) Save

func (_u *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 (_u *RefreshTokenUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*RefreshTokenUpdate) SetExpiresAt

func (_u *RefreshTokenUpdate) SetExpiresAt(v time.Time) *RefreshTokenUpdate

SetExpiresAt sets the "expires_at" field.

func (*RefreshTokenUpdate) SetFamily

func (_u *RefreshTokenUpdate) SetFamily(v string) *RefreshTokenUpdate

SetFamily sets the "family" field.

func (*RefreshTokenUpdate) SetIPAddress

func (_u *RefreshTokenUpdate) SetIPAddress(v string) *RefreshTokenUpdate

SetIPAddress sets the "ip_address" field.

func (*RefreshTokenUpdate) SetNillableExpiresAt

func (_u *RefreshTokenUpdate) SetNillableExpiresAt(v *time.Time) *RefreshTokenUpdate

SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.

func (*RefreshTokenUpdate) SetNillableFamily

func (_u *RefreshTokenUpdate) SetNillableFamily(v *string) *RefreshTokenUpdate

SetNillableFamily sets the "family" field if the given value is not nil.

func (*RefreshTokenUpdate) SetNillableIPAddress

func (_u *RefreshTokenUpdate) SetNillableIPAddress(v *string) *RefreshTokenUpdate

SetNillableIPAddress sets the "ip_address" field if the given value is not nil.

func (*RefreshTokenUpdate) SetNillableRevoked

func (_u *RefreshTokenUpdate) SetNillableRevoked(v *bool) *RefreshTokenUpdate

SetNillableRevoked sets the "revoked" field if the given value is not nil.

func (*RefreshTokenUpdate) SetNillableToken

func (_u *RefreshTokenUpdate) SetNillableToken(v *string) *RefreshTokenUpdate

SetNillableToken sets the "token" field if the given value is not nil.

func (*RefreshTokenUpdate) SetNillableUserAgent

func (_u *RefreshTokenUpdate) SetNillableUserAgent(v *string) *RefreshTokenUpdate

SetNillableUserAgent sets the "user_agent" field if the given value is not nil.

func (*RefreshTokenUpdate) SetNillableUserID

func (_u *RefreshTokenUpdate) SetNillableUserID(v *uuid.UUID) *RefreshTokenUpdate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*RefreshTokenUpdate) SetRevoked

func (_u *RefreshTokenUpdate) SetRevoked(v bool) *RefreshTokenUpdate

SetRevoked sets the "revoked" field.

func (*RefreshTokenUpdate) SetToken

func (_u *RefreshTokenUpdate) SetToken(v string) *RefreshTokenUpdate

SetToken sets the "token" field.

func (*RefreshTokenUpdate) SetUpdatedAt

func (_u *RefreshTokenUpdate) SetUpdatedAt(v time.Time) *RefreshTokenUpdate

SetUpdatedAt sets the "updated_at" field.

func (*RefreshTokenUpdate) SetUser

func (_u *RefreshTokenUpdate) SetUser(v *User) *RefreshTokenUpdate

SetUser sets the "user" edge to the User entity.

func (*RefreshTokenUpdate) SetUserAgent

func (_u *RefreshTokenUpdate) SetUserAgent(v string) *RefreshTokenUpdate

SetUserAgent sets the "user_agent" field.

func (*RefreshTokenUpdate) SetUserID

func (_u *RefreshTokenUpdate) SetUserID(v uuid.UUID) *RefreshTokenUpdate

SetUserID sets the "user_id" 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) ClearIPAddress

func (_u *RefreshTokenUpdateOne) ClearIPAddress() *RefreshTokenUpdateOne

ClearIPAddress clears the value of the "ip_address" field.

func (*RefreshTokenUpdateOne) ClearUser

ClearUser clears the "user" edge to the User entity.

func (*RefreshTokenUpdateOne) ClearUserAgent

func (_u *RefreshTokenUpdateOne) ClearUserAgent() *RefreshTokenUpdateOne

ClearUserAgent clears the value of the "user_agent" field.

func (*RefreshTokenUpdateOne) Exec

Exec executes the query on the entity.

func (*RefreshTokenUpdateOne) ExecX

func (_u *RefreshTokenUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RefreshTokenUpdateOne) Mutation

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 (_u *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) SetExpiresAt

SetExpiresAt sets the "expires_at" field.

func (*RefreshTokenUpdateOne) SetFamily

SetFamily sets the "family" field.

func (*RefreshTokenUpdateOne) SetIPAddress

func (_u *RefreshTokenUpdateOne) SetIPAddress(v string) *RefreshTokenUpdateOne

SetIPAddress sets the "ip_address" field.

func (*RefreshTokenUpdateOne) SetNillableExpiresAt

func (_u *RefreshTokenUpdateOne) SetNillableExpiresAt(v *time.Time) *RefreshTokenUpdateOne

SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.

func (*RefreshTokenUpdateOne) SetNillableFamily

func (_u *RefreshTokenUpdateOne) SetNillableFamily(v *string) *RefreshTokenUpdateOne

SetNillableFamily sets the "family" field if the given value is not nil.

func (*RefreshTokenUpdateOne) SetNillableIPAddress

func (_u *RefreshTokenUpdateOne) SetNillableIPAddress(v *string) *RefreshTokenUpdateOne

SetNillableIPAddress sets the "ip_address" field if the given value is not nil.

func (*RefreshTokenUpdateOne) SetNillableRevoked

func (_u *RefreshTokenUpdateOne) SetNillableRevoked(v *bool) *RefreshTokenUpdateOne

SetNillableRevoked sets the "revoked" field if the given value is not nil.

func (*RefreshTokenUpdateOne) SetNillableToken

func (_u *RefreshTokenUpdateOne) SetNillableToken(v *string) *RefreshTokenUpdateOne

SetNillableToken sets the "token" field if the given value is not nil.

func (*RefreshTokenUpdateOne) SetNillableUserAgent

func (_u *RefreshTokenUpdateOne) SetNillableUserAgent(v *string) *RefreshTokenUpdateOne

SetNillableUserAgent sets the "user_agent" field if the given value is not nil.

func (*RefreshTokenUpdateOne) SetNillableUserID

func (_u *RefreshTokenUpdateOne) SetNillableUserID(v *uuid.UUID) *RefreshTokenUpdateOne

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*RefreshTokenUpdateOne) SetRevoked

SetRevoked sets the "revoked" field.

func (*RefreshTokenUpdateOne) SetToken

SetToken sets the "token" field.

func (*RefreshTokenUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*RefreshTokenUpdateOne) SetUser

SetUser sets the "user" edge to the User entity.

func (*RefreshTokenUpdateOne) SetUserAgent

func (_u *RefreshTokenUpdateOne) SetUserAgent(v string) *RefreshTokenUpdateOne

SetUserAgent sets the "user_agent" field.

func (*RefreshTokenUpdateOne) SetUserID

SetUserID sets the "user_id" field.

func (*RefreshTokenUpdateOne) Where

Where appends a list predicates to the RefreshTokenUpdate builder.

type RefreshTokenUpsert

type RefreshTokenUpsert struct {
	*sql.UpdateSet
}

RefreshTokenUpsert is the "OnConflict" setter.

func (*RefreshTokenUpsert) ClearIPAddress

func (u *RefreshTokenUpsert) ClearIPAddress() *RefreshTokenUpsert

ClearIPAddress clears the value of the "ip_address" field.

func (*RefreshTokenUpsert) ClearUserAgent

func (u *RefreshTokenUpsert) ClearUserAgent() *RefreshTokenUpsert

ClearUserAgent clears the value of the "user_agent" field.

func (*RefreshTokenUpsert) SetExpiresAt

func (u *RefreshTokenUpsert) SetExpiresAt(v time.Time) *RefreshTokenUpsert

SetExpiresAt sets the "expires_at" field.

func (*RefreshTokenUpsert) SetFamily

func (u *RefreshTokenUpsert) SetFamily(v string) *RefreshTokenUpsert

SetFamily sets the "family" field.

func (*RefreshTokenUpsert) SetIPAddress

func (u *RefreshTokenUpsert) SetIPAddress(v string) *RefreshTokenUpsert

SetIPAddress sets the "ip_address" field.

func (*RefreshTokenUpsert) SetRevoked

func (u *RefreshTokenUpsert) SetRevoked(v bool) *RefreshTokenUpsert

SetRevoked sets the "revoked" field.

func (*RefreshTokenUpsert) SetToken

SetToken sets the "token" field.

func (*RefreshTokenUpsert) SetUpdatedAt

func (u *RefreshTokenUpsert) SetUpdatedAt(v time.Time) *RefreshTokenUpsert

SetUpdatedAt sets the "updated_at" field.

func (*RefreshTokenUpsert) SetUserAgent

func (u *RefreshTokenUpsert) SetUserAgent(v string) *RefreshTokenUpsert

SetUserAgent sets the "user_agent" field.

func (*RefreshTokenUpsert) SetUserID

SetUserID sets the "user_id" field.

func (*RefreshTokenUpsert) UpdateExpiresAt

func (u *RefreshTokenUpsert) UpdateExpiresAt() *RefreshTokenUpsert

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*RefreshTokenUpsert) UpdateFamily

func (u *RefreshTokenUpsert) UpdateFamily() *RefreshTokenUpsert

UpdateFamily sets the "family" field to the value that was provided on create.

func (*RefreshTokenUpsert) UpdateIPAddress

func (u *RefreshTokenUpsert) UpdateIPAddress() *RefreshTokenUpsert

UpdateIPAddress sets the "ip_address" field to the value that was provided on create.

func (*RefreshTokenUpsert) UpdateRevoked

func (u *RefreshTokenUpsert) UpdateRevoked() *RefreshTokenUpsert

UpdateRevoked sets the "revoked" field to the value that was provided on create.

func (*RefreshTokenUpsert) UpdateToken

func (u *RefreshTokenUpsert) UpdateToken() *RefreshTokenUpsert

UpdateToken sets the "token" field to the value that was provided on create.

func (*RefreshTokenUpsert) UpdateUpdatedAt

func (u *RefreshTokenUpsert) UpdateUpdatedAt() *RefreshTokenUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*RefreshTokenUpsert) UpdateUserAgent

func (u *RefreshTokenUpsert) UpdateUserAgent() *RefreshTokenUpsert

UpdateUserAgent sets the "user_agent" field to the value that was provided on create.

func (*RefreshTokenUpsert) UpdateUserID

func (u *RefreshTokenUpsert) UpdateUserID() *RefreshTokenUpsert

UpdateUserID sets the "user_id" field to the value that was provided on create.

type RefreshTokenUpsertBulk

type RefreshTokenUpsertBulk struct {
	// contains filtered or unexported fields
}

RefreshTokenUpsertBulk is the builder for "upsert"-ing a bulk of RefreshToken nodes.

func (*RefreshTokenUpsertBulk) ClearIPAddress

func (u *RefreshTokenUpsertBulk) ClearIPAddress() *RefreshTokenUpsertBulk

ClearIPAddress clears the value of the "ip_address" field.

func (*RefreshTokenUpsertBulk) ClearUserAgent

func (u *RefreshTokenUpsertBulk) ClearUserAgent() *RefreshTokenUpsertBulk

ClearUserAgent clears the value of the "user_agent" field.

func (*RefreshTokenUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*RefreshTokenUpsertBulk) Exec

Exec executes the query.

func (*RefreshTokenUpsertBulk) ExecX

func (u *RefreshTokenUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RefreshTokenUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.RefreshToken.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*RefreshTokenUpsertBulk) SetExpiresAt

SetExpiresAt sets the "expires_at" field.

func (*RefreshTokenUpsertBulk) SetFamily

SetFamily sets the "family" field.

func (*RefreshTokenUpsertBulk) SetIPAddress

SetIPAddress sets the "ip_address" field.

func (*RefreshTokenUpsertBulk) SetRevoked

SetRevoked sets the "revoked" field.

func (*RefreshTokenUpsertBulk) SetToken

SetToken sets the "token" field.

func (*RefreshTokenUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*RefreshTokenUpsertBulk) SetUserAgent

SetUserAgent sets the "user_agent" field.

func (*RefreshTokenUpsertBulk) SetUserID

SetUserID sets the "user_id" field.

func (*RefreshTokenUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the RefreshTokenCreateBulk.OnConflict documentation for more info.

func (*RefreshTokenUpsertBulk) UpdateExpiresAt

func (u *RefreshTokenUpsertBulk) UpdateExpiresAt() *RefreshTokenUpsertBulk

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*RefreshTokenUpsertBulk) UpdateFamily

UpdateFamily sets the "family" field to the value that was provided on create.

func (*RefreshTokenUpsertBulk) UpdateIPAddress

func (u *RefreshTokenUpsertBulk) UpdateIPAddress() *RefreshTokenUpsertBulk

UpdateIPAddress sets the "ip_address" field to the value that was provided on create.

func (*RefreshTokenUpsertBulk) UpdateNewValues

func (u *RefreshTokenUpsertBulk) UpdateNewValues() *RefreshTokenUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.RefreshToken.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(refreshtoken.FieldID)
		}),
	).
	Exec(ctx)

func (*RefreshTokenUpsertBulk) UpdateRevoked

func (u *RefreshTokenUpsertBulk) UpdateRevoked() *RefreshTokenUpsertBulk

UpdateRevoked sets the "revoked" field to the value that was provided on create.

func (*RefreshTokenUpsertBulk) UpdateToken

UpdateToken sets the "token" field to the value that was provided on create.

func (*RefreshTokenUpsertBulk) UpdateUpdatedAt

func (u *RefreshTokenUpsertBulk) UpdateUpdatedAt() *RefreshTokenUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*RefreshTokenUpsertBulk) UpdateUserAgent

func (u *RefreshTokenUpsertBulk) UpdateUserAgent() *RefreshTokenUpsertBulk

UpdateUserAgent sets the "user_agent" field to the value that was provided on create.

func (*RefreshTokenUpsertBulk) UpdateUserID

UpdateUserID sets the "user_id" field to the value that was provided on create.

type RefreshTokenUpsertOne

type RefreshTokenUpsertOne struct {
	// contains filtered or unexported fields
}

RefreshTokenUpsertOne is the builder for "upsert"-ing

one RefreshToken node.

func (*RefreshTokenUpsertOne) ClearIPAddress

func (u *RefreshTokenUpsertOne) ClearIPAddress() *RefreshTokenUpsertOne

ClearIPAddress clears the value of the "ip_address" field.

func (*RefreshTokenUpsertOne) ClearUserAgent

func (u *RefreshTokenUpsertOne) ClearUserAgent() *RefreshTokenUpsertOne

ClearUserAgent clears the value of the "user_agent" field.

func (*RefreshTokenUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*RefreshTokenUpsertOne) Exec

Exec executes the query.

func (*RefreshTokenUpsertOne) ExecX

func (u *RefreshTokenUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RefreshTokenUpsertOne) ID

func (u *RefreshTokenUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*RefreshTokenUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*RefreshTokenUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.RefreshToken.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*RefreshTokenUpsertOne) SetExpiresAt

SetExpiresAt sets the "expires_at" field.

func (*RefreshTokenUpsertOne) SetFamily

SetFamily sets the "family" field.

func (*RefreshTokenUpsertOne) SetIPAddress

SetIPAddress sets the "ip_address" field.

func (*RefreshTokenUpsertOne) SetRevoked

SetRevoked sets the "revoked" field.

func (*RefreshTokenUpsertOne) SetToken

SetToken sets the "token" field.

func (*RefreshTokenUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*RefreshTokenUpsertOne) SetUserAgent

SetUserAgent sets the "user_agent" field.

func (*RefreshTokenUpsertOne) SetUserID

SetUserID sets the "user_id" field.

func (*RefreshTokenUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the RefreshTokenCreate.OnConflict documentation for more info.

func (*RefreshTokenUpsertOne) UpdateExpiresAt

func (u *RefreshTokenUpsertOne) UpdateExpiresAt() *RefreshTokenUpsertOne

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*RefreshTokenUpsertOne) UpdateFamily

func (u *RefreshTokenUpsertOne) UpdateFamily() *RefreshTokenUpsertOne

UpdateFamily sets the "family" field to the value that was provided on create.

func (*RefreshTokenUpsertOne) UpdateIPAddress

func (u *RefreshTokenUpsertOne) UpdateIPAddress() *RefreshTokenUpsertOne

UpdateIPAddress sets the "ip_address" field to the value that was provided on create.

func (*RefreshTokenUpsertOne) UpdateNewValues

func (u *RefreshTokenUpsertOne) UpdateNewValues() *RefreshTokenUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.RefreshToken.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(refreshtoken.FieldID)
		}),
	).
	Exec(ctx)

func (*RefreshTokenUpsertOne) UpdateRevoked

func (u *RefreshTokenUpsertOne) UpdateRevoked() *RefreshTokenUpsertOne

UpdateRevoked sets the "revoked" field to the value that was provided on create.

func (*RefreshTokenUpsertOne) UpdateToken

func (u *RefreshTokenUpsertOne) UpdateToken() *RefreshTokenUpsertOne

UpdateToken sets the "token" field to the value that was provided on create.

func (*RefreshTokenUpsertOne) UpdateUpdatedAt

func (u *RefreshTokenUpsertOne) UpdateUpdatedAt() *RefreshTokenUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*RefreshTokenUpsertOne) UpdateUserAgent

func (u *RefreshTokenUpsertOne) UpdateUserAgent() *RefreshTokenUpsertOne

UpdateUserAgent sets the "user_agent" field to the value that was provided on create.

func (*RefreshTokenUpsertOne) UpdateUserID

func (u *RefreshTokenUpsertOne) UpdateUserID() *RefreshTokenUpsertOne

UpdateUserID sets the "user_id" field to the value that was provided on create.

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 ServiceAccount

type ServiceAccount struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Human-readable name
	Name string `json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// Unique identifier (e.g., mybot@myorg.serviceaccount.local)
	Email string `json:"email,omitempty"`
	// Organization this service account belongs to
	OrganizationID uuid.UUID `json:"organization_id,omitempty"`
	// User who created this service account
	CreatedBy uuid.UUID `json:"created_by,omitempty"`
	// Scopes this SA can request
	AllowedScopes []string `json:"allowed_scopes,omitempty"`
	// Active holds the value of the "active" field.
	Active bool `json:"active,omitempty"`
	// LastUsedAt holds the value of the "last_used_at" field.
	LastUsedAt *time.Time `json:"last_used_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ServiceAccountQuery when eager-loading is set.
	Edges ServiceAccountEdges `json:"edges"`
	// contains filtered or unexported fields
}

ServiceAccount is the model entity for the ServiceAccount schema.

func (*ServiceAccount) QueryCreator

func (_m *ServiceAccount) QueryCreator() *UserQuery

QueryCreator queries the "creator" edge of the ServiceAccount entity.

func (*ServiceAccount) QueryKeyPairs

func (_m *ServiceAccount) QueryKeyPairs() *ServiceAccountKeyPairQuery

QueryKeyPairs queries the "key_pairs" edge of the ServiceAccount entity.

func (*ServiceAccount) QueryOrganization

func (_m *ServiceAccount) QueryOrganization() *OrganizationQuery

QueryOrganization queries the "organization" edge of the ServiceAccount entity.

func (*ServiceAccount) String

func (_m *ServiceAccount) String() string

String implements the fmt.Stringer.

func (*ServiceAccount) Unwrap

func (_m *ServiceAccount) Unwrap() *ServiceAccount

Unwrap unwraps the ServiceAccount 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 (*ServiceAccount) Update

Update returns a builder for updating this ServiceAccount. Note that you need to call ServiceAccount.Unwrap() before calling this method if this ServiceAccount was returned from a transaction, and the transaction was committed or rolled back.

func (*ServiceAccount) Value

func (_m *ServiceAccount) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the ServiceAccount. This includes values selected through modifiers, order, etc.

type ServiceAccountClient

type ServiceAccountClient struct {
	// contains filtered or unexported fields
}

ServiceAccountClient is a client for the ServiceAccount schema.

func NewServiceAccountClient

func NewServiceAccountClient(c config) *ServiceAccountClient

NewServiceAccountClient returns a client for the ServiceAccount from the given config.

func (*ServiceAccountClient) Create

Create returns a builder for creating a ServiceAccount entity.

func (*ServiceAccountClient) CreateBulk

CreateBulk returns a builder for creating a bulk of ServiceAccount entities.

func (*ServiceAccountClient) Delete

Delete returns a delete builder for ServiceAccount.

func (*ServiceAccountClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ServiceAccountClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ServiceAccountClient) Get

Get returns a ServiceAccount entity by its id.

func (*ServiceAccountClient) GetX

GetX is like Get, but panics if an error occurs.

func (*ServiceAccountClient) Hooks

func (c *ServiceAccountClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ServiceAccountClient) Intercept

func (c *ServiceAccountClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `serviceaccount.Intercept(f(g(h())))`.

func (*ServiceAccountClient) Interceptors

func (c *ServiceAccountClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ServiceAccountClient) MapCreateBulk

func (c *ServiceAccountClient) MapCreateBulk(slice any, setFunc func(*ServiceAccountCreate, int)) *ServiceAccountCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*ServiceAccountClient) Query

Query returns a query builder for ServiceAccount.

func (*ServiceAccountClient) QueryCreator

func (c *ServiceAccountClient) QueryCreator(_m *ServiceAccount) *UserQuery

QueryCreator queries the creator edge of a ServiceAccount.

func (*ServiceAccountClient) QueryKeyPairs

QueryKeyPairs queries the key_pairs edge of a ServiceAccount.

func (*ServiceAccountClient) QueryOrganization

func (c *ServiceAccountClient) QueryOrganization(_m *ServiceAccount) *OrganizationQuery

QueryOrganization queries the organization edge of a ServiceAccount.

func (*ServiceAccountClient) Update

Update returns an update builder for ServiceAccount.

func (*ServiceAccountClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ServiceAccountClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*ServiceAccountClient) Use

func (c *ServiceAccountClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `serviceaccount.Hooks(f(g(h())))`.

type ServiceAccountCreate

type ServiceAccountCreate struct {
	// contains filtered or unexported fields
}

ServiceAccountCreate is the builder for creating a ServiceAccount entity.

func (*ServiceAccountCreate) AddKeyPairIDs

func (_c *ServiceAccountCreate) AddKeyPairIDs(ids ...uuid.UUID) *ServiceAccountCreate

AddKeyPairIDs adds the "key_pairs" edge to the ServiceAccountKeyPair entity by IDs.

func (*ServiceAccountCreate) AddKeyPairs

AddKeyPairs adds the "key_pairs" edges to the ServiceAccountKeyPair entity.

func (*ServiceAccountCreate) Exec

func (_c *ServiceAccountCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ServiceAccountCreate) ExecX

func (_c *ServiceAccountCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ServiceAccountCreate) Mutation

Mutation returns the ServiceAccountMutation object of the builder.

func (*ServiceAccountCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.ServiceAccount.Create().
	SetName(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ServiceAccountUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*ServiceAccountCreate) OnConflictColumns

func (_c *ServiceAccountCreate) OnConflictColumns(columns ...string) *ServiceAccountUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.ServiceAccount.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ServiceAccountCreate) Save

Save creates the ServiceAccount in the database.

func (*ServiceAccountCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*ServiceAccountCreate) SetActive

SetActive sets the "active" field.

func (*ServiceAccountCreate) SetAllowedScopes

func (_c *ServiceAccountCreate) SetAllowedScopes(v []string) *ServiceAccountCreate

SetAllowedScopes sets the "allowed_scopes" field.

func (*ServiceAccountCreate) SetCreatedAt

func (_c *ServiceAccountCreate) SetCreatedAt(v time.Time) *ServiceAccountCreate

SetCreatedAt sets the "created_at" field.

func (*ServiceAccountCreate) SetCreatedBy

func (_c *ServiceAccountCreate) SetCreatedBy(v uuid.UUID) *ServiceAccountCreate

SetCreatedBy sets the "created_by" field.

func (*ServiceAccountCreate) SetCreator

func (_c *ServiceAccountCreate) SetCreator(v *User) *ServiceAccountCreate

SetCreator sets the "creator" edge to the User entity.

func (*ServiceAccountCreate) SetCreatorID

func (_c *ServiceAccountCreate) SetCreatorID(id uuid.UUID) *ServiceAccountCreate

SetCreatorID sets the "creator" edge to the User entity by ID.

func (*ServiceAccountCreate) SetDescription

func (_c *ServiceAccountCreate) SetDescription(v string) *ServiceAccountCreate

SetDescription sets the "description" field.

func (*ServiceAccountCreate) SetEmail

SetEmail sets the "email" field.

func (*ServiceAccountCreate) SetID

SetID sets the "id" field.

func (*ServiceAccountCreate) SetLastUsedAt

func (_c *ServiceAccountCreate) SetLastUsedAt(v time.Time) *ServiceAccountCreate

SetLastUsedAt sets the "last_used_at" field.

func (*ServiceAccountCreate) SetName

SetName sets the "name" field.

func (*ServiceAccountCreate) SetNillableActive

func (_c *ServiceAccountCreate) SetNillableActive(v *bool) *ServiceAccountCreate

SetNillableActive sets the "active" field if the given value is not nil.

func (*ServiceAccountCreate) SetNillableCreatedAt

func (_c *ServiceAccountCreate) SetNillableCreatedAt(v *time.Time) *ServiceAccountCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ServiceAccountCreate) SetNillableDescription

func (_c *ServiceAccountCreate) SetNillableDescription(v *string) *ServiceAccountCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*ServiceAccountCreate) SetNillableID

func (_c *ServiceAccountCreate) SetNillableID(v *uuid.UUID) *ServiceAccountCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*ServiceAccountCreate) SetNillableLastUsedAt

func (_c *ServiceAccountCreate) SetNillableLastUsedAt(v *time.Time) *ServiceAccountCreate

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*ServiceAccountCreate) SetNillableUpdatedAt

func (_c *ServiceAccountCreate) SetNillableUpdatedAt(v *time.Time) *ServiceAccountCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*ServiceAccountCreate) SetOrganization

func (_c *ServiceAccountCreate) SetOrganization(v *Organization) *ServiceAccountCreate

SetOrganization sets the "organization" edge to the Organization entity.

func (*ServiceAccountCreate) SetOrganizationID

func (_c *ServiceAccountCreate) SetOrganizationID(v uuid.UUID) *ServiceAccountCreate

SetOrganizationID sets the "organization_id" field.

func (*ServiceAccountCreate) SetUpdatedAt

func (_c *ServiceAccountCreate) SetUpdatedAt(v time.Time) *ServiceAccountCreate

SetUpdatedAt sets the "updated_at" field.

type ServiceAccountCreateBulk

type ServiceAccountCreateBulk struct {
	// contains filtered or unexported fields
}

ServiceAccountCreateBulk is the builder for creating many ServiceAccount entities in bulk.

func (*ServiceAccountCreateBulk) Exec

Exec executes the query.

func (*ServiceAccountCreateBulk) ExecX

func (_c *ServiceAccountCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ServiceAccountCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.ServiceAccount.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ServiceAccountUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*ServiceAccountCreateBulk) OnConflictColumns

func (_c *ServiceAccountCreateBulk) OnConflictColumns(columns ...string) *ServiceAccountUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.ServiceAccount.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ServiceAccountCreateBulk) Save

Save creates the ServiceAccount entities in the database.

func (*ServiceAccountCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type ServiceAccountDelete

type ServiceAccountDelete struct {
	// contains filtered or unexported fields
}

ServiceAccountDelete is the builder for deleting a ServiceAccount entity.

func (*ServiceAccountDelete) Exec

func (_d *ServiceAccountDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ServiceAccountDelete) ExecX

func (_d *ServiceAccountDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ServiceAccountDelete) Where

Where appends a list predicates to the ServiceAccountDelete builder.

type ServiceAccountDeleteOne

type ServiceAccountDeleteOne struct {
	// contains filtered or unexported fields
}

ServiceAccountDeleteOne is the builder for deleting a single ServiceAccount entity.

func (*ServiceAccountDeleteOne) Exec

Exec executes the deletion query.

func (*ServiceAccountDeleteOne) ExecX

func (_d *ServiceAccountDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ServiceAccountDeleteOne) Where

Where appends a list predicates to the ServiceAccountDelete builder.

type ServiceAccountEdges

type ServiceAccountEdges struct {
	// Organization holds the value of the organization edge.
	Organization *Organization `json:"organization,omitempty"`
	// Creator holds the value of the creator edge.
	Creator *User `json:"creator,omitempty"`
	// KeyPairs holds the value of the key_pairs edge.
	KeyPairs []*ServiceAccountKeyPair `json:"key_pairs,omitempty"`
	// contains filtered or unexported fields
}

ServiceAccountEdges holds the relations/edges for other nodes in the graph.

func (ServiceAccountEdges) CreatorOrErr

func (e ServiceAccountEdges) CreatorOrErr() (*User, error)

CreatorOrErr returns the Creator value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ServiceAccountEdges) KeyPairsOrErr

func (e ServiceAccountEdges) KeyPairsOrErr() ([]*ServiceAccountKeyPair, error)

KeyPairsOrErr returns the KeyPairs value or an error if the edge was not loaded in eager-loading.

func (ServiceAccountEdges) OrganizationOrErr

func (e ServiceAccountEdges) OrganizationOrErr() (*Organization, error)

OrganizationOrErr returns the Organization value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type ServiceAccountFilter

type ServiceAccountFilter struct {
	// contains filtered or unexported fields
}

ServiceAccountFilter provides a generic filtering capability at runtime for ServiceAccountQuery.

func (*ServiceAccountFilter) Where

func (f *ServiceAccountFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*ServiceAccountFilter) WhereActive

func (f *ServiceAccountFilter) WhereActive(p entql.BoolP)

WhereActive applies the entql bool predicate on the active field.

func (*ServiceAccountFilter) WhereAllowedScopes

func (f *ServiceAccountFilter) WhereAllowedScopes(p entql.BytesP)

WhereAllowedScopes applies the entql json.RawMessage predicate on the allowed_scopes field.

func (*ServiceAccountFilter) WhereCreatedAt

func (f *ServiceAccountFilter) WhereCreatedAt(p entql.TimeP)

WhereCreatedAt applies the entql time.Time predicate on the created_at field.

func (*ServiceAccountFilter) WhereCreatedBy

func (f *ServiceAccountFilter) WhereCreatedBy(p entql.ValueP)

WhereCreatedBy applies the entql [16]byte predicate on the created_by field.

func (*ServiceAccountFilter) WhereDescription

func (f *ServiceAccountFilter) WhereDescription(p entql.StringP)

WhereDescription applies the entql string predicate on the description field.

func (*ServiceAccountFilter) WhereEmail

func (f *ServiceAccountFilter) WhereEmail(p entql.StringP)

WhereEmail applies the entql string predicate on the email field.

func (*ServiceAccountFilter) WhereHasCreator

func (f *ServiceAccountFilter) WhereHasCreator()

WhereHasCreator applies a predicate to check if query has an edge creator.

func (*ServiceAccountFilter) WhereHasCreatorWith

func (f *ServiceAccountFilter) WhereHasCreatorWith(preds ...predicate.User)

WhereHasCreatorWith applies a predicate to check if query has an edge creator with a given conditions (other predicates).

func (*ServiceAccountFilter) WhereHasKeyPairs

func (f *ServiceAccountFilter) WhereHasKeyPairs()

WhereHasKeyPairs applies a predicate to check if query has an edge key_pairs.

func (*ServiceAccountFilter) WhereHasKeyPairsWith

func (f *ServiceAccountFilter) WhereHasKeyPairsWith(preds ...predicate.ServiceAccountKeyPair)

WhereHasKeyPairsWith applies a predicate to check if query has an edge key_pairs with a given conditions (other predicates).

func (*ServiceAccountFilter) WhereHasOrganization

func (f *ServiceAccountFilter) WhereHasOrganization()

WhereHasOrganization applies a predicate to check if query has an edge organization.

func (*ServiceAccountFilter) WhereHasOrganizationWith

func (f *ServiceAccountFilter) WhereHasOrganizationWith(preds ...predicate.Organization)

WhereHasOrganizationWith applies a predicate to check if query has an edge organization with a given conditions (other predicates).

func (*ServiceAccountFilter) WhereID

func (f *ServiceAccountFilter) WhereID(p entql.ValueP)

WhereID applies the entql [16]byte predicate on the id field.

func (*ServiceAccountFilter) WhereLastUsedAt

func (f *ServiceAccountFilter) WhereLastUsedAt(p entql.TimeP)

WhereLastUsedAt applies the entql time.Time predicate on the last_used_at field.

func (*ServiceAccountFilter) WhereName

func (f *ServiceAccountFilter) WhereName(p entql.StringP)

WhereName applies the entql string predicate on the name field.

func (*ServiceAccountFilter) WhereOrganizationID

func (f *ServiceAccountFilter) WhereOrganizationID(p entql.ValueP)

WhereOrganizationID applies the entql [16]byte predicate on the organization_id field.

func (*ServiceAccountFilter) WhereUpdatedAt

func (f *ServiceAccountFilter) WhereUpdatedAt(p entql.TimeP)

WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.

type ServiceAccountGroupBy

type ServiceAccountGroupBy struct {
	// contains filtered or unexported fields
}

ServiceAccountGroupBy is the group-by builder for ServiceAccount entities.

func (*ServiceAccountGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*ServiceAccountGroupBy) Bool

func (s *ServiceAccountGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ServiceAccountGroupBy) BoolX

func (s *ServiceAccountGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ServiceAccountGroupBy) Bools

func (s *ServiceAccountGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ServiceAccountGroupBy) BoolsX

func (s *ServiceAccountGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ServiceAccountGroupBy) Float64

func (s *ServiceAccountGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ServiceAccountGroupBy) Float64X

func (s *ServiceAccountGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ServiceAccountGroupBy) Float64s

func (s *ServiceAccountGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ServiceAccountGroupBy) Float64sX

func (s *ServiceAccountGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ServiceAccountGroupBy) Int

func (s *ServiceAccountGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ServiceAccountGroupBy) IntX

func (s *ServiceAccountGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ServiceAccountGroupBy) Ints

func (s *ServiceAccountGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ServiceAccountGroupBy) IntsX

func (s *ServiceAccountGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ServiceAccountGroupBy) Scan

func (_g *ServiceAccountGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ServiceAccountGroupBy) ScanX

func (s *ServiceAccountGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ServiceAccountGroupBy) String

func (s *ServiceAccountGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ServiceAccountGroupBy) StringX

func (s *ServiceAccountGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ServiceAccountGroupBy) Strings

func (s *ServiceAccountGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ServiceAccountGroupBy) StringsX

func (s *ServiceAccountGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ServiceAccountKeyPair

type ServiceAccountKeyPair struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Service account this key belongs to
	ServiceAccountID uuid.UUID `json:"service_account_id,omitempty"`
	// Key ID for JWK 'kid' claim
	KeyID string `json:"key_id,omitempty"`
	// Key type: RSA or EC
	KeyType serviceaccountkeypair.KeyType `json:"key_type,omitempty"`
	// JWT signing algorithm
	Algorithm serviceaccountkeypair.Algorithm `json:"algorithm,omitempty"`
	// PEM-encoded public key for signature verification
	PublicKeyPem string `json:"public_key_pem,omitempty"`
	// When this key expires
	ExpiresAt *time.Time `json:"expires_at,omitempty"`
	// Active holds the value of the "active" field.
	Active bool `json:"active,omitempty"`
	// LastUsedAt holds the value of the "last_used_at" field.
	LastUsedAt *time.Time `json:"last_used_at,omitempty"`
	// Revoked holds the value of the "revoked" field.
	Revoked bool `json:"revoked,omitempty"`
	// RevokedAt holds the value of the "revoked_at" field.
	RevokedAt *time.Time `json:"revoked_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ServiceAccountKeyPairQuery when eager-loading is set.
	Edges ServiceAccountKeyPairEdges `json:"edges"`
	// contains filtered or unexported fields
}

ServiceAccountKeyPair is the model entity for the ServiceAccountKeyPair schema.

func (*ServiceAccountKeyPair) QueryServiceAccount

func (_m *ServiceAccountKeyPair) QueryServiceAccount() *ServiceAccountQuery

QueryServiceAccount queries the "service_account" edge of the ServiceAccountKeyPair entity.

func (*ServiceAccountKeyPair) String

func (_m *ServiceAccountKeyPair) String() string

String implements the fmt.Stringer.

func (*ServiceAccountKeyPair) Unwrap

Unwrap unwraps the ServiceAccountKeyPair 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 (*ServiceAccountKeyPair) Update

Update returns a builder for updating this ServiceAccountKeyPair. Note that you need to call ServiceAccountKeyPair.Unwrap() before calling this method if this ServiceAccountKeyPair was returned from a transaction, and the transaction was committed or rolled back.

func (*ServiceAccountKeyPair) Value

func (_m *ServiceAccountKeyPair) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the ServiceAccountKeyPair. This includes values selected through modifiers, order, etc.

type ServiceAccountKeyPairClient

type ServiceAccountKeyPairClient struct {
	// contains filtered or unexported fields
}

ServiceAccountKeyPairClient is a client for the ServiceAccountKeyPair schema.

func NewServiceAccountKeyPairClient

func NewServiceAccountKeyPairClient(c config) *ServiceAccountKeyPairClient

NewServiceAccountKeyPairClient returns a client for the ServiceAccountKeyPair from the given config.

func (*ServiceAccountKeyPairClient) Create

Create returns a builder for creating a ServiceAccountKeyPair entity.

func (*ServiceAccountKeyPairClient) CreateBulk

CreateBulk returns a builder for creating a bulk of ServiceAccountKeyPair entities.

func (*ServiceAccountKeyPairClient) Delete

Delete returns a delete builder for ServiceAccountKeyPair.

func (*ServiceAccountKeyPairClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ServiceAccountKeyPairClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ServiceAccountKeyPairClient) Get

Get returns a ServiceAccountKeyPair entity by its id.

func (*ServiceAccountKeyPairClient) GetX

GetX is like Get, but panics if an error occurs.

func (*ServiceAccountKeyPairClient) Hooks

func (c *ServiceAccountKeyPairClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ServiceAccountKeyPairClient) Intercept

func (c *ServiceAccountKeyPairClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `serviceaccountkeypair.Intercept(f(g(h())))`.

func (*ServiceAccountKeyPairClient) Interceptors

func (c *ServiceAccountKeyPairClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ServiceAccountKeyPairClient) MapCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*ServiceAccountKeyPairClient) Query

Query returns a query builder for ServiceAccountKeyPair.

func (*ServiceAccountKeyPairClient) QueryServiceAccount

QueryServiceAccount queries the service_account edge of a ServiceAccountKeyPair.

func (*ServiceAccountKeyPairClient) Update

Update returns an update builder for ServiceAccountKeyPair.

func (*ServiceAccountKeyPairClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ServiceAccountKeyPairClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*ServiceAccountKeyPairClient) Use

func (c *ServiceAccountKeyPairClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `serviceaccountkeypair.Hooks(f(g(h())))`.

type ServiceAccountKeyPairCreate

type ServiceAccountKeyPairCreate struct {
	// contains filtered or unexported fields
}

ServiceAccountKeyPairCreate is the builder for creating a ServiceAccountKeyPair entity.

func (*ServiceAccountKeyPairCreate) Exec

Exec executes the query.

func (*ServiceAccountKeyPairCreate) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*ServiceAccountKeyPairCreate) Mutation

Mutation returns the ServiceAccountKeyPairMutation object of the builder.

func (*ServiceAccountKeyPairCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.ServiceAccountKeyPair.Create().
	SetServiceAccountID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ServiceAccountKeyPairUpsert) {
		SetServiceAccountID(v+v).
	}).
	Exec(ctx)

func (*ServiceAccountKeyPairCreate) OnConflictColumns

func (_c *ServiceAccountKeyPairCreate) OnConflictColumns(columns ...string) *ServiceAccountKeyPairUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.ServiceAccountKeyPair.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ServiceAccountKeyPairCreate) Save

Save creates the ServiceAccountKeyPair in the database.

func (*ServiceAccountKeyPairCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*ServiceAccountKeyPairCreate) SetActive

SetActive sets the "active" field.

func (*ServiceAccountKeyPairCreate) SetAlgorithm

SetAlgorithm sets the "algorithm" field.

func (*ServiceAccountKeyPairCreate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*ServiceAccountKeyPairCreate) SetExpiresAt

SetExpiresAt sets the "expires_at" field.

func (*ServiceAccountKeyPairCreate) SetID

SetID sets the "id" field.

func (*ServiceAccountKeyPairCreate) SetKeyID

SetKeyID sets the "key_id" field.

func (*ServiceAccountKeyPairCreate) SetKeyType

SetKeyType sets the "key_type" field.

func (*ServiceAccountKeyPairCreate) SetLastUsedAt

SetLastUsedAt sets the "last_used_at" field.

func (*ServiceAccountKeyPairCreate) SetNillableActive

SetNillableActive sets the "active" field if the given value is not nil.

func (*ServiceAccountKeyPairCreate) SetNillableAlgorithm

SetNillableAlgorithm sets the "algorithm" field if the given value is not nil.

func (*ServiceAccountKeyPairCreate) SetNillableCreatedAt

func (_c *ServiceAccountKeyPairCreate) SetNillableCreatedAt(v *time.Time) *ServiceAccountKeyPairCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ServiceAccountKeyPairCreate) SetNillableExpiresAt

func (_c *ServiceAccountKeyPairCreate) SetNillableExpiresAt(v *time.Time) *ServiceAccountKeyPairCreate

SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.

func (*ServiceAccountKeyPairCreate) SetNillableID

SetNillableID sets the "id" field if the given value is not nil.

func (*ServiceAccountKeyPairCreate) SetNillableKeyType

SetNillableKeyType sets the "key_type" field if the given value is not nil.

func (*ServiceAccountKeyPairCreate) SetNillableLastUsedAt

func (_c *ServiceAccountKeyPairCreate) SetNillableLastUsedAt(v *time.Time) *ServiceAccountKeyPairCreate

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*ServiceAccountKeyPairCreate) SetNillableRevoked

func (_c *ServiceAccountKeyPairCreate) SetNillableRevoked(v *bool) *ServiceAccountKeyPairCreate

SetNillableRevoked sets the "revoked" field if the given value is not nil.

func (*ServiceAccountKeyPairCreate) SetNillableRevokedAt

func (_c *ServiceAccountKeyPairCreate) SetNillableRevokedAt(v *time.Time) *ServiceAccountKeyPairCreate

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*ServiceAccountKeyPairCreate) SetPublicKeyPem

SetPublicKeyPem sets the "public_key_pem" field.

func (*ServiceAccountKeyPairCreate) SetRevoked

SetRevoked sets the "revoked" field.

func (*ServiceAccountKeyPairCreate) SetRevokedAt

SetRevokedAt sets the "revoked_at" field.

func (*ServiceAccountKeyPairCreate) SetServiceAccount

SetServiceAccount sets the "service_account" edge to the ServiceAccount entity.

func (*ServiceAccountKeyPairCreate) SetServiceAccountID

SetServiceAccountID sets the "service_account_id" field.

type ServiceAccountKeyPairCreateBulk

type ServiceAccountKeyPairCreateBulk struct {
	// contains filtered or unexported fields
}

ServiceAccountKeyPairCreateBulk is the builder for creating many ServiceAccountKeyPair entities in bulk.

func (*ServiceAccountKeyPairCreateBulk) Exec

Exec executes the query.

func (*ServiceAccountKeyPairCreateBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*ServiceAccountKeyPairCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.ServiceAccountKeyPair.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ServiceAccountKeyPairUpsert) {
		SetServiceAccountID(v+v).
	}).
	Exec(ctx)

func (*ServiceAccountKeyPairCreateBulk) OnConflictColumns

func (_c *ServiceAccountKeyPairCreateBulk) OnConflictColumns(columns ...string) *ServiceAccountKeyPairUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.ServiceAccountKeyPair.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ServiceAccountKeyPairCreateBulk) Save

Save creates the ServiceAccountKeyPair entities in the database.

func (*ServiceAccountKeyPairCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type ServiceAccountKeyPairDelete

type ServiceAccountKeyPairDelete struct {
	// contains filtered or unexported fields
}

ServiceAccountKeyPairDelete is the builder for deleting a ServiceAccountKeyPair entity.

func (*ServiceAccountKeyPairDelete) Exec

Exec executes the deletion query and returns how many vertices were deleted.

func (*ServiceAccountKeyPairDelete) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*ServiceAccountKeyPairDelete) Where

Where appends a list predicates to the ServiceAccountKeyPairDelete builder.

type ServiceAccountKeyPairDeleteOne

type ServiceAccountKeyPairDeleteOne struct {
	// contains filtered or unexported fields
}

ServiceAccountKeyPairDeleteOne is the builder for deleting a single ServiceAccountKeyPair entity.

func (*ServiceAccountKeyPairDeleteOne) Exec

Exec executes the deletion query.

func (*ServiceAccountKeyPairDeleteOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*ServiceAccountKeyPairDeleteOne) Where

Where appends a list predicates to the ServiceAccountKeyPairDelete builder.

type ServiceAccountKeyPairEdges

type ServiceAccountKeyPairEdges struct {
	// ServiceAccount holds the value of the service_account edge.
	ServiceAccount *ServiceAccount `json:"service_account,omitempty"`
	// contains filtered or unexported fields
}

ServiceAccountKeyPairEdges holds the relations/edges for other nodes in the graph.

func (ServiceAccountKeyPairEdges) ServiceAccountOrErr

func (e ServiceAccountKeyPairEdges) ServiceAccountOrErr() (*ServiceAccount, error)

ServiceAccountOrErr returns the ServiceAccount value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type ServiceAccountKeyPairFilter

type ServiceAccountKeyPairFilter struct {
	// contains filtered or unexported fields
}

ServiceAccountKeyPairFilter provides a generic filtering capability at runtime for ServiceAccountKeyPairQuery.

func (*ServiceAccountKeyPairFilter) Where

func (f *ServiceAccountKeyPairFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*ServiceAccountKeyPairFilter) WhereActive

func (f *ServiceAccountKeyPairFilter) WhereActive(p entql.BoolP)

WhereActive applies the entql bool predicate on the active field.

func (*ServiceAccountKeyPairFilter) WhereAlgorithm

func (f *ServiceAccountKeyPairFilter) WhereAlgorithm(p entql.StringP)

WhereAlgorithm applies the entql string predicate on the algorithm field.

func (*ServiceAccountKeyPairFilter) WhereCreatedAt

func (f *ServiceAccountKeyPairFilter) WhereCreatedAt(p entql.TimeP)

WhereCreatedAt applies the entql time.Time predicate on the created_at field.

func (*ServiceAccountKeyPairFilter) WhereExpiresAt

func (f *ServiceAccountKeyPairFilter) WhereExpiresAt(p entql.TimeP)

WhereExpiresAt applies the entql time.Time predicate on the expires_at field.

func (*ServiceAccountKeyPairFilter) WhereHasServiceAccount

func (f *ServiceAccountKeyPairFilter) WhereHasServiceAccount()

WhereHasServiceAccount applies a predicate to check if query has an edge service_account.

func (*ServiceAccountKeyPairFilter) WhereHasServiceAccountWith

func (f *ServiceAccountKeyPairFilter) WhereHasServiceAccountWith(preds ...predicate.ServiceAccount)

WhereHasServiceAccountWith applies a predicate to check if query has an edge service_account with a given conditions (other predicates).

func (*ServiceAccountKeyPairFilter) WhereID

WhereID applies the entql [16]byte predicate on the id field.

func (*ServiceAccountKeyPairFilter) WhereKeyID

func (f *ServiceAccountKeyPairFilter) WhereKeyID(p entql.StringP)

WhereKeyID applies the entql string predicate on the key_id field.

func (*ServiceAccountKeyPairFilter) WhereKeyType

func (f *ServiceAccountKeyPairFilter) WhereKeyType(p entql.StringP)

WhereKeyType applies the entql string predicate on the key_type field.

func (*ServiceAccountKeyPairFilter) WhereLastUsedAt

func (f *ServiceAccountKeyPairFilter) WhereLastUsedAt(p entql.TimeP)

WhereLastUsedAt applies the entql time.Time predicate on the last_used_at field.

func (*ServiceAccountKeyPairFilter) WherePublicKeyPem

func (f *ServiceAccountKeyPairFilter) WherePublicKeyPem(p entql.StringP)

WherePublicKeyPem applies the entql string predicate on the public_key_pem field.

func (*ServiceAccountKeyPairFilter) WhereRevoked

func (f *ServiceAccountKeyPairFilter) WhereRevoked(p entql.BoolP)

WhereRevoked applies the entql bool predicate on the revoked field.

func (*ServiceAccountKeyPairFilter) WhereRevokedAt

func (f *ServiceAccountKeyPairFilter) WhereRevokedAt(p entql.TimeP)

WhereRevokedAt applies the entql time.Time predicate on the revoked_at field.

func (*ServiceAccountKeyPairFilter) WhereServiceAccountID

func (f *ServiceAccountKeyPairFilter) WhereServiceAccountID(p entql.ValueP)

WhereServiceAccountID applies the entql [16]byte predicate on the service_account_id field.

type ServiceAccountKeyPairGroupBy

type ServiceAccountKeyPairGroupBy struct {
	// contains filtered or unexported fields
}

ServiceAccountKeyPairGroupBy is the group-by builder for ServiceAccountKeyPair entities.

func (*ServiceAccountKeyPairGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*ServiceAccountKeyPairGroupBy) Bool

func (s *ServiceAccountKeyPairGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ServiceAccountKeyPairGroupBy) BoolX

func (s *ServiceAccountKeyPairGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ServiceAccountKeyPairGroupBy) Bools

func (s *ServiceAccountKeyPairGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ServiceAccountKeyPairGroupBy) BoolsX

func (s *ServiceAccountKeyPairGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ServiceAccountKeyPairGroupBy) Float64

func (s *ServiceAccountKeyPairGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ServiceAccountKeyPairGroupBy) Float64X

func (s *ServiceAccountKeyPairGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ServiceAccountKeyPairGroupBy) Float64s

func (s *ServiceAccountKeyPairGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ServiceAccountKeyPairGroupBy) Float64sX

func (s *ServiceAccountKeyPairGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ServiceAccountKeyPairGroupBy) Int

func (s *ServiceAccountKeyPairGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ServiceAccountKeyPairGroupBy) IntX

func (s *ServiceAccountKeyPairGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ServiceAccountKeyPairGroupBy) Ints

func (s *ServiceAccountKeyPairGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ServiceAccountKeyPairGroupBy) IntsX

func (s *ServiceAccountKeyPairGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ServiceAccountKeyPairGroupBy) Scan

Scan applies the selector query and scans the result into the given value.

func (*ServiceAccountKeyPairGroupBy) ScanX

func (s *ServiceAccountKeyPairGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ServiceAccountKeyPairGroupBy) String

func (s *ServiceAccountKeyPairGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ServiceAccountKeyPairGroupBy) StringX

func (s *ServiceAccountKeyPairGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ServiceAccountKeyPairGroupBy) Strings

func (s *ServiceAccountKeyPairGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ServiceAccountKeyPairGroupBy) StringsX

func (s *ServiceAccountKeyPairGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ServiceAccountKeyPairMutation

type ServiceAccountKeyPairMutation struct {
	// contains filtered or unexported fields
}

ServiceAccountKeyPairMutation represents an operation that mutates the ServiceAccountKeyPair nodes in the graph.

func (*ServiceAccountKeyPairMutation) Active

func (m *ServiceAccountKeyPairMutation) Active() (r bool, exists bool)

Active returns the value of the "active" field in the mutation.

func (*ServiceAccountKeyPairMutation) AddField

func (m *ServiceAccountKeyPairMutation) 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 (*ServiceAccountKeyPairMutation) AddedEdges

func (m *ServiceAccountKeyPairMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ServiceAccountKeyPairMutation) AddedField

func (m *ServiceAccountKeyPairMutation) 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 (*ServiceAccountKeyPairMutation) AddedFields

func (m *ServiceAccountKeyPairMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ServiceAccountKeyPairMutation) AddedIDs

func (m *ServiceAccountKeyPairMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ServiceAccountKeyPairMutation) Algorithm

Algorithm returns the value of the "algorithm" field in the mutation.

func (*ServiceAccountKeyPairMutation) ClearEdge

func (m *ServiceAccountKeyPairMutation) 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 (*ServiceAccountKeyPairMutation) ClearExpiresAt

func (m *ServiceAccountKeyPairMutation) ClearExpiresAt()

ClearExpiresAt clears the value of the "expires_at" field.

func (*ServiceAccountKeyPairMutation) ClearField

func (m *ServiceAccountKeyPairMutation) 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 (*ServiceAccountKeyPairMutation) ClearLastUsedAt

func (m *ServiceAccountKeyPairMutation) ClearLastUsedAt()

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*ServiceAccountKeyPairMutation) ClearRevokedAt

func (m *ServiceAccountKeyPairMutation) ClearRevokedAt()

ClearRevokedAt clears the value of the "revoked_at" field.

func (*ServiceAccountKeyPairMutation) ClearServiceAccount

func (m *ServiceAccountKeyPairMutation) ClearServiceAccount()

ClearServiceAccount clears the "service_account" edge to the ServiceAccount entity.

func (*ServiceAccountKeyPairMutation) ClearedEdges

func (m *ServiceAccountKeyPairMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ServiceAccountKeyPairMutation) ClearedFields

func (m *ServiceAccountKeyPairMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ServiceAccountKeyPairMutation) 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 (*ServiceAccountKeyPairMutation) CreatedAt

func (m *ServiceAccountKeyPairMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*ServiceAccountKeyPairMutation) EdgeCleared

func (m *ServiceAccountKeyPairMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ServiceAccountKeyPairMutation) ExpiresAt

func (m *ServiceAccountKeyPairMutation) ExpiresAt() (r time.Time, exists bool)

ExpiresAt returns the value of the "expires_at" field in the mutation.

func (*ServiceAccountKeyPairMutation) ExpiresAtCleared

func (m *ServiceAccountKeyPairMutation) ExpiresAtCleared() bool

ExpiresAtCleared returns if the "expires_at" field was cleared in this mutation.

func (*ServiceAccountKeyPairMutation) Field

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 (*ServiceAccountKeyPairMutation) FieldCleared

func (m *ServiceAccountKeyPairMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ServiceAccountKeyPairMutation) Fields

func (m *ServiceAccountKeyPairMutation) 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 (*ServiceAccountKeyPairMutation) Filter

Filter returns an entql.Where implementation to apply filters on the ServiceAccountKeyPairMutation builder.

func (*ServiceAccountKeyPairMutation) ID

func (m *ServiceAccountKeyPairMutation) ID() (id uuid.UUID, 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 (*ServiceAccountKeyPairMutation) 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 (*ServiceAccountKeyPairMutation) KeyID

func (m *ServiceAccountKeyPairMutation) KeyID() (r string, exists bool)

KeyID returns the value of the "key_id" field in the mutation.

func (*ServiceAccountKeyPairMutation) KeyType

KeyType returns the value of the "key_type" field in the mutation.

func (*ServiceAccountKeyPairMutation) LastUsedAt

func (m *ServiceAccountKeyPairMutation) LastUsedAt() (r time.Time, exists bool)

LastUsedAt returns the value of the "last_used_at" field in the mutation.

func (*ServiceAccountKeyPairMutation) LastUsedAtCleared

func (m *ServiceAccountKeyPairMutation) LastUsedAtCleared() bool

LastUsedAtCleared returns if the "last_used_at" field was cleared in this mutation.

func (*ServiceAccountKeyPairMutation) OldActive

func (m *ServiceAccountKeyPairMutation) OldActive(ctx context.Context) (v bool, err error)

OldActive returns the old "active" field's value of the ServiceAccountKeyPair entity. If the ServiceAccountKeyPair 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 (*ServiceAccountKeyPairMutation) OldAlgorithm

OldAlgorithm returns the old "algorithm" field's value of the ServiceAccountKeyPair entity. If the ServiceAccountKeyPair 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 (*ServiceAccountKeyPairMutation) OldCreatedAt

func (m *ServiceAccountKeyPairMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the ServiceAccountKeyPair entity. If the ServiceAccountKeyPair 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 (*ServiceAccountKeyPairMutation) OldExpiresAt

func (m *ServiceAccountKeyPairMutation) OldExpiresAt(ctx context.Context) (v *time.Time, err error)

OldExpiresAt returns the old "expires_at" field's value of the ServiceAccountKeyPair entity. If the ServiceAccountKeyPair 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 (*ServiceAccountKeyPairMutation) OldField

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 (*ServiceAccountKeyPairMutation) OldKeyID

func (m *ServiceAccountKeyPairMutation) OldKeyID(ctx context.Context) (v string, err error)

OldKeyID returns the old "key_id" field's value of the ServiceAccountKeyPair entity. If the ServiceAccountKeyPair 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 (*ServiceAccountKeyPairMutation) OldKeyType

OldKeyType returns the old "key_type" field's value of the ServiceAccountKeyPair entity. If the ServiceAccountKeyPair 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 (*ServiceAccountKeyPairMutation) OldLastUsedAt

func (m *ServiceAccountKeyPairMutation) OldLastUsedAt(ctx context.Context) (v *time.Time, err error)

OldLastUsedAt returns the old "last_used_at" field's value of the ServiceAccountKeyPair entity. If the ServiceAccountKeyPair 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 (*ServiceAccountKeyPairMutation) OldPublicKeyPem

func (m *ServiceAccountKeyPairMutation) OldPublicKeyPem(ctx context.Context) (v string, err error)

OldPublicKeyPem returns the old "public_key_pem" field's value of the ServiceAccountKeyPair entity. If the ServiceAccountKeyPair 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 (*ServiceAccountKeyPairMutation) OldRevoked

func (m *ServiceAccountKeyPairMutation) OldRevoked(ctx context.Context) (v bool, err error)

OldRevoked returns the old "revoked" field's value of the ServiceAccountKeyPair entity. If the ServiceAccountKeyPair 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 (*ServiceAccountKeyPairMutation) OldRevokedAt

func (m *ServiceAccountKeyPairMutation) OldRevokedAt(ctx context.Context) (v *time.Time, err error)

OldRevokedAt returns the old "revoked_at" field's value of the ServiceAccountKeyPair entity. If the ServiceAccountKeyPair 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 (*ServiceAccountKeyPairMutation) OldServiceAccountID

func (m *ServiceAccountKeyPairMutation) OldServiceAccountID(ctx context.Context) (v uuid.UUID, err error)

OldServiceAccountID returns the old "service_account_id" field's value of the ServiceAccountKeyPair entity. If the ServiceAccountKeyPair 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 (*ServiceAccountKeyPairMutation) Op

Op returns the operation name.

func (*ServiceAccountKeyPairMutation) PublicKeyPem

func (m *ServiceAccountKeyPairMutation) PublicKeyPem() (r string, exists bool)

PublicKeyPem returns the value of the "public_key_pem" field in the mutation.

func (*ServiceAccountKeyPairMutation) RemovedEdges

func (m *ServiceAccountKeyPairMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ServiceAccountKeyPairMutation) RemovedIDs

func (m *ServiceAccountKeyPairMutation) 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 (*ServiceAccountKeyPairMutation) ResetActive

func (m *ServiceAccountKeyPairMutation) ResetActive()

ResetActive resets all changes to the "active" field.

func (*ServiceAccountKeyPairMutation) ResetAlgorithm

func (m *ServiceAccountKeyPairMutation) ResetAlgorithm()

ResetAlgorithm resets all changes to the "algorithm" field.

func (*ServiceAccountKeyPairMutation) ResetCreatedAt

func (m *ServiceAccountKeyPairMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ServiceAccountKeyPairMutation) ResetEdge

func (m *ServiceAccountKeyPairMutation) 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 (*ServiceAccountKeyPairMutation) ResetExpiresAt

func (m *ServiceAccountKeyPairMutation) ResetExpiresAt()

ResetExpiresAt resets all changes to the "expires_at" field.

func (*ServiceAccountKeyPairMutation) ResetField

func (m *ServiceAccountKeyPairMutation) 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 (*ServiceAccountKeyPairMutation) ResetKeyID

func (m *ServiceAccountKeyPairMutation) ResetKeyID()

ResetKeyID resets all changes to the "key_id" field.

func (*ServiceAccountKeyPairMutation) ResetKeyType

func (m *ServiceAccountKeyPairMutation) ResetKeyType()

ResetKeyType resets all changes to the "key_type" field.

func (*ServiceAccountKeyPairMutation) ResetLastUsedAt

func (m *ServiceAccountKeyPairMutation) ResetLastUsedAt()

ResetLastUsedAt resets all changes to the "last_used_at" field.

func (*ServiceAccountKeyPairMutation) ResetPublicKeyPem

func (m *ServiceAccountKeyPairMutation) ResetPublicKeyPem()

ResetPublicKeyPem resets all changes to the "public_key_pem" field.

func (*ServiceAccountKeyPairMutation) ResetRevoked

func (m *ServiceAccountKeyPairMutation) ResetRevoked()

ResetRevoked resets all changes to the "revoked" field.

func (*ServiceAccountKeyPairMutation) ResetRevokedAt

func (m *ServiceAccountKeyPairMutation) ResetRevokedAt()

ResetRevokedAt resets all changes to the "revoked_at" field.

func (*ServiceAccountKeyPairMutation) ResetServiceAccount

func (m *ServiceAccountKeyPairMutation) ResetServiceAccount()

ResetServiceAccount resets all changes to the "service_account" edge.

func (*ServiceAccountKeyPairMutation) ResetServiceAccountID

func (m *ServiceAccountKeyPairMutation) ResetServiceAccountID()

ResetServiceAccountID resets all changes to the "service_account_id" field.

func (*ServiceAccountKeyPairMutation) Revoked

func (m *ServiceAccountKeyPairMutation) Revoked() (r bool, exists bool)

Revoked returns the value of the "revoked" field in the mutation.

func (*ServiceAccountKeyPairMutation) RevokedAt

func (m *ServiceAccountKeyPairMutation) RevokedAt() (r time.Time, exists bool)

RevokedAt returns the value of the "revoked_at" field in the mutation.

func (*ServiceAccountKeyPairMutation) RevokedAtCleared

func (m *ServiceAccountKeyPairMutation) RevokedAtCleared() bool

RevokedAtCleared returns if the "revoked_at" field was cleared in this mutation.

func (*ServiceAccountKeyPairMutation) ServiceAccountCleared

func (m *ServiceAccountKeyPairMutation) ServiceAccountCleared() bool

ServiceAccountCleared reports if the "service_account" edge to the ServiceAccount entity was cleared.

func (*ServiceAccountKeyPairMutation) ServiceAccountID

func (m *ServiceAccountKeyPairMutation) ServiceAccountID() (r uuid.UUID, exists bool)

ServiceAccountID returns the value of the "service_account_id" field in the mutation.

func (*ServiceAccountKeyPairMutation) ServiceAccountIDs

func (m *ServiceAccountKeyPairMutation) ServiceAccountIDs() (ids []uuid.UUID)

ServiceAccountIDs returns the "service_account" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ServiceAccountID instead. It exists only for internal usage by the builders.

func (*ServiceAccountKeyPairMutation) SetActive

func (m *ServiceAccountKeyPairMutation) SetActive(b bool)

SetActive sets the "active" field.

func (*ServiceAccountKeyPairMutation) SetAlgorithm

SetAlgorithm sets the "algorithm" field.

func (*ServiceAccountKeyPairMutation) SetCreatedAt

func (m *ServiceAccountKeyPairMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*ServiceAccountKeyPairMutation) SetExpiresAt

func (m *ServiceAccountKeyPairMutation) SetExpiresAt(t time.Time)

SetExpiresAt sets the "expires_at" field.

func (*ServiceAccountKeyPairMutation) SetField

func (m *ServiceAccountKeyPairMutation) 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 (*ServiceAccountKeyPairMutation) SetID

SetID sets the value of the id field. Note that this operation is only accepted on creation of ServiceAccountKeyPair entities.

func (*ServiceAccountKeyPairMutation) SetKeyID

func (m *ServiceAccountKeyPairMutation) SetKeyID(s string)

SetKeyID sets the "key_id" field.

func (*ServiceAccountKeyPairMutation) SetKeyType

SetKeyType sets the "key_type" field.

func (*ServiceAccountKeyPairMutation) SetLastUsedAt

func (m *ServiceAccountKeyPairMutation) SetLastUsedAt(t time.Time)

SetLastUsedAt sets the "last_used_at" field.

func (*ServiceAccountKeyPairMutation) SetOp

func (m *ServiceAccountKeyPairMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ServiceAccountKeyPairMutation) SetPublicKeyPem

func (m *ServiceAccountKeyPairMutation) SetPublicKeyPem(s string)

SetPublicKeyPem sets the "public_key_pem" field.

func (*ServiceAccountKeyPairMutation) SetRevoked

func (m *ServiceAccountKeyPairMutation) SetRevoked(b bool)

SetRevoked sets the "revoked" field.

func (*ServiceAccountKeyPairMutation) SetRevokedAt

func (m *ServiceAccountKeyPairMutation) SetRevokedAt(t time.Time)

SetRevokedAt sets the "revoked_at" field.

func (*ServiceAccountKeyPairMutation) SetServiceAccountID

func (m *ServiceAccountKeyPairMutation) SetServiceAccountID(u uuid.UUID)

SetServiceAccountID sets the "service_account_id" field.

func (ServiceAccountKeyPairMutation) Tx

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ServiceAccountKeyPairMutation) Type

Type returns the node type of this mutation (ServiceAccountKeyPair).

func (*ServiceAccountKeyPairMutation) Where

Where appends a list predicates to the ServiceAccountKeyPairMutation builder.

func (*ServiceAccountKeyPairMutation) WhereP

func (m *ServiceAccountKeyPairMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ServiceAccountKeyPairMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ServiceAccountKeyPairQuery

type ServiceAccountKeyPairQuery struct {
	// contains filtered or unexported fields
}

ServiceAccountKeyPairQuery is the builder for querying ServiceAccountKeyPair entities.

func (*ServiceAccountKeyPairQuery) Aggregate

Aggregate returns a ServiceAccountKeyPairSelect configured with the given aggregations.

func (*ServiceAccountKeyPairQuery) All

All executes the query and returns a list of ServiceAccountKeyPairs.

func (*ServiceAccountKeyPairQuery) AllX

AllX is like All, but panics if an error occurs.

func (*ServiceAccountKeyPairQuery) Clone

Clone returns a duplicate of the ServiceAccountKeyPairQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ServiceAccountKeyPairQuery) Count

Count returns the count of the given query.

func (*ServiceAccountKeyPairQuery) CountX

CountX is like Count, but panics if an error occurs.

func (*ServiceAccountKeyPairQuery) Exist

Exist returns true if the query has elements in the graph.

func (*ServiceAccountKeyPairQuery) ExistX

ExistX is like Exist, but panics if an error occurs.

func (*ServiceAccountKeyPairQuery) Filter

Filter returns a Filter implementation to apply filters on the ServiceAccountKeyPairQuery builder.

func (*ServiceAccountKeyPairQuery) First

First returns the first ServiceAccountKeyPair entity from the query. Returns a *NotFoundError when no ServiceAccountKeyPair was found.

func (*ServiceAccountKeyPairQuery) FirstID

func (_q *ServiceAccountKeyPairQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first ServiceAccountKeyPair ID from the query. Returns a *NotFoundError when no ServiceAccountKeyPair ID was found.

func (*ServiceAccountKeyPairQuery) FirstIDX

FirstIDX is like FirstID, but panics if an error occurs.

func (*ServiceAccountKeyPairQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*ServiceAccountKeyPairQuery) GroupBy

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 {
	ServiceAccountID uuid.UUID `json:"service_account_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.ServiceAccountKeyPair.Query().
	GroupBy(serviceaccountkeypair.FieldServiceAccountID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ServiceAccountKeyPairQuery) IDs

func (_q *ServiceAccountKeyPairQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of ServiceAccountKeyPair IDs.

func (*ServiceAccountKeyPairQuery) IDsX

IDsX is like IDs, but panics if an error occurs.

func (*ServiceAccountKeyPairQuery) Limit

Limit the number of records to be returned by this query.

func (*ServiceAccountKeyPairQuery) Offset

Offset to start from.

func (*ServiceAccountKeyPairQuery) Only

Only returns a single ServiceAccountKeyPair entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ServiceAccountKeyPair entity is found. Returns a *NotFoundError when no ServiceAccountKeyPair entities are found.

func (*ServiceAccountKeyPairQuery) OnlyID

func (_q *ServiceAccountKeyPairQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only ServiceAccountKeyPair ID in the query. Returns a *NotSingularError when more than one ServiceAccountKeyPair ID is found. Returns a *NotFoundError when no entities are found.

func (*ServiceAccountKeyPairQuery) OnlyIDX

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ServiceAccountKeyPairQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*ServiceAccountKeyPairQuery) Order

Order specifies how the records should be ordered.

func (*ServiceAccountKeyPairQuery) QueryServiceAccount

func (_q *ServiceAccountKeyPairQuery) QueryServiceAccount() *ServiceAccountQuery

QueryServiceAccount chains the current query on the "service_account" edge.

func (*ServiceAccountKeyPairQuery) Select

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 {
	ServiceAccountID uuid.UUID `json:"service_account_id,omitempty"`
}

client.ServiceAccountKeyPair.Query().
	Select(serviceaccountkeypair.FieldServiceAccountID).
	Scan(ctx, &v)

func (*ServiceAccountKeyPairQuery) Unique

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 (*ServiceAccountKeyPairQuery) Where

Where adds a new predicate for the ServiceAccountKeyPairQuery builder.

func (*ServiceAccountKeyPairQuery) WithServiceAccount

func (_q *ServiceAccountKeyPairQuery) WithServiceAccount(opts ...func(*ServiceAccountQuery)) *ServiceAccountKeyPairQuery

WithServiceAccount tells the query-builder to eager-load the nodes that are connected to the "service_account" edge. The optional arguments are used to configure the query builder of the edge.

type ServiceAccountKeyPairSelect

type ServiceAccountKeyPairSelect struct {
	*ServiceAccountKeyPairQuery
	// contains filtered or unexported fields
}

ServiceAccountKeyPairSelect is the builder for selecting fields of ServiceAccountKeyPair entities.

func (*ServiceAccountKeyPairSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*ServiceAccountKeyPairSelect) Bool

func (s *ServiceAccountKeyPairSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ServiceAccountKeyPairSelect) BoolX

func (s *ServiceAccountKeyPairSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ServiceAccountKeyPairSelect) Bools

func (s *ServiceAccountKeyPairSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ServiceAccountKeyPairSelect) BoolsX

func (s *ServiceAccountKeyPairSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ServiceAccountKeyPairSelect) Float64

func (s *ServiceAccountKeyPairSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ServiceAccountKeyPairSelect) Float64X

func (s *ServiceAccountKeyPairSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ServiceAccountKeyPairSelect) Float64s

func (s *ServiceAccountKeyPairSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ServiceAccountKeyPairSelect) Float64sX

func (s *ServiceAccountKeyPairSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ServiceAccountKeyPairSelect) Int

func (s *ServiceAccountKeyPairSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ServiceAccountKeyPairSelect) IntX

func (s *ServiceAccountKeyPairSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ServiceAccountKeyPairSelect) Ints

func (s *ServiceAccountKeyPairSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ServiceAccountKeyPairSelect) IntsX

func (s *ServiceAccountKeyPairSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ServiceAccountKeyPairSelect) Scan

Scan applies the selector query and scans the result into the given value.

func (*ServiceAccountKeyPairSelect) ScanX

func (s *ServiceAccountKeyPairSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ServiceAccountKeyPairSelect) String

func (s *ServiceAccountKeyPairSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ServiceAccountKeyPairSelect) StringX

func (s *ServiceAccountKeyPairSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ServiceAccountKeyPairSelect) Strings

func (s *ServiceAccountKeyPairSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ServiceAccountKeyPairSelect) StringsX

func (s *ServiceAccountKeyPairSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ServiceAccountKeyPairUpdate

type ServiceAccountKeyPairUpdate struct {
	// contains filtered or unexported fields
}

ServiceAccountKeyPairUpdate is the builder for updating ServiceAccountKeyPair entities.

func (*ServiceAccountKeyPairUpdate) ClearExpiresAt

ClearExpiresAt clears the value of the "expires_at" field.

func (*ServiceAccountKeyPairUpdate) ClearLastUsedAt

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*ServiceAccountKeyPairUpdate) ClearRevokedAt

ClearRevokedAt clears the value of the "revoked_at" field.

func (*ServiceAccountKeyPairUpdate) ClearServiceAccount

func (_u *ServiceAccountKeyPairUpdate) ClearServiceAccount() *ServiceAccountKeyPairUpdate

ClearServiceAccount clears the "service_account" edge to the ServiceAccount entity.

func (*ServiceAccountKeyPairUpdate) Exec

Exec executes the query.

func (*ServiceAccountKeyPairUpdate) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*ServiceAccountKeyPairUpdate) Mutation

Mutation returns the ServiceAccountKeyPairMutation object of the builder.

func (*ServiceAccountKeyPairUpdate) Save

Save executes the query and returns the number of nodes affected by the update operation.

func (*ServiceAccountKeyPairUpdate) SaveX

SaveX is like Save, but panics if an error occurs.

func (*ServiceAccountKeyPairUpdate) SetActive

SetActive sets the "active" field.

func (*ServiceAccountKeyPairUpdate) SetAlgorithm

SetAlgorithm sets the "algorithm" field.

func (*ServiceAccountKeyPairUpdate) SetExpiresAt

SetExpiresAt sets the "expires_at" field.

func (*ServiceAccountKeyPairUpdate) SetKeyID

SetKeyID sets the "key_id" field.

func (*ServiceAccountKeyPairUpdate) SetKeyType

SetKeyType sets the "key_type" field.

func (*ServiceAccountKeyPairUpdate) SetLastUsedAt

SetLastUsedAt sets the "last_used_at" field.

func (*ServiceAccountKeyPairUpdate) SetNillableActive

SetNillableActive sets the "active" field if the given value is not nil.

func (*ServiceAccountKeyPairUpdate) SetNillableAlgorithm

SetNillableAlgorithm sets the "algorithm" field if the given value is not nil.

func (*ServiceAccountKeyPairUpdate) SetNillableExpiresAt

func (_u *ServiceAccountKeyPairUpdate) SetNillableExpiresAt(v *time.Time) *ServiceAccountKeyPairUpdate

SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.

func (*ServiceAccountKeyPairUpdate) SetNillableKeyID

SetNillableKeyID sets the "key_id" field if the given value is not nil.

func (*ServiceAccountKeyPairUpdate) SetNillableKeyType

SetNillableKeyType sets the "key_type" field if the given value is not nil.

func (*ServiceAccountKeyPairUpdate) SetNillableLastUsedAt

func (_u *ServiceAccountKeyPairUpdate) SetNillableLastUsedAt(v *time.Time) *ServiceAccountKeyPairUpdate

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*ServiceAccountKeyPairUpdate) SetNillablePublicKeyPem

func (_u *ServiceAccountKeyPairUpdate) SetNillablePublicKeyPem(v *string) *ServiceAccountKeyPairUpdate

SetNillablePublicKeyPem sets the "public_key_pem" field if the given value is not nil.

func (*ServiceAccountKeyPairUpdate) SetNillableRevoked

func (_u *ServiceAccountKeyPairUpdate) SetNillableRevoked(v *bool) *ServiceAccountKeyPairUpdate

SetNillableRevoked sets the "revoked" field if the given value is not nil.

func (*ServiceAccountKeyPairUpdate) SetNillableRevokedAt

func (_u *ServiceAccountKeyPairUpdate) SetNillableRevokedAt(v *time.Time) *ServiceAccountKeyPairUpdate

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*ServiceAccountKeyPairUpdate) SetNillableServiceAccountID

func (_u *ServiceAccountKeyPairUpdate) SetNillableServiceAccountID(v *uuid.UUID) *ServiceAccountKeyPairUpdate

SetNillableServiceAccountID sets the "service_account_id" field if the given value is not nil.

func (*ServiceAccountKeyPairUpdate) SetPublicKeyPem

SetPublicKeyPem sets the "public_key_pem" field.

func (*ServiceAccountKeyPairUpdate) SetRevoked

SetRevoked sets the "revoked" field.

func (*ServiceAccountKeyPairUpdate) SetRevokedAt

SetRevokedAt sets the "revoked_at" field.

func (*ServiceAccountKeyPairUpdate) SetServiceAccount

SetServiceAccount sets the "service_account" edge to the ServiceAccount entity.

func (*ServiceAccountKeyPairUpdate) SetServiceAccountID

SetServiceAccountID sets the "service_account_id" field.

func (*ServiceAccountKeyPairUpdate) Where

Where appends a list predicates to the ServiceAccountKeyPairUpdate builder.

type ServiceAccountKeyPairUpdateOne

type ServiceAccountKeyPairUpdateOne struct {
	// contains filtered or unexported fields
}

ServiceAccountKeyPairUpdateOne is the builder for updating a single ServiceAccountKeyPair entity.

func (*ServiceAccountKeyPairUpdateOne) ClearExpiresAt

ClearExpiresAt clears the value of the "expires_at" field.

func (*ServiceAccountKeyPairUpdateOne) ClearLastUsedAt

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*ServiceAccountKeyPairUpdateOne) ClearRevokedAt

ClearRevokedAt clears the value of the "revoked_at" field.

func (*ServiceAccountKeyPairUpdateOne) ClearServiceAccount

ClearServiceAccount clears the "service_account" edge to the ServiceAccount entity.

func (*ServiceAccountKeyPairUpdateOne) Exec

Exec executes the query on the entity.

func (*ServiceAccountKeyPairUpdateOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*ServiceAccountKeyPairUpdateOne) Mutation

Mutation returns the ServiceAccountKeyPairMutation object of the builder.

func (*ServiceAccountKeyPairUpdateOne) Save

Save executes the query and returns the updated ServiceAccountKeyPair entity.

func (*ServiceAccountKeyPairUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*ServiceAccountKeyPairUpdateOne) Select

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ServiceAccountKeyPairUpdateOne) SetActive

SetActive sets the "active" field.

func (*ServiceAccountKeyPairUpdateOne) SetAlgorithm

SetAlgorithm sets the "algorithm" field.

func (*ServiceAccountKeyPairUpdateOne) SetExpiresAt

SetExpiresAt sets the "expires_at" field.

func (*ServiceAccountKeyPairUpdateOne) SetKeyID

SetKeyID sets the "key_id" field.

func (*ServiceAccountKeyPairUpdateOne) SetKeyType

SetKeyType sets the "key_type" field.

func (*ServiceAccountKeyPairUpdateOne) SetLastUsedAt

SetLastUsedAt sets the "last_used_at" field.

func (*ServiceAccountKeyPairUpdateOne) SetNillableActive

SetNillableActive sets the "active" field if the given value is not nil.

func (*ServiceAccountKeyPairUpdateOne) SetNillableAlgorithm

SetNillableAlgorithm sets the "algorithm" field if the given value is not nil.

func (*ServiceAccountKeyPairUpdateOne) SetNillableExpiresAt

SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.

func (*ServiceAccountKeyPairUpdateOne) SetNillableKeyID

SetNillableKeyID sets the "key_id" field if the given value is not nil.

func (*ServiceAccountKeyPairUpdateOne) SetNillableKeyType

SetNillableKeyType sets the "key_type" field if the given value is not nil.

func (*ServiceAccountKeyPairUpdateOne) SetNillableLastUsedAt

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*ServiceAccountKeyPairUpdateOne) SetNillablePublicKeyPem

func (_u *ServiceAccountKeyPairUpdateOne) SetNillablePublicKeyPem(v *string) *ServiceAccountKeyPairUpdateOne

SetNillablePublicKeyPem sets the "public_key_pem" field if the given value is not nil.

func (*ServiceAccountKeyPairUpdateOne) SetNillableRevoked

SetNillableRevoked sets the "revoked" field if the given value is not nil.

func (*ServiceAccountKeyPairUpdateOne) SetNillableRevokedAt

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*ServiceAccountKeyPairUpdateOne) SetNillableServiceAccountID

func (_u *ServiceAccountKeyPairUpdateOne) SetNillableServiceAccountID(v *uuid.UUID) *ServiceAccountKeyPairUpdateOne

SetNillableServiceAccountID sets the "service_account_id" field if the given value is not nil.

func (*ServiceAccountKeyPairUpdateOne) SetPublicKeyPem

SetPublicKeyPem sets the "public_key_pem" field.

func (*ServiceAccountKeyPairUpdateOne) SetRevoked

SetRevoked sets the "revoked" field.

func (*ServiceAccountKeyPairUpdateOne) SetRevokedAt

SetRevokedAt sets the "revoked_at" field.

func (*ServiceAccountKeyPairUpdateOne) SetServiceAccount

SetServiceAccount sets the "service_account" edge to the ServiceAccount entity.

func (*ServiceAccountKeyPairUpdateOne) SetServiceAccountID

SetServiceAccountID sets the "service_account_id" field.

func (*ServiceAccountKeyPairUpdateOne) Where

Where appends a list predicates to the ServiceAccountKeyPairUpdate builder.

type ServiceAccountKeyPairUpsert

type ServiceAccountKeyPairUpsert struct {
	*sql.UpdateSet
}

ServiceAccountKeyPairUpsert is the "OnConflict" setter.

func (*ServiceAccountKeyPairUpsert) ClearExpiresAt

ClearExpiresAt clears the value of the "expires_at" field.

func (*ServiceAccountKeyPairUpsert) ClearLastUsedAt

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*ServiceAccountKeyPairUpsert) ClearRevokedAt

ClearRevokedAt clears the value of the "revoked_at" field.

func (*ServiceAccountKeyPairUpsert) SetActive

SetActive sets the "active" field.

func (*ServiceAccountKeyPairUpsert) SetAlgorithm

SetAlgorithm sets the "algorithm" field.

func (*ServiceAccountKeyPairUpsert) SetExpiresAt

SetExpiresAt sets the "expires_at" field.

func (*ServiceAccountKeyPairUpsert) SetKeyID

SetKeyID sets the "key_id" field.

func (*ServiceAccountKeyPairUpsert) SetKeyType

SetKeyType sets the "key_type" field.

func (*ServiceAccountKeyPairUpsert) SetLastUsedAt

SetLastUsedAt sets the "last_used_at" field.

func (*ServiceAccountKeyPairUpsert) SetPublicKeyPem

SetPublicKeyPem sets the "public_key_pem" field.

func (*ServiceAccountKeyPairUpsert) SetRevoked

SetRevoked sets the "revoked" field.

func (*ServiceAccountKeyPairUpsert) SetRevokedAt

SetRevokedAt sets the "revoked_at" field.

func (*ServiceAccountKeyPairUpsert) SetServiceAccountID

SetServiceAccountID sets the "service_account_id" field.

func (*ServiceAccountKeyPairUpsert) UpdateActive

UpdateActive sets the "active" field to the value that was provided on create.

func (*ServiceAccountKeyPairUpsert) UpdateAlgorithm

UpdateAlgorithm sets the "algorithm" field to the value that was provided on create.

func (*ServiceAccountKeyPairUpsert) UpdateExpiresAt

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*ServiceAccountKeyPairUpsert) UpdateKeyID

UpdateKeyID sets the "key_id" field to the value that was provided on create.

func (*ServiceAccountKeyPairUpsert) UpdateKeyType

UpdateKeyType sets the "key_type" field to the value that was provided on create.

func (*ServiceAccountKeyPairUpsert) UpdateLastUsedAt

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*ServiceAccountKeyPairUpsert) UpdatePublicKeyPem

UpdatePublicKeyPem sets the "public_key_pem" field to the value that was provided on create.

func (*ServiceAccountKeyPairUpsert) UpdateRevoked

UpdateRevoked sets the "revoked" field to the value that was provided on create.

func (*ServiceAccountKeyPairUpsert) UpdateRevokedAt

UpdateRevokedAt sets the "revoked_at" field to the value that was provided on create.

func (*ServiceAccountKeyPairUpsert) UpdateServiceAccountID

func (u *ServiceAccountKeyPairUpsert) UpdateServiceAccountID() *ServiceAccountKeyPairUpsert

UpdateServiceAccountID sets the "service_account_id" field to the value that was provided on create.

type ServiceAccountKeyPairUpsertBulk

type ServiceAccountKeyPairUpsertBulk struct {
	// contains filtered or unexported fields
}

ServiceAccountKeyPairUpsertBulk is the builder for "upsert"-ing a bulk of ServiceAccountKeyPair nodes.

func (*ServiceAccountKeyPairUpsertBulk) ClearExpiresAt

ClearExpiresAt clears the value of the "expires_at" field.

func (*ServiceAccountKeyPairUpsertBulk) ClearLastUsedAt

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*ServiceAccountKeyPairUpsertBulk) ClearRevokedAt

ClearRevokedAt clears the value of the "revoked_at" field.

func (*ServiceAccountKeyPairUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ServiceAccountKeyPairUpsertBulk) Exec

Exec executes the query.

func (*ServiceAccountKeyPairUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*ServiceAccountKeyPairUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.ServiceAccountKeyPair.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*ServiceAccountKeyPairUpsertBulk) SetActive

SetActive sets the "active" field.

func (*ServiceAccountKeyPairUpsertBulk) SetAlgorithm

SetAlgorithm sets the "algorithm" field.

func (*ServiceAccountKeyPairUpsertBulk) SetExpiresAt

SetExpiresAt sets the "expires_at" field.

func (*ServiceAccountKeyPairUpsertBulk) SetKeyID

SetKeyID sets the "key_id" field.

func (*ServiceAccountKeyPairUpsertBulk) SetKeyType

SetKeyType sets the "key_type" field.

func (*ServiceAccountKeyPairUpsertBulk) SetLastUsedAt

SetLastUsedAt sets the "last_used_at" field.

func (*ServiceAccountKeyPairUpsertBulk) SetPublicKeyPem

SetPublicKeyPem sets the "public_key_pem" field.

func (*ServiceAccountKeyPairUpsertBulk) SetRevoked

SetRevoked sets the "revoked" field.

func (*ServiceAccountKeyPairUpsertBulk) SetRevokedAt

SetRevokedAt sets the "revoked_at" field.

func (*ServiceAccountKeyPairUpsertBulk) SetServiceAccountID

SetServiceAccountID sets the "service_account_id" field.

func (*ServiceAccountKeyPairUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the ServiceAccountKeyPairCreateBulk.OnConflict documentation for more info.

func (*ServiceAccountKeyPairUpsertBulk) UpdateActive

UpdateActive sets the "active" field to the value that was provided on create.

func (*ServiceAccountKeyPairUpsertBulk) UpdateAlgorithm

UpdateAlgorithm sets the "algorithm" field to the value that was provided on create.

func (*ServiceAccountKeyPairUpsertBulk) UpdateExpiresAt

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*ServiceAccountKeyPairUpsertBulk) UpdateKeyID

UpdateKeyID sets the "key_id" field to the value that was provided on create.

func (*ServiceAccountKeyPairUpsertBulk) UpdateKeyType

UpdateKeyType sets the "key_type" field to the value that was provided on create.

func (*ServiceAccountKeyPairUpsertBulk) UpdateLastUsedAt

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*ServiceAccountKeyPairUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.ServiceAccountKeyPair.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(serviceaccountkeypair.FieldID)
		}),
	).
	Exec(ctx)

func (*ServiceAccountKeyPairUpsertBulk) UpdatePublicKeyPem

UpdatePublicKeyPem sets the "public_key_pem" field to the value that was provided on create.

func (*ServiceAccountKeyPairUpsertBulk) UpdateRevoked

UpdateRevoked sets the "revoked" field to the value that was provided on create.

func (*ServiceAccountKeyPairUpsertBulk) UpdateRevokedAt

UpdateRevokedAt sets the "revoked_at" field to the value that was provided on create.

func (*ServiceAccountKeyPairUpsertBulk) UpdateServiceAccountID

UpdateServiceAccountID sets the "service_account_id" field to the value that was provided on create.

type ServiceAccountKeyPairUpsertOne

type ServiceAccountKeyPairUpsertOne struct {
	// contains filtered or unexported fields
}

ServiceAccountKeyPairUpsertOne is the builder for "upsert"-ing

one ServiceAccountKeyPair node.

func (*ServiceAccountKeyPairUpsertOne) ClearExpiresAt

ClearExpiresAt clears the value of the "expires_at" field.

func (*ServiceAccountKeyPairUpsertOne) ClearLastUsedAt

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*ServiceAccountKeyPairUpsertOne) ClearRevokedAt

ClearRevokedAt clears the value of the "revoked_at" field.

func (*ServiceAccountKeyPairUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ServiceAccountKeyPairUpsertOne) Exec

Exec executes the query.

func (*ServiceAccountKeyPairUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*ServiceAccountKeyPairUpsertOne) ID

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*ServiceAccountKeyPairUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*ServiceAccountKeyPairUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.ServiceAccountKeyPair.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*ServiceAccountKeyPairUpsertOne) SetActive

SetActive sets the "active" field.

func (*ServiceAccountKeyPairUpsertOne) SetAlgorithm

SetAlgorithm sets the "algorithm" field.

func (*ServiceAccountKeyPairUpsertOne) SetExpiresAt

SetExpiresAt sets the "expires_at" field.

func (*ServiceAccountKeyPairUpsertOne) SetKeyID

SetKeyID sets the "key_id" field.

func (*ServiceAccountKeyPairUpsertOne) SetKeyType

SetKeyType sets the "key_type" field.

func (*ServiceAccountKeyPairUpsertOne) SetLastUsedAt

SetLastUsedAt sets the "last_used_at" field.

func (*ServiceAccountKeyPairUpsertOne) SetPublicKeyPem

SetPublicKeyPem sets the "public_key_pem" field.

func (*ServiceAccountKeyPairUpsertOne) SetRevoked

SetRevoked sets the "revoked" field.

func (*ServiceAccountKeyPairUpsertOne) SetRevokedAt

SetRevokedAt sets the "revoked_at" field.

func (*ServiceAccountKeyPairUpsertOne) SetServiceAccountID

SetServiceAccountID sets the "service_account_id" field.

func (*ServiceAccountKeyPairUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the ServiceAccountKeyPairCreate.OnConflict documentation for more info.

func (*ServiceAccountKeyPairUpsertOne) UpdateActive

UpdateActive sets the "active" field to the value that was provided on create.

func (*ServiceAccountKeyPairUpsertOne) UpdateAlgorithm

UpdateAlgorithm sets the "algorithm" field to the value that was provided on create.

func (*ServiceAccountKeyPairUpsertOne) UpdateExpiresAt

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*ServiceAccountKeyPairUpsertOne) UpdateKeyID

UpdateKeyID sets the "key_id" field to the value that was provided on create.

func (*ServiceAccountKeyPairUpsertOne) UpdateKeyType

UpdateKeyType sets the "key_type" field to the value that was provided on create.

func (*ServiceAccountKeyPairUpsertOne) UpdateLastUsedAt

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*ServiceAccountKeyPairUpsertOne) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.ServiceAccountKeyPair.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(serviceaccountkeypair.FieldID)
		}),
	).
	Exec(ctx)

func (*ServiceAccountKeyPairUpsertOne) UpdatePublicKeyPem

UpdatePublicKeyPem sets the "public_key_pem" field to the value that was provided on create.

func (*ServiceAccountKeyPairUpsertOne) UpdateRevoked

UpdateRevoked sets the "revoked" field to the value that was provided on create.

func (*ServiceAccountKeyPairUpsertOne) UpdateRevokedAt

UpdateRevokedAt sets the "revoked_at" field to the value that was provided on create.

func (*ServiceAccountKeyPairUpsertOne) UpdateServiceAccountID

UpdateServiceAccountID sets the "service_account_id" field to the value that was provided on create.

type ServiceAccountKeyPairs

type ServiceAccountKeyPairs []*ServiceAccountKeyPair

ServiceAccountKeyPairs is a parsable slice of ServiceAccountKeyPair.

type ServiceAccountMutation

type ServiceAccountMutation struct {
	// contains filtered or unexported fields
}

ServiceAccountMutation represents an operation that mutates the ServiceAccount nodes in the graph.

func (*ServiceAccountMutation) Active

func (m *ServiceAccountMutation) Active() (r bool, exists bool)

Active returns the value of the "active" field in the mutation.

func (*ServiceAccountMutation) AddField

func (m *ServiceAccountMutation) 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 (*ServiceAccountMutation) AddKeyPairIDs

func (m *ServiceAccountMutation) AddKeyPairIDs(ids ...uuid.UUID)

AddKeyPairIDs adds the "key_pairs" edge to the ServiceAccountKeyPair entity by ids.

func (*ServiceAccountMutation) AddedEdges

func (m *ServiceAccountMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ServiceAccountMutation) AddedField

func (m *ServiceAccountMutation) 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 (*ServiceAccountMutation) AddedFields

func (m *ServiceAccountMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ServiceAccountMutation) AddedIDs

func (m *ServiceAccountMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ServiceAccountMutation) AllowedScopes

func (m *ServiceAccountMutation) AllowedScopes() (r []string, exists bool)

AllowedScopes returns the value of the "allowed_scopes" field in the mutation.

func (*ServiceAccountMutation) AppendAllowedScopes

func (m *ServiceAccountMutation) AppendAllowedScopes(s []string)

AppendAllowedScopes adds s to the "allowed_scopes" field.

func (*ServiceAccountMutation) AppendedAllowedScopes

func (m *ServiceAccountMutation) AppendedAllowedScopes() ([]string, bool)

AppendedAllowedScopes returns the list of values that were appended to the "allowed_scopes" field in this mutation.

func (*ServiceAccountMutation) ClearCreator

func (m *ServiceAccountMutation) ClearCreator()

ClearCreator clears the "creator" edge to the User entity.

func (*ServiceAccountMutation) ClearDescription

func (m *ServiceAccountMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*ServiceAccountMutation) ClearEdge

func (m *ServiceAccountMutation) 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 (*ServiceAccountMutation) ClearField

func (m *ServiceAccountMutation) 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 (*ServiceAccountMutation) ClearKeyPairs

func (m *ServiceAccountMutation) ClearKeyPairs()

ClearKeyPairs clears the "key_pairs" edge to the ServiceAccountKeyPair entity.

func (*ServiceAccountMutation) ClearLastUsedAt

func (m *ServiceAccountMutation) ClearLastUsedAt()

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*ServiceAccountMutation) ClearOrganization

func (m *ServiceAccountMutation) ClearOrganization()

ClearOrganization clears the "organization" edge to the Organization entity.

func (*ServiceAccountMutation) ClearedEdges

func (m *ServiceAccountMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ServiceAccountMutation) ClearedFields

func (m *ServiceAccountMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ServiceAccountMutation) Client

func (m ServiceAccountMutation) 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 (*ServiceAccountMutation) CreatedAt

func (m *ServiceAccountMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*ServiceAccountMutation) CreatedBy

func (m *ServiceAccountMutation) CreatedBy() (r uuid.UUID, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*ServiceAccountMutation) CreatorCleared

func (m *ServiceAccountMutation) CreatorCleared() bool

CreatorCleared reports if the "creator" edge to the User entity was cleared.

func (*ServiceAccountMutation) CreatorID

func (m *ServiceAccountMutation) CreatorID() (id uuid.UUID, exists bool)

CreatorID returns the "creator" edge ID in the mutation.

func (*ServiceAccountMutation) CreatorIDs

func (m *ServiceAccountMutation) CreatorIDs() (ids []uuid.UUID)

CreatorIDs returns the "creator" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CreatorID instead. It exists only for internal usage by the builders.

func (*ServiceAccountMutation) Description

func (m *ServiceAccountMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*ServiceAccountMutation) DescriptionCleared

func (m *ServiceAccountMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*ServiceAccountMutation) EdgeCleared

func (m *ServiceAccountMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ServiceAccountMutation) Email

func (m *ServiceAccountMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*ServiceAccountMutation) Field

func (m *ServiceAccountMutation) 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 (*ServiceAccountMutation) FieldCleared

func (m *ServiceAccountMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ServiceAccountMutation) Fields

func (m *ServiceAccountMutation) 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 (*ServiceAccountMutation) Filter

Filter returns an entql.Where implementation to apply filters on the ServiceAccountMutation builder.

func (*ServiceAccountMutation) ID

func (m *ServiceAccountMutation) ID() (id uuid.UUID, 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 (*ServiceAccountMutation) 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 (*ServiceAccountMutation) KeyPairsCleared

func (m *ServiceAccountMutation) KeyPairsCleared() bool

KeyPairsCleared reports if the "key_pairs" edge to the ServiceAccountKeyPair entity was cleared.

func (*ServiceAccountMutation) KeyPairsIDs

func (m *ServiceAccountMutation) KeyPairsIDs() (ids []uuid.UUID)

KeyPairsIDs returns the "key_pairs" edge IDs in the mutation.

func (*ServiceAccountMutation) LastUsedAt

func (m *ServiceAccountMutation) LastUsedAt() (r time.Time, exists bool)

LastUsedAt returns the value of the "last_used_at" field in the mutation.

func (*ServiceAccountMutation) LastUsedAtCleared

func (m *ServiceAccountMutation) LastUsedAtCleared() bool

LastUsedAtCleared returns if the "last_used_at" field was cleared in this mutation.

func (*ServiceAccountMutation) Name

func (m *ServiceAccountMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*ServiceAccountMutation) OldActive

func (m *ServiceAccountMutation) OldActive(ctx context.Context) (v bool, err error)

OldActive returns the old "active" field's value of the ServiceAccount entity. If the ServiceAccount 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 (*ServiceAccountMutation) OldAllowedScopes

func (m *ServiceAccountMutation) OldAllowedScopes(ctx context.Context) (v []string, err error)

OldAllowedScopes returns the old "allowed_scopes" field's value of the ServiceAccount entity. If the ServiceAccount 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 (*ServiceAccountMutation) OldCreatedAt

func (m *ServiceAccountMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the ServiceAccount entity. If the ServiceAccount 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 (*ServiceAccountMutation) OldCreatedBy

func (m *ServiceAccountMutation) OldCreatedBy(ctx context.Context) (v uuid.UUID, err error)

OldCreatedBy returns the old "created_by" field's value of the ServiceAccount entity. If the ServiceAccount 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 (*ServiceAccountMutation) OldDescription

func (m *ServiceAccountMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the ServiceAccount entity. If the ServiceAccount 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 (*ServiceAccountMutation) OldEmail

func (m *ServiceAccountMutation) OldEmail(ctx context.Context) (v string, err error)

OldEmail returns the old "email" field's value of the ServiceAccount entity. If the ServiceAccount 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 (*ServiceAccountMutation) OldField

func (m *ServiceAccountMutation) 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 (*ServiceAccountMutation) OldLastUsedAt

func (m *ServiceAccountMutation) OldLastUsedAt(ctx context.Context) (v *time.Time, err error)

OldLastUsedAt returns the old "last_used_at" field's value of the ServiceAccount entity. If the ServiceAccount 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 (*ServiceAccountMutation) OldName

func (m *ServiceAccountMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the ServiceAccount entity. If the ServiceAccount 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 (*ServiceAccountMutation) OldOrganizationID

func (m *ServiceAccountMutation) OldOrganizationID(ctx context.Context) (v uuid.UUID, err error)

OldOrganizationID returns the old "organization_id" field's value of the ServiceAccount entity. If the ServiceAccount 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 (*ServiceAccountMutation) OldUpdatedAt

func (m *ServiceAccountMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the ServiceAccount entity. If the ServiceAccount 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 (*ServiceAccountMutation) Op

func (m *ServiceAccountMutation) Op() Op

Op returns the operation name.

func (*ServiceAccountMutation) OrganizationCleared

func (m *ServiceAccountMutation) OrganizationCleared() bool

OrganizationCleared reports if the "organization" edge to the Organization entity was cleared.

func (*ServiceAccountMutation) OrganizationID

func (m *ServiceAccountMutation) OrganizationID() (r uuid.UUID, exists bool)

OrganizationID returns the value of the "organization_id" field in the mutation.

func (*ServiceAccountMutation) OrganizationIDs

func (m *ServiceAccountMutation) OrganizationIDs() (ids []uuid.UUID)

OrganizationIDs returns the "organization" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrganizationID instead. It exists only for internal usage by the builders.

func (*ServiceAccountMutation) RemoveKeyPairIDs

func (m *ServiceAccountMutation) RemoveKeyPairIDs(ids ...uuid.UUID)

RemoveKeyPairIDs removes the "key_pairs" edge to the ServiceAccountKeyPair entity by IDs.

func (*ServiceAccountMutation) RemovedEdges

func (m *ServiceAccountMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ServiceAccountMutation) RemovedIDs

func (m *ServiceAccountMutation) 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 (*ServiceAccountMutation) RemovedKeyPairsIDs

func (m *ServiceAccountMutation) RemovedKeyPairsIDs() (ids []uuid.UUID)

RemovedKeyPairs returns the removed IDs of the "key_pairs" edge to the ServiceAccountKeyPair entity.

func (*ServiceAccountMutation) ResetActive

func (m *ServiceAccountMutation) ResetActive()

ResetActive resets all changes to the "active" field.

func (*ServiceAccountMutation) ResetAllowedScopes

func (m *ServiceAccountMutation) ResetAllowedScopes()

ResetAllowedScopes resets all changes to the "allowed_scopes" field.

func (*ServiceAccountMutation) ResetCreatedAt

func (m *ServiceAccountMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ServiceAccountMutation) ResetCreatedBy

func (m *ServiceAccountMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*ServiceAccountMutation) ResetCreator

func (m *ServiceAccountMutation) ResetCreator()

ResetCreator resets all changes to the "creator" edge.

func (*ServiceAccountMutation) ResetDescription

func (m *ServiceAccountMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*ServiceAccountMutation) ResetEdge

func (m *ServiceAccountMutation) 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 (*ServiceAccountMutation) ResetEmail

func (m *ServiceAccountMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*ServiceAccountMutation) ResetField

func (m *ServiceAccountMutation) 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 (*ServiceAccountMutation) ResetKeyPairs

func (m *ServiceAccountMutation) ResetKeyPairs()

ResetKeyPairs resets all changes to the "key_pairs" edge.

func (*ServiceAccountMutation) ResetLastUsedAt

func (m *ServiceAccountMutation) ResetLastUsedAt()

ResetLastUsedAt resets all changes to the "last_used_at" field.

func (*ServiceAccountMutation) ResetName

func (m *ServiceAccountMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ServiceAccountMutation) ResetOrganization

func (m *ServiceAccountMutation) ResetOrganization()

ResetOrganization resets all changes to the "organization" edge.

func (*ServiceAccountMutation) ResetOrganizationID

func (m *ServiceAccountMutation) ResetOrganizationID()

ResetOrganizationID resets all changes to the "organization_id" field.

func (*ServiceAccountMutation) ResetUpdatedAt

func (m *ServiceAccountMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*ServiceAccountMutation) SetActive

func (m *ServiceAccountMutation) SetActive(b bool)

SetActive sets the "active" field.

func (*ServiceAccountMutation) SetAllowedScopes

func (m *ServiceAccountMutation) SetAllowedScopes(s []string)

SetAllowedScopes sets the "allowed_scopes" field.

func (*ServiceAccountMutation) SetCreatedAt

func (m *ServiceAccountMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*ServiceAccountMutation) SetCreatedBy

func (m *ServiceAccountMutation) SetCreatedBy(u uuid.UUID)

SetCreatedBy sets the "created_by" field.

func (*ServiceAccountMutation) SetCreatorID

func (m *ServiceAccountMutation) SetCreatorID(id uuid.UUID)

SetCreatorID sets the "creator" edge to the User entity by id.

func (*ServiceAccountMutation) SetDescription

func (m *ServiceAccountMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*ServiceAccountMutation) SetEmail

func (m *ServiceAccountMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*ServiceAccountMutation) SetField

func (m *ServiceAccountMutation) 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 (*ServiceAccountMutation) SetID

func (m *ServiceAccountMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of ServiceAccount entities.

func (*ServiceAccountMutation) SetLastUsedAt

func (m *ServiceAccountMutation) SetLastUsedAt(t time.Time)

SetLastUsedAt sets the "last_used_at" field.

func (*ServiceAccountMutation) SetName

func (m *ServiceAccountMutation) SetName(s string)

SetName sets the "name" field.

func (*ServiceAccountMutation) SetOp

func (m *ServiceAccountMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ServiceAccountMutation) SetOrganizationID

func (m *ServiceAccountMutation) SetOrganizationID(u uuid.UUID)

SetOrganizationID sets the "organization_id" field.

func (*ServiceAccountMutation) SetUpdatedAt

func (m *ServiceAccountMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (ServiceAccountMutation) Tx

func (m ServiceAccountMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ServiceAccountMutation) Type

func (m *ServiceAccountMutation) Type() string

Type returns the node type of this mutation (ServiceAccount).

func (*ServiceAccountMutation) UpdatedAt

func (m *ServiceAccountMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*ServiceAccountMutation) Where

Where appends a list predicates to the ServiceAccountMutation builder.

func (*ServiceAccountMutation) WhereP

func (m *ServiceAccountMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ServiceAccountMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ServiceAccountQuery

type ServiceAccountQuery struct {
	// contains filtered or unexported fields
}

ServiceAccountQuery is the builder for querying ServiceAccount entities.

func (*ServiceAccountQuery) Aggregate

Aggregate returns a ServiceAccountSelect configured with the given aggregations.

func (*ServiceAccountQuery) All

All executes the query and returns a list of ServiceAccounts.

func (*ServiceAccountQuery) AllX

AllX is like All, but panics if an error occurs.

func (*ServiceAccountQuery) Clone

Clone returns a duplicate of the ServiceAccountQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ServiceAccountQuery) Count

func (_q *ServiceAccountQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ServiceAccountQuery) CountX

func (_q *ServiceAccountQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ServiceAccountQuery) Exist

func (_q *ServiceAccountQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ServiceAccountQuery) ExistX

func (_q *ServiceAccountQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ServiceAccountQuery) Filter

Filter returns a Filter implementation to apply filters on the ServiceAccountQuery builder.

func (*ServiceAccountQuery) First

First returns the first ServiceAccount entity from the query. Returns a *NotFoundError when no ServiceAccount was found.

func (*ServiceAccountQuery) FirstID

func (_q *ServiceAccountQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first ServiceAccount ID from the query. Returns a *NotFoundError when no ServiceAccount ID was found.

func (*ServiceAccountQuery) FirstIDX

func (_q *ServiceAccountQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*ServiceAccountQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*ServiceAccountQuery) GroupBy

func (_q *ServiceAccountQuery) GroupBy(field string, fields ...string) *ServiceAccountGroupBy

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 {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.ServiceAccount.Query().
	GroupBy(serviceaccount.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ServiceAccountQuery) IDs

func (_q *ServiceAccountQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of ServiceAccount IDs.

func (*ServiceAccountQuery) IDsX

func (_q *ServiceAccountQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*ServiceAccountQuery) Limit

func (_q *ServiceAccountQuery) Limit(limit int) *ServiceAccountQuery

Limit the number of records to be returned by this query.

func (*ServiceAccountQuery) Offset

func (_q *ServiceAccountQuery) Offset(offset int) *ServiceAccountQuery

Offset to start from.

func (*ServiceAccountQuery) Only

Only returns a single ServiceAccount entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ServiceAccount entity is found. Returns a *NotFoundError when no ServiceAccount entities are found.

func (*ServiceAccountQuery) OnlyID

func (_q *ServiceAccountQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only ServiceAccount ID in the query. Returns a *NotSingularError when more than one ServiceAccount ID is found. Returns a *NotFoundError when no entities are found.

func (*ServiceAccountQuery) OnlyIDX

func (_q *ServiceAccountQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ServiceAccountQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*ServiceAccountQuery) Order

Order specifies how the records should be ordered.

func (*ServiceAccountQuery) QueryCreator

func (_q *ServiceAccountQuery) QueryCreator() *UserQuery

QueryCreator chains the current query on the "creator" edge.

func (*ServiceAccountQuery) QueryKeyPairs

func (_q *ServiceAccountQuery) QueryKeyPairs() *ServiceAccountKeyPairQuery

QueryKeyPairs chains the current query on the "key_pairs" edge.

func (*ServiceAccountQuery) QueryOrganization

func (_q *ServiceAccountQuery) QueryOrganization() *OrganizationQuery

QueryOrganization chains the current query on the "organization" edge.

func (*ServiceAccountQuery) Select

func (_q *ServiceAccountQuery) Select(fields ...string) *ServiceAccountSelect

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 {
	Name string `json:"name,omitempty"`
}

client.ServiceAccount.Query().
	Select(serviceaccount.FieldName).
	Scan(ctx, &v)

func (*ServiceAccountQuery) Unique

func (_q *ServiceAccountQuery) Unique(unique bool) *ServiceAccountQuery

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 (*ServiceAccountQuery) Where

Where adds a new predicate for the ServiceAccountQuery builder.

func (*ServiceAccountQuery) WithCreator

func (_q *ServiceAccountQuery) WithCreator(opts ...func(*UserQuery)) *ServiceAccountQuery

WithCreator tells the query-builder to eager-load the nodes that are connected to the "creator" edge. The optional arguments are used to configure the query builder of the edge.

func (*ServiceAccountQuery) WithKeyPairs

func (_q *ServiceAccountQuery) WithKeyPairs(opts ...func(*ServiceAccountKeyPairQuery)) *ServiceAccountQuery

WithKeyPairs tells the query-builder to eager-load the nodes that are connected to the "key_pairs" edge. The optional arguments are used to configure the query builder of the edge.

func (*ServiceAccountQuery) WithOrganization

func (_q *ServiceAccountQuery) WithOrganization(opts ...func(*OrganizationQuery)) *ServiceAccountQuery

WithOrganization tells the query-builder to eager-load the nodes that are connected to the "organization" edge. The optional arguments are used to configure the query builder of the edge.

type ServiceAccountSelect

type ServiceAccountSelect struct {
	*ServiceAccountQuery
	// contains filtered or unexported fields
}

ServiceAccountSelect is the builder for selecting fields of ServiceAccount entities.

func (*ServiceAccountSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*ServiceAccountSelect) Bool

func (s *ServiceAccountSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ServiceAccountSelect) BoolX

func (s *ServiceAccountSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ServiceAccountSelect) Bools

func (s *ServiceAccountSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ServiceAccountSelect) BoolsX

func (s *ServiceAccountSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ServiceAccountSelect) Float64

func (s *ServiceAccountSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ServiceAccountSelect) Float64X

func (s *ServiceAccountSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ServiceAccountSelect) Float64s

func (s *ServiceAccountSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ServiceAccountSelect) Float64sX

func (s *ServiceAccountSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ServiceAccountSelect) Int

func (s *ServiceAccountSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ServiceAccountSelect) IntX

func (s *ServiceAccountSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ServiceAccountSelect) Ints

func (s *ServiceAccountSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ServiceAccountSelect) IntsX

func (s *ServiceAccountSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ServiceAccountSelect) Scan

func (_s *ServiceAccountSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ServiceAccountSelect) ScanX

func (s *ServiceAccountSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ServiceAccountSelect) String

func (s *ServiceAccountSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ServiceAccountSelect) StringX

func (s *ServiceAccountSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ServiceAccountSelect) Strings

func (s *ServiceAccountSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ServiceAccountSelect) StringsX

func (s *ServiceAccountSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ServiceAccountUpdate

type ServiceAccountUpdate struct {
	// contains filtered or unexported fields
}

ServiceAccountUpdate is the builder for updating ServiceAccount entities.

func (*ServiceAccountUpdate) AddKeyPairIDs

func (_u *ServiceAccountUpdate) AddKeyPairIDs(ids ...uuid.UUID) *ServiceAccountUpdate

AddKeyPairIDs adds the "key_pairs" edge to the ServiceAccountKeyPair entity by IDs.

func (*ServiceAccountUpdate) AddKeyPairs

AddKeyPairs adds the "key_pairs" edges to the ServiceAccountKeyPair entity.

func (*ServiceAccountUpdate) AppendAllowedScopes

func (_u *ServiceAccountUpdate) AppendAllowedScopes(v []string) *ServiceAccountUpdate

AppendAllowedScopes appends value to the "allowed_scopes" field.

func (*ServiceAccountUpdate) ClearCreator

func (_u *ServiceAccountUpdate) ClearCreator() *ServiceAccountUpdate

ClearCreator clears the "creator" edge to the User entity.

func (*ServiceAccountUpdate) ClearDescription

func (_u *ServiceAccountUpdate) ClearDescription() *ServiceAccountUpdate

ClearDescription clears the value of the "description" field.

func (*ServiceAccountUpdate) ClearKeyPairs

func (_u *ServiceAccountUpdate) ClearKeyPairs() *ServiceAccountUpdate

ClearKeyPairs clears all "key_pairs" edges to the ServiceAccountKeyPair entity.

func (*ServiceAccountUpdate) ClearLastUsedAt

func (_u *ServiceAccountUpdate) ClearLastUsedAt() *ServiceAccountUpdate

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*ServiceAccountUpdate) ClearOrganization

func (_u *ServiceAccountUpdate) ClearOrganization() *ServiceAccountUpdate

ClearOrganization clears the "organization" edge to the Organization entity.

func (*ServiceAccountUpdate) Exec

func (_u *ServiceAccountUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ServiceAccountUpdate) ExecX

func (_u *ServiceAccountUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ServiceAccountUpdate) Mutation

Mutation returns the ServiceAccountMutation object of the builder.

func (*ServiceAccountUpdate) RemoveKeyPairIDs

func (_u *ServiceAccountUpdate) RemoveKeyPairIDs(ids ...uuid.UUID) *ServiceAccountUpdate

RemoveKeyPairIDs removes the "key_pairs" edge to ServiceAccountKeyPair entities by IDs.

func (*ServiceAccountUpdate) RemoveKeyPairs

RemoveKeyPairs removes "key_pairs" edges to ServiceAccountKeyPair entities.

func (*ServiceAccountUpdate) Save

func (_u *ServiceAccountUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ServiceAccountUpdate) SaveX

func (_u *ServiceAccountUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ServiceAccountUpdate) SetActive

SetActive sets the "active" field.

func (*ServiceAccountUpdate) SetAllowedScopes

func (_u *ServiceAccountUpdate) SetAllowedScopes(v []string) *ServiceAccountUpdate

SetAllowedScopes sets the "allowed_scopes" field.

func (*ServiceAccountUpdate) SetCreatedBy

func (_u *ServiceAccountUpdate) SetCreatedBy(v uuid.UUID) *ServiceAccountUpdate

SetCreatedBy sets the "created_by" field.

func (*ServiceAccountUpdate) SetCreator

func (_u *ServiceAccountUpdate) SetCreator(v *User) *ServiceAccountUpdate

SetCreator sets the "creator" edge to the User entity.

func (*ServiceAccountUpdate) SetCreatorID

func (_u *ServiceAccountUpdate) SetCreatorID(id uuid.UUID) *ServiceAccountUpdate

SetCreatorID sets the "creator" edge to the User entity by ID.

func (*ServiceAccountUpdate) SetDescription

func (_u *ServiceAccountUpdate) SetDescription(v string) *ServiceAccountUpdate

SetDescription sets the "description" field.

func (*ServiceAccountUpdate) SetEmail

SetEmail sets the "email" field.

func (*ServiceAccountUpdate) SetLastUsedAt

func (_u *ServiceAccountUpdate) SetLastUsedAt(v time.Time) *ServiceAccountUpdate

SetLastUsedAt sets the "last_used_at" field.

func (*ServiceAccountUpdate) SetName

SetName sets the "name" field.

func (*ServiceAccountUpdate) SetNillableActive

func (_u *ServiceAccountUpdate) SetNillableActive(v *bool) *ServiceAccountUpdate

SetNillableActive sets the "active" field if the given value is not nil.

func (*ServiceAccountUpdate) SetNillableCreatedBy

func (_u *ServiceAccountUpdate) SetNillableCreatedBy(v *uuid.UUID) *ServiceAccountUpdate

SetNillableCreatedBy sets the "created_by" field if the given value is not nil.

func (*ServiceAccountUpdate) SetNillableDescription

func (_u *ServiceAccountUpdate) SetNillableDescription(v *string) *ServiceAccountUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*ServiceAccountUpdate) SetNillableEmail

func (_u *ServiceAccountUpdate) SetNillableEmail(v *string) *ServiceAccountUpdate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*ServiceAccountUpdate) SetNillableLastUsedAt

func (_u *ServiceAccountUpdate) SetNillableLastUsedAt(v *time.Time) *ServiceAccountUpdate

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*ServiceAccountUpdate) SetNillableName

func (_u *ServiceAccountUpdate) SetNillableName(v *string) *ServiceAccountUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*ServiceAccountUpdate) SetNillableOrganizationID

func (_u *ServiceAccountUpdate) SetNillableOrganizationID(v *uuid.UUID) *ServiceAccountUpdate

SetNillableOrganizationID sets the "organization_id" field if the given value is not nil.

func (*ServiceAccountUpdate) SetOrganization

func (_u *ServiceAccountUpdate) SetOrganization(v *Organization) *ServiceAccountUpdate

SetOrganization sets the "organization" edge to the Organization entity.

func (*ServiceAccountUpdate) SetOrganizationID

func (_u *ServiceAccountUpdate) SetOrganizationID(v uuid.UUID) *ServiceAccountUpdate

SetOrganizationID sets the "organization_id" field.

func (*ServiceAccountUpdate) SetUpdatedAt

func (_u *ServiceAccountUpdate) SetUpdatedAt(v time.Time) *ServiceAccountUpdate

SetUpdatedAt sets the "updated_at" field.

func (*ServiceAccountUpdate) Where

Where appends a list predicates to the ServiceAccountUpdate builder.

type ServiceAccountUpdateOne

type ServiceAccountUpdateOne struct {
	// contains filtered or unexported fields
}

ServiceAccountUpdateOne is the builder for updating a single ServiceAccount entity.

func (*ServiceAccountUpdateOne) AddKeyPairIDs

func (_u *ServiceAccountUpdateOne) AddKeyPairIDs(ids ...uuid.UUID) *ServiceAccountUpdateOne

AddKeyPairIDs adds the "key_pairs" edge to the ServiceAccountKeyPair entity by IDs.

func (*ServiceAccountUpdateOne) AddKeyPairs

AddKeyPairs adds the "key_pairs" edges to the ServiceAccountKeyPair entity.

func (*ServiceAccountUpdateOne) AppendAllowedScopes

func (_u *ServiceAccountUpdateOne) AppendAllowedScopes(v []string) *ServiceAccountUpdateOne

AppendAllowedScopes appends value to the "allowed_scopes" field.

func (*ServiceAccountUpdateOne) ClearCreator

ClearCreator clears the "creator" edge to the User entity.

func (*ServiceAccountUpdateOne) ClearDescription

func (_u *ServiceAccountUpdateOne) ClearDescription() *ServiceAccountUpdateOne

ClearDescription clears the value of the "description" field.

func (*ServiceAccountUpdateOne) ClearKeyPairs

func (_u *ServiceAccountUpdateOne) ClearKeyPairs() *ServiceAccountUpdateOne

ClearKeyPairs clears all "key_pairs" edges to the ServiceAccountKeyPair entity.

func (*ServiceAccountUpdateOne) ClearLastUsedAt

func (_u *ServiceAccountUpdateOne) ClearLastUsedAt() *ServiceAccountUpdateOne

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*ServiceAccountUpdateOne) ClearOrganization

func (_u *ServiceAccountUpdateOne) ClearOrganization() *ServiceAccountUpdateOne

ClearOrganization clears the "organization" edge to the Organization entity.

func (*ServiceAccountUpdateOne) Exec

Exec executes the query on the entity.

func (*ServiceAccountUpdateOne) ExecX

func (_u *ServiceAccountUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ServiceAccountUpdateOne) Mutation

Mutation returns the ServiceAccountMutation object of the builder.

func (*ServiceAccountUpdateOne) RemoveKeyPairIDs

func (_u *ServiceAccountUpdateOne) RemoveKeyPairIDs(ids ...uuid.UUID) *ServiceAccountUpdateOne

RemoveKeyPairIDs removes the "key_pairs" edge to ServiceAccountKeyPair entities by IDs.

func (*ServiceAccountUpdateOne) RemoveKeyPairs

RemoveKeyPairs removes "key_pairs" edges to ServiceAccountKeyPair entities.

func (*ServiceAccountUpdateOne) Save

Save executes the query and returns the updated ServiceAccount entity.

func (*ServiceAccountUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*ServiceAccountUpdateOne) Select

func (_u *ServiceAccountUpdateOne) Select(field string, fields ...string) *ServiceAccountUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ServiceAccountUpdateOne) SetActive

SetActive sets the "active" field.

func (*ServiceAccountUpdateOne) SetAllowedScopes

func (_u *ServiceAccountUpdateOne) SetAllowedScopes(v []string) *ServiceAccountUpdateOne

SetAllowedScopes sets the "allowed_scopes" field.

func (*ServiceAccountUpdateOne) SetCreatedBy

SetCreatedBy sets the "created_by" field.

func (*ServiceAccountUpdateOne) SetCreator

SetCreator sets the "creator" edge to the User entity.

func (*ServiceAccountUpdateOne) SetCreatorID

SetCreatorID sets the "creator" edge to the User entity by ID.

func (*ServiceAccountUpdateOne) SetDescription

SetDescription sets the "description" field.

func (*ServiceAccountUpdateOne) SetEmail

SetEmail sets the "email" field.

func (*ServiceAccountUpdateOne) SetLastUsedAt

SetLastUsedAt sets the "last_used_at" field.

func (*ServiceAccountUpdateOne) SetName

SetName sets the "name" field.

func (*ServiceAccountUpdateOne) SetNillableActive

func (_u *ServiceAccountUpdateOne) SetNillableActive(v *bool) *ServiceAccountUpdateOne

SetNillableActive sets the "active" field if the given value is not nil.

func (*ServiceAccountUpdateOne) SetNillableCreatedBy

func (_u *ServiceAccountUpdateOne) SetNillableCreatedBy(v *uuid.UUID) *ServiceAccountUpdateOne

SetNillableCreatedBy sets the "created_by" field if the given value is not nil.

func (*ServiceAccountUpdateOne) SetNillableDescription

func (_u *ServiceAccountUpdateOne) SetNillableDescription(v *string) *ServiceAccountUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*ServiceAccountUpdateOne) SetNillableEmail

func (_u *ServiceAccountUpdateOne) SetNillableEmail(v *string) *ServiceAccountUpdateOne

SetNillableEmail sets the "email" field if the given value is not nil.

func (*ServiceAccountUpdateOne) SetNillableLastUsedAt

func (_u *ServiceAccountUpdateOne) SetNillableLastUsedAt(v *time.Time) *ServiceAccountUpdateOne

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*ServiceAccountUpdateOne) SetNillableName

func (_u *ServiceAccountUpdateOne) SetNillableName(v *string) *ServiceAccountUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*ServiceAccountUpdateOne) SetNillableOrganizationID

func (_u *ServiceAccountUpdateOne) SetNillableOrganizationID(v *uuid.UUID) *ServiceAccountUpdateOne

SetNillableOrganizationID sets the "organization_id" field if the given value is not nil.

func (*ServiceAccountUpdateOne) SetOrganization

SetOrganization sets the "organization" edge to the Organization entity.

func (*ServiceAccountUpdateOne) SetOrganizationID

func (_u *ServiceAccountUpdateOne) SetOrganizationID(v uuid.UUID) *ServiceAccountUpdateOne

SetOrganizationID sets the "organization_id" field.

func (*ServiceAccountUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*ServiceAccountUpdateOne) Where

Where appends a list predicates to the ServiceAccountUpdate builder.

type ServiceAccountUpsert

type ServiceAccountUpsert struct {
	*sql.UpdateSet
}

ServiceAccountUpsert is the "OnConflict" setter.

func (*ServiceAccountUpsert) ClearDescription

func (u *ServiceAccountUpsert) ClearDescription() *ServiceAccountUpsert

ClearDescription clears the value of the "description" field.

func (*ServiceAccountUpsert) ClearLastUsedAt

func (u *ServiceAccountUpsert) ClearLastUsedAt() *ServiceAccountUpsert

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*ServiceAccountUpsert) SetActive

SetActive sets the "active" field.

func (*ServiceAccountUpsert) SetAllowedScopes

func (u *ServiceAccountUpsert) SetAllowedScopes(v []string) *ServiceAccountUpsert

SetAllowedScopes sets the "allowed_scopes" field.

func (*ServiceAccountUpsert) SetCreatedBy

func (u *ServiceAccountUpsert) SetCreatedBy(v uuid.UUID) *ServiceAccountUpsert

SetCreatedBy sets the "created_by" field.

func (*ServiceAccountUpsert) SetDescription

func (u *ServiceAccountUpsert) SetDescription(v string) *ServiceAccountUpsert

SetDescription sets the "description" field.

func (*ServiceAccountUpsert) SetEmail

SetEmail sets the "email" field.

func (*ServiceAccountUpsert) SetLastUsedAt

func (u *ServiceAccountUpsert) SetLastUsedAt(v time.Time) *ServiceAccountUpsert

SetLastUsedAt sets the "last_used_at" field.

func (*ServiceAccountUpsert) SetName

SetName sets the "name" field.

func (*ServiceAccountUpsert) SetOrganizationID

func (u *ServiceAccountUpsert) SetOrganizationID(v uuid.UUID) *ServiceAccountUpsert

SetOrganizationID sets the "organization_id" field.

func (*ServiceAccountUpsert) SetUpdatedAt

func (u *ServiceAccountUpsert) SetUpdatedAt(v time.Time) *ServiceAccountUpsert

SetUpdatedAt sets the "updated_at" field.

func (*ServiceAccountUpsert) UpdateActive

func (u *ServiceAccountUpsert) UpdateActive() *ServiceAccountUpsert

UpdateActive sets the "active" field to the value that was provided on create.

func (*ServiceAccountUpsert) UpdateAllowedScopes

func (u *ServiceAccountUpsert) UpdateAllowedScopes() *ServiceAccountUpsert

UpdateAllowedScopes sets the "allowed_scopes" field to the value that was provided on create.

func (*ServiceAccountUpsert) UpdateCreatedBy

func (u *ServiceAccountUpsert) UpdateCreatedBy() *ServiceAccountUpsert

UpdateCreatedBy sets the "created_by" field to the value that was provided on create.

func (*ServiceAccountUpsert) UpdateDescription

func (u *ServiceAccountUpsert) UpdateDescription() *ServiceAccountUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*ServiceAccountUpsert) UpdateEmail

func (u *ServiceAccountUpsert) UpdateEmail() *ServiceAccountUpsert

UpdateEmail sets the "email" field to the value that was provided on create.

func (*ServiceAccountUpsert) UpdateLastUsedAt

func (u *ServiceAccountUpsert) UpdateLastUsedAt() *ServiceAccountUpsert

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*ServiceAccountUpsert) UpdateName

func (u *ServiceAccountUpsert) UpdateName() *ServiceAccountUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*ServiceAccountUpsert) UpdateOrganizationID

func (u *ServiceAccountUpsert) UpdateOrganizationID() *ServiceAccountUpsert

UpdateOrganizationID sets the "organization_id" field to the value that was provided on create.

func (*ServiceAccountUpsert) UpdateUpdatedAt

func (u *ServiceAccountUpsert) UpdateUpdatedAt() *ServiceAccountUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type ServiceAccountUpsertBulk

type ServiceAccountUpsertBulk struct {
	// contains filtered or unexported fields
}

ServiceAccountUpsertBulk is the builder for "upsert"-ing a bulk of ServiceAccount nodes.

func (*ServiceAccountUpsertBulk) ClearDescription

func (u *ServiceAccountUpsertBulk) ClearDescription() *ServiceAccountUpsertBulk

ClearDescription clears the value of the "description" field.

func (*ServiceAccountUpsertBulk) ClearLastUsedAt

func (u *ServiceAccountUpsertBulk) ClearLastUsedAt() *ServiceAccountUpsertBulk

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*ServiceAccountUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ServiceAccountUpsertBulk) Exec

Exec executes the query.

func (*ServiceAccountUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*ServiceAccountUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.ServiceAccount.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*ServiceAccountUpsertBulk) SetActive

SetActive sets the "active" field.

func (*ServiceAccountUpsertBulk) SetAllowedScopes

func (u *ServiceAccountUpsertBulk) SetAllowedScopes(v []string) *ServiceAccountUpsertBulk

SetAllowedScopes sets the "allowed_scopes" field.

func (*ServiceAccountUpsertBulk) SetCreatedBy

SetCreatedBy sets the "created_by" field.

func (*ServiceAccountUpsertBulk) SetDescription

SetDescription sets the "description" field.

func (*ServiceAccountUpsertBulk) SetEmail

SetEmail sets the "email" field.

func (*ServiceAccountUpsertBulk) SetLastUsedAt

SetLastUsedAt sets the "last_used_at" field.

func (*ServiceAccountUpsertBulk) SetName

SetName sets the "name" field.

func (*ServiceAccountUpsertBulk) SetOrganizationID

SetOrganizationID sets the "organization_id" field.

func (*ServiceAccountUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*ServiceAccountUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the ServiceAccountCreateBulk.OnConflict documentation for more info.

func (*ServiceAccountUpsertBulk) UpdateActive

UpdateActive sets the "active" field to the value that was provided on create.

func (*ServiceAccountUpsertBulk) UpdateAllowedScopes

func (u *ServiceAccountUpsertBulk) UpdateAllowedScopes() *ServiceAccountUpsertBulk

UpdateAllowedScopes sets the "allowed_scopes" field to the value that was provided on create.

func (*ServiceAccountUpsertBulk) UpdateCreatedBy

func (u *ServiceAccountUpsertBulk) UpdateCreatedBy() *ServiceAccountUpsertBulk

UpdateCreatedBy sets the "created_by" field to the value that was provided on create.

func (*ServiceAccountUpsertBulk) UpdateDescription

func (u *ServiceAccountUpsertBulk) UpdateDescription() *ServiceAccountUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*ServiceAccountUpsertBulk) UpdateEmail

UpdateEmail sets the "email" field to the value that was provided on create.

func (*ServiceAccountUpsertBulk) UpdateLastUsedAt

func (u *ServiceAccountUpsertBulk) UpdateLastUsedAt() *ServiceAccountUpsertBulk

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*ServiceAccountUpsertBulk) UpdateName

UpdateName sets the "name" field to the value that was provided on create.

func (*ServiceAccountUpsertBulk) UpdateNewValues

func (u *ServiceAccountUpsertBulk) UpdateNewValues() *ServiceAccountUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.ServiceAccount.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(serviceaccount.FieldID)
		}),
	).
	Exec(ctx)

func (*ServiceAccountUpsertBulk) UpdateOrganizationID

func (u *ServiceAccountUpsertBulk) UpdateOrganizationID() *ServiceAccountUpsertBulk

UpdateOrganizationID sets the "organization_id" field to the value that was provided on create.

func (*ServiceAccountUpsertBulk) UpdateUpdatedAt

func (u *ServiceAccountUpsertBulk) UpdateUpdatedAt() *ServiceAccountUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type ServiceAccountUpsertOne

type ServiceAccountUpsertOne struct {
	// contains filtered or unexported fields
}

ServiceAccountUpsertOne is the builder for "upsert"-ing

one ServiceAccount node.

func (*ServiceAccountUpsertOne) ClearDescription

func (u *ServiceAccountUpsertOne) ClearDescription() *ServiceAccountUpsertOne

ClearDescription clears the value of the "description" field.

func (*ServiceAccountUpsertOne) ClearLastUsedAt

func (u *ServiceAccountUpsertOne) ClearLastUsedAt() *ServiceAccountUpsertOne

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*ServiceAccountUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ServiceAccountUpsertOne) Exec

Exec executes the query.

func (*ServiceAccountUpsertOne) ExecX

func (u *ServiceAccountUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ServiceAccountUpsertOne) ID

func (u *ServiceAccountUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*ServiceAccountUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*ServiceAccountUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.ServiceAccount.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*ServiceAccountUpsertOne) SetActive

SetActive sets the "active" field.

func (*ServiceAccountUpsertOne) SetAllowedScopes

func (u *ServiceAccountUpsertOne) SetAllowedScopes(v []string) *ServiceAccountUpsertOne

SetAllowedScopes sets the "allowed_scopes" field.

func (*ServiceAccountUpsertOne) SetCreatedBy

SetCreatedBy sets the "created_by" field.

func (*ServiceAccountUpsertOne) SetDescription

SetDescription sets the "description" field.

func (*ServiceAccountUpsertOne) SetEmail

SetEmail sets the "email" field.

func (*ServiceAccountUpsertOne) SetLastUsedAt

SetLastUsedAt sets the "last_used_at" field.

func (*ServiceAccountUpsertOne) SetName

SetName sets the "name" field.

func (*ServiceAccountUpsertOne) SetOrganizationID

func (u *ServiceAccountUpsertOne) SetOrganizationID(v uuid.UUID) *ServiceAccountUpsertOne

SetOrganizationID sets the "organization_id" field.

func (*ServiceAccountUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*ServiceAccountUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the ServiceAccountCreate.OnConflict documentation for more info.

func (*ServiceAccountUpsertOne) UpdateActive

UpdateActive sets the "active" field to the value that was provided on create.

func (*ServiceAccountUpsertOne) UpdateAllowedScopes

func (u *ServiceAccountUpsertOne) UpdateAllowedScopes() *ServiceAccountUpsertOne

UpdateAllowedScopes sets the "allowed_scopes" field to the value that was provided on create.

func (*ServiceAccountUpsertOne) UpdateCreatedBy

func (u *ServiceAccountUpsertOne) UpdateCreatedBy() *ServiceAccountUpsertOne

UpdateCreatedBy sets the "created_by" field to the value that was provided on create.

func (*ServiceAccountUpsertOne) UpdateDescription

func (u *ServiceAccountUpsertOne) UpdateDescription() *ServiceAccountUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*ServiceAccountUpsertOne) UpdateEmail

UpdateEmail sets the "email" field to the value that was provided on create.

func (*ServiceAccountUpsertOne) UpdateLastUsedAt

func (u *ServiceAccountUpsertOne) UpdateLastUsedAt() *ServiceAccountUpsertOne

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*ServiceAccountUpsertOne) UpdateName

UpdateName sets the "name" field to the value that was provided on create.

func (*ServiceAccountUpsertOne) UpdateNewValues

func (u *ServiceAccountUpsertOne) UpdateNewValues() *ServiceAccountUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.ServiceAccount.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(serviceaccount.FieldID)
		}),
	).
	Exec(ctx)

func (*ServiceAccountUpsertOne) UpdateOrganizationID

func (u *ServiceAccountUpsertOne) UpdateOrganizationID() *ServiceAccountUpsertOne

UpdateOrganizationID sets the "organization_id" field to the value that was provided on create.

func (*ServiceAccountUpsertOne) UpdateUpdatedAt

func (u *ServiceAccountUpsertOne) UpdateUpdatedAt() *ServiceAccountUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type ServiceAccounts

type ServiceAccounts []*ServiceAccount

ServiceAccounts is a parsable slice of ServiceAccount.

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 {

	// APIKey is the client for interacting with the APIKey builders.
	APIKey *APIKeyClient
	// Membership is the client for interacting with the Membership builders.
	Membership *MembershipClient
	// OAuthAccount is the client for interacting with the OAuthAccount builders.
	OAuthAccount *OAuthAccountClient
	// OAuthApp is the client for interacting with the OAuthApp builders.
	OAuthApp *OAuthAppClient
	// OAuthAppSecret is the client for interacting with the OAuthAppSecret builders.
	OAuthAppSecret *OAuthAppSecretClient
	// OAuthAuthCode is the client for interacting with the OAuthAuthCode builders.
	OAuthAuthCode *OAuthAuthCodeClient
	// OAuthConsent is the client for interacting with the OAuthConsent builders.
	OAuthConsent *OAuthConsentClient
	// OAuthToken is the client for interacting with the OAuthToken builders.
	OAuthToken *OAuthTokenClient
	// Organization is the client for interacting with the Organization builders.
	Organization *OrganizationClient
	// RefreshToken is the client for interacting with the RefreshToken builders.
	RefreshToken *RefreshTokenClient
	// ServiceAccount is the client for interacting with the ServiceAccount builders.
	ServiceAccount *ServiceAccountClient
	// ServiceAccountKeyPair is the client for interacting with the ServiceAccountKeyPair builders.
	ServiceAccountKeyPair *ServiceAccountKeyPairClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// 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 User

type User struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Email holds the value of the "email" field.
	Email string `json:"email,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// AvatarURL holds the value of the "avatar_url" field.
	AvatarURL *string `json:"avatar_url,omitempty"`
	// PasswordHash holds the value of the "password_hash" field.
	PasswordHash string `json:"-"`
	// Cross-organization admin access
	IsPlatformAdmin bool `json:"is_platform_admin,omitempty"`
	// Active holds the value of the "active" field.
	Active bool `json:"active,omitempty"`
	// LastLoginAt holds the value of the "last_login_at" field.
	LastLoginAt *time.Time `json:"last_login_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UserQuery when eager-loading is set.
	Edges UserEdges `json:"edges"`
	// contains filtered or unexported fields
}

User is the model entity for the User schema.

func (*User) QueryAPIKeys

func (_m *User) QueryAPIKeys() *APIKeyQuery

QueryAPIKeys queries the "api_keys" edge of the User entity.

func (*User) QueryCreatedServiceAccounts

func (_m *User) QueryCreatedServiceAccounts() *ServiceAccountQuery

QueryCreatedServiceAccounts queries the "created_service_accounts" edge of the User entity.

func (*User) QueryMemberships

func (_m *User) QueryMemberships() *MembershipQuery

QueryMemberships queries the "memberships" edge of the User entity.

func (*User) QueryOauthAccounts

func (_m *User) QueryOauthAccounts() *OAuthAccountQuery

QueryOauthAccounts queries the "oauth_accounts" edge of the User entity.

func (*User) QueryOauthApps

func (_m *User) QueryOauthApps() *OAuthAppQuery

QueryOauthApps queries the "oauth_apps" edge of the User entity.

func (*User) QueryOauthAuthCodes

func (_m *User) QueryOauthAuthCodes() *OAuthAuthCodeQuery

QueryOauthAuthCodes queries the "oauth_auth_codes" edge of the User entity.

func (*User) QueryOauthConsents

func (_m *User) QueryOauthConsents() *OAuthConsentQuery

QueryOauthConsents queries the "oauth_consents" edge of the User entity.

func (*User) QueryOauthTokens

func (_m *User) QueryOauthTokens() *OAuthTokenQuery

QueryOauthTokens queries the "oauth_tokens" edge of the User entity.

func (*User) QueryRefreshTokens

func (_m *User) QueryRefreshTokens() *RefreshTokenQuery

QueryRefreshTokens queries the "refresh_tokens" edge of the User entity.

func (*User) String

func (_m *User) String() string

String implements the fmt.Stringer.

func (*User) Unwrap

func (_m *User) Unwrap() *User

Unwrap unwraps the User 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 (*User) Update

func (_m *User) Update() *UserUpdateOne

Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.

func (*User) Value

func (_m *User) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the User. This includes values selected through modifiers, order, etc.

type UserClient

type UserClient struct {
	// contains filtered or unexported fields
}

UserClient is a client for the User schema.

func NewUserClient

func NewUserClient(c config) *UserClient

NewUserClient returns a client for the User from the given config.

func (*UserClient) Create

func (c *UserClient) Create() *UserCreate

Create returns a builder for creating a User entity.

func (*UserClient) CreateBulk

func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk

CreateBulk returns a builder for creating a bulk of User entities.

func (*UserClient) Delete

func (c *UserClient) Delete() *UserDelete

Delete returns a delete builder for User.

func (*UserClient) DeleteOne

func (c *UserClient) DeleteOne(_m *User) *UserDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserClient) DeleteOneID

func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserClient) Get

func (c *UserClient) Get(ctx context.Context, id uuid.UUID) (*User, error)

Get returns a User entity by its id.

func (*UserClient) GetX

func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *User

GetX is like Get, but panics if an error occurs.

func (*UserClient) Hooks

func (c *UserClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UserClient) Intercept

func (c *UserClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.

func (*UserClient) Interceptors

func (c *UserClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UserClient) MapCreateBulk

func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*UserClient) Query

func (c *UserClient) Query() *UserQuery

Query returns a query builder for User.

func (*UserClient) QueryAPIKeys

func (c *UserClient) QueryAPIKeys(_m *User) *APIKeyQuery

QueryAPIKeys queries the api_keys edge of a User.

func (*UserClient) QueryCreatedServiceAccounts

func (c *UserClient) QueryCreatedServiceAccounts(_m *User) *ServiceAccountQuery

QueryCreatedServiceAccounts queries the created_service_accounts edge of a User.

func (*UserClient) QueryMemberships

func (c *UserClient) QueryMemberships(_m *User) *MembershipQuery

QueryMemberships queries the memberships edge of a User.

func (*UserClient) QueryOauthAccounts

func (c *UserClient) QueryOauthAccounts(_m *User) *OAuthAccountQuery

QueryOauthAccounts queries the oauth_accounts edge of a User.

func (*UserClient) QueryOauthApps

func (c *UserClient) QueryOauthApps(_m *User) *OAuthAppQuery

QueryOauthApps queries the oauth_apps edge of a User.

func (*UserClient) QueryOauthAuthCodes

func (c *UserClient) QueryOauthAuthCodes(_m *User) *OAuthAuthCodeQuery

QueryOauthAuthCodes queries the oauth_auth_codes edge of a User.

func (*UserClient) QueryOauthConsents

func (c *UserClient) QueryOauthConsents(_m *User) *OAuthConsentQuery

QueryOauthConsents queries the oauth_consents edge of a User.

func (*UserClient) QueryOauthTokens

func (c *UserClient) QueryOauthTokens(_m *User) *OAuthTokenQuery

QueryOauthTokens queries the oauth_tokens edge of a User.

func (*UserClient) QueryRefreshTokens

func (c *UserClient) QueryRefreshTokens(_m *User) *RefreshTokenQuery

QueryRefreshTokens queries the refresh_tokens edge of a User.

func (*UserClient) Update

func (c *UserClient) Update() *UserUpdate

Update returns an update builder for User.

func (*UserClient) UpdateOne

func (c *UserClient) UpdateOne(_m *User) *UserUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserClient) UpdateOneID

func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserClient) Use

func (c *UserClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.

type UserCreate

type UserCreate struct {
	// contains filtered or unexported fields
}

UserCreate is the builder for creating a User entity.

func (*UserCreate) AddAPIKeyIDs

func (_c *UserCreate) AddAPIKeyIDs(ids ...uuid.UUID) *UserCreate

AddAPIKeyIDs adds the "api_keys" edge to the APIKey entity by IDs.

func (*UserCreate) AddAPIKeys

func (_c *UserCreate) AddAPIKeys(v ...*APIKey) *UserCreate

AddAPIKeys adds the "api_keys" edges to the APIKey entity.

func (*UserCreate) AddCreatedServiceAccountIDs

func (_c *UserCreate) AddCreatedServiceAccountIDs(ids ...uuid.UUID) *UserCreate

AddCreatedServiceAccountIDs adds the "created_service_accounts" edge to the ServiceAccount entity by IDs.

func (*UserCreate) AddCreatedServiceAccounts

func (_c *UserCreate) AddCreatedServiceAccounts(v ...*ServiceAccount) *UserCreate

AddCreatedServiceAccounts adds the "created_service_accounts" edges to the ServiceAccount entity.

func (*UserCreate) AddMembershipIDs

func (_c *UserCreate) AddMembershipIDs(ids ...uuid.UUID) *UserCreate

AddMembershipIDs adds the "memberships" edge to the Membership entity by IDs.

func (*UserCreate) AddMemberships

func (_c *UserCreate) AddMemberships(v ...*Membership) *UserCreate

AddMemberships adds the "memberships" edges to the Membership entity.

func (*UserCreate) AddOauthAccountIDs

func (_c *UserCreate) AddOauthAccountIDs(ids ...uuid.UUID) *UserCreate

AddOauthAccountIDs adds the "oauth_accounts" edge to the OAuthAccount entity by IDs.

func (*UserCreate) AddOauthAccounts

func (_c *UserCreate) AddOauthAccounts(v ...*OAuthAccount) *UserCreate

AddOauthAccounts adds the "oauth_accounts" edges to the OAuthAccount entity.

func (*UserCreate) AddOauthAppIDs

func (_c *UserCreate) AddOauthAppIDs(ids ...uuid.UUID) *UserCreate

AddOauthAppIDs adds the "oauth_apps" edge to the OAuthApp entity by IDs.

func (*UserCreate) AddOauthApps

func (_c *UserCreate) AddOauthApps(v ...*OAuthApp) *UserCreate

AddOauthApps adds the "oauth_apps" edges to the OAuthApp entity.

func (*UserCreate) AddOauthAuthCodeIDs

func (_c *UserCreate) AddOauthAuthCodeIDs(ids ...uuid.UUID) *UserCreate

AddOauthAuthCodeIDs adds the "oauth_auth_codes" edge to the OAuthAuthCode entity by IDs.

func (*UserCreate) AddOauthAuthCodes

func (_c *UserCreate) AddOauthAuthCodes(v ...*OAuthAuthCode) *UserCreate

AddOauthAuthCodes adds the "oauth_auth_codes" edges to the OAuthAuthCode entity.

func (*UserCreate) AddOauthConsentIDs

func (_c *UserCreate) AddOauthConsentIDs(ids ...uuid.UUID) *UserCreate

AddOauthConsentIDs adds the "oauth_consents" edge to the OAuthConsent entity by IDs.

func (*UserCreate) AddOauthConsents

func (_c *UserCreate) AddOauthConsents(v ...*OAuthConsent) *UserCreate

AddOauthConsents adds the "oauth_consents" edges to the OAuthConsent entity.

func (*UserCreate) AddOauthTokenIDs

func (_c *UserCreate) AddOauthTokenIDs(ids ...uuid.UUID) *UserCreate

AddOauthTokenIDs adds the "oauth_tokens" edge to the OAuthToken entity by IDs.

func (*UserCreate) AddOauthTokens

func (_c *UserCreate) AddOauthTokens(v ...*OAuthToken) *UserCreate

AddOauthTokens adds the "oauth_tokens" edges to the OAuthToken entity.

func (*UserCreate) AddRefreshTokenIDs

func (_c *UserCreate) AddRefreshTokenIDs(ids ...uuid.UUID) *UserCreate

AddRefreshTokenIDs adds the "refresh_tokens" edge to the RefreshToken entity by IDs.

func (*UserCreate) AddRefreshTokens

func (_c *UserCreate) AddRefreshTokens(v ...*RefreshToken) *UserCreate

AddRefreshTokens adds the "refresh_tokens" edges to the RefreshToken entity.

func (*UserCreate) Exec

func (_c *UserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreate) ExecX

func (_c *UserCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreate) Mutation

func (_c *UserCreate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserCreate) OnConflict

func (_c *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.User.Create().
	SetCreatedAt(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*UserCreate) OnConflictColumns

func (_c *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserCreate) Save

func (_c *UserCreate) Save(ctx context.Context) (*User, error)

Save creates the User in the database.

func (*UserCreate) SaveX

func (_c *UserCreate) SaveX(ctx context.Context) *User

SaveX calls Save and panics if Save returns an error.

func (*UserCreate) SetActive

func (_c *UserCreate) SetActive(v bool) *UserCreate

SetActive sets the "active" field.

func (*UserCreate) SetAvatarURL

func (_c *UserCreate) SetAvatarURL(v string) *UserCreate

SetAvatarURL sets the "avatar_url" field.

func (*UserCreate) SetCreatedAt

func (_c *UserCreate) SetCreatedAt(v time.Time) *UserCreate

SetCreatedAt sets the "created_at" field.

func (*UserCreate) SetEmail

func (_c *UserCreate) SetEmail(v string) *UserCreate

SetEmail sets the "email" field.

func (*UserCreate) SetID

func (_c *UserCreate) SetID(v uuid.UUID) *UserCreate

SetID sets the "id" field.

func (*UserCreate) SetIsPlatformAdmin

func (_c *UserCreate) SetIsPlatformAdmin(v bool) *UserCreate

SetIsPlatformAdmin sets the "is_platform_admin" field.

func (*UserCreate) SetLastLoginAt

func (_c *UserCreate) SetLastLoginAt(v time.Time) *UserCreate

SetLastLoginAt sets the "last_login_at" field.

func (*UserCreate) SetName

func (_c *UserCreate) SetName(v string) *UserCreate

SetName sets the "name" field.

func (*UserCreate) SetNillableActive

func (_c *UserCreate) SetNillableActive(v *bool) *UserCreate

SetNillableActive sets the "active" field if the given value is not nil.

func (*UserCreate) SetNillableAvatarURL

func (_c *UserCreate) SetNillableAvatarURL(v *string) *UserCreate

SetNillableAvatarURL sets the "avatar_url" field if the given value is not nil.

func (*UserCreate) SetNillableCreatedAt

func (_c *UserCreate) SetNillableCreatedAt(v *time.Time) *UserCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UserCreate) SetNillableID

func (_c *UserCreate) SetNillableID(v *uuid.UUID) *UserCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*UserCreate) SetNillableIsPlatformAdmin

func (_c *UserCreate) SetNillableIsPlatformAdmin(v *bool) *UserCreate

SetNillableIsPlatformAdmin sets the "is_platform_admin" field if the given value is not nil.

func (*UserCreate) SetNillableLastLoginAt

func (_c *UserCreate) SetNillableLastLoginAt(v *time.Time) *UserCreate

SetNillableLastLoginAt sets the "last_login_at" field if the given value is not nil.

func (*UserCreate) SetNillablePasswordHash

func (_c *UserCreate) SetNillablePasswordHash(v *string) *UserCreate

SetNillablePasswordHash sets the "password_hash" field if the given value is not nil.

func (*UserCreate) SetNillableUpdatedAt

func (_c *UserCreate) SetNillableUpdatedAt(v *time.Time) *UserCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UserCreate) SetPasswordHash

func (_c *UserCreate) SetPasswordHash(v string) *UserCreate

SetPasswordHash sets the "password_hash" field.

func (*UserCreate) SetUpdatedAt

func (_c *UserCreate) SetUpdatedAt(v time.Time) *UserCreate

SetUpdatedAt sets the "updated_at" field.

type UserCreateBulk

type UserCreateBulk struct {
	// contains filtered or unexported fields
}

UserCreateBulk is the builder for creating many User entities in bulk.

func (*UserCreateBulk) Exec

func (_c *UserCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreateBulk) ExecX

func (_c *UserCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreateBulk) OnConflict

func (_c *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.User.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*UserCreateBulk) OnConflictColumns

func (_c *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserCreateBulk) Save

func (_c *UserCreateBulk) Save(ctx context.Context) ([]*User, error)

Save creates the User entities in the database.

func (*UserCreateBulk) SaveX

func (_c *UserCreateBulk) SaveX(ctx context.Context) []*User

SaveX is like Save, but panics if an error occurs.

type UserDelete

type UserDelete struct {
	// contains filtered or unexported fields
}

UserDelete is the builder for deleting a User entity.

func (*UserDelete) Exec

func (_d *UserDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserDelete) ExecX

func (_d *UserDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserDelete) Where

func (_d *UserDelete) Where(ps ...predicate.User) *UserDelete

Where appends a list predicates to the UserDelete builder.

type UserDeleteOne

type UserDeleteOne struct {
	// contains filtered or unexported fields
}

UserDeleteOne is the builder for deleting a single User entity.

func (*UserDeleteOne) Exec

func (_d *UserDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserDeleteOne) ExecX

func (_d *UserDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserDeleteOne) Where

func (_d *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne

Where appends a list predicates to the UserDelete builder.

type UserEdges

type UserEdges struct {
	// Memberships holds the value of the memberships edge.
	Memberships []*Membership `json:"memberships,omitempty"`
	// OauthAccounts holds the value of the oauth_accounts edge.
	OauthAccounts []*OAuthAccount `json:"oauth_accounts,omitempty"`
	// RefreshTokens holds the value of the refresh_tokens edge.
	RefreshTokens []*RefreshToken `json:"refresh_tokens,omitempty"`
	// APIKeys holds the value of the api_keys edge.
	APIKeys []*APIKey `json:"api_keys,omitempty"`
	// OauthApps holds the value of the oauth_apps edge.
	OauthApps []*OAuthApp `json:"oauth_apps,omitempty"`
	// OauthTokens holds the value of the oauth_tokens edge.
	OauthTokens []*OAuthToken `json:"oauth_tokens,omitempty"`
	// OauthAuthCodes holds the value of the oauth_auth_codes edge.
	OauthAuthCodes []*OAuthAuthCode `json:"oauth_auth_codes,omitempty"`
	// OauthConsents holds the value of the oauth_consents edge.
	OauthConsents []*OAuthConsent `json:"oauth_consents,omitempty"`
	// CreatedServiceAccounts holds the value of the created_service_accounts edge.
	CreatedServiceAccounts []*ServiceAccount `json:"created_service_accounts,omitempty"`
	// contains filtered or unexported fields
}

UserEdges holds the relations/edges for other nodes in the graph.

func (UserEdges) APIKeysOrErr

func (e UserEdges) APIKeysOrErr() ([]*APIKey, error)

APIKeysOrErr returns the APIKeys value or an error if the edge was not loaded in eager-loading.

func (UserEdges) CreatedServiceAccountsOrErr

func (e UserEdges) CreatedServiceAccountsOrErr() ([]*ServiceAccount, error)

CreatedServiceAccountsOrErr returns the CreatedServiceAccounts value or an error if the edge was not loaded in eager-loading.

func (UserEdges) MembershipsOrErr

func (e UserEdges) MembershipsOrErr() ([]*Membership, error)

MembershipsOrErr returns the Memberships value or an error if the edge was not loaded in eager-loading.

func (UserEdges) OauthAccountsOrErr

func (e UserEdges) OauthAccountsOrErr() ([]*OAuthAccount, error)

OauthAccountsOrErr returns the OauthAccounts value or an error if the edge was not loaded in eager-loading.

func (UserEdges) OauthAppsOrErr

func (e UserEdges) OauthAppsOrErr() ([]*OAuthApp, error)

OauthAppsOrErr returns the OauthApps value or an error if the edge was not loaded in eager-loading.

func (UserEdges) OauthAuthCodesOrErr

func (e UserEdges) OauthAuthCodesOrErr() ([]*OAuthAuthCode, error)

OauthAuthCodesOrErr returns the OauthAuthCodes value or an error if the edge was not loaded in eager-loading.

func (UserEdges) OauthConsentsOrErr

func (e UserEdges) OauthConsentsOrErr() ([]*OAuthConsent, error)

OauthConsentsOrErr returns the OauthConsents value or an error if the edge was not loaded in eager-loading.

func (UserEdges) OauthTokensOrErr

func (e UserEdges) OauthTokensOrErr() ([]*OAuthToken, error)

OauthTokensOrErr returns the OauthTokens value or an error if the edge was not loaded in eager-loading.

func (UserEdges) RefreshTokensOrErr

func (e UserEdges) RefreshTokensOrErr() ([]*RefreshToken, error)

RefreshTokensOrErr returns the RefreshTokens value or an error if the edge was not loaded in eager-loading.

type UserFilter

type UserFilter struct {
	// contains filtered or unexported fields
}

UserFilter provides a generic filtering capability at runtime for UserQuery.

func (*UserFilter) Where

func (f *UserFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*UserFilter) WhereActive

func (f *UserFilter) WhereActive(p entql.BoolP)

WhereActive applies the entql bool predicate on the active field.

func (*UserFilter) WhereAvatarURL

func (f *UserFilter) WhereAvatarURL(p entql.StringP)

WhereAvatarURL applies the entql string predicate on the avatar_url field.

func (*UserFilter) WhereCreatedAt

func (f *UserFilter) WhereCreatedAt(p entql.TimeP)

WhereCreatedAt applies the entql time.Time predicate on the created_at field.

func (*UserFilter) WhereEmail

func (f *UserFilter) WhereEmail(p entql.StringP)

WhereEmail applies the entql string predicate on the email field.

func (*UserFilter) WhereHasAPIKeys

func (f *UserFilter) WhereHasAPIKeys()

WhereHasAPIKeys applies a predicate to check if query has an edge api_keys.

func (*UserFilter) WhereHasAPIKeysWith

func (f *UserFilter) WhereHasAPIKeysWith(preds ...predicate.APIKey)

WhereHasAPIKeysWith applies a predicate to check if query has an edge api_keys with a given conditions (other predicates).

func (*UserFilter) WhereHasCreatedServiceAccounts

func (f *UserFilter) WhereHasCreatedServiceAccounts()

WhereHasCreatedServiceAccounts applies a predicate to check if query has an edge created_service_accounts.

func (*UserFilter) WhereHasCreatedServiceAccountsWith

func (f *UserFilter) WhereHasCreatedServiceAccountsWith(preds ...predicate.ServiceAccount)

WhereHasCreatedServiceAccountsWith applies a predicate to check if query has an edge created_service_accounts with a given conditions (other predicates).

func (*UserFilter) WhereHasMemberships

func (f *UserFilter) WhereHasMemberships()

WhereHasMemberships applies a predicate to check if query has an edge memberships.

func (*UserFilter) WhereHasMembershipsWith

func (f *UserFilter) WhereHasMembershipsWith(preds ...predicate.Membership)

WhereHasMembershipsWith applies a predicate to check if query has an edge memberships with a given conditions (other predicates).

func (*UserFilter) WhereHasOauthAccounts

func (f *UserFilter) WhereHasOauthAccounts()

WhereHasOauthAccounts applies a predicate to check if query has an edge oauth_accounts.

func (*UserFilter) WhereHasOauthAccountsWith

func (f *UserFilter) WhereHasOauthAccountsWith(preds ...predicate.OAuthAccount)

WhereHasOauthAccountsWith applies a predicate to check if query has an edge oauth_accounts with a given conditions (other predicates).

func (*UserFilter) WhereHasOauthApps

func (f *UserFilter) WhereHasOauthApps()

WhereHasOauthApps applies a predicate to check if query has an edge oauth_apps.

func (*UserFilter) WhereHasOauthAppsWith

func (f *UserFilter) WhereHasOauthAppsWith(preds ...predicate.OAuthApp)

WhereHasOauthAppsWith applies a predicate to check if query has an edge oauth_apps with a given conditions (other predicates).

func (*UserFilter) WhereHasOauthAuthCodes

func (f *UserFilter) WhereHasOauthAuthCodes()

WhereHasOauthAuthCodes applies a predicate to check if query has an edge oauth_auth_codes.

func (*UserFilter) WhereHasOauthAuthCodesWith

func (f *UserFilter) WhereHasOauthAuthCodesWith(preds ...predicate.OAuthAuthCode)

WhereHasOauthAuthCodesWith applies a predicate to check if query has an edge oauth_auth_codes with a given conditions (other predicates).

func (*UserFilter) WhereHasOauthConsents

func (f *UserFilter) WhereHasOauthConsents()

WhereHasOauthConsents applies a predicate to check if query has an edge oauth_consents.

func (*UserFilter) WhereHasOauthConsentsWith

func (f *UserFilter) WhereHasOauthConsentsWith(preds ...predicate.OAuthConsent)

WhereHasOauthConsentsWith applies a predicate to check if query has an edge oauth_consents with a given conditions (other predicates).

func (*UserFilter) WhereHasOauthTokens

func (f *UserFilter) WhereHasOauthTokens()

WhereHasOauthTokens applies a predicate to check if query has an edge oauth_tokens.

func (*UserFilter) WhereHasOauthTokensWith

func (f *UserFilter) WhereHasOauthTokensWith(preds ...predicate.OAuthToken)

WhereHasOauthTokensWith applies a predicate to check if query has an edge oauth_tokens with a given conditions (other predicates).

func (*UserFilter) WhereHasRefreshTokens

func (f *UserFilter) WhereHasRefreshTokens()

WhereHasRefreshTokens applies a predicate to check if query has an edge refresh_tokens.

func (*UserFilter) WhereHasRefreshTokensWith

func (f *UserFilter) WhereHasRefreshTokensWith(preds ...predicate.RefreshToken)

WhereHasRefreshTokensWith applies a predicate to check if query has an edge refresh_tokens with a given conditions (other predicates).

func (*UserFilter) WhereID

func (f *UserFilter) WhereID(p entql.ValueP)

WhereID applies the entql [16]byte predicate on the id field.

func (*UserFilter) WhereIsPlatformAdmin

func (f *UserFilter) WhereIsPlatformAdmin(p entql.BoolP)

WhereIsPlatformAdmin applies the entql bool predicate on the is_platform_admin field.

func (*UserFilter) WhereLastLoginAt

func (f *UserFilter) WhereLastLoginAt(p entql.TimeP)

WhereLastLoginAt applies the entql time.Time predicate on the last_login_at field.

func (*UserFilter) WhereName

func (f *UserFilter) WhereName(p entql.StringP)

WhereName applies the entql string predicate on the name field.

func (*UserFilter) WherePasswordHash

func (f *UserFilter) WherePasswordHash(p entql.StringP)

WherePasswordHash applies the entql string predicate on the password_hash field.

func (*UserFilter) WhereUpdatedAt

func (f *UserFilter) WhereUpdatedAt(p entql.TimeP)

WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.

type UserGroupBy

type UserGroupBy struct {
	// contains filtered or unexported fields
}

UserGroupBy is the group-by builder for User entities.

func (*UserGroupBy) Aggregate

func (_g *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UserGroupBy) Bool

func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolX

func (s *UserGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserGroupBy) Bools

func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolsX

func (s *UserGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserGroupBy) Float64

func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64X

func (s *UserGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserGroupBy) Float64s

func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64sX

func (s *UserGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserGroupBy) Int

func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntX

func (s *UserGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserGroupBy) Ints

func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntsX

func (s *UserGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserGroupBy) Scan

func (_g *UserGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserGroupBy) ScanX

func (s *UserGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserGroupBy) String

func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringX

func (s *UserGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserGroupBy) Strings

func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringsX

func (s *UserGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserMutation

type UserMutation struct {
	// contains filtered or unexported fields
}

UserMutation represents an operation that mutates the User nodes in the graph.

func (*UserMutation) APIKeysCleared

func (m *UserMutation) APIKeysCleared() bool

APIKeysCleared reports if the "api_keys" edge to the APIKey entity was cleared.

func (*UserMutation) APIKeysIDs

func (m *UserMutation) APIKeysIDs() (ids []uuid.UUID)

APIKeysIDs returns the "api_keys" edge IDs in the mutation.

func (*UserMutation) Active

func (m *UserMutation) Active() (r bool, exists bool)

Active returns the value of the "active" field in the mutation.

func (*UserMutation) AddAPIKeyIDs

func (m *UserMutation) AddAPIKeyIDs(ids ...uuid.UUID)

AddAPIKeyIDs adds the "api_keys" edge to the APIKey entity by ids.

func (*UserMutation) AddCreatedServiceAccountIDs

func (m *UserMutation) AddCreatedServiceAccountIDs(ids ...uuid.UUID)

AddCreatedServiceAccountIDs adds the "created_service_accounts" edge to the ServiceAccount entity by ids.

func (*UserMutation) AddField

func (m *UserMutation) 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 (*UserMutation) AddMembershipIDs

func (m *UserMutation) AddMembershipIDs(ids ...uuid.UUID)

AddMembershipIDs adds the "memberships" edge to the Membership entity by ids.

func (*UserMutation) AddOauthAccountIDs

func (m *UserMutation) AddOauthAccountIDs(ids ...uuid.UUID)

AddOauthAccountIDs adds the "oauth_accounts" edge to the OAuthAccount entity by ids.

func (*UserMutation) AddOauthAppIDs

func (m *UserMutation) AddOauthAppIDs(ids ...uuid.UUID)

AddOauthAppIDs adds the "oauth_apps" edge to the OAuthApp entity by ids.

func (*UserMutation) AddOauthAuthCodeIDs

func (m *UserMutation) AddOauthAuthCodeIDs(ids ...uuid.UUID)

AddOauthAuthCodeIDs adds the "oauth_auth_codes" edge to the OAuthAuthCode entity by ids.

func (*UserMutation) AddOauthConsentIDs

func (m *UserMutation) AddOauthConsentIDs(ids ...uuid.UUID)

AddOauthConsentIDs adds the "oauth_consents" edge to the OAuthConsent entity by ids.

func (*UserMutation) AddOauthTokenIDs

func (m *UserMutation) AddOauthTokenIDs(ids ...uuid.UUID)

AddOauthTokenIDs adds the "oauth_tokens" edge to the OAuthToken entity by ids.

func (*UserMutation) AddRefreshTokenIDs

func (m *UserMutation) AddRefreshTokenIDs(ids ...uuid.UUID)

AddRefreshTokenIDs adds the "refresh_tokens" edge to the RefreshToken entity by ids.

func (*UserMutation) AddedEdges

func (m *UserMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserMutation) AddedField

func (m *UserMutation) 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 (*UserMutation) AddedFields

func (m *UserMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserMutation) AddedIDs

func (m *UserMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserMutation) AvatarURL

func (m *UserMutation) AvatarURL() (r string, exists bool)

AvatarURL returns the value of the "avatar_url" field in the mutation.

func (*UserMutation) AvatarURLCleared

func (m *UserMutation) AvatarURLCleared() bool

AvatarURLCleared returns if the "avatar_url" field was cleared in this mutation.

func (*UserMutation) ClearAPIKeys

func (m *UserMutation) ClearAPIKeys()

ClearAPIKeys clears the "api_keys" edge to the APIKey entity.

func (*UserMutation) ClearAvatarURL

func (m *UserMutation) ClearAvatarURL()

ClearAvatarURL clears the value of the "avatar_url" field.

func (*UserMutation) ClearCreatedServiceAccounts

func (m *UserMutation) ClearCreatedServiceAccounts()

ClearCreatedServiceAccounts clears the "created_service_accounts" edge to the ServiceAccount entity.

func (*UserMutation) ClearEdge

func (m *UserMutation) 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 (*UserMutation) ClearField

func (m *UserMutation) 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 (*UserMutation) ClearLastLoginAt

func (m *UserMutation) ClearLastLoginAt()

ClearLastLoginAt clears the value of the "last_login_at" field.

func (*UserMutation) ClearMemberships

func (m *UserMutation) ClearMemberships()

ClearMemberships clears the "memberships" edge to the Membership entity.

func (*UserMutation) ClearOauthAccounts

func (m *UserMutation) ClearOauthAccounts()

ClearOauthAccounts clears the "oauth_accounts" edge to the OAuthAccount entity.

func (*UserMutation) ClearOauthApps

func (m *UserMutation) ClearOauthApps()

ClearOauthApps clears the "oauth_apps" edge to the OAuthApp entity.

func (*UserMutation) ClearOauthAuthCodes

func (m *UserMutation) ClearOauthAuthCodes()

ClearOauthAuthCodes clears the "oauth_auth_codes" edge to the OAuthAuthCode entity.

func (*UserMutation) ClearOauthConsents

func (m *UserMutation) ClearOauthConsents()

ClearOauthConsents clears the "oauth_consents" edge to the OAuthConsent entity.

func (*UserMutation) ClearOauthTokens

func (m *UserMutation) ClearOauthTokens()

ClearOauthTokens clears the "oauth_tokens" edge to the OAuthToken entity.

func (*UserMutation) ClearPasswordHash

func (m *UserMutation) ClearPasswordHash()

ClearPasswordHash clears the value of the "password_hash" field.

func (*UserMutation) ClearRefreshTokens

func (m *UserMutation) ClearRefreshTokens()

ClearRefreshTokens clears the "refresh_tokens" edge to the RefreshToken entity.

func (*UserMutation) ClearedEdges

func (m *UserMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserMutation) ClearedFields

func (m *UserMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserMutation) Client

func (m UserMutation) 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 (*UserMutation) CreatedAt

func (m *UserMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*UserMutation) CreatedServiceAccountsCleared

func (m *UserMutation) CreatedServiceAccountsCleared() bool

CreatedServiceAccountsCleared reports if the "created_service_accounts" edge to the ServiceAccount entity was cleared.

func (*UserMutation) CreatedServiceAccountsIDs

func (m *UserMutation) CreatedServiceAccountsIDs() (ids []uuid.UUID)

CreatedServiceAccountsIDs returns the "created_service_accounts" edge IDs in the mutation.

func (*UserMutation) EdgeCleared

func (m *UserMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserMutation) Email

func (m *UserMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*UserMutation) Field

func (m *UserMutation) 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 (*UserMutation) FieldCleared

func (m *UserMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserMutation) Fields

func (m *UserMutation) 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 (*UserMutation) Filter

func (m *UserMutation) Filter() *UserFilter

Filter returns an entql.Where implementation to apply filters on the UserMutation builder.

func (*UserMutation) ID

func (m *UserMutation) ID() (id uuid.UUID, 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 (*UserMutation) IDs

func (m *UserMutation) IDs(ctx context.Context) ([]uuid.UUID, 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 (*UserMutation) IsPlatformAdmin

func (m *UserMutation) IsPlatformAdmin() (r bool, exists bool)

IsPlatformAdmin returns the value of the "is_platform_admin" field in the mutation.

func (*UserMutation) LastLoginAt

func (m *UserMutation) LastLoginAt() (r time.Time, exists bool)

LastLoginAt returns the value of the "last_login_at" field in the mutation.

func (*UserMutation) LastLoginAtCleared

func (m *UserMutation) LastLoginAtCleared() bool

LastLoginAtCleared returns if the "last_login_at" field was cleared in this mutation.

func (*UserMutation) MembershipsCleared

func (m *UserMutation) MembershipsCleared() bool

MembershipsCleared reports if the "memberships" edge to the Membership entity was cleared.

func (*UserMutation) MembershipsIDs

func (m *UserMutation) MembershipsIDs() (ids []uuid.UUID)

MembershipsIDs returns the "memberships" edge IDs in the mutation.

func (*UserMutation) Name

func (m *UserMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*UserMutation) OauthAccountsCleared

func (m *UserMutation) OauthAccountsCleared() bool

OauthAccountsCleared reports if the "oauth_accounts" edge to the OAuthAccount entity was cleared.

func (*UserMutation) OauthAccountsIDs

func (m *UserMutation) OauthAccountsIDs() (ids []uuid.UUID)

OauthAccountsIDs returns the "oauth_accounts" edge IDs in the mutation.

func (*UserMutation) OauthAppsCleared

func (m *UserMutation) OauthAppsCleared() bool

OauthAppsCleared reports if the "oauth_apps" edge to the OAuthApp entity was cleared.

func (*UserMutation) OauthAppsIDs

func (m *UserMutation) OauthAppsIDs() (ids []uuid.UUID)

OauthAppsIDs returns the "oauth_apps" edge IDs in the mutation.

func (*UserMutation) OauthAuthCodesCleared

func (m *UserMutation) OauthAuthCodesCleared() bool

OauthAuthCodesCleared reports if the "oauth_auth_codes" edge to the OAuthAuthCode entity was cleared.

func (*UserMutation) OauthAuthCodesIDs

func (m *UserMutation) OauthAuthCodesIDs() (ids []uuid.UUID)

OauthAuthCodesIDs returns the "oauth_auth_codes" edge IDs in the mutation.

func (*UserMutation) OauthConsentsCleared

func (m *UserMutation) OauthConsentsCleared() bool

OauthConsentsCleared reports if the "oauth_consents" edge to the OAuthConsent entity was cleared.

func (*UserMutation) OauthConsentsIDs

func (m *UserMutation) OauthConsentsIDs() (ids []uuid.UUID)

OauthConsentsIDs returns the "oauth_consents" edge IDs in the mutation.

func (*UserMutation) OauthTokensCleared

func (m *UserMutation) OauthTokensCleared() bool

OauthTokensCleared reports if the "oauth_tokens" edge to the OAuthToken entity was cleared.

func (*UserMutation) OauthTokensIDs

func (m *UserMutation) OauthTokensIDs() (ids []uuid.UUID)

OauthTokensIDs returns the "oauth_tokens" edge IDs in the mutation.

func (*UserMutation) OldActive

func (m *UserMutation) OldActive(ctx context.Context) (v bool, err error)

OldActive returns the old "active" field's value of the User entity. If the User 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 (*UserMutation) OldAvatarURL

func (m *UserMutation) OldAvatarURL(ctx context.Context) (v *string, err error)

OldAvatarURL returns the old "avatar_url" field's value of the User entity. If the User 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 (*UserMutation) OldCreatedAt

func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the User entity. If the User 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 (*UserMutation) OldEmail

func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)

OldEmail returns the old "email" field's value of the User entity. If the User 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 (*UserMutation) OldField

func (m *UserMutation) 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 (*UserMutation) OldIsPlatformAdmin

func (m *UserMutation) OldIsPlatformAdmin(ctx context.Context) (v bool, err error)

OldIsPlatformAdmin returns the old "is_platform_admin" field's value of the User entity. If the User 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 (*UserMutation) OldLastLoginAt

func (m *UserMutation) OldLastLoginAt(ctx context.Context) (v *time.Time, err error)

OldLastLoginAt returns the old "last_login_at" field's value of the User entity. If the User 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 (*UserMutation) OldName

func (m *UserMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the User entity. If the User 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 (*UserMutation) OldPasswordHash

func (m *UserMutation) OldPasswordHash(ctx context.Context) (v string, err error)

OldPasswordHash returns the old "password_hash" field's value of the User entity. If the User 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 (*UserMutation) OldUpdatedAt

func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the User entity. If the User 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 (*UserMutation) Op

func (m *UserMutation) Op() Op

Op returns the operation name.

func (*UserMutation) PasswordHash

func (m *UserMutation) PasswordHash() (r string, exists bool)

PasswordHash returns the value of the "password_hash" field in the mutation.

func (*UserMutation) PasswordHashCleared

func (m *UserMutation) PasswordHashCleared() bool

PasswordHashCleared returns if the "password_hash" field was cleared in this mutation.

func (*UserMutation) RefreshTokensCleared

func (m *UserMutation) RefreshTokensCleared() bool

RefreshTokensCleared reports if the "refresh_tokens" edge to the RefreshToken entity was cleared.

func (*UserMutation) RefreshTokensIDs

func (m *UserMutation) RefreshTokensIDs() (ids []uuid.UUID)

RefreshTokensIDs returns the "refresh_tokens" edge IDs in the mutation.

func (*UserMutation) RemoveAPIKeyIDs

func (m *UserMutation) RemoveAPIKeyIDs(ids ...uuid.UUID)

RemoveAPIKeyIDs removes the "api_keys" edge to the APIKey entity by IDs.

func (*UserMutation) RemoveCreatedServiceAccountIDs

func (m *UserMutation) RemoveCreatedServiceAccountIDs(ids ...uuid.UUID)

RemoveCreatedServiceAccountIDs removes the "created_service_accounts" edge to the ServiceAccount entity by IDs.

func (*UserMutation) RemoveMembershipIDs

func (m *UserMutation) RemoveMembershipIDs(ids ...uuid.UUID)

RemoveMembershipIDs removes the "memberships" edge to the Membership entity by IDs.

func (*UserMutation) RemoveOauthAccountIDs

func (m *UserMutation) RemoveOauthAccountIDs(ids ...uuid.UUID)

RemoveOauthAccountIDs removes the "oauth_accounts" edge to the OAuthAccount entity by IDs.

func (*UserMutation) RemoveOauthAppIDs

func (m *UserMutation) RemoveOauthAppIDs(ids ...uuid.UUID)

RemoveOauthAppIDs removes the "oauth_apps" edge to the OAuthApp entity by IDs.

func (*UserMutation) RemoveOauthAuthCodeIDs

func (m *UserMutation) RemoveOauthAuthCodeIDs(ids ...uuid.UUID)

RemoveOauthAuthCodeIDs removes the "oauth_auth_codes" edge to the OAuthAuthCode entity by IDs.

func (*UserMutation) RemoveOauthConsentIDs

func (m *UserMutation) RemoveOauthConsentIDs(ids ...uuid.UUID)

RemoveOauthConsentIDs removes the "oauth_consents" edge to the OAuthConsent entity by IDs.

func (*UserMutation) RemoveOauthTokenIDs

func (m *UserMutation) RemoveOauthTokenIDs(ids ...uuid.UUID)

RemoveOauthTokenIDs removes the "oauth_tokens" edge to the OAuthToken entity by IDs.

func (*UserMutation) RemoveRefreshTokenIDs

func (m *UserMutation) RemoveRefreshTokenIDs(ids ...uuid.UUID)

RemoveRefreshTokenIDs removes the "refresh_tokens" edge to the RefreshToken entity by IDs.

func (*UserMutation) RemovedAPIKeysIDs

func (m *UserMutation) RemovedAPIKeysIDs() (ids []uuid.UUID)

RemovedAPIKeys returns the removed IDs of the "api_keys" edge to the APIKey entity.

func (*UserMutation) RemovedCreatedServiceAccountsIDs

func (m *UserMutation) RemovedCreatedServiceAccountsIDs() (ids []uuid.UUID)

RemovedCreatedServiceAccounts returns the removed IDs of the "created_service_accounts" edge to the ServiceAccount entity.

func (*UserMutation) RemovedEdges

func (m *UserMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserMutation) RemovedIDs

func (m *UserMutation) 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 (*UserMutation) RemovedMembershipsIDs

func (m *UserMutation) RemovedMembershipsIDs() (ids []uuid.UUID)

RemovedMemberships returns the removed IDs of the "memberships" edge to the Membership entity.

func (*UserMutation) RemovedOauthAccountsIDs

func (m *UserMutation) RemovedOauthAccountsIDs() (ids []uuid.UUID)

RemovedOauthAccounts returns the removed IDs of the "oauth_accounts" edge to the OAuthAccount entity.

func (*UserMutation) RemovedOauthAppsIDs

func (m *UserMutation) RemovedOauthAppsIDs() (ids []uuid.UUID)

RemovedOauthApps returns the removed IDs of the "oauth_apps" edge to the OAuthApp entity.

func (*UserMutation) RemovedOauthAuthCodesIDs

func (m *UserMutation) RemovedOauthAuthCodesIDs() (ids []uuid.UUID)

RemovedOauthAuthCodes returns the removed IDs of the "oauth_auth_codes" edge to the OAuthAuthCode entity.

func (*UserMutation) RemovedOauthConsentsIDs

func (m *UserMutation) RemovedOauthConsentsIDs() (ids []uuid.UUID)

RemovedOauthConsents returns the removed IDs of the "oauth_consents" edge to the OAuthConsent entity.

func (*UserMutation) RemovedOauthTokensIDs

func (m *UserMutation) RemovedOauthTokensIDs() (ids []uuid.UUID)

RemovedOauthTokens returns the removed IDs of the "oauth_tokens" edge to the OAuthToken entity.

func (*UserMutation) RemovedRefreshTokensIDs

func (m *UserMutation) RemovedRefreshTokensIDs() (ids []uuid.UUID)

RemovedRefreshTokens returns the removed IDs of the "refresh_tokens" edge to the RefreshToken entity.

func (*UserMutation) ResetAPIKeys

func (m *UserMutation) ResetAPIKeys()

ResetAPIKeys resets all changes to the "api_keys" edge.

func (*UserMutation) ResetActive

func (m *UserMutation) ResetActive()

ResetActive resets all changes to the "active" field.

func (*UserMutation) ResetAvatarURL

func (m *UserMutation) ResetAvatarURL()

ResetAvatarURL resets all changes to the "avatar_url" field.

func (*UserMutation) ResetCreatedAt

func (m *UserMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*UserMutation) ResetCreatedServiceAccounts

func (m *UserMutation) ResetCreatedServiceAccounts()

ResetCreatedServiceAccounts resets all changes to the "created_service_accounts" edge.

func (*UserMutation) ResetEdge

func (m *UserMutation) 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 (*UserMutation) ResetEmail

func (m *UserMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*UserMutation) ResetField

func (m *UserMutation) 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 (*UserMutation) ResetIsPlatformAdmin

func (m *UserMutation) ResetIsPlatformAdmin()

ResetIsPlatformAdmin resets all changes to the "is_platform_admin" field.

func (*UserMutation) ResetLastLoginAt

func (m *UserMutation) ResetLastLoginAt()

ResetLastLoginAt resets all changes to the "last_login_at" field.

func (*UserMutation) ResetMemberships

func (m *UserMutation) ResetMemberships()

ResetMemberships resets all changes to the "memberships" edge.

func (*UserMutation) ResetName

func (m *UserMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*UserMutation) ResetOauthAccounts

func (m *UserMutation) ResetOauthAccounts()

ResetOauthAccounts resets all changes to the "oauth_accounts" edge.

func (*UserMutation) ResetOauthApps

func (m *UserMutation) ResetOauthApps()

ResetOauthApps resets all changes to the "oauth_apps" edge.

func (*UserMutation) ResetOauthAuthCodes

func (m *UserMutation) ResetOauthAuthCodes()

ResetOauthAuthCodes resets all changes to the "oauth_auth_codes" edge.

func (*UserMutation) ResetOauthConsents

func (m *UserMutation) ResetOauthConsents()

ResetOauthConsents resets all changes to the "oauth_consents" edge.

func (*UserMutation) ResetOauthTokens

func (m *UserMutation) ResetOauthTokens()

ResetOauthTokens resets all changes to the "oauth_tokens" edge.

func (*UserMutation) ResetPasswordHash

func (m *UserMutation) ResetPasswordHash()

ResetPasswordHash resets all changes to the "password_hash" field.

func (*UserMutation) ResetRefreshTokens

func (m *UserMutation) ResetRefreshTokens()

ResetRefreshTokens resets all changes to the "refresh_tokens" edge.

func (*UserMutation) ResetUpdatedAt

func (m *UserMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*UserMutation) SetActive

func (m *UserMutation) SetActive(b bool)

SetActive sets the "active" field.

func (*UserMutation) SetAvatarURL

func (m *UserMutation) SetAvatarURL(s string)

SetAvatarURL sets the "avatar_url" field.

func (*UserMutation) SetCreatedAt

func (m *UserMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*UserMutation) SetEmail

func (m *UserMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*UserMutation) SetField

func (m *UserMutation) 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 (*UserMutation) SetID

func (m *UserMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.

func (*UserMutation) SetIsPlatformAdmin

func (m *UserMutation) SetIsPlatformAdmin(b bool)

SetIsPlatformAdmin sets the "is_platform_admin" field.

func (*UserMutation) SetLastLoginAt

func (m *UserMutation) SetLastLoginAt(t time.Time)

SetLastLoginAt sets the "last_login_at" field.

func (*UserMutation) SetName

func (m *UserMutation) SetName(s string)

SetName sets the "name" field.

func (*UserMutation) SetOp

func (m *UserMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserMutation) SetPasswordHash

func (m *UserMutation) SetPasswordHash(s string)

SetPasswordHash sets the "password_hash" field.

func (*UserMutation) SetUpdatedAt

func (m *UserMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (UserMutation) Tx

func (m UserMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserMutation) Type

func (m *UserMutation) Type() string

Type returns the node type of this mutation (User).

func (*UserMutation) UpdatedAt

func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*UserMutation) Where

func (m *UserMutation) Where(ps ...predicate.User)

Where appends a list predicates to the UserMutation builder.

func (*UserMutation) WhereP

func (m *UserMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UserQuery

type UserQuery struct {
	// contains filtered or unexported fields
}

UserQuery is the builder for querying User entities.

func (*UserQuery) Aggregate

func (_q *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate returns a UserSelect configured with the given aggregations.

func (*UserQuery) All

func (_q *UserQuery) All(ctx context.Context) ([]*User, error)

All executes the query and returns a list of Users.

func (*UserQuery) AllX

func (_q *UserQuery) AllX(ctx context.Context) []*User

AllX is like All, but panics if an error occurs.

func (*UserQuery) Clone

func (_q *UserQuery) Clone() *UserQuery

Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UserQuery) Count

func (_q *UserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserQuery) CountX

func (_q *UserQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserQuery) Exist

func (_q *UserQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserQuery) ExistX

func (_q *UserQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserQuery) Filter

func (_q *UserQuery) Filter() *UserFilter

Filter returns a Filter implementation to apply filters on the UserQuery builder.

func (*UserQuery) First

func (_q *UserQuery) First(ctx context.Context) (*User, error)

First returns the first User entity from the query. Returns a *NotFoundError when no User was found.

func (*UserQuery) FirstID

func (_q *UserQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.

func (*UserQuery) FirstIDX

func (_q *UserQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserQuery) FirstX

func (_q *UserQuery) FirstX(ctx context.Context) *User

FirstX is like First, but panics if an error occurs.

func (*UserQuery) GroupBy

func (_q *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy

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 {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.User.Query().
	GroupBy(user.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserQuery) IDs

func (_q *UserQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of User IDs.

func (*UserQuery) IDsX

func (_q *UserQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*UserQuery) Limit

func (_q *UserQuery) Limit(limit int) *UserQuery

Limit the number of records to be returned by this query.

func (*UserQuery) Offset

func (_q *UserQuery) Offset(offset int) *UserQuery

Offset to start from.

func (*UserQuery) Only

func (_q *UserQuery) Only(ctx context.Context) (*User, error)

Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.

func (*UserQuery) OnlyID

func (_q *UserQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.

func (*UserQuery) OnlyIDX

func (_q *UserQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserQuery) OnlyX

func (_q *UserQuery) OnlyX(ctx context.Context) *User

OnlyX is like Only, but panics if an error occurs.

func (*UserQuery) Order

func (_q *UserQuery) Order(o ...user.OrderOption) *UserQuery

Order specifies how the records should be ordered.

func (*UserQuery) QueryAPIKeys

func (_q *UserQuery) QueryAPIKeys() *APIKeyQuery

QueryAPIKeys chains the current query on the "api_keys" edge.

func (*UserQuery) QueryCreatedServiceAccounts

func (_q *UserQuery) QueryCreatedServiceAccounts() *ServiceAccountQuery

QueryCreatedServiceAccounts chains the current query on the "created_service_accounts" edge.

func (*UserQuery) QueryMemberships

func (_q *UserQuery) QueryMemberships() *MembershipQuery

QueryMemberships chains the current query on the "memberships" edge.

func (*UserQuery) QueryOauthAccounts

func (_q *UserQuery) QueryOauthAccounts() *OAuthAccountQuery

QueryOauthAccounts chains the current query on the "oauth_accounts" edge.

func (*UserQuery) QueryOauthApps

func (_q *UserQuery) QueryOauthApps() *OAuthAppQuery

QueryOauthApps chains the current query on the "oauth_apps" edge.

func (*UserQuery) QueryOauthAuthCodes

func (_q *UserQuery) QueryOauthAuthCodes() *OAuthAuthCodeQuery

QueryOauthAuthCodes chains the current query on the "oauth_auth_codes" edge.

func (*UserQuery) QueryOauthConsents

func (_q *UserQuery) QueryOauthConsents() *OAuthConsentQuery

QueryOauthConsents chains the current query on the "oauth_consents" edge.

func (*UserQuery) QueryOauthTokens

func (_q *UserQuery) QueryOauthTokens() *OAuthTokenQuery

QueryOauthTokens chains the current query on the "oauth_tokens" edge.

func (*UserQuery) QueryRefreshTokens

func (_q *UserQuery) QueryRefreshTokens() *RefreshTokenQuery

QueryRefreshTokens chains the current query on the "refresh_tokens" edge.

func (*UserQuery) Select

func (_q *UserQuery) Select(fields ...string) *UserSelect

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 {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.User.Query().
	Select(user.FieldCreatedAt).
	Scan(ctx, &v)

func (*UserQuery) Unique

func (_q *UserQuery) Unique(unique bool) *UserQuery

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 (*UserQuery) Where

func (_q *UserQuery) Where(ps ...predicate.User) *UserQuery

Where adds a new predicate for the UserQuery builder.

func (*UserQuery) WithAPIKeys

func (_q *UserQuery) WithAPIKeys(opts ...func(*APIKeyQuery)) *UserQuery

WithAPIKeys tells the query-builder to eager-load the nodes that are connected to the "api_keys" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithCreatedServiceAccounts

func (_q *UserQuery) WithCreatedServiceAccounts(opts ...func(*ServiceAccountQuery)) *UserQuery

WithCreatedServiceAccounts tells the query-builder to eager-load the nodes that are connected to the "created_service_accounts" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithMemberships

func (_q *UserQuery) WithMemberships(opts ...func(*MembershipQuery)) *UserQuery

WithMemberships tells the query-builder to eager-load the nodes that are connected to the "memberships" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithOauthAccounts

func (_q *UserQuery) WithOauthAccounts(opts ...func(*OAuthAccountQuery)) *UserQuery

WithOauthAccounts tells the query-builder to eager-load the nodes that are connected to the "oauth_accounts" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithOauthApps

func (_q *UserQuery) WithOauthApps(opts ...func(*OAuthAppQuery)) *UserQuery

WithOauthApps tells the query-builder to eager-load the nodes that are connected to the "oauth_apps" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithOauthAuthCodes

func (_q *UserQuery) WithOauthAuthCodes(opts ...func(*OAuthAuthCodeQuery)) *UserQuery

WithOauthAuthCodes tells the query-builder to eager-load the nodes that are connected to the "oauth_auth_codes" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithOauthConsents

func (_q *UserQuery) WithOauthConsents(opts ...func(*OAuthConsentQuery)) *UserQuery

WithOauthConsents tells the query-builder to eager-load the nodes that are connected to the "oauth_consents" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithOauthTokens

func (_q *UserQuery) WithOauthTokens(opts ...func(*OAuthTokenQuery)) *UserQuery

WithOauthTokens tells the query-builder to eager-load the nodes that are connected to the "oauth_tokens" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithRefreshTokens

func (_q *UserQuery) WithRefreshTokens(opts ...func(*RefreshTokenQuery)) *UserQuery

WithRefreshTokens tells the query-builder to eager-load the nodes that are connected to the "refresh_tokens" edge. The optional arguments are used to configure the query builder of the edge.

type UserSelect

type UserSelect struct {
	*UserQuery
	// contains filtered or unexported fields
}

UserSelect is the builder for selecting fields of User entities.

func (*UserSelect) Aggregate

func (_s *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UserSelect) Bool

func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolX

func (s *UserSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserSelect) Bools

func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolsX

func (s *UserSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserSelect) Float64

func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64X

func (s *UserSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserSelect) Float64s

func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64sX

func (s *UserSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserSelect) Int

func (s *UserSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntX

func (s *UserSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserSelect) Ints

func (s *UserSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntsX

func (s *UserSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserSelect) Scan

func (_s *UserSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserSelect) ScanX

func (s *UserSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserSelect) String

func (s *UserSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserSelect) StringX

func (s *UserSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserSelect) Strings

func (s *UserSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserSelect) StringsX

func (s *UserSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserUpdate

type UserUpdate struct {
	// contains filtered or unexported fields
}

UserUpdate is the builder for updating User entities.

func (*UserUpdate) AddAPIKeyIDs

func (_u *UserUpdate) AddAPIKeyIDs(ids ...uuid.UUID) *UserUpdate

AddAPIKeyIDs adds the "api_keys" edge to the APIKey entity by IDs.

func (*UserUpdate) AddAPIKeys

func (_u *UserUpdate) AddAPIKeys(v ...*APIKey) *UserUpdate

AddAPIKeys adds the "api_keys" edges to the APIKey entity.

func (*UserUpdate) AddCreatedServiceAccountIDs

func (_u *UserUpdate) AddCreatedServiceAccountIDs(ids ...uuid.UUID) *UserUpdate

AddCreatedServiceAccountIDs adds the "created_service_accounts" edge to the ServiceAccount entity by IDs.

func (*UserUpdate) AddCreatedServiceAccounts

func (_u *UserUpdate) AddCreatedServiceAccounts(v ...*ServiceAccount) *UserUpdate

AddCreatedServiceAccounts adds the "created_service_accounts" edges to the ServiceAccount entity.

func (*UserUpdate) AddMembershipIDs

func (_u *UserUpdate) AddMembershipIDs(ids ...uuid.UUID) *UserUpdate

AddMembershipIDs adds the "memberships" edge to the Membership entity by IDs.

func (*UserUpdate) AddMemberships

func (_u *UserUpdate) AddMemberships(v ...*Membership) *UserUpdate

AddMemberships adds the "memberships" edges to the Membership entity.

func (*UserUpdate) AddOauthAccountIDs

func (_u *UserUpdate) AddOauthAccountIDs(ids ...uuid.UUID) *UserUpdate

AddOauthAccountIDs adds the "oauth_accounts" edge to the OAuthAccount entity by IDs.

func (*UserUpdate) AddOauthAccounts

func (_u *UserUpdate) AddOauthAccounts(v ...*OAuthAccount) *UserUpdate

AddOauthAccounts adds the "oauth_accounts" edges to the OAuthAccount entity.

func (*UserUpdate) AddOauthAppIDs

func (_u *UserUpdate) AddOauthAppIDs(ids ...uuid.UUID) *UserUpdate

AddOauthAppIDs adds the "oauth_apps" edge to the OAuthApp entity by IDs.

func (*UserUpdate) AddOauthApps

func (_u *UserUpdate) AddOauthApps(v ...*OAuthApp) *UserUpdate

AddOauthApps adds the "oauth_apps" edges to the OAuthApp entity.

func (*UserUpdate) AddOauthAuthCodeIDs

func (_u *UserUpdate) AddOauthAuthCodeIDs(ids ...uuid.UUID) *UserUpdate

AddOauthAuthCodeIDs adds the "oauth_auth_codes" edge to the OAuthAuthCode entity by IDs.

func (*UserUpdate) AddOauthAuthCodes

func (_u *UserUpdate) AddOauthAuthCodes(v ...*OAuthAuthCode) *UserUpdate

AddOauthAuthCodes adds the "oauth_auth_codes" edges to the OAuthAuthCode entity.

func (*UserUpdate) AddOauthConsentIDs

func (_u *UserUpdate) AddOauthConsentIDs(ids ...uuid.UUID) *UserUpdate

AddOauthConsentIDs adds the "oauth_consents" edge to the OAuthConsent entity by IDs.

func (*UserUpdate) AddOauthConsents

func (_u *UserUpdate) AddOauthConsents(v ...*OAuthConsent) *UserUpdate

AddOauthConsents adds the "oauth_consents" edges to the OAuthConsent entity.

func (*UserUpdate) AddOauthTokenIDs

func (_u *UserUpdate) AddOauthTokenIDs(ids ...uuid.UUID) *UserUpdate

AddOauthTokenIDs adds the "oauth_tokens" edge to the OAuthToken entity by IDs.

func (*UserUpdate) AddOauthTokens

func (_u *UserUpdate) AddOauthTokens(v ...*OAuthToken) *UserUpdate

AddOauthTokens adds the "oauth_tokens" edges to the OAuthToken entity.

func (*UserUpdate) AddRefreshTokenIDs

func (_u *UserUpdate) AddRefreshTokenIDs(ids ...uuid.UUID) *UserUpdate

AddRefreshTokenIDs adds the "refresh_tokens" edge to the RefreshToken entity by IDs.

func (*UserUpdate) AddRefreshTokens

func (_u *UserUpdate) AddRefreshTokens(v ...*RefreshToken) *UserUpdate

AddRefreshTokens adds the "refresh_tokens" edges to the RefreshToken entity.

func (*UserUpdate) ClearAPIKeys

func (_u *UserUpdate) ClearAPIKeys() *UserUpdate

ClearAPIKeys clears all "api_keys" edges to the APIKey entity.

func (*UserUpdate) ClearAvatarURL

func (_u *UserUpdate) ClearAvatarURL() *UserUpdate

ClearAvatarURL clears the value of the "avatar_url" field.

func (*UserUpdate) ClearCreatedServiceAccounts

func (_u *UserUpdate) ClearCreatedServiceAccounts() *UserUpdate

ClearCreatedServiceAccounts clears all "created_service_accounts" edges to the ServiceAccount entity.

func (*UserUpdate) ClearLastLoginAt

func (_u *UserUpdate) ClearLastLoginAt() *UserUpdate

ClearLastLoginAt clears the value of the "last_login_at" field.

func (*UserUpdate) ClearMemberships

func (_u *UserUpdate) ClearMemberships() *UserUpdate

ClearMemberships clears all "memberships" edges to the Membership entity.

func (*UserUpdate) ClearOauthAccounts

func (_u *UserUpdate) ClearOauthAccounts() *UserUpdate

ClearOauthAccounts clears all "oauth_accounts" edges to the OAuthAccount entity.

func (*UserUpdate) ClearOauthApps

func (_u *UserUpdate) ClearOauthApps() *UserUpdate

ClearOauthApps clears all "oauth_apps" edges to the OAuthApp entity.

func (*UserUpdate) ClearOauthAuthCodes

func (_u *UserUpdate) ClearOauthAuthCodes() *UserUpdate

ClearOauthAuthCodes clears all "oauth_auth_codes" edges to the OAuthAuthCode entity.

func (*UserUpdate) ClearOauthConsents

func (_u *UserUpdate) ClearOauthConsents() *UserUpdate

ClearOauthConsents clears all "oauth_consents" edges to the OAuthConsent entity.

func (*UserUpdate) ClearOauthTokens

func (_u *UserUpdate) ClearOauthTokens() *UserUpdate

ClearOauthTokens clears all "oauth_tokens" edges to the OAuthToken entity.

func (*UserUpdate) ClearPasswordHash

func (_u *UserUpdate) ClearPasswordHash() *UserUpdate

ClearPasswordHash clears the value of the "password_hash" field.

func (*UserUpdate) ClearRefreshTokens

func (_u *UserUpdate) ClearRefreshTokens() *UserUpdate

ClearRefreshTokens clears all "refresh_tokens" edges to the RefreshToken entity.

func (*UserUpdate) Exec

func (_u *UserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpdate) ExecX

func (_u *UserUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdate) Mutation

func (_u *UserUpdate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdate) RemoveAPIKeyIDs

func (_u *UserUpdate) RemoveAPIKeyIDs(ids ...uuid.UUID) *UserUpdate

RemoveAPIKeyIDs removes the "api_keys" edge to APIKey entities by IDs.

func (*UserUpdate) RemoveAPIKeys

func (_u *UserUpdate) RemoveAPIKeys(v ...*APIKey) *UserUpdate

RemoveAPIKeys removes "api_keys" edges to APIKey entities.

func (*UserUpdate) RemoveCreatedServiceAccountIDs

func (_u *UserUpdate) RemoveCreatedServiceAccountIDs(ids ...uuid.UUID) *UserUpdate

RemoveCreatedServiceAccountIDs removes the "created_service_accounts" edge to ServiceAccount entities by IDs.

func (*UserUpdate) RemoveCreatedServiceAccounts

func (_u *UserUpdate) RemoveCreatedServiceAccounts(v ...*ServiceAccount) *UserUpdate

RemoveCreatedServiceAccounts removes "created_service_accounts" edges to ServiceAccount entities.

func (*UserUpdate) RemoveMembershipIDs

func (_u *UserUpdate) RemoveMembershipIDs(ids ...uuid.UUID) *UserUpdate

RemoveMembershipIDs removes the "memberships" edge to Membership entities by IDs.

func (*UserUpdate) RemoveMemberships

func (_u *UserUpdate) RemoveMemberships(v ...*Membership) *UserUpdate

RemoveMemberships removes "memberships" edges to Membership entities.

func (*UserUpdate) RemoveOauthAccountIDs

func (_u *UserUpdate) RemoveOauthAccountIDs(ids ...uuid.UUID) *UserUpdate

RemoveOauthAccountIDs removes the "oauth_accounts" edge to OAuthAccount entities by IDs.

func (*UserUpdate) RemoveOauthAccounts

func (_u *UserUpdate) RemoveOauthAccounts(v ...*OAuthAccount) *UserUpdate

RemoveOauthAccounts removes "oauth_accounts" edges to OAuthAccount entities.

func (*UserUpdate) RemoveOauthAppIDs

func (_u *UserUpdate) RemoveOauthAppIDs(ids ...uuid.UUID) *UserUpdate

RemoveOauthAppIDs removes the "oauth_apps" edge to OAuthApp entities by IDs.

func (*UserUpdate) RemoveOauthApps

func (_u *UserUpdate) RemoveOauthApps(v ...*OAuthApp) *UserUpdate

RemoveOauthApps removes "oauth_apps" edges to OAuthApp entities.

func (*UserUpdate) RemoveOauthAuthCodeIDs

func (_u *UserUpdate) RemoveOauthAuthCodeIDs(ids ...uuid.UUID) *UserUpdate

RemoveOauthAuthCodeIDs removes the "oauth_auth_codes" edge to OAuthAuthCode entities by IDs.

func (*UserUpdate) RemoveOauthAuthCodes

func (_u *UserUpdate) RemoveOauthAuthCodes(v ...*OAuthAuthCode) *UserUpdate

RemoveOauthAuthCodes removes "oauth_auth_codes" edges to OAuthAuthCode entities.

func (*UserUpdate) RemoveOauthConsentIDs

func (_u *UserUpdate) RemoveOauthConsentIDs(ids ...uuid.UUID) *UserUpdate

RemoveOauthConsentIDs removes the "oauth_consents" edge to OAuthConsent entities by IDs.

func (*UserUpdate) RemoveOauthConsents

func (_u *UserUpdate) RemoveOauthConsents(v ...*OAuthConsent) *UserUpdate

RemoveOauthConsents removes "oauth_consents" edges to OAuthConsent entities.

func (*UserUpdate) RemoveOauthTokenIDs

func (_u *UserUpdate) RemoveOauthTokenIDs(ids ...uuid.UUID) *UserUpdate

RemoveOauthTokenIDs removes the "oauth_tokens" edge to OAuthToken entities by IDs.

func (*UserUpdate) RemoveOauthTokens

func (_u *UserUpdate) RemoveOauthTokens(v ...*OAuthToken) *UserUpdate

RemoveOauthTokens removes "oauth_tokens" edges to OAuthToken entities.

func (*UserUpdate) RemoveRefreshTokenIDs

func (_u *UserUpdate) RemoveRefreshTokenIDs(ids ...uuid.UUID) *UserUpdate

RemoveRefreshTokenIDs removes the "refresh_tokens" edge to RefreshToken entities by IDs.

func (*UserUpdate) RemoveRefreshTokens

func (_u *UserUpdate) RemoveRefreshTokens(v ...*RefreshToken) *UserUpdate

RemoveRefreshTokens removes "refresh_tokens" edges to RefreshToken entities.

func (*UserUpdate) Save

func (_u *UserUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserUpdate) SaveX

func (_u *UserUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserUpdate) SetActive

func (_u *UserUpdate) SetActive(v bool) *UserUpdate

SetActive sets the "active" field.

func (*UserUpdate) SetAvatarURL

func (_u *UserUpdate) SetAvatarURL(v string) *UserUpdate

SetAvatarURL sets the "avatar_url" field.

func (*UserUpdate) SetEmail

func (_u *UserUpdate) SetEmail(v string) *UserUpdate

SetEmail sets the "email" field.

func (*UserUpdate) SetIsPlatformAdmin

func (_u *UserUpdate) SetIsPlatformAdmin(v bool) *UserUpdate

SetIsPlatformAdmin sets the "is_platform_admin" field.

func (*UserUpdate) SetLastLoginAt

func (_u *UserUpdate) SetLastLoginAt(v time.Time) *UserUpdate

SetLastLoginAt sets the "last_login_at" field.

func (*UserUpdate) SetName

func (_u *UserUpdate) SetName(v string) *UserUpdate

SetName sets the "name" field.

func (*UserUpdate) SetNillableActive

func (_u *UserUpdate) SetNillableActive(v *bool) *UserUpdate

SetNillableActive sets the "active" field if the given value is not nil.

func (*UserUpdate) SetNillableAvatarURL

func (_u *UserUpdate) SetNillableAvatarURL(v *string) *UserUpdate

SetNillableAvatarURL sets the "avatar_url" field if the given value is not nil.

func (*UserUpdate) SetNillableEmail

func (_u *UserUpdate) SetNillableEmail(v *string) *UserUpdate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*UserUpdate) SetNillableIsPlatformAdmin

func (_u *UserUpdate) SetNillableIsPlatformAdmin(v *bool) *UserUpdate

SetNillableIsPlatformAdmin sets the "is_platform_admin" field if the given value is not nil.

func (*UserUpdate) SetNillableLastLoginAt

func (_u *UserUpdate) SetNillableLastLoginAt(v *time.Time) *UserUpdate

SetNillableLastLoginAt sets the "last_login_at" field if the given value is not nil.

func (*UserUpdate) SetNillableName

func (_u *UserUpdate) SetNillableName(v *string) *UserUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*UserUpdate) SetNillablePasswordHash

func (_u *UserUpdate) SetNillablePasswordHash(v *string) *UserUpdate

SetNillablePasswordHash sets the "password_hash" field if the given value is not nil.

func (*UserUpdate) SetPasswordHash

func (_u *UserUpdate) SetPasswordHash(v string) *UserUpdate

SetPasswordHash sets the "password_hash" field.

func (*UserUpdate) SetUpdatedAt

func (_u *UserUpdate) SetUpdatedAt(v time.Time) *UserUpdate

SetUpdatedAt sets the "updated_at" field.

func (*UserUpdate) Where

func (_u *UserUpdate) Where(ps ...predicate.User) *UserUpdate

Where appends a list predicates to the UserUpdate builder.

type UserUpdateOne

type UserUpdateOne struct {
	// contains filtered or unexported fields
}

UserUpdateOne is the builder for updating a single User entity.

func (*UserUpdateOne) AddAPIKeyIDs

func (_u *UserUpdateOne) AddAPIKeyIDs(ids ...uuid.UUID) *UserUpdateOne

AddAPIKeyIDs adds the "api_keys" edge to the APIKey entity by IDs.

func (*UserUpdateOne) AddAPIKeys

func (_u *UserUpdateOne) AddAPIKeys(v ...*APIKey) *UserUpdateOne

AddAPIKeys adds the "api_keys" edges to the APIKey entity.

func (*UserUpdateOne) AddCreatedServiceAccountIDs

func (_u *UserUpdateOne) AddCreatedServiceAccountIDs(ids ...uuid.UUID) *UserUpdateOne

AddCreatedServiceAccountIDs adds the "created_service_accounts" edge to the ServiceAccount entity by IDs.

func (*UserUpdateOne) AddCreatedServiceAccounts

func (_u *UserUpdateOne) AddCreatedServiceAccounts(v ...*ServiceAccount) *UserUpdateOne

AddCreatedServiceAccounts adds the "created_service_accounts" edges to the ServiceAccount entity.

func (*UserUpdateOne) AddMembershipIDs

func (_u *UserUpdateOne) AddMembershipIDs(ids ...uuid.UUID) *UserUpdateOne

AddMembershipIDs adds the "memberships" edge to the Membership entity by IDs.

func (*UserUpdateOne) AddMemberships

func (_u *UserUpdateOne) AddMemberships(v ...*Membership) *UserUpdateOne

AddMemberships adds the "memberships" edges to the Membership entity.

func (*UserUpdateOne) AddOauthAccountIDs

func (_u *UserUpdateOne) AddOauthAccountIDs(ids ...uuid.UUID) *UserUpdateOne

AddOauthAccountIDs adds the "oauth_accounts" edge to the OAuthAccount entity by IDs.

func (*UserUpdateOne) AddOauthAccounts

func (_u *UserUpdateOne) AddOauthAccounts(v ...*OAuthAccount) *UserUpdateOne

AddOauthAccounts adds the "oauth_accounts" edges to the OAuthAccount entity.

func (*UserUpdateOne) AddOauthAppIDs

func (_u *UserUpdateOne) AddOauthAppIDs(ids ...uuid.UUID) *UserUpdateOne

AddOauthAppIDs adds the "oauth_apps" edge to the OAuthApp entity by IDs.

func (*UserUpdateOne) AddOauthApps

func (_u *UserUpdateOne) AddOauthApps(v ...*OAuthApp) *UserUpdateOne

AddOauthApps adds the "oauth_apps" edges to the OAuthApp entity.

func (*UserUpdateOne) AddOauthAuthCodeIDs

func (_u *UserUpdateOne) AddOauthAuthCodeIDs(ids ...uuid.UUID) *UserUpdateOne

AddOauthAuthCodeIDs adds the "oauth_auth_codes" edge to the OAuthAuthCode entity by IDs.

func (*UserUpdateOne) AddOauthAuthCodes

func (_u *UserUpdateOne) AddOauthAuthCodes(v ...*OAuthAuthCode) *UserUpdateOne

AddOauthAuthCodes adds the "oauth_auth_codes" edges to the OAuthAuthCode entity.

func (*UserUpdateOne) AddOauthConsentIDs

func (_u *UserUpdateOne) AddOauthConsentIDs(ids ...uuid.UUID) *UserUpdateOne

AddOauthConsentIDs adds the "oauth_consents" edge to the OAuthConsent entity by IDs.

func (*UserUpdateOne) AddOauthConsents

func (_u *UserUpdateOne) AddOauthConsents(v ...*OAuthConsent) *UserUpdateOne

AddOauthConsents adds the "oauth_consents" edges to the OAuthConsent entity.

func (*UserUpdateOne) AddOauthTokenIDs

func (_u *UserUpdateOne) AddOauthTokenIDs(ids ...uuid.UUID) *UserUpdateOne

AddOauthTokenIDs adds the "oauth_tokens" edge to the OAuthToken entity by IDs.

func (*UserUpdateOne) AddOauthTokens

func (_u *UserUpdateOne) AddOauthTokens(v ...*OAuthToken) *UserUpdateOne

AddOauthTokens adds the "oauth_tokens" edges to the OAuthToken entity.

func (*UserUpdateOne) AddRefreshTokenIDs

func (_u *UserUpdateOne) AddRefreshTokenIDs(ids ...uuid.UUID) *UserUpdateOne

AddRefreshTokenIDs adds the "refresh_tokens" edge to the RefreshToken entity by IDs.

func (*UserUpdateOne) AddRefreshTokens

func (_u *UserUpdateOne) AddRefreshTokens(v ...*RefreshToken) *UserUpdateOne

AddRefreshTokens adds the "refresh_tokens" edges to the RefreshToken entity.

func (*UserUpdateOne) ClearAPIKeys

func (_u *UserUpdateOne) ClearAPIKeys() *UserUpdateOne

ClearAPIKeys clears all "api_keys" edges to the APIKey entity.

func (*UserUpdateOne) ClearAvatarURL

func (_u *UserUpdateOne) ClearAvatarURL() *UserUpdateOne

ClearAvatarURL clears the value of the "avatar_url" field.

func (*UserUpdateOne) ClearCreatedServiceAccounts

func (_u *UserUpdateOne) ClearCreatedServiceAccounts() *UserUpdateOne

ClearCreatedServiceAccounts clears all "created_service_accounts" edges to the ServiceAccount entity.

func (*UserUpdateOne) ClearLastLoginAt

func (_u *UserUpdateOne) ClearLastLoginAt() *UserUpdateOne

ClearLastLoginAt clears the value of the "last_login_at" field.

func (*UserUpdateOne) ClearMemberships

func (_u *UserUpdateOne) ClearMemberships() *UserUpdateOne

ClearMemberships clears all "memberships" edges to the Membership entity.

func (*UserUpdateOne) ClearOauthAccounts

func (_u *UserUpdateOne) ClearOauthAccounts() *UserUpdateOne

ClearOauthAccounts clears all "oauth_accounts" edges to the OAuthAccount entity.

func (*UserUpdateOne) ClearOauthApps

func (_u *UserUpdateOne) ClearOauthApps() *UserUpdateOne

ClearOauthApps clears all "oauth_apps" edges to the OAuthApp entity.

func (*UserUpdateOne) ClearOauthAuthCodes

func (_u *UserUpdateOne) ClearOauthAuthCodes() *UserUpdateOne

ClearOauthAuthCodes clears all "oauth_auth_codes" edges to the OAuthAuthCode entity.

func (*UserUpdateOne) ClearOauthConsents

func (_u *UserUpdateOne) ClearOauthConsents() *UserUpdateOne

ClearOauthConsents clears all "oauth_consents" edges to the OAuthConsent entity.

func (*UserUpdateOne) ClearOauthTokens

func (_u *UserUpdateOne) ClearOauthTokens() *UserUpdateOne

ClearOauthTokens clears all "oauth_tokens" edges to the OAuthToken entity.

func (*UserUpdateOne) ClearPasswordHash

func (_u *UserUpdateOne) ClearPasswordHash() *UserUpdateOne

ClearPasswordHash clears the value of the "password_hash" field.

func (*UserUpdateOne) ClearRefreshTokens

func (_u *UserUpdateOne) ClearRefreshTokens() *UserUpdateOne

ClearRefreshTokens clears all "refresh_tokens" edges to the RefreshToken entity.

func (*UserUpdateOne) Exec

func (_u *UserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserUpdateOne) ExecX

func (_u *UserUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdateOne) Mutation

func (_u *UserUpdateOne) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdateOne) RemoveAPIKeyIDs

func (_u *UserUpdateOne) RemoveAPIKeyIDs(ids ...uuid.UUID) *UserUpdateOne

RemoveAPIKeyIDs removes the "api_keys" edge to APIKey entities by IDs.

func (*UserUpdateOne) RemoveAPIKeys

func (_u *UserUpdateOne) RemoveAPIKeys(v ...*APIKey) *UserUpdateOne

RemoveAPIKeys removes "api_keys" edges to APIKey entities.

func (*UserUpdateOne) RemoveCreatedServiceAccountIDs

func (_u *UserUpdateOne) RemoveCreatedServiceAccountIDs(ids ...uuid.UUID) *UserUpdateOne

RemoveCreatedServiceAccountIDs removes the "created_service_accounts" edge to ServiceAccount entities by IDs.

func (*UserUpdateOne) RemoveCreatedServiceAccounts

func (_u *UserUpdateOne) RemoveCreatedServiceAccounts(v ...*ServiceAccount) *UserUpdateOne

RemoveCreatedServiceAccounts removes "created_service_accounts" edges to ServiceAccount entities.

func (*UserUpdateOne) RemoveMembershipIDs

func (_u *UserUpdateOne) RemoveMembershipIDs(ids ...uuid.UUID) *UserUpdateOne

RemoveMembershipIDs removes the "memberships" edge to Membership entities by IDs.

func (*UserUpdateOne) RemoveMemberships

func (_u *UserUpdateOne) RemoveMemberships(v ...*Membership) *UserUpdateOne

RemoveMemberships removes "memberships" edges to Membership entities.

func (*UserUpdateOne) RemoveOauthAccountIDs

func (_u *UserUpdateOne) RemoveOauthAccountIDs(ids ...uuid.UUID) *UserUpdateOne

RemoveOauthAccountIDs removes the "oauth_accounts" edge to OAuthAccount entities by IDs.

func (*UserUpdateOne) RemoveOauthAccounts

func (_u *UserUpdateOne) RemoveOauthAccounts(v ...*OAuthAccount) *UserUpdateOne

RemoveOauthAccounts removes "oauth_accounts" edges to OAuthAccount entities.

func (*UserUpdateOne) RemoveOauthAppIDs

func (_u *UserUpdateOne) RemoveOauthAppIDs(ids ...uuid.UUID) *UserUpdateOne

RemoveOauthAppIDs removes the "oauth_apps" edge to OAuthApp entities by IDs.

func (*UserUpdateOne) RemoveOauthApps

func (_u *UserUpdateOne) RemoveOauthApps(v ...*OAuthApp) *UserUpdateOne

RemoveOauthApps removes "oauth_apps" edges to OAuthApp entities.

func (*UserUpdateOne) RemoveOauthAuthCodeIDs

func (_u *UserUpdateOne) RemoveOauthAuthCodeIDs(ids ...uuid.UUID) *UserUpdateOne

RemoveOauthAuthCodeIDs removes the "oauth_auth_codes" edge to OAuthAuthCode entities by IDs.

func (*UserUpdateOne) RemoveOauthAuthCodes

func (_u *UserUpdateOne) RemoveOauthAuthCodes(v ...*OAuthAuthCode) *UserUpdateOne

RemoveOauthAuthCodes removes "oauth_auth_codes" edges to OAuthAuthCode entities.

func (*UserUpdateOne) RemoveOauthConsentIDs

func (_u *UserUpdateOne) RemoveOauthConsentIDs(ids ...uuid.UUID) *UserUpdateOne

RemoveOauthConsentIDs removes the "oauth_consents" edge to OAuthConsent entities by IDs.

func (*UserUpdateOne) RemoveOauthConsents

func (_u *UserUpdateOne) RemoveOauthConsents(v ...*OAuthConsent) *UserUpdateOne

RemoveOauthConsents removes "oauth_consents" edges to OAuthConsent entities.

func (*UserUpdateOne) RemoveOauthTokenIDs

func (_u *UserUpdateOne) RemoveOauthTokenIDs(ids ...uuid.UUID) *UserUpdateOne

RemoveOauthTokenIDs removes the "oauth_tokens" edge to OAuthToken entities by IDs.

func (*UserUpdateOne) RemoveOauthTokens

func (_u *UserUpdateOne) RemoveOauthTokens(v ...*OAuthToken) *UserUpdateOne

RemoveOauthTokens removes "oauth_tokens" edges to OAuthToken entities.

func (*UserUpdateOne) RemoveRefreshTokenIDs

func (_u *UserUpdateOne) RemoveRefreshTokenIDs(ids ...uuid.UUID) *UserUpdateOne

RemoveRefreshTokenIDs removes the "refresh_tokens" edge to RefreshToken entities by IDs.

func (*UserUpdateOne) RemoveRefreshTokens

func (_u *UserUpdateOne) RemoveRefreshTokens(v ...*RefreshToken) *UserUpdateOne

RemoveRefreshTokens removes "refresh_tokens" edges to RefreshToken entities.

func (*UserUpdateOne) Save

func (_u *UserUpdateOne) Save(ctx context.Context) (*User, error)

Save executes the query and returns the updated User entity.

func (*UserUpdateOne) SaveX

func (_u *UserUpdateOne) SaveX(ctx context.Context) *User

SaveX is like Save, but panics if an error occurs.

func (*UserUpdateOne) Select

func (_u *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserUpdateOne) SetActive

func (_u *UserUpdateOne) SetActive(v bool) *UserUpdateOne

SetActive sets the "active" field.

func (*UserUpdateOne) SetAvatarURL

func (_u *UserUpdateOne) SetAvatarURL(v string) *UserUpdateOne

SetAvatarURL sets the "avatar_url" field.

func (*UserUpdateOne) SetEmail

func (_u *UserUpdateOne) SetEmail(v string) *UserUpdateOne

SetEmail sets the "email" field.

func (*UserUpdateOne) SetIsPlatformAdmin

func (_u *UserUpdateOne) SetIsPlatformAdmin(v bool) *UserUpdateOne

SetIsPlatformAdmin sets the "is_platform_admin" field.

func (*UserUpdateOne) SetLastLoginAt

func (_u *UserUpdateOne) SetLastLoginAt(v time.Time) *UserUpdateOne

SetLastLoginAt sets the "last_login_at" field.

func (*UserUpdateOne) SetName

func (_u *UserUpdateOne) SetName(v string) *UserUpdateOne

SetName sets the "name" field.

func (*UserUpdateOne) SetNillableActive

func (_u *UserUpdateOne) SetNillableActive(v *bool) *UserUpdateOne

SetNillableActive sets the "active" field if the given value is not nil.

func (*UserUpdateOne) SetNillableAvatarURL

func (_u *UserUpdateOne) SetNillableAvatarURL(v *string) *UserUpdateOne

SetNillableAvatarURL sets the "avatar_url" field if the given value is not nil.

func (*UserUpdateOne) SetNillableEmail

func (_u *UserUpdateOne) SetNillableEmail(v *string) *UserUpdateOne

SetNillableEmail sets the "email" field if the given value is not nil.

func (*UserUpdateOne) SetNillableIsPlatformAdmin

func (_u *UserUpdateOne) SetNillableIsPlatformAdmin(v *bool) *UserUpdateOne

SetNillableIsPlatformAdmin sets the "is_platform_admin" field if the given value is not nil.

func (*UserUpdateOne) SetNillableLastLoginAt

func (_u *UserUpdateOne) SetNillableLastLoginAt(v *time.Time) *UserUpdateOne

SetNillableLastLoginAt sets the "last_login_at" field if the given value is not nil.

func (*UserUpdateOne) SetNillableName

func (_u *UserUpdateOne) SetNillableName(v *string) *UserUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*UserUpdateOne) SetNillablePasswordHash

func (_u *UserUpdateOne) SetNillablePasswordHash(v *string) *UserUpdateOne

SetNillablePasswordHash sets the "password_hash" field if the given value is not nil.

func (*UserUpdateOne) SetPasswordHash

func (_u *UserUpdateOne) SetPasswordHash(v string) *UserUpdateOne

SetPasswordHash sets the "password_hash" field.

func (*UserUpdateOne) SetUpdatedAt

func (_u *UserUpdateOne) SetUpdatedAt(v time.Time) *UserUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*UserUpdateOne) Where

func (_u *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne

Where appends a list predicates to the UserUpdate builder.

type UserUpsert

type UserUpsert struct {
	*sql.UpdateSet
}

UserUpsert is the "OnConflict" setter.

func (*UserUpsert) ClearAvatarURL

func (u *UserUpsert) ClearAvatarURL() *UserUpsert

ClearAvatarURL clears the value of the "avatar_url" field.

func (*UserUpsert) ClearLastLoginAt

func (u *UserUpsert) ClearLastLoginAt() *UserUpsert

ClearLastLoginAt clears the value of the "last_login_at" field.

func (*UserUpsert) ClearPasswordHash

func (u *UserUpsert) ClearPasswordHash() *UserUpsert

ClearPasswordHash clears the value of the "password_hash" field.

func (*UserUpsert) SetActive

func (u *UserUpsert) SetActive(v bool) *UserUpsert

SetActive sets the "active" field.

func (*UserUpsert) SetAvatarURL

func (u *UserUpsert) SetAvatarURL(v string) *UserUpsert

SetAvatarURL sets the "avatar_url" field.

func (*UserUpsert) SetEmail

func (u *UserUpsert) SetEmail(v string) *UserUpsert

SetEmail sets the "email" field.

func (*UserUpsert) SetIsPlatformAdmin

func (u *UserUpsert) SetIsPlatformAdmin(v bool) *UserUpsert

SetIsPlatformAdmin sets the "is_platform_admin" field.

func (*UserUpsert) SetLastLoginAt

func (u *UserUpsert) SetLastLoginAt(v time.Time) *UserUpsert

SetLastLoginAt sets the "last_login_at" field.

func (*UserUpsert) SetName

func (u *UserUpsert) SetName(v string) *UserUpsert

SetName sets the "name" field.

func (*UserUpsert) SetPasswordHash

func (u *UserUpsert) SetPasswordHash(v string) *UserUpsert

SetPasswordHash sets the "password_hash" field.

func (*UserUpsert) SetUpdatedAt

func (u *UserUpsert) SetUpdatedAt(v time.Time) *UserUpsert

SetUpdatedAt sets the "updated_at" field.

func (*UserUpsert) UpdateActive

func (u *UserUpsert) UpdateActive() *UserUpsert

UpdateActive sets the "active" field to the value that was provided on create.

func (*UserUpsert) UpdateAvatarURL

func (u *UserUpsert) UpdateAvatarURL() *UserUpsert

UpdateAvatarURL sets the "avatar_url" field to the value that was provided on create.

func (*UserUpsert) UpdateEmail

func (u *UserUpsert) UpdateEmail() *UserUpsert

UpdateEmail sets the "email" field to the value that was provided on create.

func (*UserUpsert) UpdateIsPlatformAdmin

func (u *UserUpsert) UpdateIsPlatformAdmin() *UserUpsert

UpdateIsPlatformAdmin sets the "is_platform_admin" field to the value that was provided on create.

func (*UserUpsert) UpdateLastLoginAt

func (u *UserUpsert) UpdateLastLoginAt() *UserUpsert

UpdateLastLoginAt sets the "last_login_at" field to the value that was provided on create.

func (*UserUpsert) UpdateName

func (u *UserUpsert) UpdateName() *UserUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*UserUpsert) UpdatePasswordHash

func (u *UserUpsert) UpdatePasswordHash() *UserUpsert

UpdatePasswordHash sets the "password_hash" field to the value that was provided on create.

func (*UserUpsert) UpdateUpdatedAt

func (u *UserUpsert) UpdateUpdatedAt() *UserUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type UserUpsertBulk

type UserUpsertBulk struct {
	// contains filtered or unexported fields
}

UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.

func (*UserUpsertBulk) ClearAvatarURL

func (u *UserUpsertBulk) ClearAvatarURL() *UserUpsertBulk

ClearAvatarURL clears the value of the "avatar_url" field.

func (*UserUpsertBulk) ClearLastLoginAt

func (u *UserUpsertBulk) ClearLastLoginAt() *UserUpsertBulk

ClearLastLoginAt clears the value of the "last_login_at" field.

func (*UserUpsertBulk) ClearPasswordHash

func (u *UserUpsertBulk) ClearPasswordHash() *UserUpsertBulk

ClearPasswordHash clears the value of the "password_hash" field.

func (*UserUpsertBulk) DoNothing

func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserUpsertBulk) Exec

func (u *UserUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpsertBulk) ExecX

func (u *UserUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpsertBulk) Ignore

func (u *UserUpsertBulk) Ignore() *UserUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UserUpsertBulk) SetActive

func (u *UserUpsertBulk) SetActive(v bool) *UserUpsertBulk

SetActive sets the "active" field.

func (*UserUpsertBulk) SetAvatarURL

func (u *UserUpsertBulk) SetAvatarURL(v string) *UserUpsertBulk

SetAvatarURL sets the "avatar_url" field.

func (*UserUpsertBulk) SetEmail

func (u *UserUpsertBulk) SetEmail(v string) *UserUpsertBulk

SetEmail sets the "email" field.

func (*UserUpsertBulk) SetIsPlatformAdmin

func (u *UserUpsertBulk) SetIsPlatformAdmin(v bool) *UserUpsertBulk

SetIsPlatformAdmin sets the "is_platform_admin" field.

func (*UserUpsertBulk) SetLastLoginAt

func (u *UserUpsertBulk) SetLastLoginAt(v time.Time) *UserUpsertBulk

SetLastLoginAt sets the "last_login_at" field.

func (*UserUpsertBulk) SetName

func (u *UserUpsertBulk) SetName(v string) *UserUpsertBulk

SetName sets the "name" field.

func (*UserUpsertBulk) SetPasswordHash

func (u *UserUpsertBulk) SetPasswordHash(v string) *UserUpsertBulk

SetPasswordHash sets the "password_hash" field.

func (*UserUpsertBulk) SetUpdatedAt

func (u *UserUpsertBulk) SetUpdatedAt(v time.Time) *UserUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*UserUpsertBulk) Update

func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk

Update allows overriding fields `UPDATE` values. See the UserCreateBulk.OnConflict documentation for more info.

func (*UserUpsertBulk) UpdateActive

func (u *UserUpsertBulk) UpdateActive() *UserUpsertBulk

UpdateActive sets the "active" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateAvatarURL

func (u *UserUpsertBulk) UpdateAvatarURL() *UserUpsertBulk

UpdateAvatarURL sets the "avatar_url" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateEmail

func (u *UserUpsertBulk) UpdateEmail() *UserUpsertBulk

UpdateEmail sets the "email" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateIsPlatformAdmin

func (u *UserUpsertBulk) UpdateIsPlatformAdmin() *UserUpsertBulk

UpdateIsPlatformAdmin sets the "is_platform_admin" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateLastLoginAt

func (u *UserUpsertBulk) UpdateLastLoginAt() *UserUpsertBulk

UpdateLastLoginAt sets the "last_login_at" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateName

func (u *UserUpsertBulk) UpdateName() *UserUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateNewValues

func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.User.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(user.FieldID)
		}),
	).
	Exec(ctx)

func (*UserUpsertBulk) UpdatePasswordHash

func (u *UserUpsertBulk) UpdatePasswordHash() *UserUpsertBulk

UpdatePasswordHash sets the "password_hash" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateUpdatedAt

func (u *UserUpsertBulk) UpdateUpdatedAt() *UserUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type UserUpsertOne

type UserUpsertOne struct {
	// contains filtered or unexported fields
}

UserUpsertOne is the builder for "upsert"-ing

one User node.

func (*UserUpsertOne) ClearAvatarURL

func (u *UserUpsertOne) ClearAvatarURL() *UserUpsertOne

ClearAvatarURL clears the value of the "avatar_url" field.

func (*UserUpsertOne) ClearLastLoginAt

func (u *UserUpsertOne) ClearLastLoginAt() *UserUpsertOne

ClearLastLoginAt clears the value of the "last_login_at" field.

func (*UserUpsertOne) ClearPasswordHash

func (u *UserUpsertOne) ClearPasswordHash() *UserUpsertOne

ClearPasswordHash clears the value of the "password_hash" field.

func (*UserUpsertOne) DoNothing

func (u *UserUpsertOne) DoNothing() *UserUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserUpsertOne) Exec

func (u *UserUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpsertOne) ExecX

func (u *UserUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpsertOne) ID

func (u *UserUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UserUpsertOne) IDX

func (u *UserUpsertOne) IDX(ctx context.Context) uuid.UUID

IDX is like ID, but panics if an error occurs.

func (*UserUpsertOne) Ignore

func (u *UserUpsertOne) Ignore() *UserUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.User.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UserUpsertOne) SetActive

func (u *UserUpsertOne) SetActive(v bool) *UserUpsertOne

SetActive sets the "active" field.

func (*UserUpsertOne) SetAvatarURL

func (u *UserUpsertOne) SetAvatarURL(v string) *UserUpsertOne

SetAvatarURL sets the "avatar_url" field.

func (*UserUpsertOne) SetEmail

func (u *UserUpsertOne) SetEmail(v string) *UserUpsertOne

SetEmail sets the "email" field.

func (*UserUpsertOne) SetIsPlatformAdmin

func (u *UserUpsertOne) SetIsPlatformAdmin(v bool) *UserUpsertOne

SetIsPlatformAdmin sets the "is_platform_admin" field.

func (*UserUpsertOne) SetLastLoginAt

func (u *UserUpsertOne) SetLastLoginAt(v time.Time) *UserUpsertOne

SetLastLoginAt sets the "last_login_at" field.

func (*UserUpsertOne) SetName

func (u *UserUpsertOne) SetName(v string) *UserUpsertOne

SetName sets the "name" field.

func (*UserUpsertOne) SetPasswordHash

func (u *UserUpsertOne) SetPasswordHash(v string) *UserUpsertOne

SetPasswordHash sets the "password_hash" field.

func (*UserUpsertOne) SetUpdatedAt

func (u *UserUpsertOne) SetUpdatedAt(v time.Time) *UserUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*UserUpsertOne) Update

func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne

Update allows overriding fields `UPDATE` values. See the UserCreate.OnConflict documentation for more info.

func (*UserUpsertOne) UpdateActive

func (u *UserUpsertOne) UpdateActive() *UserUpsertOne

UpdateActive sets the "active" field to the value that was provided on create.

func (*UserUpsertOne) UpdateAvatarURL

func (u *UserUpsertOne) UpdateAvatarURL() *UserUpsertOne

UpdateAvatarURL sets the "avatar_url" field to the value that was provided on create.

func (*UserUpsertOne) UpdateEmail

func (u *UserUpsertOne) UpdateEmail() *UserUpsertOne

UpdateEmail sets the "email" field to the value that was provided on create.

func (*UserUpsertOne) UpdateIsPlatformAdmin

func (u *UserUpsertOne) UpdateIsPlatformAdmin() *UserUpsertOne

UpdateIsPlatformAdmin sets the "is_platform_admin" field to the value that was provided on create.

func (*UserUpsertOne) UpdateLastLoginAt

func (u *UserUpsertOne) UpdateLastLoginAt() *UserUpsertOne

UpdateLastLoginAt sets the "last_login_at" field to the value that was provided on create.

func (*UserUpsertOne) UpdateName

func (u *UserUpsertOne) UpdateName() *UserUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*UserUpsertOne) UpdateNewValues

func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.User.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(user.FieldID)
		}),
	).
	Exec(ctx)

func (*UserUpsertOne) UpdatePasswordHash

func (u *UserUpsertOne) UpdatePasswordHash() *UserUpsertOne

UpdatePasswordHash sets the "password_hash" field to the value that was provided on create.

func (*UserUpsertOne) UpdateUpdatedAt

func (u *UserUpsertOne) UpdateUpdatedAt() *UserUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type Users

type Users []*User

Users is a parsable slice of User.

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.

Directories

Path Synopsis
Package mixin provides Ent mixins for composing CoreForge identity fields into application schemas.
Package mixin provides Ent mixins for composing CoreForge identity fields into application schemas.
Package schema provides Ent schema definitions for CoreForge identity management.
Package schema provides Ent schema definitions for CoreForge identity management.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL