ent

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 44 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"
	TypeAgent                 = "Agent"
	TypeApplication           = "Application"
	TypeCredential            = "Credential"
	TypeHuman                 = "Human"
	TypeInvite                = "Invite"
	TypeMembership            = "Membership"
	TypeOAuthAccount          = "OAuthAccount"
	TypeOAuthApp              = "OAuthApp"
	TypeOAuthAppSecret        = "OAuthAppSecret"
	TypeOAuthAuthCode         = "OAuthAuthCode"
	TypeOAuthConsent          = "OAuthConsent"
	TypeOAuthToken            = "OAuthToken"
	TypeOrganization          = "Organization"
	TypePrincipal             = "Principal"
	TypePrincipalMembership   = "PrincipalMembership"
	TypePrincipalToken        = "PrincipalToken"
	TypeRefreshToken          = "RefreshToken"
	TypeServiceAccount        = "ServiceAccount"
	TypeServiceAccountKeyPair = "ServiceAccountKeyPair"
	TypeServicePrincipal      = "ServicePrincipal"
	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 Agent added in v0.2.0

type Agent 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"`
	// Reference to parent Principal
	PrincipalID uuid.UUID `json:"principal_id,omitempty"`
	// AI model identifier (e.g., claude-3-opus)
	ModelID string `json:"model_id,omitempty"`
	// Agent version
	Version string `json:"version,omitempty"`
	// Principal who delegated authority to this agent
	DelegatingPrincipalID *uuid.UUID `json:"delegating_principal_id,omitempty"`
	// Capabilities this agent is constrained to
	CapabilityConstraints []string `json:"capability_constraints,omitempty"`
	// Resources this agent can access
	ResourceConstraints []string `json:"resource_constraints,omitempty"`
	// Maximum token lifetime in seconds (default 1 hour)
	MaxTokenLifetime int `json:"max_token_lifetime,omitempty"`
	// Current session identifier
	SessionID *string `json:"session_id,omitempty"`
	// Whether actions require human confirmation
	RequiresConfirmation bool `json:"requires_confirmation,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the AgentQuery when eager-loading is set.
	Edges AgentEdges `json:"edges"`
	// contains filtered or unexported fields
}

Agent is the model entity for the Agent schema.

func (*Agent) QueryDelegatingPrincipal added in v0.2.0

func (_m *Agent) QueryDelegatingPrincipal() *PrincipalQuery

QueryDelegatingPrincipal queries the "delegating_principal" edge of the Agent entity.

func (*Agent) QueryPrincipal added in v0.2.0

func (_m *Agent) QueryPrincipal() *PrincipalQuery

QueryPrincipal queries the "principal" edge of the Agent entity.

func (*Agent) String added in v0.2.0

func (_m *Agent) String() string

String implements the fmt.Stringer.

func (*Agent) Unwrap added in v0.2.0

func (_m *Agent) Unwrap() *Agent

Unwrap unwraps the Agent 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 (*Agent) Update added in v0.2.0

func (_m *Agent) Update() *AgentUpdateOne

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

func (*Agent) Value added in v0.2.0

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

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

type AgentClient added in v0.2.0

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

AgentClient is a client for the Agent schema.

func NewAgentClient added in v0.2.0

func NewAgentClient(c config) *AgentClient

NewAgentClient returns a client for the Agent from the given config.

func (*AgentClient) Create added in v0.2.0

func (c *AgentClient) Create() *AgentCreate

Create returns a builder for creating a Agent entity.

func (*AgentClient) CreateBulk added in v0.2.0

func (c *AgentClient) CreateBulk(builders ...*AgentCreate) *AgentCreateBulk

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

func (*AgentClient) Delete added in v0.2.0

func (c *AgentClient) Delete() *AgentDelete

Delete returns a delete builder for Agent.

func (*AgentClient) DeleteOne added in v0.2.0

func (c *AgentClient) DeleteOne(_m *Agent) *AgentDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AgentClient) DeleteOneID added in v0.2.0

func (c *AgentClient) DeleteOneID(id uuid.UUID) *AgentDeleteOne

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

func (*AgentClient) Get added in v0.2.0

func (c *AgentClient) Get(ctx context.Context, id uuid.UUID) (*Agent, error)

Get returns a Agent entity by its id.

func (*AgentClient) GetX added in v0.2.0

func (c *AgentClient) GetX(ctx context.Context, id uuid.UUID) *Agent

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

func (*AgentClient) Hooks added in v0.2.0

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

Hooks returns the client hooks.

func (*AgentClient) Intercept added in v0.2.0

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

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

func (*AgentClient) Interceptors added in v0.2.0

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

Interceptors returns the client interceptors.

func (*AgentClient) MapCreateBulk added in v0.2.0

func (c *AgentClient) MapCreateBulk(slice any, setFunc func(*AgentCreate, int)) *AgentCreateBulk

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 (*AgentClient) Query added in v0.2.0

func (c *AgentClient) Query() *AgentQuery

Query returns a query builder for Agent.

func (*AgentClient) QueryDelegatingPrincipal added in v0.2.0

func (c *AgentClient) QueryDelegatingPrincipal(_m *Agent) *PrincipalQuery

QueryDelegatingPrincipal queries the delegating_principal edge of a Agent.

func (*AgentClient) QueryPrincipal added in v0.2.0

func (c *AgentClient) QueryPrincipal(_m *Agent) *PrincipalQuery

QueryPrincipal queries the principal edge of a Agent.

func (*AgentClient) Update added in v0.2.0

func (c *AgentClient) Update() *AgentUpdate

Update returns an update builder for Agent.

func (*AgentClient) UpdateOne added in v0.2.0

func (c *AgentClient) UpdateOne(_m *Agent) *AgentUpdateOne

UpdateOne returns an update builder for the given entity.

func (*AgentClient) UpdateOneID added in v0.2.0

func (c *AgentClient) UpdateOneID(id uuid.UUID) *AgentUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AgentClient) Use added in v0.2.0

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

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

type AgentCreate added in v0.2.0

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

AgentCreate is the builder for creating a Agent entity.

func (*AgentCreate) Exec added in v0.2.0

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

Exec executes the query.

func (*AgentCreate) ExecX added in v0.2.0

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

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

func (*AgentCreate) Mutation added in v0.2.0

func (_c *AgentCreate) Mutation() *AgentMutation

Mutation returns the AgentMutation object of the builder.

func (*AgentCreate) OnConflict added in v0.2.0

func (_c *AgentCreate) OnConflict(opts ...sql.ConflictOption) *AgentUpsertOne

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

client.Agent.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.AgentUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*AgentCreate) OnConflictColumns added in v0.2.0

func (_c *AgentCreate) OnConflictColumns(columns ...string) *AgentUpsertOne

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

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

func (*AgentCreate) Save added in v0.2.0

func (_c *AgentCreate) Save(ctx context.Context) (*Agent, error)

Save creates the Agent in the database.

func (*AgentCreate) SaveX added in v0.2.0

func (_c *AgentCreate) SaveX(ctx context.Context) *Agent

SaveX calls Save and panics if Save returns an error.

func (*AgentCreate) SetCapabilityConstraints added in v0.2.0

func (_c *AgentCreate) SetCapabilityConstraints(v []string) *AgentCreate

SetCapabilityConstraints sets the "capability_constraints" field.

func (*AgentCreate) SetCreatedAt added in v0.2.0

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

SetCreatedAt sets the "created_at" field.

func (*AgentCreate) SetDelegatingPrincipal added in v0.2.0

func (_c *AgentCreate) SetDelegatingPrincipal(v *Principal) *AgentCreate

SetDelegatingPrincipal sets the "delegating_principal" edge to the Principal entity.

func (*AgentCreate) SetDelegatingPrincipalID added in v0.2.0

func (_c *AgentCreate) SetDelegatingPrincipalID(v uuid.UUID) *AgentCreate

SetDelegatingPrincipalID sets the "delegating_principal_id" field.

func (*AgentCreate) SetID added in v0.2.0

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

SetID sets the "id" field.

func (*AgentCreate) SetMaxTokenLifetime added in v0.2.0

func (_c *AgentCreate) SetMaxTokenLifetime(v int) *AgentCreate

SetMaxTokenLifetime sets the "max_token_lifetime" field.

func (*AgentCreate) SetModelID added in v0.2.0

func (_c *AgentCreate) SetModelID(v string) *AgentCreate

SetModelID sets the "model_id" field.

func (*AgentCreate) SetNillableCreatedAt added in v0.2.0

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

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

func (*AgentCreate) SetNillableDelegatingPrincipalID added in v0.2.0

func (_c *AgentCreate) SetNillableDelegatingPrincipalID(v *uuid.UUID) *AgentCreate

SetNillableDelegatingPrincipalID sets the "delegating_principal_id" field if the given value is not nil.

func (*AgentCreate) SetNillableID added in v0.2.0

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

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

func (*AgentCreate) SetNillableMaxTokenLifetime added in v0.2.0

func (_c *AgentCreate) SetNillableMaxTokenLifetime(v *int) *AgentCreate

SetNillableMaxTokenLifetime sets the "max_token_lifetime" field if the given value is not nil.

func (*AgentCreate) SetNillableRequiresConfirmation added in v0.2.0

func (_c *AgentCreate) SetNillableRequiresConfirmation(v *bool) *AgentCreate

SetNillableRequiresConfirmation sets the "requires_confirmation" field if the given value is not nil.

func (*AgentCreate) SetNillableSessionID added in v0.2.0

func (_c *AgentCreate) SetNillableSessionID(v *string) *AgentCreate

SetNillableSessionID sets the "session_id" field if the given value is not nil.

func (*AgentCreate) SetNillableUpdatedAt added in v0.2.0

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

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

func (*AgentCreate) SetNillableVersion added in v0.2.0

func (_c *AgentCreate) SetNillableVersion(v *string) *AgentCreate

SetNillableVersion sets the "version" field if the given value is not nil.

func (*AgentCreate) SetPrincipal added in v0.2.0

func (_c *AgentCreate) SetPrincipal(v *Principal) *AgentCreate

SetPrincipal sets the "principal" edge to the Principal entity.

func (*AgentCreate) SetPrincipalID added in v0.2.0

func (_c *AgentCreate) SetPrincipalID(v uuid.UUID) *AgentCreate

SetPrincipalID sets the "principal_id" field.

func (*AgentCreate) SetRequiresConfirmation added in v0.2.0

func (_c *AgentCreate) SetRequiresConfirmation(v bool) *AgentCreate

SetRequiresConfirmation sets the "requires_confirmation" field.

func (*AgentCreate) SetResourceConstraints added in v0.2.0

func (_c *AgentCreate) SetResourceConstraints(v []string) *AgentCreate

SetResourceConstraints sets the "resource_constraints" field.

func (*AgentCreate) SetSessionID added in v0.2.0

func (_c *AgentCreate) SetSessionID(v string) *AgentCreate

SetSessionID sets the "session_id" field.

func (*AgentCreate) SetUpdatedAt added in v0.2.0

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

SetUpdatedAt sets the "updated_at" field.

func (*AgentCreate) SetVersion added in v0.2.0

func (_c *AgentCreate) SetVersion(v string) *AgentCreate

SetVersion sets the "version" field.

type AgentCreateBulk added in v0.2.0

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

AgentCreateBulk is the builder for creating many Agent entities in bulk.

func (*AgentCreateBulk) Exec added in v0.2.0

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

Exec executes the query.

func (*AgentCreateBulk) ExecX added in v0.2.0

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

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

func (*AgentCreateBulk) OnConflict added in v0.2.0

func (_c *AgentCreateBulk) OnConflict(opts ...sql.ConflictOption) *AgentUpsertBulk

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

client.Agent.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.AgentUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*AgentCreateBulk) OnConflictColumns added in v0.2.0

func (_c *AgentCreateBulk) OnConflictColumns(columns ...string) *AgentUpsertBulk

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

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

func (*AgentCreateBulk) Save added in v0.2.0

func (_c *AgentCreateBulk) Save(ctx context.Context) ([]*Agent, error)

Save creates the Agent entities in the database.

func (*AgentCreateBulk) SaveX added in v0.2.0

func (_c *AgentCreateBulk) SaveX(ctx context.Context) []*Agent

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

type AgentDelete added in v0.2.0

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

AgentDelete is the builder for deleting a Agent entity.

func (*AgentDelete) Exec added in v0.2.0

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

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

func (*AgentDelete) ExecX added in v0.2.0

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

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

func (*AgentDelete) Where added in v0.2.0

func (_d *AgentDelete) Where(ps ...predicate.Agent) *AgentDelete

Where appends a list predicates to the AgentDelete builder.

type AgentDeleteOne added in v0.2.0

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

AgentDeleteOne is the builder for deleting a single Agent entity.

func (*AgentDeleteOne) Exec added in v0.2.0

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

Exec executes the deletion query.

func (*AgentDeleteOne) ExecX added in v0.2.0

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

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

func (*AgentDeleteOne) Where added in v0.2.0

func (_d *AgentDeleteOne) Where(ps ...predicate.Agent) *AgentDeleteOne

Where appends a list predicates to the AgentDelete builder.

type AgentEdges added in v0.2.0

type AgentEdges struct {
	// Principal holds the value of the principal edge.
	Principal *Principal `json:"principal,omitempty"`
	// Principal who authorized this agent
	DelegatingPrincipal *Principal `json:"delegating_principal,omitempty"`
	// contains filtered or unexported fields
}

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

func (AgentEdges) DelegatingPrincipalOrErr added in v0.2.0

func (e AgentEdges) DelegatingPrincipalOrErr() (*Principal, error)

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

func (AgentEdges) PrincipalOrErr added in v0.2.0

func (e AgentEdges) PrincipalOrErr() (*Principal, error)

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

type AgentFilter added in v0.2.0

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

AgentFilter provides a generic filtering capability at runtime for AgentQuery.

func (*AgentFilter) Where added in v0.2.0

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

Where applies the entql predicate on the query filter.

func (*AgentFilter) WhereCapabilityConstraints added in v0.2.0

func (f *AgentFilter) WhereCapabilityConstraints(p entql.BytesP)

WhereCapabilityConstraints applies the entql json.RawMessage predicate on the capability_constraints field.

func (*AgentFilter) WhereCreatedAt added in v0.2.0

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

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

func (*AgentFilter) WhereDelegatingPrincipalID added in v0.2.0

func (f *AgentFilter) WhereDelegatingPrincipalID(p entql.ValueP)

WhereDelegatingPrincipalID applies the entql [16]byte predicate on the delegating_principal_id field.

func (*AgentFilter) WhereHasDelegatingPrincipal added in v0.2.0

func (f *AgentFilter) WhereHasDelegatingPrincipal()

WhereHasDelegatingPrincipal applies a predicate to check if query has an edge delegating_principal.

func (*AgentFilter) WhereHasDelegatingPrincipalWith added in v0.2.0

func (f *AgentFilter) WhereHasDelegatingPrincipalWith(preds ...predicate.Principal)

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

func (*AgentFilter) WhereHasPrincipal added in v0.2.0

func (f *AgentFilter) WhereHasPrincipal()

WhereHasPrincipal applies a predicate to check if query has an edge principal.

func (*AgentFilter) WhereHasPrincipalWith added in v0.2.0

func (f *AgentFilter) WhereHasPrincipalWith(preds ...predicate.Principal)

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

func (*AgentFilter) WhereID added in v0.2.0

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

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

func (*AgentFilter) WhereMaxTokenLifetime added in v0.2.0

func (f *AgentFilter) WhereMaxTokenLifetime(p entql.IntP)

WhereMaxTokenLifetime applies the entql int predicate on the max_token_lifetime field.

func (*AgentFilter) WhereModelID added in v0.2.0

func (f *AgentFilter) WhereModelID(p entql.StringP)

WhereModelID applies the entql string predicate on the model_id field.

func (*AgentFilter) WherePrincipalID added in v0.2.0

func (f *AgentFilter) WherePrincipalID(p entql.ValueP)

WherePrincipalID applies the entql [16]byte predicate on the principal_id field.

func (*AgentFilter) WhereRequiresConfirmation added in v0.2.0

func (f *AgentFilter) WhereRequiresConfirmation(p entql.BoolP)

WhereRequiresConfirmation applies the entql bool predicate on the requires_confirmation field.

func (*AgentFilter) WhereResourceConstraints added in v0.2.0

func (f *AgentFilter) WhereResourceConstraints(p entql.BytesP)

WhereResourceConstraints applies the entql json.RawMessage predicate on the resource_constraints field.

func (*AgentFilter) WhereSessionID added in v0.2.0

func (f *AgentFilter) WhereSessionID(p entql.StringP)

WhereSessionID applies the entql string predicate on the session_id field.

func (*AgentFilter) WhereUpdatedAt added in v0.2.0

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

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

func (*AgentFilter) WhereVersion added in v0.2.0

func (f *AgentFilter) WhereVersion(p entql.StringP)

WhereVersion applies the entql string predicate on the version field.

type AgentGroupBy added in v0.2.0

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

AgentGroupBy is the group-by builder for Agent entities.

func (*AgentGroupBy) Aggregate added in v0.2.0

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

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

func (*AgentGroupBy) Bool added in v0.2.0

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

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

func (*AgentGroupBy) BoolX added in v0.2.0

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

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

func (*AgentGroupBy) Bools added in v0.2.0

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

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

func (*AgentGroupBy) BoolsX added in v0.2.0

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

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

func (*AgentGroupBy) Float64 added in v0.2.0

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

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

func (*AgentGroupBy) Float64X added in v0.2.0

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

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

func (*AgentGroupBy) Float64s added in v0.2.0

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

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

func (*AgentGroupBy) Float64sX added in v0.2.0

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

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

func (*AgentGroupBy) Int added in v0.2.0

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

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

func (*AgentGroupBy) IntX added in v0.2.0

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

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

func (*AgentGroupBy) Ints added in v0.2.0

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

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

func (*AgentGroupBy) IntsX added in v0.2.0

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

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

func (*AgentGroupBy) Scan added in v0.2.0

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

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

func (*AgentGroupBy) ScanX added in v0.2.0

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

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

func (*AgentGroupBy) String added in v0.2.0

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

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

func (*AgentGroupBy) StringX added in v0.2.0

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

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

func (*AgentGroupBy) Strings added in v0.2.0

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

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

func (*AgentGroupBy) StringsX added in v0.2.0

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

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

type AgentMutation added in v0.2.0

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

AgentMutation represents an operation that mutates the Agent nodes in the graph.

func (*AgentMutation) AddField added in v0.2.0

func (m *AgentMutation) 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 (*AgentMutation) AddMaxTokenLifetime added in v0.2.0

func (m *AgentMutation) AddMaxTokenLifetime(i int)

AddMaxTokenLifetime adds i to the "max_token_lifetime" field.

func (*AgentMutation) AddedEdges added in v0.2.0

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

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

func (*AgentMutation) AddedField added in v0.2.0

func (m *AgentMutation) 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 (*AgentMutation) AddedFields added in v0.2.0

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

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

func (*AgentMutation) AddedIDs added in v0.2.0

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

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

func (*AgentMutation) AddedMaxTokenLifetime added in v0.2.0

func (m *AgentMutation) AddedMaxTokenLifetime() (r int, exists bool)

AddedMaxTokenLifetime returns the value that was added to the "max_token_lifetime" field in this mutation.

func (*AgentMutation) AppendCapabilityConstraints added in v0.2.0

func (m *AgentMutation) AppendCapabilityConstraints(s []string)

AppendCapabilityConstraints adds s to the "capability_constraints" field.

func (*AgentMutation) AppendResourceConstraints added in v0.2.0

func (m *AgentMutation) AppendResourceConstraints(s []string)

AppendResourceConstraints adds s to the "resource_constraints" field.

func (*AgentMutation) AppendedCapabilityConstraints added in v0.2.0

func (m *AgentMutation) AppendedCapabilityConstraints() ([]string, bool)

AppendedCapabilityConstraints returns the list of values that were appended to the "capability_constraints" field in this mutation.

func (*AgentMutation) AppendedResourceConstraints added in v0.2.0

func (m *AgentMutation) AppendedResourceConstraints() ([]string, bool)

AppendedResourceConstraints returns the list of values that were appended to the "resource_constraints" field in this mutation.

func (*AgentMutation) CapabilityConstraints added in v0.2.0

func (m *AgentMutation) CapabilityConstraints() (r []string, exists bool)

CapabilityConstraints returns the value of the "capability_constraints" field in the mutation.

func (*AgentMutation) ClearDelegatingPrincipal added in v0.2.0

func (m *AgentMutation) ClearDelegatingPrincipal()

ClearDelegatingPrincipal clears the "delegating_principal" edge to the Principal entity.

func (*AgentMutation) ClearDelegatingPrincipalID added in v0.2.0

func (m *AgentMutation) ClearDelegatingPrincipalID()

ClearDelegatingPrincipalID clears the value of the "delegating_principal_id" field.

func (*AgentMutation) ClearEdge added in v0.2.0

func (m *AgentMutation) 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 (*AgentMutation) ClearField added in v0.2.0

func (m *AgentMutation) 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 (*AgentMutation) ClearPrincipal added in v0.2.0

func (m *AgentMutation) ClearPrincipal()

ClearPrincipal clears the "principal" edge to the Principal entity.

func (*AgentMutation) ClearSessionID added in v0.2.0

func (m *AgentMutation) ClearSessionID()

ClearSessionID clears the value of the "session_id" field.

func (*AgentMutation) ClearVersion added in v0.2.0

func (m *AgentMutation) ClearVersion()

ClearVersion clears the value of the "version" field.

func (*AgentMutation) ClearedEdges added in v0.2.0

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

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

func (*AgentMutation) ClearedFields added in v0.2.0

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

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

func (AgentMutation) Client added in v0.2.0

func (m AgentMutation) 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 (*AgentMutation) CreatedAt added in v0.2.0

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

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

func (*AgentMutation) DelegatingPrincipalCleared added in v0.2.0

func (m *AgentMutation) DelegatingPrincipalCleared() bool

DelegatingPrincipalCleared reports if the "delegating_principal" edge to the Principal entity was cleared.

func (*AgentMutation) DelegatingPrincipalID added in v0.2.0

func (m *AgentMutation) DelegatingPrincipalID() (r uuid.UUID, exists bool)

DelegatingPrincipalID returns the value of the "delegating_principal_id" field in the mutation.

func (*AgentMutation) DelegatingPrincipalIDCleared added in v0.2.0

func (m *AgentMutation) DelegatingPrincipalIDCleared() bool

DelegatingPrincipalIDCleared returns if the "delegating_principal_id" field was cleared in this mutation.

func (*AgentMutation) DelegatingPrincipalIDs added in v0.2.0

func (m *AgentMutation) DelegatingPrincipalIDs() (ids []uuid.UUID)

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

func (*AgentMutation) EdgeCleared added in v0.2.0

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

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

func (*AgentMutation) Field added in v0.2.0

func (m *AgentMutation) 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 (*AgentMutation) FieldCleared added in v0.2.0

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

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

func (*AgentMutation) Fields added in v0.2.0

func (m *AgentMutation) 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 (*AgentMutation) Filter added in v0.2.0

func (m *AgentMutation) Filter() *AgentFilter

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

func (*AgentMutation) ID added in v0.2.0

func (m *AgentMutation) 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 (*AgentMutation) IDs added in v0.2.0

func (m *AgentMutation) 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 (*AgentMutation) MaxTokenLifetime added in v0.2.0

func (m *AgentMutation) MaxTokenLifetime() (r int, exists bool)

MaxTokenLifetime returns the value of the "max_token_lifetime" field in the mutation.

func (*AgentMutation) ModelID added in v0.2.0

func (m *AgentMutation) ModelID() (r string, exists bool)

ModelID returns the value of the "model_id" field in the mutation.

func (*AgentMutation) OldCapabilityConstraints added in v0.2.0

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

OldCapabilityConstraints returns the old "capability_constraints" field's value of the Agent entity. If the Agent 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 (*AgentMutation) OldCreatedAt added in v0.2.0

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

OldCreatedAt returns the old "created_at" field's value of the Agent entity. If the Agent 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 (*AgentMutation) OldDelegatingPrincipalID added in v0.2.0

func (m *AgentMutation) OldDelegatingPrincipalID(ctx context.Context) (v *uuid.UUID, err error)

OldDelegatingPrincipalID returns the old "delegating_principal_id" field's value of the Agent entity. If the Agent 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 (*AgentMutation) OldField added in v0.2.0

func (m *AgentMutation) 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 (*AgentMutation) OldMaxTokenLifetime added in v0.2.0

func (m *AgentMutation) OldMaxTokenLifetime(ctx context.Context) (v int, err error)

OldMaxTokenLifetime returns the old "max_token_lifetime" field's value of the Agent entity. If the Agent 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 (*AgentMutation) OldModelID added in v0.2.0

func (m *AgentMutation) OldModelID(ctx context.Context) (v string, err error)

OldModelID returns the old "model_id" field's value of the Agent entity. If the Agent 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 (*AgentMutation) OldPrincipalID added in v0.2.0

func (m *AgentMutation) OldPrincipalID(ctx context.Context) (v uuid.UUID, err error)

OldPrincipalID returns the old "principal_id" field's value of the Agent entity. If the Agent 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 (*AgentMutation) OldRequiresConfirmation added in v0.2.0

func (m *AgentMutation) OldRequiresConfirmation(ctx context.Context) (v bool, err error)

OldRequiresConfirmation returns the old "requires_confirmation" field's value of the Agent entity. If the Agent 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 (*AgentMutation) OldResourceConstraints added in v0.2.0

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

OldResourceConstraints returns the old "resource_constraints" field's value of the Agent entity. If the Agent 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 (*AgentMutation) OldSessionID added in v0.2.0

func (m *AgentMutation) OldSessionID(ctx context.Context) (v *string, err error)

OldSessionID returns the old "session_id" field's value of the Agent entity. If the Agent 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 (*AgentMutation) OldUpdatedAt added in v0.2.0

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

OldUpdatedAt returns the old "updated_at" field's value of the Agent entity. If the Agent 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 (*AgentMutation) OldVersion added in v0.2.0

func (m *AgentMutation) OldVersion(ctx context.Context) (v string, err error)

OldVersion returns the old "version" field's value of the Agent entity. If the Agent 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 (*AgentMutation) Op added in v0.2.0

func (m *AgentMutation) Op() Op

Op returns the operation name.

func (*AgentMutation) PrincipalCleared added in v0.2.0

func (m *AgentMutation) PrincipalCleared() bool

PrincipalCleared reports if the "principal" edge to the Principal entity was cleared.

func (*AgentMutation) PrincipalID added in v0.2.0

func (m *AgentMutation) PrincipalID() (r uuid.UUID, exists bool)

PrincipalID returns the value of the "principal_id" field in the mutation.

func (*AgentMutation) PrincipalIDs added in v0.2.0

func (m *AgentMutation) PrincipalIDs() (ids []uuid.UUID)

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

func (*AgentMutation) RemovedEdges added in v0.2.0

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

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

func (*AgentMutation) RemovedIDs added in v0.2.0

func (m *AgentMutation) 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 (*AgentMutation) RequiresConfirmation added in v0.2.0

func (m *AgentMutation) RequiresConfirmation() (r bool, exists bool)

RequiresConfirmation returns the value of the "requires_confirmation" field in the mutation.

func (*AgentMutation) ResetCapabilityConstraints added in v0.2.0

func (m *AgentMutation) ResetCapabilityConstraints()

ResetCapabilityConstraints resets all changes to the "capability_constraints" field.

func (*AgentMutation) ResetCreatedAt added in v0.2.0

func (m *AgentMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*AgentMutation) ResetDelegatingPrincipal added in v0.2.0

func (m *AgentMutation) ResetDelegatingPrincipal()

ResetDelegatingPrincipal resets all changes to the "delegating_principal" edge.

func (*AgentMutation) ResetDelegatingPrincipalID added in v0.2.0

func (m *AgentMutation) ResetDelegatingPrincipalID()

ResetDelegatingPrincipalID resets all changes to the "delegating_principal_id" field.

func (*AgentMutation) ResetEdge added in v0.2.0

func (m *AgentMutation) 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 (*AgentMutation) ResetField added in v0.2.0

func (m *AgentMutation) 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 (*AgentMutation) ResetMaxTokenLifetime added in v0.2.0

func (m *AgentMutation) ResetMaxTokenLifetime()

ResetMaxTokenLifetime resets all changes to the "max_token_lifetime" field.

func (*AgentMutation) ResetModelID added in v0.2.0

func (m *AgentMutation) ResetModelID()

ResetModelID resets all changes to the "model_id" field.

func (*AgentMutation) ResetPrincipal added in v0.2.0

func (m *AgentMutation) ResetPrincipal()

ResetPrincipal resets all changes to the "principal" edge.

func (*AgentMutation) ResetPrincipalID added in v0.2.0

func (m *AgentMutation) ResetPrincipalID()

ResetPrincipalID resets all changes to the "principal_id" field.

func (*AgentMutation) ResetRequiresConfirmation added in v0.2.0

func (m *AgentMutation) ResetRequiresConfirmation()

ResetRequiresConfirmation resets all changes to the "requires_confirmation" field.

func (*AgentMutation) ResetResourceConstraints added in v0.2.0

func (m *AgentMutation) ResetResourceConstraints()

ResetResourceConstraints resets all changes to the "resource_constraints" field.

func (*AgentMutation) ResetSessionID added in v0.2.0

func (m *AgentMutation) ResetSessionID()

ResetSessionID resets all changes to the "session_id" field.

func (*AgentMutation) ResetUpdatedAt added in v0.2.0

func (m *AgentMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*AgentMutation) ResetVersion added in v0.2.0

func (m *AgentMutation) ResetVersion()

ResetVersion resets all changes to the "version" field.

func (*AgentMutation) ResourceConstraints added in v0.2.0

func (m *AgentMutation) ResourceConstraints() (r []string, exists bool)

ResourceConstraints returns the value of the "resource_constraints" field in the mutation.

func (*AgentMutation) SessionID added in v0.2.0

func (m *AgentMutation) SessionID() (r string, exists bool)

SessionID returns the value of the "session_id" field in the mutation.

func (*AgentMutation) SessionIDCleared added in v0.2.0

func (m *AgentMutation) SessionIDCleared() bool

SessionIDCleared returns if the "session_id" field was cleared in this mutation.

func (*AgentMutation) SetCapabilityConstraints added in v0.2.0

func (m *AgentMutation) SetCapabilityConstraints(s []string)

SetCapabilityConstraints sets the "capability_constraints" field.

func (*AgentMutation) SetCreatedAt added in v0.2.0

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

SetCreatedAt sets the "created_at" field.

func (*AgentMutation) SetDelegatingPrincipalID added in v0.2.0

func (m *AgentMutation) SetDelegatingPrincipalID(u uuid.UUID)

SetDelegatingPrincipalID sets the "delegating_principal_id" field.

func (*AgentMutation) SetField added in v0.2.0

func (m *AgentMutation) 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 (*AgentMutation) SetID added in v0.2.0

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

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

func (*AgentMutation) SetMaxTokenLifetime added in v0.2.0

func (m *AgentMutation) SetMaxTokenLifetime(i int)

SetMaxTokenLifetime sets the "max_token_lifetime" field.

func (*AgentMutation) SetModelID added in v0.2.0

func (m *AgentMutation) SetModelID(s string)

SetModelID sets the "model_id" field.

func (*AgentMutation) SetOp added in v0.2.0

func (m *AgentMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AgentMutation) SetPrincipalID added in v0.2.0

func (m *AgentMutation) SetPrincipalID(u uuid.UUID)

SetPrincipalID sets the "principal_id" field.

func (*AgentMutation) SetRequiresConfirmation added in v0.2.0

func (m *AgentMutation) SetRequiresConfirmation(b bool)

SetRequiresConfirmation sets the "requires_confirmation" field.

func (*AgentMutation) SetResourceConstraints added in v0.2.0

func (m *AgentMutation) SetResourceConstraints(s []string)

SetResourceConstraints sets the "resource_constraints" field.

func (*AgentMutation) SetSessionID added in v0.2.0

func (m *AgentMutation) SetSessionID(s string)

SetSessionID sets the "session_id" field.

func (*AgentMutation) SetUpdatedAt added in v0.2.0

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

SetUpdatedAt sets the "updated_at" field.

func (*AgentMutation) SetVersion added in v0.2.0

func (m *AgentMutation) SetVersion(s string)

SetVersion sets the "version" field.

func (AgentMutation) Tx added in v0.2.0

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

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

func (*AgentMutation) Type added in v0.2.0

func (m *AgentMutation) Type() string

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

func (*AgentMutation) UpdatedAt added in v0.2.0

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

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

func (*AgentMutation) Version added in v0.2.0

func (m *AgentMutation) Version() (r string, exists bool)

Version returns the value of the "version" field in the mutation.

func (*AgentMutation) VersionCleared added in v0.2.0

func (m *AgentMutation) VersionCleared() bool

VersionCleared returns if the "version" field was cleared in this mutation.

func (*AgentMutation) Where added in v0.2.0

func (m *AgentMutation) Where(ps ...predicate.Agent)

Where appends a list predicates to the AgentMutation builder.

func (*AgentMutation) WhereP added in v0.2.0

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

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

type AgentQuery added in v0.2.0

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

AgentQuery is the builder for querying Agent entities.

func (*AgentQuery) Aggregate added in v0.2.0

func (_q *AgentQuery) Aggregate(fns ...AggregateFunc) *AgentSelect

Aggregate returns a AgentSelect configured with the given aggregations.

func (*AgentQuery) All added in v0.2.0

func (_q *AgentQuery) All(ctx context.Context) ([]*Agent, error)

All executes the query and returns a list of Agents.

func (*AgentQuery) AllX added in v0.2.0

func (_q *AgentQuery) AllX(ctx context.Context) []*Agent

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

func (*AgentQuery) Clone added in v0.2.0

func (_q *AgentQuery) Clone() *AgentQuery

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

func (*AgentQuery) Count added in v0.2.0

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

Count returns the count of the given query.

func (*AgentQuery) CountX added in v0.2.0

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

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

func (*AgentQuery) Exist added in v0.2.0

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

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

func (*AgentQuery) ExistX added in v0.2.0

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

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

func (*AgentQuery) Filter added in v0.2.0

func (_q *AgentQuery) Filter() *AgentFilter

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

func (*AgentQuery) First added in v0.2.0

func (_q *AgentQuery) First(ctx context.Context) (*Agent, error)

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

func (*AgentQuery) FirstID added in v0.2.0

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

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

func (*AgentQuery) FirstIDX added in v0.2.0

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

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

func (*AgentQuery) FirstX added in v0.2.0

func (_q *AgentQuery) FirstX(ctx context.Context) *Agent

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

func (*AgentQuery) GroupBy added in v0.2.0

func (_q *AgentQuery) GroupBy(field string, fields ...string) *AgentGroupBy

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.Agent.Query().
	GroupBy(agent.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AgentQuery) IDs added in v0.2.0

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

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

func (*AgentQuery) IDsX added in v0.2.0

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

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

func (*AgentQuery) Limit added in v0.2.0

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

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

func (*AgentQuery) Offset added in v0.2.0

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

Offset to start from.

func (*AgentQuery) Only added in v0.2.0

func (_q *AgentQuery) Only(ctx context.Context) (*Agent, error)

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

func (*AgentQuery) OnlyID added in v0.2.0

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

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

func (*AgentQuery) OnlyIDX added in v0.2.0

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

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

func (*AgentQuery) OnlyX added in v0.2.0

func (_q *AgentQuery) OnlyX(ctx context.Context) *Agent

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

func (*AgentQuery) Order added in v0.2.0

func (_q *AgentQuery) Order(o ...agent.OrderOption) *AgentQuery

Order specifies how the records should be ordered.

func (*AgentQuery) QueryDelegatingPrincipal added in v0.2.0

func (_q *AgentQuery) QueryDelegatingPrincipal() *PrincipalQuery

QueryDelegatingPrincipal chains the current query on the "delegating_principal" edge.

func (*AgentQuery) QueryPrincipal added in v0.2.0

func (_q *AgentQuery) QueryPrincipal() *PrincipalQuery

QueryPrincipal chains the current query on the "principal" edge.

func (*AgentQuery) Select added in v0.2.0

func (_q *AgentQuery) Select(fields ...string) *AgentSelect

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.Agent.Query().
	Select(agent.FieldCreatedAt).
	Scan(ctx, &v)

func (*AgentQuery) Unique added in v0.2.0

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

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 (*AgentQuery) Where added in v0.2.0

func (_q *AgentQuery) Where(ps ...predicate.Agent) *AgentQuery

Where adds a new predicate for the AgentQuery builder.

func (*AgentQuery) WithDelegatingPrincipal added in v0.2.0

func (_q *AgentQuery) WithDelegatingPrincipal(opts ...func(*PrincipalQuery)) *AgentQuery

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

func (*AgentQuery) WithPrincipal added in v0.2.0

func (_q *AgentQuery) WithPrincipal(opts ...func(*PrincipalQuery)) *AgentQuery

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

type AgentSelect added in v0.2.0

type AgentSelect struct {
	*AgentQuery
	// contains filtered or unexported fields
}

AgentSelect is the builder for selecting fields of Agent entities.

func (*AgentSelect) Aggregate added in v0.2.0

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

Aggregate adds the given aggregation functions to the selector query.

func (*AgentSelect) Bool added in v0.2.0

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

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

func (*AgentSelect) BoolX added in v0.2.0

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

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

func (*AgentSelect) Bools added in v0.2.0

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

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

func (*AgentSelect) BoolsX added in v0.2.0

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

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

func (*AgentSelect) Float64 added in v0.2.0

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

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

func (*AgentSelect) Float64X added in v0.2.0

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

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

func (*AgentSelect) Float64s added in v0.2.0

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

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

func (*AgentSelect) Float64sX added in v0.2.0

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

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

func (*AgentSelect) Int added in v0.2.0

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

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

func (*AgentSelect) IntX added in v0.2.0

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

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

func (*AgentSelect) Ints added in v0.2.0

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

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

func (*AgentSelect) IntsX added in v0.2.0

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

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

func (*AgentSelect) Scan added in v0.2.0

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

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

func (*AgentSelect) ScanX added in v0.2.0

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

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

func (*AgentSelect) String added in v0.2.0

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

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

func (*AgentSelect) StringX added in v0.2.0

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

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

func (*AgentSelect) Strings added in v0.2.0

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

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

func (*AgentSelect) StringsX added in v0.2.0

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

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

type AgentUpdate added in v0.2.0

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

AgentUpdate is the builder for updating Agent entities.

func (*AgentUpdate) AddMaxTokenLifetime added in v0.2.0

func (_u *AgentUpdate) AddMaxTokenLifetime(v int) *AgentUpdate

AddMaxTokenLifetime adds value to the "max_token_lifetime" field.

func (*AgentUpdate) AppendCapabilityConstraints added in v0.2.0

func (_u *AgentUpdate) AppendCapabilityConstraints(v []string) *AgentUpdate

AppendCapabilityConstraints appends value to the "capability_constraints" field.

func (*AgentUpdate) AppendResourceConstraints added in v0.2.0

func (_u *AgentUpdate) AppendResourceConstraints(v []string) *AgentUpdate

AppendResourceConstraints appends value to the "resource_constraints" field.

func (*AgentUpdate) ClearDelegatingPrincipal added in v0.2.0

func (_u *AgentUpdate) ClearDelegatingPrincipal() *AgentUpdate

ClearDelegatingPrincipal clears the "delegating_principal" edge to the Principal entity.

func (*AgentUpdate) ClearDelegatingPrincipalID added in v0.2.0

func (_u *AgentUpdate) ClearDelegatingPrincipalID() *AgentUpdate

ClearDelegatingPrincipalID clears the value of the "delegating_principal_id" field.

func (*AgentUpdate) ClearSessionID added in v0.2.0

func (_u *AgentUpdate) ClearSessionID() *AgentUpdate

ClearSessionID clears the value of the "session_id" field.

func (*AgentUpdate) ClearVersion added in v0.2.0

func (_u *AgentUpdate) ClearVersion() *AgentUpdate

ClearVersion clears the value of the "version" field.

func (*AgentUpdate) Exec added in v0.2.0

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

Exec executes the query.

func (*AgentUpdate) ExecX added in v0.2.0

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

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

func (*AgentUpdate) Mutation added in v0.2.0

func (_u *AgentUpdate) Mutation() *AgentMutation

Mutation returns the AgentMutation object of the builder.

func (*AgentUpdate) Save added in v0.2.0

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

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

func (*AgentUpdate) SaveX added in v0.2.0

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

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

func (*AgentUpdate) SetCapabilityConstraints added in v0.2.0

func (_u *AgentUpdate) SetCapabilityConstraints(v []string) *AgentUpdate

SetCapabilityConstraints sets the "capability_constraints" field.

func (*AgentUpdate) SetDelegatingPrincipal added in v0.2.0

func (_u *AgentUpdate) SetDelegatingPrincipal(v *Principal) *AgentUpdate

SetDelegatingPrincipal sets the "delegating_principal" edge to the Principal entity.

func (*AgentUpdate) SetDelegatingPrincipalID added in v0.2.0

func (_u *AgentUpdate) SetDelegatingPrincipalID(v uuid.UUID) *AgentUpdate

SetDelegatingPrincipalID sets the "delegating_principal_id" field.

func (*AgentUpdate) SetMaxTokenLifetime added in v0.2.0

func (_u *AgentUpdate) SetMaxTokenLifetime(v int) *AgentUpdate

SetMaxTokenLifetime sets the "max_token_lifetime" field.

func (*AgentUpdate) SetModelID added in v0.2.0

func (_u *AgentUpdate) SetModelID(v string) *AgentUpdate

SetModelID sets the "model_id" field.

func (*AgentUpdate) SetNillableDelegatingPrincipalID added in v0.2.0

func (_u *AgentUpdate) SetNillableDelegatingPrincipalID(v *uuid.UUID) *AgentUpdate

SetNillableDelegatingPrincipalID sets the "delegating_principal_id" field if the given value is not nil.

func (*AgentUpdate) SetNillableMaxTokenLifetime added in v0.2.0

func (_u *AgentUpdate) SetNillableMaxTokenLifetime(v *int) *AgentUpdate

SetNillableMaxTokenLifetime sets the "max_token_lifetime" field if the given value is not nil.

func (*AgentUpdate) SetNillableModelID added in v0.2.0

func (_u *AgentUpdate) SetNillableModelID(v *string) *AgentUpdate

SetNillableModelID sets the "model_id" field if the given value is not nil.

func (*AgentUpdate) SetNillableRequiresConfirmation added in v0.2.0

func (_u *AgentUpdate) SetNillableRequiresConfirmation(v *bool) *AgentUpdate

SetNillableRequiresConfirmation sets the "requires_confirmation" field if the given value is not nil.

func (*AgentUpdate) SetNillableSessionID added in v0.2.0

func (_u *AgentUpdate) SetNillableSessionID(v *string) *AgentUpdate

SetNillableSessionID sets the "session_id" field if the given value is not nil.

func (*AgentUpdate) SetNillableVersion added in v0.2.0

func (_u *AgentUpdate) SetNillableVersion(v *string) *AgentUpdate

SetNillableVersion sets the "version" field if the given value is not nil.

func (*AgentUpdate) SetRequiresConfirmation added in v0.2.0

func (_u *AgentUpdate) SetRequiresConfirmation(v bool) *AgentUpdate

SetRequiresConfirmation sets the "requires_confirmation" field.

func (*AgentUpdate) SetResourceConstraints added in v0.2.0

func (_u *AgentUpdate) SetResourceConstraints(v []string) *AgentUpdate

SetResourceConstraints sets the "resource_constraints" field.

func (*AgentUpdate) SetSessionID added in v0.2.0

func (_u *AgentUpdate) SetSessionID(v string) *AgentUpdate

SetSessionID sets the "session_id" field.

func (*AgentUpdate) SetUpdatedAt added in v0.2.0

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

SetUpdatedAt sets the "updated_at" field.

func (*AgentUpdate) SetVersion added in v0.2.0

func (_u *AgentUpdate) SetVersion(v string) *AgentUpdate

SetVersion sets the "version" field.

func (*AgentUpdate) Where added in v0.2.0

func (_u *AgentUpdate) Where(ps ...predicate.Agent) *AgentUpdate

Where appends a list predicates to the AgentUpdate builder.

type AgentUpdateOne added in v0.2.0

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

AgentUpdateOne is the builder for updating a single Agent entity.

func (*AgentUpdateOne) AddMaxTokenLifetime added in v0.2.0

func (_u *AgentUpdateOne) AddMaxTokenLifetime(v int) *AgentUpdateOne

AddMaxTokenLifetime adds value to the "max_token_lifetime" field.

func (*AgentUpdateOne) AppendCapabilityConstraints added in v0.2.0

func (_u *AgentUpdateOne) AppendCapabilityConstraints(v []string) *AgentUpdateOne

AppendCapabilityConstraints appends value to the "capability_constraints" field.

func (*AgentUpdateOne) AppendResourceConstraints added in v0.2.0

func (_u *AgentUpdateOne) AppendResourceConstraints(v []string) *AgentUpdateOne

AppendResourceConstraints appends value to the "resource_constraints" field.

func (*AgentUpdateOne) ClearDelegatingPrincipal added in v0.2.0

func (_u *AgentUpdateOne) ClearDelegatingPrincipal() *AgentUpdateOne

ClearDelegatingPrincipal clears the "delegating_principal" edge to the Principal entity.

func (*AgentUpdateOne) ClearDelegatingPrincipalID added in v0.2.0

func (_u *AgentUpdateOne) ClearDelegatingPrincipalID() *AgentUpdateOne

ClearDelegatingPrincipalID clears the value of the "delegating_principal_id" field.

func (*AgentUpdateOne) ClearSessionID added in v0.2.0

func (_u *AgentUpdateOne) ClearSessionID() *AgentUpdateOne

ClearSessionID clears the value of the "session_id" field.

func (*AgentUpdateOne) ClearVersion added in v0.2.0

func (_u *AgentUpdateOne) ClearVersion() *AgentUpdateOne

ClearVersion clears the value of the "version" field.

func (*AgentUpdateOne) Exec added in v0.2.0

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

Exec executes the query on the entity.

func (*AgentUpdateOne) ExecX added in v0.2.0

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

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

func (*AgentUpdateOne) Mutation added in v0.2.0

func (_u *AgentUpdateOne) Mutation() *AgentMutation

Mutation returns the AgentMutation object of the builder.

func (*AgentUpdateOne) Save added in v0.2.0

func (_u *AgentUpdateOne) Save(ctx context.Context) (*Agent, error)

Save executes the query and returns the updated Agent entity.

func (*AgentUpdateOne) SaveX added in v0.2.0

func (_u *AgentUpdateOne) SaveX(ctx context.Context) *Agent

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

func (*AgentUpdateOne) Select added in v0.2.0

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

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

func (*AgentUpdateOne) SetCapabilityConstraints added in v0.2.0

func (_u *AgentUpdateOne) SetCapabilityConstraints(v []string) *AgentUpdateOne

SetCapabilityConstraints sets the "capability_constraints" field.

func (*AgentUpdateOne) SetDelegatingPrincipal added in v0.2.0

func (_u *AgentUpdateOne) SetDelegatingPrincipal(v *Principal) *AgentUpdateOne

SetDelegatingPrincipal sets the "delegating_principal" edge to the Principal entity.

func (*AgentUpdateOne) SetDelegatingPrincipalID added in v0.2.0

func (_u *AgentUpdateOne) SetDelegatingPrincipalID(v uuid.UUID) *AgentUpdateOne

SetDelegatingPrincipalID sets the "delegating_principal_id" field.

func (*AgentUpdateOne) SetMaxTokenLifetime added in v0.2.0

func (_u *AgentUpdateOne) SetMaxTokenLifetime(v int) *AgentUpdateOne

SetMaxTokenLifetime sets the "max_token_lifetime" field.

func (*AgentUpdateOne) SetModelID added in v0.2.0

func (_u *AgentUpdateOne) SetModelID(v string) *AgentUpdateOne

SetModelID sets the "model_id" field.

func (*AgentUpdateOne) SetNillableDelegatingPrincipalID added in v0.2.0

func (_u *AgentUpdateOne) SetNillableDelegatingPrincipalID(v *uuid.UUID) *AgentUpdateOne

SetNillableDelegatingPrincipalID sets the "delegating_principal_id" field if the given value is not nil.

func (*AgentUpdateOne) SetNillableMaxTokenLifetime added in v0.2.0

func (_u *AgentUpdateOne) SetNillableMaxTokenLifetime(v *int) *AgentUpdateOne

SetNillableMaxTokenLifetime sets the "max_token_lifetime" field if the given value is not nil.

func (*AgentUpdateOne) SetNillableModelID added in v0.2.0

func (_u *AgentUpdateOne) SetNillableModelID(v *string) *AgentUpdateOne

SetNillableModelID sets the "model_id" field if the given value is not nil.

func (*AgentUpdateOne) SetNillableRequiresConfirmation added in v0.2.0

func (_u *AgentUpdateOne) SetNillableRequiresConfirmation(v *bool) *AgentUpdateOne

SetNillableRequiresConfirmation sets the "requires_confirmation" field if the given value is not nil.

func (*AgentUpdateOne) SetNillableSessionID added in v0.2.0

func (_u *AgentUpdateOne) SetNillableSessionID(v *string) *AgentUpdateOne

SetNillableSessionID sets the "session_id" field if the given value is not nil.

func (*AgentUpdateOne) SetNillableVersion added in v0.2.0

func (_u *AgentUpdateOne) SetNillableVersion(v *string) *AgentUpdateOne

SetNillableVersion sets the "version" field if the given value is not nil.

func (*AgentUpdateOne) SetRequiresConfirmation added in v0.2.0

func (_u *AgentUpdateOne) SetRequiresConfirmation(v bool) *AgentUpdateOne

SetRequiresConfirmation sets the "requires_confirmation" field.

func (*AgentUpdateOne) SetResourceConstraints added in v0.2.0

func (_u *AgentUpdateOne) SetResourceConstraints(v []string) *AgentUpdateOne

SetResourceConstraints sets the "resource_constraints" field.

func (*AgentUpdateOne) SetSessionID added in v0.2.0

func (_u *AgentUpdateOne) SetSessionID(v string) *AgentUpdateOne

SetSessionID sets the "session_id" field.

func (*AgentUpdateOne) SetUpdatedAt added in v0.2.0

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

SetUpdatedAt sets the "updated_at" field.

func (*AgentUpdateOne) SetVersion added in v0.2.0

func (_u *AgentUpdateOne) SetVersion(v string) *AgentUpdateOne

SetVersion sets the "version" field.

func (*AgentUpdateOne) Where added in v0.2.0

func (_u *AgentUpdateOne) Where(ps ...predicate.Agent) *AgentUpdateOne

Where appends a list predicates to the AgentUpdate builder.

type AgentUpsert added in v0.2.0

type AgentUpsert struct {
	*sql.UpdateSet
}

AgentUpsert is the "OnConflict" setter.

func (*AgentUpsert) AddMaxTokenLifetime added in v0.2.0

func (u *AgentUpsert) AddMaxTokenLifetime(v int) *AgentUpsert

AddMaxTokenLifetime adds v to the "max_token_lifetime" field.

func (*AgentUpsert) ClearDelegatingPrincipalID added in v0.2.0

func (u *AgentUpsert) ClearDelegatingPrincipalID() *AgentUpsert

ClearDelegatingPrincipalID clears the value of the "delegating_principal_id" field.

func (*AgentUpsert) ClearSessionID added in v0.2.0

func (u *AgentUpsert) ClearSessionID() *AgentUpsert

ClearSessionID clears the value of the "session_id" field.

func (*AgentUpsert) ClearVersion added in v0.2.0

func (u *AgentUpsert) ClearVersion() *AgentUpsert

ClearVersion clears the value of the "version" field.

func (*AgentUpsert) SetCapabilityConstraints added in v0.2.0

func (u *AgentUpsert) SetCapabilityConstraints(v []string) *AgentUpsert

SetCapabilityConstraints sets the "capability_constraints" field.

func (*AgentUpsert) SetDelegatingPrincipalID added in v0.2.0

func (u *AgentUpsert) SetDelegatingPrincipalID(v uuid.UUID) *AgentUpsert

SetDelegatingPrincipalID sets the "delegating_principal_id" field.

func (*AgentUpsert) SetMaxTokenLifetime added in v0.2.0

func (u *AgentUpsert) SetMaxTokenLifetime(v int) *AgentUpsert

SetMaxTokenLifetime sets the "max_token_lifetime" field.

func (*AgentUpsert) SetModelID added in v0.2.0

func (u *AgentUpsert) SetModelID(v string) *AgentUpsert

SetModelID sets the "model_id" field.

func (*AgentUpsert) SetRequiresConfirmation added in v0.2.0

func (u *AgentUpsert) SetRequiresConfirmation(v bool) *AgentUpsert

SetRequiresConfirmation sets the "requires_confirmation" field.

func (*AgentUpsert) SetResourceConstraints added in v0.2.0

func (u *AgentUpsert) SetResourceConstraints(v []string) *AgentUpsert

SetResourceConstraints sets the "resource_constraints" field.

func (*AgentUpsert) SetSessionID added in v0.2.0

func (u *AgentUpsert) SetSessionID(v string) *AgentUpsert

SetSessionID sets the "session_id" field.

func (*AgentUpsert) SetUpdatedAt added in v0.2.0

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

SetUpdatedAt sets the "updated_at" field.

func (*AgentUpsert) SetVersion added in v0.2.0

func (u *AgentUpsert) SetVersion(v string) *AgentUpsert

SetVersion sets the "version" field.

func (*AgentUpsert) UpdateCapabilityConstraints added in v0.2.0

func (u *AgentUpsert) UpdateCapabilityConstraints() *AgentUpsert

UpdateCapabilityConstraints sets the "capability_constraints" field to the value that was provided on create.

func (*AgentUpsert) UpdateDelegatingPrincipalID added in v0.2.0

func (u *AgentUpsert) UpdateDelegatingPrincipalID() *AgentUpsert

UpdateDelegatingPrincipalID sets the "delegating_principal_id" field to the value that was provided on create.

func (*AgentUpsert) UpdateMaxTokenLifetime added in v0.2.0

func (u *AgentUpsert) UpdateMaxTokenLifetime() *AgentUpsert

UpdateMaxTokenLifetime sets the "max_token_lifetime" field to the value that was provided on create.

func (*AgentUpsert) UpdateModelID added in v0.2.0

func (u *AgentUpsert) UpdateModelID() *AgentUpsert

UpdateModelID sets the "model_id" field to the value that was provided on create.

func (*AgentUpsert) UpdateRequiresConfirmation added in v0.2.0

func (u *AgentUpsert) UpdateRequiresConfirmation() *AgentUpsert

UpdateRequiresConfirmation sets the "requires_confirmation" field to the value that was provided on create.

func (*AgentUpsert) UpdateResourceConstraints added in v0.2.0

func (u *AgentUpsert) UpdateResourceConstraints() *AgentUpsert

UpdateResourceConstraints sets the "resource_constraints" field to the value that was provided on create.

func (*AgentUpsert) UpdateSessionID added in v0.2.0

func (u *AgentUpsert) UpdateSessionID() *AgentUpsert

UpdateSessionID sets the "session_id" field to the value that was provided on create.

func (*AgentUpsert) UpdateUpdatedAt added in v0.2.0

func (u *AgentUpsert) UpdateUpdatedAt() *AgentUpsert

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

func (*AgentUpsert) UpdateVersion added in v0.2.0

func (u *AgentUpsert) UpdateVersion() *AgentUpsert

UpdateVersion sets the "version" field to the value that was provided on create.

type AgentUpsertBulk added in v0.2.0

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

AgentUpsertBulk is the builder for "upsert"-ing a bulk of Agent nodes.

func (*AgentUpsertBulk) AddMaxTokenLifetime added in v0.2.0

func (u *AgentUpsertBulk) AddMaxTokenLifetime(v int) *AgentUpsertBulk

AddMaxTokenLifetime adds v to the "max_token_lifetime" field.

func (*AgentUpsertBulk) ClearDelegatingPrincipalID added in v0.2.0

func (u *AgentUpsertBulk) ClearDelegatingPrincipalID() *AgentUpsertBulk

ClearDelegatingPrincipalID clears the value of the "delegating_principal_id" field.

func (*AgentUpsertBulk) ClearSessionID added in v0.2.0

func (u *AgentUpsertBulk) ClearSessionID() *AgentUpsertBulk

ClearSessionID clears the value of the "session_id" field.

func (*AgentUpsertBulk) ClearVersion added in v0.2.0

func (u *AgentUpsertBulk) ClearVersion() *AgentUpsertBulk

ClearVersion clears the value of the "version" field.

func (*AgentUpsertBulk) DoNothing added in v0.2.0

func (u *AgentUpsertBulk) DoNothing() *AgentUpsertBulk

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

func (*AgentUpsertBulk) Exec added in v0.2.0

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

Exec executes the query.

func (*AgentUpsertBulk) ExecX added in v0.2.0

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

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

func (*AgentUpsertBulk) Ignore added in v0.2.0

func (u *AgentUpsertBulk) Ignore() *AgentUpsertBulk

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

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

func (*AgentUpsertBulk) SetCapabilityConstraints added in v0.2.0

func (u *AgentUpsertBulk) SetCapabilityConstraints(v []string) *AgentUpsertBulk

SetCapabilityConstraints sets the "capability_constraints" field.

func (*AgentUpsertBulk) SetDelegatingPrincipalID added in v0.2.0

func (u *AgentUpsertBulk) SetDelegatingPrincipalID(v uuid.UUID) *AgentUpsertBulk

SetDelegatingPrincipalID sets the "delegating_principal_id" field.

func (*AgentUpsertBulk) SetMaxTokenLifetime added in v0.2.0

func (u *AgentUpsertBulk) SetMaxTokenLifetime(v int) *AgentUpsertBulk

SetMaxTokenLifetime sets the "max_token_lifetime" field.

func (*AgentUpsertBulk) SetModelID added in v0.2.0

func (u *AgentUpsertBulk) SetModelID(v string) *AgentUpsertBulk

SetModelID sets the "model_id" field.

func (*AgentUpsertBulk) SetRequiresConfirmation added in v0.2.0

func (u *AgentUpsertBulk) SetRequiresConfirmation(v bool) *AgentUpsertBulk

SetRequiresConfirmation sets the "requires_confirmation" field.

func (*AgentUpsertBulk) SetResourceConstraints added in v0.2.0

func (u *AgentUpsertBulk) SetResourceConstraints(v []string) *AgentUpsertBulk

SetResourceConstraints sets the "resource_constraints" field.

func (*AgentUpsertBulk) SetSessionID added in v0.2.0

func (u *AgentUpsertBulk) SetSessionID(v string) *AgentUpsertBulk

SetSessionID sets the "session_id" field.

func (*AgentUpsertBulk) SetUpdatedAt added in v0.2.0

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

SetUpdatedAt sets the "updated_at" field.

func (*AgentUpsertBulk) SetVersion added in v0.2.0

func (u *AgentUpsertBulk) SetVersion(v string) *AgentUpsertBulk

SetVersion sets the "version" field.

func (*AgentUpsertBulk) Update added in v0.2.0

func (u *AgentUpsertBulk) Update(set func(*AgentUpsert)) *AgentUpsertBulk

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

func (*AgentUpsertBulk) UpdateCapabilityConstraints added in v0.2.0

func (u *AgentUpsertBulk) UpdateCapabilityConstraints() *AgentUpsertBulk

UpdateCapabilityConstraints sets the "capability_constraints" field to the value that was provided on create.

func (*AgentUpsertBulk) UpdateDelegatingPrincipalID added in v0.2.0

func (u *AgentUpsertBulk) UpdateDelegatingPrincipalID() *AgentUpsertBulk

UpdateDelegatingPrincipalID sets the "delegating_principal_id" field to the value that was provided on create.

func (*AgentUpsertBulk) UpdateMaxTokenLifetime added in v0.2.0

func (u *AgentUpsertBulk) UpdateMaxTokenLifetime() *AgentUpsertBulk

UpdateMaxTokenLifetime sets the "max_token_lifetime" field to the value that was provided on create.

func (*AgentUpsertBulk) UpdateModelID added in v0.2.0

func (u *AgentUpsertBulk) UpdateModelID() *AgentUpsertBulk

UpdateModelID sets the "model_id" field to the value that was provided on create.

func (*AgentUpsertBulk) UpdateNewValues added in v0.2.0

func (u *AgentUpsertBulk) UpdateNewValues() *AgentUpsertBulk

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

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

func (*AgentUpsertBulk) UpdateRequiresConfirmation added in v0.2.0

func (u *AgentUpsertBulk) UpdateRequiresConfirmation() *AgentUpsertBulk

UpdateRequiresConfirmation sets the "requires_confirmation" field to the value that was provided on create.

func (*AgentUpsertBulk) UpdateResourceConstraints added in v0.2.0

func (u *AgentUpsertBulk) UpdateResourceConstraints() *AgentUpsertBulk

UpdateResourceConstraints sets the "resource_constraints" field to the value that was provided on create.

func (*AgentUpsertBulk) UpdateSessionID added in v0.2.0

func (u *AgentUpsertBulk) UpdateSessionID() *AgentUpsertBulk

UpdateSessionID sets the "session_id" field to the value that was provided on create.

func (*AgentUpsertBulk) UpdateUpdatedAt added in v0.2.0

func (u *AgentUpsertBulk) UpdateUpdatedAt() *AgentUpsertBulk

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

func (*AgentUpsertBulk) UpdateVersion added in v0.2.0

func (u *AgentUpsertBulk) UpdateVersion() *AgentUpsertBulk

UpdateVersion sets the "version" field to the value that was provided on create.

type AgentUpsertOne added in v0.2.0

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

AgentUpsertOne is the builder for "upsert"-ing

one Agent node.

func (*AgentUpsertOne) AddMaxTokenLifetime added in v0.2.0

func (u *AgentUpsertOne) AddMaxTokenLifetime(v int) *AgentUpsertOne

AddMaxTokenLifetime adds v to the "max_token_lifetime" field.

func (*AgentUpsertOne) ClearDelegatingPrincipalID added in v0.2.0

func (u *AgentUpsertOne) ClearDelegatingPrincipalID() *AgentUpsertOne

ClearDelegatingPrincipalID clears the value of the "delegating_principal_id" field.

func (*AgentUpsertOne) ClearSessionID added in v0.2.0

func (u *AgentUpsertOne) ClearSessionID() *AgentUpsertOne

ClearSessionID clears the value of the "session_id" field.

func (*AgentUpsertOne) ClearVersion added in v0.2.0

func (u *AgentUpsertOne) ClearVersion() *AgentUpsertOne

ClearVersion clears the value of the "version" field.

func (*AgentUpsertOne) DoNothing added in v0.2.0

func (u *AgentUpsertOne) DoNothing() *AgentUpsertOne

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

func (*AgentUpsertOne) Exec added in v0.2.0

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

Exec executes the query.

func (*AgentUpsertOne) ExecX added in v0.2.0

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

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

func (*AgentUpsertOne) ID added in v0.2.0

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

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

func (*AgentUpsertOne) IDX added in v0.2.0

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

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

func (*AgentUpsertOne) Ignore added in v0.2.0

func (u *AgentUpsertOne) Ignore() *AgentUpsertOne

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

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

func (*AgentUpsertOne) SetCapabilityConstraints added in v0.2.0

func (u *AgentUpsertOne) SetCapabilityConstraints(v []string) *AgentUpsertOne

SetCapabilityConstraints sets the "capability_constraints" field.

func (*AgentUpsertOne) SetDelegatingPrincipalID added in v0.2.0

func (u *AgentUpsertOne) SetDelegatingPrincipalID(v uuid.UUID) *AgentUpsertOne

SetDelegatingPrincipalID sets the "delegating_principal_id" field.

func (*AgentUpsertOne) SetMaxTokenLifetime added in v0.2.0

func (u *AgentUpsertOne) SetMaxTokenLifetime(v int) *AgentUpsertOne

SetMaxTokenLifetime sets the "max_token_lifetime" field.

func (*AgentUpsertOne) SetModelID added in v0.2.0

func (u *AgentUpsertOne) SetModelID(v string) *AgentUpsertOne

SetModelID sets the "model_id" field.

func (*AgentUpsertOne) SetRequiresConfirmation added in v0.2.0

func (u *AgentUpsertOne) SetRequiresConfirmation(v bool) *AgentUpsertOne

SetRequiresConfirmation sets the "requires_confirmation" field.

func (*AgentUpsertOne) SetResourceConstraints added in v0.2.0

func (u *AgentUpsertOne) SetResourceConstraints(v []string) *AgentUpsertOne

SetResourceConstraints sets the "resource_constraints" field.

func (*AgentUpsertOne) SetSessionID added in v0.2.0

func (u *AgentUpsertOne) SetSessionID(v string) *AgentUpsertOne

SetSessionID sets the "session_id" field.

func (*AgentUpsertOne) SetUpdatedAt added in v0.2.0

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

SetUpdatedAt sets the "updated_at" field.

func (*AgentUpsertOne) SetVersion added in v0.2.0

func (u *AgentUpsertOne) SetVersion(v string) *AgentUpsertOne

SetVersion sets the "version" field.

func (*AgentUpsertOne) Update added in v0.2.0

func (u *AgentUpsertOne) Update(set func(*AgentUpsert)) *AgentUpsertOne

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

func (*AgentUpsertOne) UpdateCapabilityConstraints added in v0.2.0

func (u *AgentUpsertOne) UpdateCapabilityConstraints() *AgentUpsertOne

UpdateCapabilityConstraints sets the "capability_constraints" field to the value that was provided on create.

func (*AgentUpsertOne) UpdateDelegatingPrincipalID added in v0.2.0

func (u *AgentUpsertOne) UpdateDelegatingPrincipalID() *AgentUpsertOne

UpdateDelegatingPrincipalID sets the "delegating_principal_id" field to the value that was provided on create.

func (*AgentUpsertOne) UpdateMaxTokenLifetime added in v0.2.0

func (u *AgentUpsertOne) UpdateMaxTokenLifetime() *AgentUpsertOne

UpdateMaxTokenLifetime sets the "max_token_lifetime" field to the value that was provided on create.

func (*AgentUpsertOne) UpdateModelID added in v0.2.0

func (u *AgentUpsertOne) UpdateModelID() *AgentUpsertOne

UpdateModelID sets the "model_id" field to the value that was provided on create.

func (*AgentUpsertOne) UpdateNewValues added in v0.2.0

func (u *AgentUpsertOne) UpdateNewValues() *AgentUpsertOne

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.Agent.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(agent.FieldID)
		}),
	).
	Exec(ctx)

func (*AgentUpsertOne) UpdateRequiresConfirmation added in v0.2.0

func (u *AgentUpsertOne) UpdateRequiresConfirmation() *AgentUpsertOne

UpdateRequiresConfirmation sets the "requires_confirmation" field to the value that was provided on create.

func (*AgentUpsertOne) UpdateResourceConstraints added in v0.2.0

func (u *AgentUpsertOne) UpdateResourceConstraints() *AgentUpsertOne

UpdateResourceConstraints sets the "resource_constraints" field to the value that was provided on create.

func (*AgentUpsertOne) UpdateSessionID added in v0.2.0

func (u *AgentUpsertOne) UpdateSessionID() *AgentUpsertOne

UpdateSessionID sets the "session_id" field to the value that was provided on create.

func (*AgentUpsertOne) UpdateUpdatedAt added in v0.2.0

func (u *AgentUpsertOne) UpdateUpdatedAt() *AgentUpsertOne

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

func (*AgentUpsertOne) UpdateVersion added in v0.2.0

func (u *AgentUpsertOne) UpdateVersion() *AgentUpsertOne

UpdateVersion sets the "version" field to the value that was provided on create.

type Agents added in v0.2.0

type Agents []*Agent

Agents is a parsable slice of Agent.

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 Application added in v0.2.0

type Application 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"`
	// Reference to parent Principal
	PrincipalID uuid.UUID `json:"principal_id,omitempty"`
	// Public OAuth client identifier
	ClientID string `json:"client_id,omitempty"`
	// Application description
	Description string `json:"description,omitempty"`
	// Application logo URL
	LogoURL string `json:"logo_url,omitempty"`
	// web=confidential, spa/native=public+PKCE, machine=client_credentials
	AppType application.AppType `json:"app_type,omitempty"`
	// Allowed redirect URIs
	RedirectUris []string `json:"redirect_uris,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"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ApplicationQuery when eager-loading is set.
	Edges ApplicationEdges `json:"edges"`
	// contains filtered or unexported fields
}

Application is the model entity for the Application schema.

func (*Application) QueryIssuedTokens added in v0.2.0

func (_m *Application) QueryIssuedTokens() *PrincipalTokenQuery

QueryIssuedTokens queries the "issued_tokens" edge of the Application entity.

func (*Application) QueryPrincipal added in v0.2.0

func (_m *Application) QueryPrincipal() *PrincipalQuery

QueryPrincipal queries the "principal" edge of the Application entity.

func (*Application) String added in v0.2.0

func (_m *Application) String() string

String implements the fmt.Stringer.

func (*Application) Unwrap added in v0.2.0

func (_m *Application) Unwrap() *Application

Unwrap unwraps the Application 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 (*Application) Update added in v0.2.0

func (_m *Application) Update() *ApplicationUpdateOne

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

func (*Application) Value added in v0.2.0

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

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

type ApplicationClient added in v0.2.0

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

ApplicationClient is a client for the Application schema.

func NewApplicationClient added in v0.2.0

func NewApplicationClient(c config) *ApplicationClient

NewApplicationClient returns a client for the Application from the given config.

func (*ApplicationClient) Create added in v0.2.0

func (c *ApplicationClient) Create() *ApplicationCreate

Create returns a builder for creating a Application entity.

func (*ApplicationClient) CreateBulk added in v0.2.0

func (c *ApplicationClient) CreateBulk(builders ...*ApplicationCreate) *ApplicationCreateBulk

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

func (*ApplicationClient) Delete added in v0.2.0

func (c *ApplicationClient) Delete() *ApplicationDelete

Delete returns a delete builder for Application.

func (*ApplicationClient) DeleteOne added in v0.2.0

DeleteOne returns a builder for deleting the given entity.

func (*ApplicationClient) DeleteOneID added in v0.2.0

func (c *ApplicationClient) DeleteOneID(id uuid.UUID) *ApplicationDeleteOne

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

func (*ApplicationClient) Get added in v0.2.0

Get returns a Application entity by its id.

func (*ApplicationClient) GetX added in v0.2.0

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

func (*ApplicationClient) Hooks added in v0.2.0

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

Hooks returns the client hooks.

func (*ApplicationClient) Intercept added in v0.2.0

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

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

func (*ApplicationClient) Interceptors added in v0.2.0

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

Interceptors returns the client interceptors.

func (*ApplicationClient) MapCreateBulk added in v0.2.0

func (c *ApplicationClient) MapCreateBulk(slice any, setFunc func(*ApplicationCreate, int)) *ApplicationCreateBulk

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 (*ApplicationClient) Query added in v0.2.0

func (c *ApplicationClient) Query() *ApplicationQuery

Query returns a query builder for Application.

func (*ApplicationClient) QueryIssuedTokens added in v0.2.0

func (c *ApplicationClient) QueryIssuedTokens(_m *Application) *PrincipalTokenQuery

QueryIssuedTokens queries the issued_tokens edge of a Application.

func (*ApplicationClient) QueryPrincipal added in v0.2.0

func (c *ApplicationClient) QueryPrincipal(_m *Application) *PrincipalQuery

QueryPrincipal queries the principal edge of a Application.

func (*ApplicationClient) Update added in v0.2.0

func (c *ApplicationClient) Update() *ApplicationUpdate

Update returns an update builder for Application.

func (*ApplicationClient) UpdateOne added in v0.2.0

UpdateOne returns an update builder for the given entity.

func (*ApplicationClient) UpdateOneID added in v0.2.0

func (c *ApplicationClient) UpdateOneID(id uuid.UUID) *ApplicationUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ApplicationClient) Use added in v0.2.0

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

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

type ApplicationCreate added in v0.2.0

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

ApplicationCreate is the builder for creating a Application entity.

func (*ApplicationCreate) AddIssuedTokenIDs added in v0.2.0

func (_c *ApplicationCreate) AddIssuedTokenIDs(ids ...uuid.UUID) *ApplicationCreate

AddIssuedTokenIDs adds the "issued_tokens" edge to the PrincipalToken entity by IDs.

func (*ApplicationCreate) AddIssuedTokens added in v0.2.0

func (_c *ApplicationCreate) AddIssuedTokens(v ...*PrincipalToken) *ApplicationCreate

AddIssuedTokens adds the "issued_tokens" edges to the PrincipalToken entity.

func (*ApplicationCreate) Exec added in v0.2.0

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

Exec executes the query.

func (*ApplicationCreate) ExecX added in v0.2.0

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

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

func (*ApplicationCreate) Mutation added in v0.2.0

func (_c *ApplicationCreate) Mutation() *ApplicationMutation

Mutation returns the ApplicationMutation object of the builder.

func (*ApplicationCreate) OnConflict added in v0.2.0

func (_c *ApplicationCreate) OnConflict(opts ...sql.ConflictOption) *ApplicationUpsertOne

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

client.Application.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.ApplicationUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*ApplicationCreate) OnConflictColumns added in v0.2.0

func (_c *ApplicationCreate) OnConflictColumns(columns ...string) *ApplicationUpsertOne

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

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

func (*ApplicationCreate) Save added in v0.2.0

Save creates the Application in the database.

func (*ApplicationCreate) SaveX added in v0.2.0

func (_c *ApplicationCreate) SaveX(ctx context.Context) *Application

SaveX calls Save and panics if Save returns an error.

func (*ApplicationCreate) SetAccessTokenTTL added in v0.2.0

func (_c *ApplicationCreate) SetAccessTokenTTL(v int) *ApplicationCreate

SetAccessTokenTTL sets the "access_token_ttl" field.

func (*ApplicationCreate) SetAllowedGrants added in v0.2.0

func (_c *ApplicationCreate) SetAllowedGrants(v []string) *ApplicationCreate

SetAllowedGrants sets the "allowed_grants" field.

func (*ApplicationCreate) SetAllowedResponseTypes added in v0.2.0

func (_c *ApplicationCreate) SetAllowedResponseTypes(v []string) *ApplicationCreate

SetAllowedResponseTypes sets the "allowed_response_types" field.

func (*ApplicationCreate) SetAppType added in v0.2.0

SetAppType sets the "app_type" field.

func (*ApplicationCreate) SetClientID added in v0.2.0

func (_c *ApplicationCreate) SetClientID(v string) *ApplicationCreate

SetClientID sets the "client_id" field.

func (*ApplicationCreate) SetCreatedAt added in v0.2.0

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

SetCreatedAt sets the "created_at" field.

func (*ApplicationCreate) SetDescription added in v0.2.0

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

SetDescription sets the "description" field.

func (*ApplicationCreate) SetFirstParty added in v0.2.0

func (_c *ApplicationCreate) SetFirstParty(v bool) *ApplicationCreate

SetFirstParty sets the "first_party" field.

func (*ApplicationCreate) SetID added in v0.2.0

SetID sets the "id" field.

func (*ApplicationCreate) SetLogoURL added in v0.2.0

func (_c *ApplicationCreate) SetLogoURL(v string) *ApplicationCreate

SetLogoURL sets the "logo_url" field.

func (*ApplicationCreate) SetNillableAccessTokenTTL added in v0.2.0

func (_c *ApplicationCreate) SetNillableAccessTokenTTL(v *int) *ApplicationCreate

SetNillableAccessTokenTTL sets the "access_token_ttl" field if the given value is not nil.

func (*ApplicationCreate) SetNillableAppType added in v0.2.0

func (_c *ApplicationCreate) SetNillableAppType(v *application.AppType) *ApplicationCreate

SetNillableAppType sets the "app_type" field if the given value is not nil.

func (*ApplicationCreate) SetNillableCreatedAt added in v0.2.0

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

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

func (*ApplicationCreate) SetNillableDescription added in v0.2.0

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

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

func (*ApplicationCreate) SetNillableFirstParty added in v0.2.0

func (_c *ApplicationCreate) SetNillableFirstParty(v *bool) *ApplicationCreate

SetNillableFirstParty sets the "first_party" field if the given value is not nil.

func (*ApplicationCreate) SetNillableID added in v0.2.0

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

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

func (*ApplicationCreate) SetNillableLogoURL added in v0.2.0

func (_c *ApplicationCreate) SetNillableLogoURL(v *string) *ApplicationCreate

SetNillableLogoURL sets the "logo_url" field if the given value is not nil.

func (*ApplicationCreate) SetNillablePublic added in v0.2.0

func (_c *ApplicationCreate) SetNillablePublic(v *bool) *ApplicationCreate

SetNillablePublic sets the "public" field if the given value is not nil.

func (*ApplicationCreate) SetNillableRefreshTokenRotation added in v0.2.0

func (_c *ApplicationCreate) SetNillableRefreshTokenRotation(v *bool) *ApplicationCreate

SetNillableRefreshTokenRotation sets the "refresh_token_rotation" field if the given value is not nil.

func (*ApplicationCreate) SetNillableRefreshTokenTTL added in v0.2.0

func (_c *ApplicationCreate) SetNillableRefreshTokenTTL(v *int) *ApplicationCreate

SetNillableRefreshTokenTTL sets the "refresh_token_ttl" field if the given value is not nil.

func (*ApplicationCreate) SetNillableUpdatedAt added in v0.2.0

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

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

func (*ApplicationCreate) SetPrincipal added in v0.2.0

func (_c *ApplicationCreate) SetPrincipal(v *Principal) *ApplicationCreate

SetPrincipal sets the "principal" edge to the Principal entity.

func (*ApplicationCreate) SetPrincipalID added in v0.2.0

func (_c *ApplicationCreate) SetPrincipalID(v uuid.UUID) *ApplicationCreate

SetPrincipalID sets the "principal_id" field.

func (*ApplicationCreate) SetPublic added in v0.2.0

func (_c *ApplicationCreate) SetPublic(v bool) *ApplicationCreate

SetPublic sets the "public" field.

func (*ApplicationCreate) SetRedirectUris added in v0.2.0

func (_c *ApplicationCreate) SetRedirectUris(v []string) *ApplicationCreate

SetRedirectUris sets the "redirect_uris" field.

func (*ApplicationCreate) SetRefreshTokenRotation added in v0.2.0

func (_c *ApplicationCreate) SetRefreshTokenRotation(v bool) *ApplicationCreate

SetRefreshTokenRotation sets the "refresh_token_rotation" field.

func (*ApplicationCreate) SetRefreshTokenTTL added in v0.2.0

func (_c *ApplicationCreate) SetRefreshTokenTTL(v int) *ApplicationCreate

SetRefreshTokenTTL sets the "refresh_token_ttl" field.

func (*ApplicationCreate) SetUpdatedAt added in v0.2.0

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

SetUpdatedAt sets the "updated_at" field.

type ApplicationCreateBulk added in v0.2.0

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

ApplicationCreateBulk is the builder for creating many Application entities in bulk.

func (*ApplicationCreateBulk) Exec added in v0.2.0

Exec executes the query.

func (*ApplicationCreateBulk) ExecX added in v0.2.0

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

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

func (*ApplicationCreateBulk) OnConflict added in v0.2.0

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

client.Application.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.ApplicationUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*ApplicationCreateBulk) OnConflictColumns added in v0.2.0

func (_c *ApplicationCreateBulk) OnConflictColumns(columns ...string) *ApplicationUpsertBulk

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

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

func (*ApplicationCreateBulk) Save added in v0.2.0

Save creates the Application entities in the database.

func (*ApplicationCreateBulk) SaveX added in v0.2.0

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

type ApplicationDelete added in v0.2.0

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

ApplicationDelete is the builder for deleting a Application entity.

func (*ApplicationDelete) Exec added in v0.2.0

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

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

func (*ApplicationDelete) ExecX added in v0.2.0

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

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

func (*ApplicationDelete) Where added in v0.2.0

Where appends a list predicates to the ApplicationDelete builder.

type ApplicationDeleteOne added in v0.2.0

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

ApplicationDeleteOne is the builder for deleting a single Application entity.

func (*ApplicationDeleteOne) Exec added in v0.2.0

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

Exec executes the deletion query.

func (*ApplicationDeleteOne) ExecX added in v0.2.0

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

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

func (*ApplicationDeleteOne) Where added in v0.2.0

Where appends a list predicates to the ApplicationDelete builder.

type ApplicationEdges added in v0.2.0

type ApplicationEdges struct {
	// Principal holds the value of the principal edge.
	Principal *Principal `json:"principal,omitempty"`
	// Tokens issued by this application
	IssuedTokens []*PrincipalToken `json:"issued_tokens,omitempty"`
	// contains filtered or unexported fields
}

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

func (ApplicationEdges) IssuedTokensOrErr added in v0.2.0

func (e ApplicationEdges) IssuedTokensOrErr() ([]*PrincipalToken, error)

IssuedTokensOrErr returns the IssuedTokens value or an error if the edge was not loaded in eager-loading.

func (ApplicationEdges) PrincipalOrErr added in v0.2.0

func (e ApplicationEdges) PrincipalOrErr() (*Principal, error)

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

type ApplicationFilter added in v0.2.0

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

ApplicationFilter provides a generic filtering capability at runtime for ApplicationQuery.

func (*ApplicationFilter) Where added in v0.2.0

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

Where applies the entql predicate on the query filter.

func (*ApplicationFilter) WhereAccessTokenTTL added in v0.2.0

func (f *ApplicationFilter) WhereAccessTokenTTL(p entql.IntP)

WhereAccessTokenTTL applies the entql int predicate on the access_token_ttl field.

func (*ApplicationFilter) WhereAllowedGrants added in v0.2.0

func (f *ApplicationFilter) WhereAllowedGrants(p entql.BytesP)

WhereAllowedGrants applies the entql json.RawMessage predicate on the allowed_grants field.

func (*ApplicationFilter) WhereAllowedResponseTypes added in v0.2.0

func (f *ApplicationFilter) WhereAllowedResponseTypes(p entql.BytesP)

WhereAllowedResponseTypes applies the entql json.RawMessage predicate on the allowed_response_types field.

func (*ApplicationFilter) WhereAppType added in v0.2.0

func (f *ApplicationFilter) WhereAppType(p entql.StringP)

WhereAppType applies the entql string predicate on the app_type field.

func (*ApplicationFilter) WhereClientID added in v0.2.0

func (f *ApplicationFilter) WhereClientID(p entql.StringP)

WhereClientID applies the entql string predicate on the client_id field.

func (*ApplicationFilter) WhereCreatedAt added in v0.2.0

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

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

func (*ApplicationFilter) WhereDescription added in v0.2.0

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

WhereDescription applies the entql string predicate on the description field.

func (*ApplicationFilter) WhereFirstParty added in v0.2.0

func (f *ApplicationFilter) WhereFirstParty(p entql.BoolP)

WhereFirstParty applies the entql bool predicate on the first_party field.

func (*ApplicationFilter) WhereHasIssuedTokens added in v0.2.0

func (f *ApplicationFilter) WhereHasIssuedTokens()

WhereHasIssuedTokens applies a predicate to check if query has an edge issued_tokens.

func (*ApplicationFilter) WhereHasIssuedTokensWith added in v0.2.0

func (f *ApplicationFilter) WhereHasIssuedTokensWith(preds ...predicate.PrincipalToken)

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

func (*ApplicationFilter) WhereHasPrincipal added in v0.2.0

func (f *ApplicationFilter) WhereHasPrincipal()

WhereHasPrincipal applies a predicate to check if query has an edge principal.

func (*ApplicationFilter) WhereHasPrincipalWith added in v0.2.0

func (f *ApplicationFilter) WhereHasPrincipalWith(preds ...predicate.Principal)

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

func (*ApplicationFilter) WhereID added in v0.2.0

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

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

func (*ApplicationFilter) WhereLogoURL added in v0.2.0

func (f *ApplicationFilter) WhereLogoURL(p entql.StringP)

WhereLogoURL applies the entql string predicate on the logo_url field.

func (*ApplicationFilter) WherePrincipalID added in v0.2.0

func (f *ApplicationFilter) WherePrincipalID(p entql.ValueP)

WherePrincipalID applies the entql [16]byte predicate on the principal_id field.

func (*ApplicationFilter) WherePublic added in v0.2.0

func (f *ApplicationFilter) WherePublic(p entql.BoolP)

WherePublic applies the entql bool predicate on the public field.

func (*ApplicationFilter) WhereRedirectUris added in v0.2.0

func (f *ApplicationFilter) WhereRedirectUris(p entql.BytesP)

WhereRedirectUris applies the entql json.RawMessage predicate on the redirect_uris field.

func (*ApplicationFilter) WhereRefreshTokenRotation added in v0.2.0

func (f *ApplicationFilter) WhereRefreshTokenRotation(p entql.BoolP)

WhereRefreshTokenRotation applies the entql bool predicate on the refresh_token_rotation field.

func (*ApplicationFilter) WhereRefreshTokenTTL added in v0.2.0

func (f *ApplicationFilter) WhereRefreshTokenTTL(p entql.IntP)

WhereRefreshTokenTTL applies the entql int predicate on the refresh_token_ttl field.

func (*ApplicationFilter) WhereUpdatedAt added in v0.2.0

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

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

type ApplicationGroupBy added in v0.2.0

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

ApplicationGroupBy is the group-by builder for Application entities.

func (*ApplicationGroupBy) Aggregate added in v0.2.0

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

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

func (*ApplicationGroupBy) Bool added in v0.2.0

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

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

func (*ApplicationGroupBy) BoolX added in v0.2.0

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

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

func (*ApplicationGroupBy) Bools added in v0.2.0

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

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

func (*ApplicationGroupBy) BoolsX added in v0.2.0

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

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

func (*ApplicationGroupBy) Float64 added in v0.2.0

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

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

func (*ApplicationGroupBy) Float64X added in v0.2.0

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

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

func (*ApplicationGroupBy) Float64s added in v0.2.0

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

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

func (*ApplicationGroupBy) Float64sX added in v0.2.0

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

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

func (*ApplicationGroupBy) Int added in v0.2.0

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

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

func (*ApplicationGroupBy) IntX added in v0.2.0

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

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

func (*ApplicationGroupBy) Ints added in v0.2.0

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

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

func (*ApplicationGroupBy) IntsX added in v0.2.0

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

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

func (*ApplicationGroupBy) Scan added in v0.2.0

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

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

func (*ApplicationGroupBy) ScanX added in v0.2.0

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

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

func (*ApplicationGroupBy) String added in v0.2.0

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

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

func (*ApplicationGroupBy) StringX added in v0.2.0

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

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

func (*ApplicationGroupBy) Strings added in v0.2.0

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

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

func (*ApplicationGroupBy) StringsX added in v0.2.0

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

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

type ApplicationMutation added in v0.2.0

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

ApplicationMutation represents an operation that mutates the Application nodes in the graph.

func (*ApplicationMutation) AccessTokenTTL added in v0.2.0

func (m *ApplicationMutation) AccessTokenTTL() (r int, exists bool)

AccessTokenTTL returns the value of the "access_token_ttl" field in the mutation.

func (*ApplicationMutation) AddAccessTokenTTL added in v0.2.0

func (m *ApplicationMutation) AddAccessTokenTTL(i int)

AddAccessTokenTTL adds i to the "access_token_ttl" field.

func (*ApplicationMutation) AddField added in v0.2.0

func (m *ApplicationMutation) 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 (*ApplicationMutation) AddIssuedTokenIDs added in v0.2.0

func (m *ApplicationMutation) AddIssuedTokenIDs(ids ...uuid.UUID)

AddIssuedTokenIDs adds the "issued_tokens" edge to the PrincipalToken entity by ids.

func (*ApplicationMutation) AddRefreshTokenTTL added in v0.2.0

func (m *ApplicationMutation) AddRefreshTokenTTL(i int)

AddRefreshTokenTTL adds i to the "refresh_token_ttl" field.

func (*ApplicationMutation) AddedAccessTokenTTL added in v0.2.0

func (m *ApplicationMutation) AddedAccessTokenTTL() (r int, exists bool)

AddedAccessTokenTTL returns the value that was added to the "access_token_ttl" field in this mutation.

func (*ApplicationMutation) AddedEdges added in v0.2.0

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

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

func (*ApplicationMutation) AddedField added in v0.2.0

func (m *ApplicationMutation) 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 (*ApplicationMutation) AddedFields added in v0.2.0

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

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

func (*ApplicationMutation) AddedIDs added in v0.2.0

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

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

func (*ApplicationMutation) AddedRefreshTokenTTL added in v0.2.0

func (m *ApplicationMutation) AddedRefreshTokenTTL() (r int, exists bool)

AddedRefreshTokenTTL returns the value that was added to the "refresh_token_ttl" field in this mutation.

func (*ApplicationMutation) AllowedGrants added in v0.2.0

func (m *ApplicationMutation) AllowedGrants() (r []string, exists bool)

AllowedGrants returns the value of the "allowed_grants" field in the mutation.

func (*ApplicationMutation) AllowedResponseTypes added in v0.2.0

func (m *ApplicationMutation) AllowedResponseTypes() (r []string, exists bool)

AllowedResponseTypes returns the value of the "allowed_response_types" field in the mutation.

func (*ApplicationMutation) AppType added in v0.2.0

func (m *ApplicationMutation) AppType() (r application.AppType, exists bool)

AppType returns the value of the "app_type" field in the mutation.

func (*ApplicationMutation) AppendAllowedGrants added in v0.2.0

func (m *ApplicationMutation) AppendAllowedGrants(s []string)

AppendAllowedGrants adds s to the "allowed_grants" field.

func (*ApplicationMutation) AppendAllowedResponseTypes added in v0.2.0

func (m *ApplicationMutation) AppendAllowedResponseTypes(s []string)

AppendAllowedResponseTypes adds s to the "allowed_response_types" field.

func (*ApplicationMutation) AppendRedirectUris added in v0.2.0

func (m *ApplicationMutation) AppendRedirectUris(s []string)

AppendRedirectUris adds s to the "redirect_uris" field.

func (*ApplicationMutation) AppendedAllowedGrants added in v0.2.0

func (m *ApplicationMutation) AppendedAllowedGrants() ([]string, bool)

AppendedAllowedGrants returns the list of values that were appended to the "allowed_grants" field in this mutation.

func (*ApplicationMutation) AppendedAllowedResponseTypes added in v0.2.0

func (m *ApplicationMutation) AppendedAllowedResponseTypes() ([]string, bool)

AppendedAllowedResponseTypes returns the list of values that were appended to the "allowed_response_types" field in this mutation.

func (*ApplicationMutation) AppendedRedirectUris added in v0.2.0

func (m *ApplicationMutation) AppendedRedirectUris() ([]string, bool)

AppendedRedirectUris returns the list of values that were appended to the "redirect_uris" field in this mutation.

func (*ApplicationMutation) ClearDescription added in v0.2.0

func (m *ApplicationMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*ApplicationMutation) ClearEdge added in v0.2.0

func (m *ApplicationMutation) 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 (*ApplicationMutation) ClearField added in v0.2.0

func (m *ApplicationMutation) 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 (*ApplicationMutation) ClearIssuedTokens added in v0.2.0

func (m *ApplicationMutation) ClearIssuedTokens()

ClearIssuedTokens clears the "issued_tokens" edge to the PrincipalToken entity.

func (*ApplicationMutation) ClearLogoURL added in v0.2.0

func (m *ApplicationMutation) ClearLogoURL()

ClearLogoURL clears the value of the "logo_url" field.

func (*ApplicationMutation) ClearPrincipal added in v0.2.0

func (m *ApplicationMutation) ClearPrincipal()

ClearPrincipal clears the "principal" edge to the Principal entity.

func (*ApplicationMutation) ClearedEdges added in v0.2.0

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

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

func (*ApplicationMutation) ClearedFields added in v0.2.0

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

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

func (ApplicationMutation) Client added in v0.2.0

func (m ApplicationMutation) 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 (*ApplicationMutation) ClientID added in v0.2.0

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

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

func (*ApplicationMutation) CreatedAt added in v0.2.0

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

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

func (*ApplicationMutation) Description added in v0.2.0

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

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

func (*ApplicationMutation) DescriptionCleared added in v0.2.0

func (m *ApplicationMutation) DescriptionCleared() bool

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

func (*ApplicationMutation) EdgeCleared added in v0.2.0

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

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

func (*ApplicationMutation) Field added in v0.2.0

func (m *ApplicationMutation) 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 (*ApplicationMutation) FieldCleared added in v0.2.0

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

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

func (*ApplicationMutation) Fields added in v0.2.0

func (m *ApplicationMutation) 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 (*ApplicationMutation) Filter added in v0.2.0

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

func (*ApplicationMutation) FirstParty added in v0.2.0

func (m *ApplicationMutation) FirstParty() (r bool, exists bool)

FirstParty returns the value of the "first_party" field in the mutation.

func (*ApplicationMutation) ID added in v0.2.0

func (m *ApplicationMutation) 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 (*ApplicationMutation) IDs added in v0.2.0

func (m *ApplicationMutation) 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 (*ApplicationMutation) IssuedTokensCleared added in v0.2.0

func (m *ApplicationMutation) IssuedTokensCleared() bool

IssuedTokensCleared reports if the "issued_tokens" edge to the PrincipalToken entity was cleared.

func (*ApplicationMutation) IssuedTokensIDs added in v0.2.0

func (m *ApplicationMutation) IssuedTokensIDs() (ids []uuid.UUID)

IssuedTokensIDs returns the "issued_tokens" edge IDs in the mutation.

func (*ApplicationMutation) LogoURL added in v0.2.0

func (m *ApplicationMutation) LogoURL() (r string, exists bool)

LogoURL returns the value of the "logo_url" field in the mutation.

func (*ApplicationMutation) LogoURLCleared added in v0.2.0

func (m *ApplicationMutation) LogoURLCleared() bool

LogoURLCleared returns if the "logo_url" field was cleared in this mutation.

func (*ApplicationMutation) OldAccessTokenTTL added in v0.2.0

func (m *ApplicationMutation) OldAccessTokenTTL(ctx context.Context) (v int, err error)

OldAccessTokenTTL returns the old "access_token_ttl" field's value of the Application entity. If the Application 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 (*ApplicationMutation) OldAllowedGrants added in v0.2.0

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

OldAllowedGrants returns the old "allowed_grants" field's value of the Application entity. If the Application 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 (*ApplicationMutation) OldAllowedResponseTypes added in v0.2.0

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

OldAllowedResponseTypes returns the old "allowed_response_types" field's value of the Application entity. If the Application 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 (*ApplicationMutation) OldAppType added in v0.2.0

func (m *ApplicationMutation) OldAppType(ctx context.Context) (v application.AppType, err error)

OldAppType returns the old "app_type" field's value of the Application entity. If the Application 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 (*ApplicationMutation) OldClientID added in v0.2.0

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

OldClientID returns the old "client_id" field's value of the Application entity. If the Application 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 (*ApplicationMutation) OldCreatedAt added in v0.2.0

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

OldCreatedAt returns the old "created_at" field's value of the Application entity. If the Application 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 (*ApplicationMutation) OldDescription added in v0.2.0

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

OldDescription returns the old "description" field's value of the Application entity. If the Application 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 (*ApplicationMutation) OldField added in v0.2.0

func (m *ApplicationMutation) 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 (*ApplicationMutation) OldFirstParty added in v0.2.0

func (m *ApplicationMutation) OldFirstParty(ctx context.Context) (v bool, err error)

OldFirstParty returns the old "first_party" field's value of the Application entity. If the Application 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 (*ApplicationMutation) OldLogoURL added in v0.2.0

func (m *ApplicationMutation) OldLogoURL(ctx context.Context) (v string, err error)

OldLogoURL returns the old "logo_url" field's value of the Application entity. If the Application 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 (*ApplicationMutation) OldPrincipalID added in v0.2.0

func (m *ApplicationMutation) OldPrincipalID(ctx context.Context) (v uuid.UUID, err error)

OldPrincipalID returns the old "principal_id" field's value of the Application entity. If the Application 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 (*ApplicationMutation) OldPublic added in v0.2.0

func (m *ApplicationMutation) OldPublic(ctx context.Context) (v bool, err error)

OldPublic returns the old "public" field's value of the Application entity. If the Application 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 (*ApplicationMutation) OldRedirectUris added in v0.2.0

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

OldRedirectUris returns the old "redirect_uris" field's value of the Application entity. If the Application 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 (*ApplicationMutation) OldRefreshTokenRotation added in v0.2.0

func (m *ApplicationMutation) OldRefreshTokenRotation(ctx context.Context) (v bool, err error)

OldRefreshTokenRotation returns the old "refresh_token_rotation" field's value of the Application entity. If the Application 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 (*ApplicationMutation) OldRefreshTokenTTL added in v0.2.0

func (m *ApplicationMutation) OldRefreshTokenTTL(ctx context.Context) (v int, err error)

OldRefreshTokenTTL returns the old "refresh_token_ttl" field's value of the Application entity. If the Application 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 (*ApplicationMutation) OldUpdatedAt added in v0.2.0

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

OldUpdatedAt returns the old "updated_at" field's value of the Application entity. If the Application 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 (*ApplicationMutation) Op added in v0.2.0

func (m *ApplicationMutation) Op() Op

Op returns the operation name.

func (*ApplicationMutation) PrincipalCleared added in v0.2.0

func (m *ApplicationMutation) PrincipalCleared() bool

PrincipalCleared reports if the "principal" edge to the Principal entity was cleared.

func (*ApplicationMutation) PrincipalID added in v0.2.0

func (m *ApplicationMutation) PrincipalID() (r uuid.UUID, exists bool)

PrincipalID returns the value of the "principal_id" field in the mutation.

func (*ApplicationMutation) PrincipalIDs added in v0.2.0

func (m *ApplicationMutation) PrincipalIDs() (ids []uuid.UUID)

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

func (*ApplicationMutation) Public added in v0.2.0

func (m *ApplicationMutation) Public() (r bool, exists bool)

Public returns the value of the "public" field in the mutation.

func (*ApplicationMutation) RedirectUris added in v0.2.0

func (m *ApplicationMutation) RedirectUris() (r []string, exists bool)

RedirectUris returns the value of the "redirect_uris" field in the mutation.

func (*ApplicationMutation) RefreshTokenRotation added in v0.2.0

func (m *ApplicationMutation) RefreshTokenRotation() (r bool, exists bool)

RefreshTokenRotation returns the value of the "refresh_token_rotation" field in the mutation.

func (*ApplicationMutation) RefreshTokenTTL added in v0.2.0

func (m *ApplicationMutation) RefreshTokenTTL() (r int, exists bool)

RefreshTokenTTL returns the value of the "refresh_token_ttl" field in the mutation.

func (*ApplicationMutation) RemoveIssuedTokenIDs added in v0.2.0

func (m *ApplicationMutation) RemoveIssuedTokenIDs(ids ...uuid.UUID)

RemoveIssuedTokenIDs removes the "issued_tokens" edge to the PrincipalToken entity by IDs.

func (*ApplicationMutation) RemovedEdges added in v0.2.0

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

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

func (*ApplicationMutation) RemovedIDs added in v0.2.0

func (m *ApplicationMutation) 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 (*ApplicationMutation) RemovedIssuedTokensIDs added in v0.2.0

func (m *ApplicationMutation) RemovedIssuedTokensIDs() (ids []uuid.UUID)

RemovedIssuedTokens returns the removed IDs of the "issued_tokens" edge to the PrincipalToken entity.

func (*ApplicationMutation) ResetAccessTokenTTL added in v0.2.0

func (m *ApplicationMutation) ResetAccessTokenTTL()

ResetAccessTokenTTL resets all changes to the "access_token_ttl" field.

func (*ApplicationMutation) ResetAllowedGrants added in v0.2.0

func (m *ApplicationMutation) ResetAllowedGrants()

ResetAllowedGrants resets all changes to the "allowed_grants" field.

func (*ApplicationMutation) ResetAllowedResponseTypes added in v0.2.0

func (m *ApplicationMutation) ResetAllowedResponseTypes()

ResetAllowedResponseTypes resets all changes to the "allowed_response_types" field.

func (*ApplicationMutation) ResetAppType added in v0.2.0

func (m *ApplicationMutation) ResetAppType()

ResetAppType resets all changes to the "app_type" field.

func (*ApplicationMutation) ResetClientID added in v0.2.0

func (m *ApplicationMutation) ResetClientID()

ResetClientID resets all changes to the "client_id" field.

func (*ApplicationMutation) ResetCreatedAt added in v0.2.0

func (m *ApplicationMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ApplicationMutation) ResetDescription added in v0.2.0

func (m *ApplicationMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*ApplicationMutation) ResetEdge added in v0.2.0

func (m *ApplicationMutation) 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 (*ApplicationMutation) ResetField added in v0.2.0

func (m *ApplicationMutation) 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 (*ApplicationMutation) ResetFirstParty added in v0.2.0

func (m *ApplicationMutation) ResetFirstParty()

ResetFirstParty resets all changes to the "first_party" field.

func (*ApplicationMutation) ResetIssuedTokens added in v0.2.0

func (m *ApplicationMutation) ResetIssuedTokens()

ResetIssuedTokens resets all changes to the "issued_tokens" edge.

func (*ApplicationMutation) ResetLogoURL added in v0.2.0

func (m *ApplicationMutation) ResetLogoURL()

ResetLogoURL resets all changes to the "logo_url" field.

func (*ApplicationMutation) ResetPrincipal added in v0.2.0

func (m *ApplicationMutation) ResetPrincipal()

ResetPrincipal resets all changes to the "principal" edge.

func (*ApplicationMutation) ResetPrincipalID added in v0.2.0

func (m *ApplicationMutation) ResetPrincipalID()

ResetPrincipalID resets all changes to the "principal_id" field.

func (*ApplicationMutation) ResetPublic added in v0.2.0

func (m *ApplicationMutation) ResetPublic()

ResetPublic resets all changes to the "public" field.

func (*ApplicationMutation) ResetRedirectUris added in v0.2.0

func (m *ApplicationMutation) ResetRedirectUris()

ResetRedirectUris resets all changes to the "redirect_uris" field.

func (*ApplicationMutation) ResetRefreshTokenRotation added in v0.2.0

func (m *ApplicationMutation) ResetRefreshTokenRotation()

ResetRefreshTokenRotation resets all changes to the "refresh_token_rotation" field.

func (*ApplicationMutation) ResetRefreshTokenTTL added in v0.2.0

func (m *ApplicationMutation) ResetRefreshTokenTTL()

ResetRefreshTokenTTL resets all changes to the "refresh_token_ttl" field.

func (*ApplicationMutation) ResetUpdatedAt added in v0.2.0

func (m *ApplicationMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*ApplicationMutation) SetAccessTokenTTL added in v0.2.0

func (m *ApplicationMutation) SetAccessTokenTTL(i int)

SetAccessTokenTTL sets the "access_token_ttl" field.

func (*ApplicationMutation) SetAllowedGrants added in v0.2.0

func (m *ApplicationMutation) SetAllowedGrants(s []string)

SetAllowedGrants sets the "allowed_grants" field.

func (*ApplicationMutation) SetAllowedResponseTypes added in v0.2.0

func (m *ApplicationMutation) SetAllowedResponseTypes(s []string)

SetAllowedResponseTypes sets the "allowed_response_types" field.

func (*ApplicationMutation) SetAppType added in v0.2.0

func (m *ApplicationMutation) SetAppType(at application.AppType)

SetAppType sets the "app_type" field.

func (*ApplicationMutation) SetClientID added in v0.2.0

func (m *ApplicationMutation) SetClientID(s string)

SetClientID sets the "client_id" field.

func (*ApplicationMutation) SetCreatedAt added in v0.2.0

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

SetCreatedAt sets the "created_at" field.

func (*ApplicationMutation) SetDescription added in v0.2.0

func (m *ApplicationMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*ApplicationMutation) SetField added in v0.2.0

func (m *ApplicationMutation) 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 (*ApplicationMutation) SetFirstParty added in v0.2.0

func (m *ApplicationMutation) SetFirstParty(b bool)

SetFirstParty sets the "first_party" field.

func (*ApplicationMutation) SetID added in v0.2.0

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

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

func (*ApplicationMutation) SetLogoURL added in v0.2.0

func (m *ApplicationMutation) SetLogoURL(s string)

SetLogoURL sets the "logo_url" field.

func (*ApplicationMutation) SetOp added in v0.2.0

func (m *ApplicationMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ApplicationMutation) SetPrincipalID added in v0.2.0

func (m *ApplicationMutation) SetPrincipalID(u uuid.UUID)

SetPrincipalID sets the "principal_id" field.

func (*ApplicationMutation) SetPublic added in v0.2.0

func (m *ApplicationMutation) SetPublic(b bool)

SetPublic sets the "public" field.

func (*ApplicationMutation) SetRedirectUris added in v0.2.0

func (m *ApplicationMutation) SetRedirectUris(s []string)

SetRedirectUris sets the "redirect_uris" field.

func (*ApplicationMutation) SetRefreshTokenRotation added in v0.2.0

func (m *ApplicationMutation) SetRefreshTokenRotation(b bool)

SetRefreshTokenRotation sets the "refresh_token_rotation" field.

func (*ApplicationMutation) SetRefreshTokenTTL added in v0.2.0

func (m *ApplicationMutation) SetRefreshTokenTTL(i int)

SetRefreshTokenTTL sets the "refresh_token_ttl" field.

func (*ApplicationMutation) SetUpdatedAt added in v0.2.0

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

SetUpdatedAt sets the "updated_at" field.

func (ApplicationMutation) Tx added in v0.2.0

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

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

func (*ApplicationMutation) Type added in v0.2.0

func (m *ApplicationMutation) Type() string

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

func (*ApplicationMutation) UpdatedAt added in v0.2.0

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

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

func (*ApplicationMutation) Where added in v0.2.0

func (m *ApplicationMutation) Where(ps ...predicate.Application)

Where appends a list predicates to the ApplicationMutation builder.

func (*ApplicationMutation) WhereP added in v0.2.0

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

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

type ApplicationQuery added in v0.2.0

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

ApplicationQuery is the builder for querying Application entities.

func (*ApplicationQuery) Aggregate added in v0.2.0

func (_q *ApplicationQuery) Aggregate(fns ...AggregateFunc) *ApplicationSelect

Aggregate returns a ApplicationSelect configured with the given aggregations.

func (*ApplicationQuery) All added in v0.2.0

func (_q *ApplicationQuery) All(ctx context.Context) ([]*Application, error)

All executes the query and returns a list of Applications.

func (*ApplicationQuery) AllX added in v0.2.0

func (_q *ApplicationQuery) AllX(ctx context.Context) []*Application

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

func (*ApplicationQuery) Clone added in v0.2.0

func (_q *ApplicationQuery) Clone() *ApplicationQuery

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

func (*ApplicationQuery) Count added in v0.2.0

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

Count returns the count of the given query.

func (*ApplicationQuery) CountX added in v0.2.0

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

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

func (*ApplicationQuery) Exist added in v0.2.0

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

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

func (*ApplicationQuery) ExistX added in v0.2.0

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

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

func (*ApplicationQuery) Filter added in v0.2.0

func (_q *ApplicationQuery) Filter() *ApplicationFilter

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

func (*ApplicationQuery) First added in v0.2.0

func (_q *ApplicationQuery) First(ctx context.Context) (*Application, error)

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

func (*ApplicationQuery) FirstID added in v0.2.0

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

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

func (*ApplicationQuery) FirstIDX added in v0.2.0

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

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

func (*ApplicationQuery) FirstX added in v0.2.0

func (_q *ApplicationQuery) FirstX(ctx context.Context) *Application

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

func (*ApplicationQuery) GroupBy added in v0.2.0

func (_q *ApplicationQuery) GroupBy(field string, fields ...string) *ApplicationGroupBy

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.Application.Query().
	GroupBy(application.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ApplicationQuery) IDs added in v0.2.0

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

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

func (*ApplicationQuery) IDsX added in v0.2.0

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

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

func (*ApplicationQuery) Limit added in v0.2.0

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

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

func (*ApplicationQuery) Offset added in v0.2.0

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

Offset to start from.

func (*ApplicationQuery) Only added in v0.2.0

func (_q *ApplicationQuery) Only(ctx context.Context) (*Application, error)

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

func (*ApplicationQuery) OnlyID added in v0.2.0

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

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

func (*ApplicationQuery) OnlyIDX added in v0.2.0

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

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

func (*ApplicationQuery) OnlyX added in v0.2.0

func (_q *ApplicationQuery) OnlyX(ctx context.Context) *Application

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

func (*ApplicationQuery) Order added in v0.2.0

Order specifies how the records should be ordered.

func (*ApplicationQuery) QueryIssuedTokens added in v0.2.0

func (_q *ApplicationQuery) QueryIssuedTokens() *PrincipalTokenQuery

QueryIssuedTokens chains the current query on the "issued_tokens" edge.

func (*ApplicationQuery) QueryPrincipal added in v0.2.0

func (_q *ApplicationQuery) QueryPrincipal() *PrincipalQuery

QueryPrincipal chains the current query on the "principal" edge.

func (*ApplicationQuery) Select added in v0.2.0

func (_q *ApplicationQuery) Select(fields ...string) *ApplicationSelect

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.Application.Query().
	Select(application.FieldCreatedAt).
	Scan(ctx, &v)

func (*ApplicationQuery) Unique added in v0.2.0

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

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 (*ApplicationQuery) Where added in v0.2.0

Where adds a new predicate for the ApplicationQuery builder.

func (*ApplicationQuery) WithIssuedTokens added in v0.2.0

func (_q *ApplicationQuery) WithIssuedTokens(opts ...func(*PrincipalTokenQuery)) *ApplicationQuery

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

func (*ApplicationQuery) WithPrincipal added in v0.2.0

func (_q *ApplicationQuery) WithPrincipal(opts ...func(*PrincipalQuery)) *ApplicationQuery

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

type ApplicationSelect added in v0.2.0

type ApplicationSelect struct {
	*ApplicationQuery
	// contains filtered or unexported fields
}

ApplicationSelect is the builder for selecting fields of Application entities.

func (*ApplicationSelect) Aggregate added in v0.2.0

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

Aggregate adds the given aggregation functions to the selector query.

func (*ApplicationSelect) Bool added in v0.2.0

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

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

func (*ApplicationSelect) BoolX added in v0.2.0

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

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

func (*ApplicationSelect) Bools added in v0.2.0

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

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

func (*ApplicationSelect) BoolsX added in v0.2.0

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

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

func (*ApplicationSelect) Float64 added in v0.2.0

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

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

func (*ApplicationSelect) Float64X added in v0.2.0

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

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

func (*ApplicationSelect) Float64s added in v0.2.0

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

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

func (*ApplicationSelect) Float64sX added in v0.2.0

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

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

func (*ApplicationSelect) Int added in v0.2.0

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

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

func (*ApplicationSelect) IntX added in v0.2.0

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

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

func (*ApplicationSelect) Ints added in v0.2.0

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

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

func (*ApplicationSelect) IntsX added in v0.2.0

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

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

func (*ApplicationSelect) Scan added in v0.2.0

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

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

func (*ApplicationSelect) ScanX added in v0.2.0

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

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

func (*ApplicationSelect) String added in v0.2.0

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

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

func (*ApplicationSelect) StringX added in v0.2.0

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

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

func (*ApplicationSelect) Strings added in v0.2.0

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

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

func (*ApplicationSelect) StringsX added in v0.2.0

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

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

type ApplicationUpdate added in v0.2.0

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

ApplicationUpdate is the builder for updating Application entities.

func (*ApplicationUpdate) AddAccessTokenTTL added in v0.2.0

func (_u *ApplicationUpdate) AddAccessTokenTTL(v int) *ApplicationUpdate

AddAccessTokenTTL adds value to the "access_token_ttl" field.

func (*ApplicationUpdate) AddIssuedTokenIDs added in v0.2.0

func (_u *ApplicationUpdate) AddIssuedTokenIDs(ids ...uuid.UUID) *ApplicationUpdate

AddIssuedTokenIDs adds the "issued_tokens" edge to the PrincipalToken entity by IDs.

func (*ApplicationUpdate) AddIssuedTokens added in v0.2.0

func (_u *ApplicationUpdate) AddIssuedTokens(v ...*PrincipalToken) *ApplicationUpdate

AddIssuedTokens adds the "issued_tokens" edges to the PrincipalToken entity.

func (*ApplicationUpdate) AddRefreshTokenTTL added in v0.2.0

func (_u *ApplicationUpdate) AddRefreshTokenTTL(v int) *ApplicationUpdate

AddRefreshTokenTTL adds value to the "refresh_token_ttl" field.

func (*ApplicationUpdate) AppendAllowedGrants added in v0.2.0

func (_u *ApplicationUpdate) AppendAllowedGrants(v []string) *ApplicationUpdate

AppendAllowedGrants appends value to the "allowed_grants" field.

func (*ApplicationUpdate) AppendAllowedResponseTypes added in v0.2.0

func (_u *ApplicationUpdate) AppendAllowedResponseTypes(v []string) *ApplicationUpdate

AppendAllowedResponseTypes appends value to the "allowed_response_types" field.

func (*ApplicationUpdate) AppendRedirectUris added in v0.2.0

func (_u *ApplicationUpdate) AppendRedirectUris(v []string) *ApplicationUpdate

AppendRedirectUris appends value to the "redirect_uris" field.

func (*ApplicationUpdate) ClearDescription added in v0.2.0

func (_u *ApplicationUpdate) ClearDescription() *ApplicationUpdate

ClearDescription clears the value of the "description" field.

func (*ApplicationUpdate) ClearIssuedTokens added in v0.2.0

func (_u *ApplicationUpdate) ClearIssuedTokens() *ApplicationUpdate

ClearIssuedTokens clears all "issued_tokens" edges to the PrincipalToken entity.

func (*ApplicationUpdate) ClearLogoURL added in v0.2.0

func (_u *ApplicationUpdate) ClearLogoURL() *ApplicationUpdate

ClearLogoURL clears the value of the "logo_url" field.

func (*ApplicationUpdate) Exec added in v0.2.0

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

Exec executes the query.

func (*ApplicationUpdate) ExecX added in v0.2.0

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

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

func (*ApplicationUpdate) Mutation added in v0.2.0

func (_u *ApplicationUpdate) Mutation() *ApplicationMutation

Mutation returns the ApplicationMutation object of the builder.

func (*ApplicationUpdate) RemoveIssuedTokenIDs added in v0.2.0

func (_u *ApplicationUpdate) RemoveIssuedTokenIDs(ids ...uuid.UUID) *ApplicationUpdate

RemoveIssuedTokenIDs removes the "issued_tokens" edge to PrincipalToken entities by IDs.

func (*ApplicationUpdate) RemoveIssuedTokens added in v0.2.0

func (_u *ApplicationUpdate) RemoveIssuedTokens(v ...*PrincipalToken) *ApplicationUpdate

RemoveIssuedTokens removes "issued_tokens" edges to PrincipalToken entities.

func (*ApplicationUpdate) Save added in v0.2.0

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

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

func (*ApplicationUpdate) SaveX added in v0.2.0

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

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

func (*ApplicationUpdate) SetAccessTokenTTL added in v0.2.0

func (_u *ApplicationUpdate) SetAccessTokenTTL(v int) *ApplicationUpdate

SetAccessTokenTTL sets the "access_token_ttl" field.

func (*ApplicationUpdate) SetAllowedGrants added in v0.2.0

func (_u *ApplicationUpdate) SetAllowedGrants(v []string) *ApplicationUpdate

SetAllowedGrants sets the "allowed_grants" field.

func (*ApplicationUpdate) SetAllowedResponseTypes added in v0.2.0

func (_u *ApplicationUpdate) SetAllowedResponseTypes(v []string) *ApplicationUpdate

SetAllowedResponseTypes sets the "allowed_response_types" field.

func (*ApplicationUpdate) SetAppType added in v0.2.0

SetAppType sets the "app_type" field.

func (*ApplicationUpdate) SetDescription added in v0.2.0

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

SetDescription sets the "description" field.

func (*ApplicationUpdate) SetFirstParty added in v0.2.0

func (_u *ApplicationUpdate) SetFirstParty(v bool) *ApplicationUpdate

SetFirstParty sets the "first_party" field.

func (*ApplicationUpdate) SetLogoURL added in v0.2.0

func (_u *ApplicationUpdate) SetLogoURL(v string) *ApplicationUpdate

SetLogoURL sets the "logo_url" field.

func (*ApplicationUpdate) SetNillableAccessTokenTTL added in v0.2.0

func (_u *ApplicationUpdate) SetNillableAccessTokenTTL(v *int) *ApplicationUpdate

SetNillableAccessTokenTTL sets the "access_token_ttl" field if the given value is not nil.

func (*ApplicationUpdate) SetNillableAppType added in v0.2.0

func (_u *ApplicationUpdate) SetNillableAppType(v *application.AppType) *ApplicationUpdate

SetNillableAppType sets the "app_type" field if the given value is not nil.

func (*ApplicationUpdate) SetNillableDescription added in v0.2.0

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

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

func (*ApplicationUpdate) SetNillableFirstParty added in v0.2.0

func (_u *ApplicationUpdate) SetNillableFirstParty(v *bool) *ApplicationUpdate

SetNillableFirstParty sets the "first_party" field if the given value is not nil.

func (*ApplicationUpdate) SetNillableLogoURL added in v0.2.0

func (_u *ApplicationUpdate) SetNillableLogoURL(v *string) *ApplicationUpdate

SetNillableLogoURL sets the "logo_url" field if the given value is not nil.

func (*ApplicationUpdate) SetNillablePublic added in v0.2.0

func (_u *ApplicationUpdate) SetNillablePublic(v *bool) *ApplicationUpdate

SetNillablePublic sets the "public" field if the given value is not nil.

func (*ApplicationUpdate) SetNillableRefreshTokenRotation added in v0.2.0

func (_u *ApplicationUpdate) SetNillableRefreshTokenRotation(v *bool) *ApplicationUpdate

SetNillableRefreshTokenRotation sets the "refresh_token_rotation" field if the given value is not nil.

func (*ApplicationUpdate) SetNillableRefreshTokenTTL added in v0.2.0

func (_u *ApplicationUpdate) SetNillableRefreshTokenTTL(v *int) *ApplicationUpdate

SetNillableRefreshTokenTTL sets the "refresh_token_ttl" field if the given value is not nil.

func (*ApplicationUpdate) SetPublic added in v0.2.0

func (_u *ApplicationUpdate) SetPublic(v bool) *ApplicationUpdate

SetPublic sets the "public" field.

func (*ApplicationUpdate) SetRedirectUris added in v0.2.0

func (_u *ApplicationUpdate) SetRedirectUris(v []string) *ApplicationUpdate

SetRedirectUris sets the "redirect_uris" field.

func (*ApplicationUpdate) SetRefreshTokenRotation added in v0.2.0

func (_u *ApplicationUpdate) SetRefreshTokenRotation(v bool) *ApplicationUpdate

SetRefreshTokenRotation sets the "refresh_token_rotation" field.

func (*ApplicationUpdate) SetRefreshTokenTTL added in v0.2.0

func (_u *ApplicationUpdate) SetRefreshTokenTTL(v int) *ApplicationUpdate

SetRefreshTokenTTL sets the "refresh_token_ttl" field.

func (*ApplicationUpdate) SetUpdatedAt added in v0.2.0

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

SetUpdatedAt sets the "updated_at" field.

func (*ApplicationUpdate) Where added in v0.2.0

Where appends a list predicates to the ApplicationUpdate builder.

type ApplicationUpdateOne added in v0.2.0

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

ApplicationUpdateOne is the builder for updating a single Application entity.

func (*ApplicationUpdateOne) AddAccessTokenTTL added in v0.2.0

func (_u *ApplicationUpdateOne) AddAccessTokenTTL(v int) *ApplicationUpdateOne

AddAccessTokenTTL adds value to the "access_token_ttl" field.

func (*ApplicationUpdateOne) AddIssuedTokenIDs added in v0.2.0

func (_u *ApplicationUpdateOne) AddIssuedTokenIDs(ids ...uuid.UUID) *ApplicationUpdateOne

AddIssuedTokenIDs adds the "issued_tokens" edge to the PrincipalToken entity by IDs.

func (*ApplicationUpdateOne) AddIssuedTokens added in v0.2.0

func (_u *ApplicationUpdateOne) AddIssuedTokens(v ...*PrincipalToken) *ApplicationUpdateOne

AddIssuedTokens adds the "issued_tokens" edges to the PrincipalToken entity.

func (*ApplicationUpdateOne) AddRefreshTokenTTL added in v0.2.0

func (_u *ApplicationUpdateOne) AddRefreshTokenTTL(v int) *ApplicationUpdateOne

AddRefreshTokenTTL adds value to the "refresh_token_ttl" field.

func (*ApplicationUpdateOne) AppendAllowedGrants added in v0.2.0

func (_u *ApplicationUpdateOne) AppendAllowedGrants(v []string) *ApplicationUpdateOne

AppendAllowedGrants appends value to the "allowed_grants" field.

func (*ApplicationUpdateOne) AppendAllowedResponseTypes added in v0.2.0

func (_u *ApplicationUpdateOne) AppendAllowedResponseTypes(v []string) *ApplicationUpdateOne

AppendAllowedResponseTypes appends value to the "allowed_response_types" field.

func (*ApplicationUpdateOne) AppendRedirectUris added in v0.2.0

func (_u *ApplicationUpdateOne) AppendRedirectUris(v []string) *ApplicationUpdateOne

AppendRedirectUris appends value to the "redirect_uris" field.

func (*ApplicationUpdateOne) ClearDescription added in v0.2.0

func (_u *ApplicationUpdateOne) ClearDescription() *ApplicationUpdateOne

ClearDescription clears the value of the "description" field.

func (*ApplicationUpdateOne) ClearIssuedTokens added in v0.2.0

func (_u *ApplicationUpdateOne) ClearIssuedTokens() *ApplicationUpdateOne

ClearIssuedTokens clears all "issued_tokens" edges to the PrincipalToken entity.

func (*ApplicationUpdateOne) ClearLogoURL added in v0.2.0

func (_u *ApplicationUpdateOne) ClearLogoURL() *ApplicationUpdateOne

ClearLogoURL clears the value of the "logo_url" field.

func (*ApplicationUpdateOne) Exec added in v0.2.0

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

Exec executes the query on the entity.

func (*ApplicationUpdateOne) ExecX added in v0.2.0

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

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

func (*ApplicationUpdateOne) Mutation added in v0.2.0

func (_u *ApplicationUpdateOne) Mutation() *ApplicationMutation

Mutation returns the ApplicationMutation object of the builder.

func (*ApplicationUpdateOne) RemoveIssuedTokenIDs added in v0.2.0

func (_u *ApplicationUpdateOne) RemoveIssuedTokenIDs(ids ...uuid.UUID) *ApplicationUpdateOne

RemoveIssuedTokenIDs removes the "issued_tokens" edge to PrincipalToken entities by IDs.

func (*ApplicationUpdateOne) RemoveIssuedTokens added in v0.2.0

func (_u *ApplicationUpdateOne) RemoveIssuedTokens(v ...*PrincipalToken) *ApplicationUpdateOne

RemoveIssuedTokens removes "issued_tokens" edges to PrincipalToken entities.

func (*ApplicationUpdateOne) Save added in v0.2.0

Save executes the query and returns the updated Application entity.

func (*ApplicationUpdateOne) SaveX added in v0.2.0

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

func (*ApplicationUpdateOne) Select added in v0.2.0

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

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

func (*ApplicationUpdateOne) SetAccessTokenTTL added in v0.2.0

func (_u *ApplicationUpdateOne) SetAccessTokenTTL(v int) *ApplicationUpdateOne

SetAccessTokenTTL sets the "access_token_ttl" field.

func (*ApplicationUpdateOne) SetAllowedGrants added in v0.2.0

func (_u *ApplicationUpdateOne) SetAllowedGrants(v []string) *ApplicationUpdateOne

SetAllowedGrants sets the "allowed_grants" field.

func (*ApplicationUpdateOne) SetAllowedResponseTypes added in v0.2.0

func (_u *ApplicationUpdateOne) SetAllowedResponseTypes(v []string) *ApplicationUpdateOne

SetAllowedResponseTypes sets the "allowed_response_types" field.

func (*ApplicationUpdateOne) SetAppType added in v0.2.0

SetAppType sets the "app_type" field.

func (*ApplicationUpdateOne) SetDescription added in v0.2.0

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

SetDescription sets the "description" field.

func (*ApplicationUpdateOne) SetFirstParty added in v0.2.0

func (_u *ApplicationUpdateOne) SetFirstParty(v bool) *ApplicationUpdateOne

SetFirstParty sets the "first_party" field.

func (*ApplicationUpdateOne) SetLogoURL added in v0.2.0

SetLogoURL sets the "logo_url" field.

func (*ApplicationUpdateOne) SetNillableAccessTokenTTL added in v0.2.0

func (_u *ApplicationUpdateOne) SetNillableAccessTokenTTL(v *int) *ApplicationUpdateOne

SetNillableAccessTokenTTL sets the "access_token_ttl" field if the given value is not nil.

func (*ApplicationUpdateOne) SetNillableAppType added in v0.2.0

func (_u *ApplicationUpdateOne) SetNillableAppType(v *application.AppType) *ApplicationUpdateOne

SetNillableAppType sets the "app_type" field if the given value is not nil.

func (*ApplicationUpdateOne) SetNillableDescription added in v0.2.0

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

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

func (*ApplicationUpdateOne) SetNillableFirstParty added in v0.2.0

func (_u *ApplicationUpdateOne) SetNillableFirstParty(v *bool) *ApplicationUpdateOne

SetNillableFirstParty sets the "first_party" field if the given value is not nil.

func (*ApplicationUpdateOne) SetNillableLogoURL added in v0.2.0

func (_u *ApplicationUpdateOne) SetNillableLogoURL(v *string) *ApplicationUpdateOne

SetNillableLogoURL sets the "logo_url" field if the given value is not nil.

func (*ApplicationUpdateOne) SetNillablePublic added in v0.2.0

func (_u *ApplicationUpdateOne) SetNillablePublic(v *bool) *ApplicationUpdateOne

SetNillablePublic sets the "public" field if the given value is not nil.

func (*ApplicationUpdateOne) SetNillableRefreshTokenRotation added in v0.2.0

func (_u *ApplicationUpdateOne) SetNillableRefreshTokenRotation(v *bool) *ApplicationUpdateOne

SetNillableRefreshTokenRotation sets the "refresh_token_rotation" field if the given value is not nil.

func (*ApplicationUpdateOne) SetNillableRefreshTokenTTL added in v0.2.0

func (_u *ApplicationUpdateOne) SetNillableRefreshTokenTTL(v *int) *ApplicationUpdateOne

SetNillableRefreshTokenTTL sets the "refresh_token_ttl" field if the given value is not nil.

func (*ApplicationUpdateOne) SetPublic added in v0.2.0

SetPublic sets the "public" field.

func (*ApplicationUpdateOne) SetRedirectUris added in v0.2.0

func (_u *ApplicationUpdateOne) SetRedirectUris(v []string) *ApplicationUpdateOne

SetRedirectUris sets the "redirect_uris" field.

func (*ApplicationUpdateOne) SetRefreshTokenRotation added in v0.2.0

func (_u *ApplicationUpdateOne) SetRefreshTokenRotation(v bool) *ApplicationUpdateOne

SetRefreshTokenRotation sets the "refresh_token_rotation" field.

func (*ApplicationUpdateOne) SetRefreshTokenTTL added in v0.2.0

func (_u *ApplicationUpdateOne) SetRefreshTokenTTL(v int) *ApplicationUpdateOne

SetRefreshTokenTTL sets the "refresh_token_ttl" field.

func (*ApplicationUpdateOne) SetUpdatedAt added in v0.2.0

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

SetUpdatedAt sets the "updated_at" field.

func (*ApplicationUpdateOne) Where added in v0.2.0

Where appends a list predicates to the ApplicationUpdate builder.

type ApplicationUpsert added in v0.2.0

type ApplicationUpsert struct {
	*sql.UpdateSet
}

ApplicationUpsert is the "OnConflict" setter.

func (*ApplicationUpsert) AddAccessTokenTTL added in v0.2.0

func (u *ApplicationUpsert) AddAccessTokenTTL(v int) *ApplicationUpsert

AddAccessTokenTTL adds v to the "access_token_ttl" field.

func (*ApplicationUpsert) AddRefreshTokenTTL added in v0.2.0

func (u *ApplicationUpsert) AddRefreshTokenTTL(v int) *ApplicationUpsert

AddRefreshTokenTTL adds v to the "refresh_token_ttl" field.

func (*ApplicationUpsert) ClearDescription added in v0.2.0

func (u *ApplicationUpsert) ClearDescription() *ApplicationUpsert

ClearDescription clears the value of the "description" field.

func (*ApplicationUpsert) ClearLogoURL added in v0.2.0

func (u *ApplicationUpsert) ClearLogoURL() *ApplicationUpsert

ClearLogoURL clears the value of the "logo_url" field.

func (*ApplicationUpsert) SetAccessTokenTTL added in v0.2.0

func (u *ApplicationUpsert) SetAccessTokenTTL(v int) *ApplicationUpsert

SetAccessTokenTTL sets the "access_token_ttl" field.

func (*ApplicationUpsert) SetAllowedGrants added in v0.2.0

func (u *ApplicationUpsert) SetAllowedGrants(v []string) *ApplicationUpsert

SetAllowedGrants sets the "allowed_grants" field.

func (*ApplicationUpsert) SetAllowedResponseTypes added in v0.2.0

func (u *ApplicationUpsert) SetAllowedResponseTypes(v []string) *ApplicationUpsert

SetAllowedResponseTypes sets the "allowed_response_types" field.

func (*ApplicationUpsert) SetAppType added in v0.2.0

SetAppType sets the "app_type" field.

func (*ApplicationUpsert) SetDescription added in v0.2.0

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

SetDescription sets the "description" field.

func (*ApplicationUpsert) SetFirstParty added in v0.2.0

func (u *ApplicationUpsert) SetFirstParty(v bool) *ApplicationUpsert

SetFirstParty sets the "first_party" field.

func (*ApplicationUpsert) SetLogoURL added in v0.2.0

func (u *ApplicationUpsert) SetLogoURL(v string) *ApplicationUpsert

SetLogoURL sets the "logo_url" field.

func (*ApplicationUpsert) SetPublic added in v0.2.0

func (u *ApplicationUpsert) SetPublic(v bool) *ApplicationUpsert

SetPublic sets the "public" field.

func (*ApplicationUpsert) SetRedirectUris added in v0.2.0

func (u *ApplicationUpsert) SetRedirectUris(v []string) *ApplicationUpsert

SetRedirectUris sets the "redirect_uris" field.

func (*ApplicationUpsert) SetRefreshTokenRotation added in v0.2.0

func (u *ApplicationUpsert) SetRefreshTokenRotation(v bool) *ApplicationUpsert

SetRefreshTokenRotation sets the "refresh_token_rotation" field.

func (*ApplicationUpsert) SetRefreshTokenTTL added in v0.2.0

func (u *ApplicationUpsert) SetRefreshTokenTTL(v int) *ApplicationUpsert

SetRefreshTokenTTL sets the "refresh_token_ttl" field.

func (*ApplicationUpsert) SetUpdatedAt added in v0.2.0

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

SetUpdatedAt sets the "updated_at" field.

func (*ApplicationUpsert) UpdateAccessTokenTTL added in v0.2.0

func (u *ApplicationUpsert) UpdateAccessTokenTTL() *ApplicationUpsert

UpdateAccessTokenTTL sets the "access_token_ttl" field to the value that was provided on create.

func (*ApplicationUpsert) UpdateAllowedGrants added in v0.2.0

func (u *ApplicationUpsert) UpdateAllowedGrants() *ApplicationUpsert

UpdateAllowedGrants sets the "allowed_grants" field to the value that was provided on create.

func (*ApplicationUpsert) UpdateAllowedResponseTypes added in v0.2.0

func (u *ApplicationUpsert) UpdateAllowedResponseTypes() *ApplicationUpsert

UpdateAllowedResponseTypes sets the "allowed_response_types" field to the value that was provided on create.

func (*ApplicationUpsert) UpdateAppType added in v0.2.0

func (u *ApplicationUpsert) UpdateAppType() *ApplicationUpsert

UpdateAppType sets the "app_type" field to the value that was provided on create.

func (*ApplicationUpsert) UpdateDescription added in v0.2.0

func (u *ApplicationUpsert) UpdateDescription() *ApplicationUpsert

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

func (*ApplicationUpsert) UpdateFirstParty added in v0.2.0

func (u *ApplicationUpsert) UpdateFirstParty() *ApplicationUpsert

UpdateFirstParty sets the "first_party" field to the value that was provided on create.

func (*ApplicationUpsert) UpdateLogoURL added in v0.2.0

func (u *ApplicationUpsert) UpdateLogoURL() *ApplicationUpsert

UpdateLogoURL sets the "logo_url" field to the value that was provided on create.

func (*ApplicationUpsert) UpdatePublic added in v0.2.0

func (u *ApplicationUpsert) UpdatePublic() *ApplicationUpsert

UpdatePublic sets the "public" field to the value that was provided on create.

func (*ApplicationUpsert) UpdateRedirectUris added in v0.2.0

func (u *ApplicationUpsert) UpdateRedirectUris() *ApplicationUpsert

UpdateRedirectUris sets the "redirect_uris" field to the value that was provided on create.

func (*ApplicationUpsert) UpdateRefreshTokenRotation added in v0.2.0

func (u *ApplicationUpsert) UpdateRefreshTokenRotation() *ApplicationUpsert

UpdateRefreshTokenRotation sets the "refresh_token_rotation" field to the value that was provided on create.

func (*ApplicationUpsert) UpdateRefreshTokenTTL added in v0.2.0

func (u *ApplicationUpsert) UpdateRefreshTokenTTL() *ApplicationUpsert

UpdateRefreshTokenTTL sets the "refresh_token_ttl" field to the value that was provided on create.

func (*ApplicationUpsert) UpdateUpdatedAt added in v0.2.0

func (u *ApplicationUpsert) UpdateUpdatedAt() *ApplicationUpsert

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

type ApplicationUpsertBulk added in v0.2.0

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

ApplicationUpsertBulk is the builder for "upsert"-ing a bulk of Application nodes.

func (*ApplicationUpsertBulk) AddAccessTokenTTL added in v0.2.0

func (u *ApplicationUpsertBulk) AddAccessTokenTTL(v int) *ApplicationUpsertBulk

AddAccessTokenTTL adds v to the "access_token_ttl" field.

func (*ApplicationUpsertBulk) AddRefreshTokenTTL added in v0.2.0

func (u *ApplicationUpsertBulk) AddRefreshTokenTTL(v int) *ApplicationUpsertBulk

AddRefreshTokenTTL adds v to the "refresh_token_ttl" field.

func (*ApplicationUpsertBulk) ClearDescription added in v0.2.0

func (u *ApplicationUpsertBulk) ClearDescription() *ApplicationUpsertBulk

ClearDescription clears the value of the "description" field.

func (*ApplicationUpsertBulk) ClearLogoURL added in v0.2.0

func (u *ApplicationUpsertBulk) ClearLogoURL() *ApplicationUpsertBulk

ClearLogoURL clears the value of the "logo_url" field.

func (*ApplicationUpsertBulk) DoNothing added in v0.2.0

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

func (*ApplicationUpsertBulk) Exec added in v0.2.0

Exec executes the query.

func (*ApplicationUpsertBulk) ExecX added in v0.2.0

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

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

func (*ApplicationUpsertBulk) Ignore added in v0.2.0

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

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

func (*ApplicationUpsertBulk) SetAccessTokenTTL added in v0.2.0

func (u *ApplicationUpsertBulk) SetAccessTokenTTL(v int) *ApplicationUpsertBulk

SetAccessTokenTTL sets the "access_token_ttl" field.

func (*ApplicationUpsertBulk) SetAllowedGrants added in v0.2.0

func (u *ApplicationUpsertBulk) SetAllowedGrants(v []string) *ApplicationUpsertBulk

SetAllowedGrants sets the "allowed_grants" field.

func (*ApplicationUpsertBulk) SetAllowedResponseTypes added in v0.2.0

func (u *ApplicationUpsertBulk) SetAllowedResponseTypes(v []string) *ApplicationUpsertBulk

SetAllowedResponseTypes sets the "allowed_response_types" field.

func (*ApplicationUpsertBulk) SetAppType added in v0.2.0

SetAppType sets the "app_type" field.

func (*ApplicationUpsertBulk) SetDescription added in v0.2.0

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

SetDescription sets the "description" field.

func (*ApplicationUpsertBulk) SetFirstParty added in v0.2.0

func (u *ApplicationUpsertBulk) SetFirstParty(v bool) *ApplicationUpsertBulk

SetFirstParty sets the "first_party" field.

func (*ApplicationUpsertBulk) SetLogoURL added in v0.2.0

SetLogoURL sets the "logo_url" field.

func (*ApplicationUpsertBulk) SetPublic added in v0.2.0

SetPublic sets the "public" field.

func (*ApplicationUpsertBulk) SetRedirectUris added in v0.2.0

func (u *ApplicationUpsertBulk) SetRedirectUris(v []string) *ApplicationUpsertBulk

SetRedirectUris sets the "redirect_uris" field.

func (*ApplicationUpsertBulk) SetRefreshTokenRotation added in v0.2.0

func (u *ApplicationUpsertBulk) SetRefreshTokenRotation(v bool) *ApplicationUpsertBulk

SetRefreshTokenRotation sets the "refresh_token_rotation" field.

func (*ApplicationUpsertBulk) SetRefreshTokenTTL added in v0.2.0

func (u *ApplicationUpsertBulk) SetRefreshTokenTTL(v int) *ApplicationUpsertBulk

SetRefreshTokenTTL sets the "refresh_token_ttl" field.

func (*ApplicationUpsertBulk) SetUpdatedAt added in v0.2.0

SetUpdatedAt sets the "updated_at" field.

func (*ApplicationUpsertBulk) Update added in v0.2.0

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

func (*ApplicationUpsertBulk) UpdateAccessTokenTTL added in v0.2.0

func (u *ApplicationUpsertBulk) UpdateAccessTokenTTL() *ApplicationUpsertBulk

UpdateAccessTokenTTL sets the "access_token_ttl" field to the value that was provided on create.

func (*ApplicationUpsertBulk) UpdateAllowedGrants added in v0.2.0

func (u *ApplicationUpsertBulk) UpdateAllowedGrants() *ApplicationUpsertBulk

UpdateAllowedGrants sets the "allowed_grants" field to the value that was provided on create.

func (*ApplicationUpsertBulk) UpdateAllowedResponseTypes added in v0.2.0

func (u *ApplicationUpsertBulk) UpdateAllowedResponseTypes() *ApplicationUpsertBulk

UpdateAllowedResponseTypes sets the "allowed_response_types" field to the value that was provided on create.

func (*ApplicationUpsertBulk) UpdateAppType added in v0.2.0

func (u *ApplicationUpsertBulk) UpdateAppType() *ApplicationUpsertBulk

UpdateAppType sets the "app_type" field to the value that was provided on create.

func (*ApplicationUpsertBulk) UpdateDescription added in v0.2.0

func (u *ApplicationUpsertBulk) UpdateDescription() *ApplicationUpsertBulk

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

func (*ApplicationUpsertBulk) UpdateFirstParty added in v0.2.0

func (u *ApplicationUpsertBulk) UpdateFirstParty() *ApplicationUpsertBulk

UpdateFirstParty sets the "first_party" field to the value that was provided on create.

func (*ApplicationUpsertBulk) UpdateLogoURL added in v0.2.0

func (u *ApplicationUpsertBulk) UpdateLogoURL() *ApplicationUpsertBulk

UpdateLogoURL sets the "logo_url" field to the value that was provided on create.

func (*ApplicationUpsertBulk) UpdateNewValues added in v0.2.0

func (u *ApplicationUpsertBulk) UpdateNewValues() *ApplicationUpsertBulk

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

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

func (*ApplicationUpsertBulk) UpdatePublic added in v0.2.0

func (u *ApplicationUpsertBulk) UpdatePublic() *ApplicationUpsertBulk

UpdatePublic sets the "public" field to the value that was provided on create.

func (*ApplicationUpsertBulk) UpdateRedirectUris added in v0.2.0

func (u *ApplicationUpsertBulk) UpdateRedirectUris() *ApplicationUpsertBulk

UpdateRedirectUris sets the "redirect_uris" field to the value that was provided on create.

func (*ApplicationUpsertBulk) UpdateRefreshTokenRotation added in v0.2.0

func (u *ApplicationUpsertBulk) UpdateRefreshTokenRotation() *ApplicationUpsertBulk

UpdateRefreshTokenRotation sets the "refresh_token_rotation" field to the value that was provided on create.

func (*ApplicationUpsertBulk) UpdateRefreshTokenTTL added in v0.2.0

func (u *ApplicationUpsertBulk) UpdateRefreshTokenTTL() *ApplicationUpsertBulk

UpdateRefreshTokenTTL sets the "refresh_token_ttl" field to the value that was provided on create.

func (*ApplicationUpsertBulk) UpdateUpdatedAt added in v0.2.0

func (u *ApplicationUpsertBulk) UpdateUpdatedAt() *ApplicationUpsertBulk

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

type ApplicationUpsertOne added in v0.2.0

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

ApplicationUpsertOne is the builder for "upsert"-ing

one Application node.

func (*ApplicationUpsertOne) AddAccessTokenTTL added in v0.2.0

func (u *ApplicationUpsertOne) AddAccessTokenTTL(v int) *ApplicationUpsertOne

AddAccessTokenTTL adds v to the "access_token_ttl" field.

func (*ApplicationUpsertOne) AddRefreshTokenTTL added in v0.2.0

func (u *ApplicationUpsertOne) AddRefreshTokenTTL(v int) *ApplicationUpsertOne

AddRefreshTokenTTL adds v to the "refresh_token_ttl" field.

func (*ApplicationUpsertOne) ClearDescription added in v0.2.0

func (u *ApplicationUpsertOne) ClearDescription() *ApplicationUpsertOne

ClearDescription clears the value of the "description" field.

func (*ApplicationUpsertOne) ClearLogoURL added in v0.2.0

func (u *ApplicationUpsertOne) ClearLogoURL() *ApplicationUpsertOne

ClearLogoURL clears the value of the "logo_url" field.

func (*ApplicationUpsertOne) DoNothing added in v0.2.0

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

func (*ApplicationUpsertOne) Exec added in v0.2.0

Exec executes the query.

func (*ApplicationUpsertOne) ExecX added in v0.2.0

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

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

func (*ApplicationUpsertOne) ID added in v0.2.0

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

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

func (*ApplicationUpsertOne) IDX added in v0.2.0

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

func (*ApplicationUpsertOne) Ignore added in v0.2.0

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

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

func (*ApplicationUpsertOne) SetAccessTokenTTL added in v0.2.0

func (u *ApplicationUpsertOne) SetAccessTokenTTL(v int) *ApplicationUpsertOne

SetAccessTokenTTL sets the "access_token_ttl" field.

func (*ApplicationUpsertOne) SetAllowedGrants added in v0.2.0

func (u *ApplicationUpsertOne) SetAllowedGrants(v []string) *ApplicationUpsertOne

SetAllowedGrants sets the "allowed_grants" field.

func (*ApplicationUpsertOne) SetAllowedResponseTypes added in v0.2.0

func (u *ApplicationUpsertOne) SetAllowedResponseTypes(v []string) *ApplicationUpsertOne

SetAllowedResponseTypes sets the "allowed_response_types" field.

func (*ApplicationUpsertOne) SetAppType added in v0.2.0

SetAppType sets the "app_type" field.

func (*ApplicationUpsertOne) SetDescription added in v0.2.0

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

SetDescription sets the "description" field.

func (*ApplicationUpsertOne) SetFirstParty added in v0.2.0

func (u *ApplicationUpsertOne) SetFirstParty(v bool) *ApplicationUpsertOne

SetFirstParty sets the "first_party" field.

func (*ApplicationUpsertOne) SetLogoURL added in v0.2.0

SetLogoURL sets the "logo_url" field.

func (*ApplicationUpsertOne) SetPublic added in v0.2.0

SetPublic sets the "public" field.

func (*ApplicationUpsertOne) SetRedirectUris added in v0.2.0

func (u *ApplicationUpsertOne) SetRedirectUris(v []string) *ApplicationUpsertOne

SetRedirectUris sets the "redirect_uris" field.

func (*ApplicationUpsertOne) SetRefreshTokenRotation added in v0.2.0

func (u *ApplicationUpsertOne) SetRefreshTokenRotation(v bool) *ApplicationUpsertOne

SetRefreshTokenRotation sets the "refresh_token_rotation" field.

func (*ApplicationUpsertOne) SetRefreshTokenTTL added in v0.2.0

func (u *ApplicationUpsertOne) SetRefreshTokenTTL(v int) *ApplicationUpsertOne

SetRefreshTokenTTL sets the "refresh_token_ttl" field.

func (*ApplicationUpsertOne) SetUpdatedAt added in v0.2.0

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

SetUpdatedAt sets the "updated_at" field.

func (*ApplicationUpsertOne) Update added in v0.2.0

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

func (*ApplicationUpsertOne) UpdateAccessTokenTTL added in v0.2.0

func (u *ApplicationUpsertOne) UpdateAccessTokenTTL() *ApplicationUpsertOne

UpdateAccessTokenTTL sets the "access_token_ttl" field to the value that was provided on create.

func (*ApplicationUpsertOne) UpdateAllowedGrants added in v0.2.0

func (u *ApplicationUpsertOne) UpdateAllowedGrants() *ApplicationUpsertOne

UpdateAllowedGrants sets the "allowed_grants" field to the value that was provided on create.

func (*ApplicationUpsertOne) UpdateAllowedResponseTypes added in v0.2.0

func (u *ApplicationUpsertOne) UpdateAllowedResponseTypes() *ApplicationUpsertOne

UpdateAllowedResponseTypes sets the "allowed_response_types" field to the value that was provided on create.

func (*ApplicationUpsertOne) UpdateAppType added in v0.2.0

func (u *ApplicationUpsertOne) UpdateAppType() *ApplicationUpsertOne

UpdateAppType sets the "app_type" field to the value that was provided on create.

func (*ApplicationUpsertOne) UpdateDescription added in v0.2.0

func (u *ApplicationUpsertOne) UpdateDescription() *ApplicationUpsertOne

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

func (*ApplicationUpsertOne) UpdateFirstParty added in v0.2.0

func (u *ApplicationUpsertOne) UpdateFirstParty() *ApplicationUpsertOne

UpdateFirstParty sets the "first_party" field to the value that was provided on create.

func (*ApplicationUpsertOne) UpdateLogoURL added in v0.2.0

func (u *ApplicationUpsertOne) UpdateLogoURL() *ApplicationUpsertOne

UpdateLogoURL sets the "logo_url" field to the value that was provided on create.

func (*ApplicationUpsertOne) UpdateNewValues added in v0.2.0

func (u *ApplicationUpsertOne) UpdateNewValues() *ApplicationUpsertOne

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.Application.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(application.FieldID)
		}),
	).
	Exec(ctx)

func (*ApplicationUpsertOne) UpdatePublic added in v0.2.0

func (u *ApplicationUpsertOne) UpdatePublic() *ApplicationUpsertOne

UpdatePublic sets the "public" field to the value that was provided on create.

func (*ApplicationUpsertOne) UpdateRedirectUris added in v0.2.0

func (u *ApplicationUpsertOne) UpdateRedirectUris() *ApplicationUpsertOne

UpdateRedirectUris sets the "redirect_uris" field to the value that was provided on create.

func (*ApplicationUpsertOne) UpdateRefreshTokenRotation added in v0.2.0

func (u *ApplicationUpsertOne) UpdateRefreshTokenRotation() *ApplicationUpsertOne

UpdateRefreshTokenRotation sets the "refresh_token_rotation" field to the value that was provided on create.

func (*ApplicationUpsertOne) UpdateRefreshTokenTTL added in v0.2.0

func (u *ApplicationUpsertOne) UpdateRefreshTokenTTL() *ApplicationUpsertOne

UpdateRefreshTokenTTL sets the "refresh_token_ttl" field to the value that was provided on create.

func (*ApplicationUpsertOne) UpdateUpdatedAt added in v0.2.0

func (u *ApplicationUpsertOne) UpdateUpdatedAt() *ApplicationUpsertOne

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

type Applications added in v0.2.0

type Applications []*Application

Applications is a parsable slice of Application.

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
	// Agent is the client for interacting with the Agent builders.
	Agent *AgentClient
	// Application is the client for interacting with the Application builders.
	Application *ApplicationClient
	// Credential is the client for interacting with the Credential builders.
	Credential *CredentialClient
	// Human is the client for interacting with the Human builders.
	Human *HumanClient
	// Invite is the client for interacting with the Invite builders.
	Invite *InviteClient
	// 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
	// Principal is the client for interacting with the Principal builders.
	Principal *PrincipalClient
	// PrincipalMembership is the client for interacting with the PrincipalMembership builders.
	PrincipalMembership *PrincipalMembershipClient
	// PrincipalToken is the client for interacting with the PrincipalToken builders.
	PrincipalToken *PrincipalTokenClient
	// 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
	// ServicePrincipal is the client for interacting with the ServicePrincipal builders.
	ServicePrincipal *ServicePrincipalClient
	// 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 Credential added in v0.2.0

type Credential struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Principal that owns this credential
	PrincipalID uuid.UUID `json:"principal_id,omitempty"`
	// Type of credential
	Type credential.Type `json:"type,omitempty"`
	// Unique identifier for this credential (e.g., key prefix)
	Identifier string `json:"identifier,omitempty"`
	// Hashed secret (Argon2id for passwords/secrets, SHA256 for tokens)
	SecretHash string `json:"-"`
	// Public key (PEM format) for keypair credentials
	PublicKey string `json:"public_key,omitempty"`
	// Key algorithm (RS256, ES256, etc.)
	KeyAlgorithm string `json:"key_algorithm,omitempty"`
	// Key ID for keypair credentials (used in JWT kid header)
	KeyID *string `json:"key_id,omitempty"`
	// WebAuthn credential ID
	WebauthnCredentialID []byte `json:"webauthn_credential_id,omitempty"`
	// WebAuthn public key (COSE format)
	WebauthnPublicKey []byte `json:"webauthn_public_key,omitempty"`
	// WebAuthn authenticator AAGUID
	WebauthnAaguid string `json:"webauthn_aaguid,omitempty"`
	// WebAuthn signature counter
	WebauthnSignCount uint32 `json:"webauthn_sign_count,omitempty"`
	// Scopes this credential grants
	Scopes []string `json:"scopes,omitempty"`
	// Whether this credential is active
	Active bool `json:"active,omitempty"`
	// When this credential expires (nil = never)
	ExpiresAt *time.Time `json:"expires_at,omitempty"`
	// Whether this credential has been revoked
	Revoked bool `json:"revoked,omitempty"`
	// When this credential was revoked
	RevokedAt *time.Time `json:"revoked_at,omitempty"`
	// Reason for revocation
	RevokedReason string `json:"revoked_reason,omitempty"`
	// Last time this credential was used
	LastUsedAt *time.Time `json:"last_used_at,omitempty"`
	// IP address of last use
	LastUsedIP string `json:"last_used_ip,omitempty"`
	// Human-readable name for this credential
	Name string `json:"name,omitempty"`
	// Custom metadata
	Metadata map[string]interface{} `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 CredentialQuery when eager-loading is set.
	Edges CredentialEdges `json:"edges"`
	// contains filtered or unexported fields
}

Credential is the model entity for the Credential schema.

func (*Credential) QueryPrincipal added in v0.2.0

func (_m *Credential) QueryPrincipal() *PrincipalQuery

QueryPrincipal queries the "principal" edge of the Credential entity.

func (*Credential) String added in v0.2.0

func (_m *Credential) String() string

String implements the fmt.Stringer.

func (*Credential) Unwrap added in v0.2.0

func (_m *Credential) Unwrap() *Credential

Unwrap unwraps the Credential 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 (*Credential) Update added in v0.2.0

func (_m *Credential) Update() *CredentialUpdateOne

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

func (*Credential) Value added in v0.2.0

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

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

type CredentialClient added in v0.2.0

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

CredentialClient is a client for the Credential schema.

func NewCredentialClient added in v0.2.0

func NewCredentialClient(c config) *CredentialClient

NewCredentialClient returns a client for the Credential from the given config.

func (*CredentialClient) Create added in v0.2.0

func (c *CredentialClient) Create() *CredentialCreate

Create returns a builder for creating a Credential entity.

func (*CredentialClient) CreateBulk added in v0.2.0

func (c *CredentialClient) CreateBulk(builders ...*CredentialCreate) *CredentialCreateBulk

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

func (*CredentialClient) Delete added in v0.2.0

func (c *CredentialClient) Delete() *CredentialDelete

Delete returns a delete builder for Credential.

func (*CredentialClient) DeleteOne added in v0.2.0

func (c *CredentialClient) DeleteOne(_m *Credential) *CredentialDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CredentialClient) DeleteOneID added in v0.2.0

func (c *CredentialClient) DeleteOneID(id uuid.UUID) *CredentialDeleteOne

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

func (*CredentialClient) Get added in v0.2.0

Get returns a Credential entity by its id.

func (*CredentialClient) GetX added in v0.2.0

func (c *CredentialClient) GetX(ctx context.Context, id uuid.UUID) *Credential

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

func (*CredentialClient) Hooks added in v0.2.0

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

Hooks returns the client hooks.

func (*CredentialClient) Intercept added in v0.2.0

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

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

func (*CredentialClient) Interceptors added in v0.2.0

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

Interceptors returns the client interceptors.

func (*CredentialClient) MapCreateBulk added in v0.2.0

func (c *CredentialClient) MapCreateBulk(slice any, setFunc func(*CredentialCreate, int)) *CredentialCreateBulk

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 (*CredentialClient) Query added in v0.2.0

func (c *CredentialClient) Query() *CredentialQuery

Query returns a query builder for Credential.

func (*CredentialClient) QueryPrincipal added in v0.2.0

func (c *CredentialClient) QueryPrincipal(_m *Credential) *PrincipalQuery

QueryPrincipal queries the principal edge of a Credential.

func (*CredentialClient) Update added in v0.2.0

func (c *CredentialClient) Update() *CredentialUpdate

Update returns an update builder for Credential.

func (*CredentialClient) UpdateOne added in v0.2.0

func (c *CredentialClient) UpdateOne(_m *Credential) *CredentialUpdateOne

UpdateOne returns an update builder for the given entity.

func (*CredentialClient) UpdateOneID added in v0.2.0

func (c *CredentialClient) UpdateOneID(id uuid.UUID) *CredentialUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CredentialClient) Use added in v0.2.0

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

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

type CredentialCreate added in v0.2.0

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

CredentialCreate is the builder for creating a Credential entity.

func (*CredentialCreate) Exec added in v0.2.0

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

Exec executes the query.

func (*CredentialCreate) ExecX added in v0.2.0

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

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

func (*CredentialCreate) Mutation added in v0.2.0

func (_c *CredentialCreate) Mutation() *CredentialMutation

Mutation returns the CredentialMutation object of the builder.

func (*CredentialCreate) OnConflict added in v0.2.0

func (_c *CredentialCreate) OnConflict(opts ...sql.ConflictOption) *CredentialUpsertOne

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

client.Credential.Create().
	SetPrincipalID(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.CredentialUpsert) {
		SetPrincipalID(v+v).
	}).
	Exec(ctx)

func (*CredentialCreate) OnConflictColumns added in v0.2.0

func (_c *CredentialCreate) OnConflictColumns(columns ...string) *CredentialUpsertOne

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

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

func (*CredentialCreate) Save added in v0.2.0

func (_c *CredentialCreate) Save(ctx context.Context) (*Credential, error)

Save creates the Credential in the database.

func (*CredentialCreate) SaveX added in v0.2.0

func (_c *CredentialCreate) SaveX(ctx context.Context) *Credential

SaveX calls Save and panics if Save returns an error.

func (*CredentialCreate) SetActive added in v0.2.0

func (_c *CredentialCreate) SetActive(v bool) *CredentialCreate

SetActive sets the "active" field.

func (*CredentialCreate) SetCreatedAt added in v0.2.0

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

SetCreatedAt sets the "created_at" field.

func (*CredentialCreate) SetExpiresAt added in v0.2.0

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

SetExpiresAt sets the "expires_at" field.

func (*CredentialCreate) SetID added in v0.2.0

SetID sets the "id" field.

func (*CredentialCreate) SetIdentifier added in v0.2.0

func (_c *CredentialCreate) SetIdentifier(v string) *CredentialCreate

SetIdentifier sets the "identifier" field.

func (*CredentialCreate) SetKeyAlgorithm added in v0.2.0

func (_c *CredentialCreate) SetKeyAlgorithm(v string) *CredentialCreate

SetKeyAlgorithm sets the "key_algorithm" field.

func (*CredentialCreate) SetKeyID added in v0.2.0

func (_c *CredentialCreate) SetKeyID(v string) *CredentialCreate

SetKeyID sets the "key_id" field.

func (*CredentialCreate) SetLastUsedAt added in v0.2.0

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

SetLastUsedAt sets the "last_used_at" field.

func (*CredentialCreate) SetLastUsedIP added in v0.2.0

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

SetLastUsedIP sets the "last_used_ip" field.

func (*CredentialCreate) SetMetadata added in v0.2.0

func (_c *CredentialCreate) SetMetadata(v map[string]interface{}) *CredentialCreate

SetMetadata sets the "metadata" field.

func (*CredentialCreate) SetName added in v0.2.0

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

SetName sets the "name" field.

func (*CredentialCreate) SetNillableActive added in v0.2.0

func (_c *CredentialCreate) SetNillableActive(v *bool) *CredentialCreate

SetNillableActive sets the "active" field if the given value is not nil.

func (*CredentialCreate) SetNillableCreatedAt added in v0.2.0

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

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

func (*CredentialCreate) SetNillableExpiresAt added in v0.2.0

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

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

func (*CredentialCreate) SetNillableID added in v0.2.0

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

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

func (*CredentialCreate) SetNillableIdentifier added in v0.2.0

func (_c *CredentialCreate) SetNillableIdentifier(v *string) *CredentialCreate

SetNillableIdentifier sets the "identifier" field if the given value is not nil.

func (*CredentialCreate) SetNillableKeyAlgorithm added in v0.2.0

func (_c *CredentialCreate) SetNillableKeyAlgorithm(v *string) *CredentialCreate

SetNillableKeyAlgorithm sets the "key_algorithm" field if the given value is not nil.

func (*CredentialCreate) SetNillableKeyID added in v0.2.0

func (_c *CredentialCreate) SetNillableKeyID(v *string) *CredentialCreate

SetNillableKeyID sets the "key_id" field if the given value is not nil.

func (*CredentialCreate) SetNillableLastUsedAt added in v0.2.0

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

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

func (*CredentialCreate) SetNillableLastUsedIP added in v0.2.0

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

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

func (*CredentialCreate) SetNillableName added in v0.2.0

func (_c *CredentialCreate) SetNillableName(v *string) *CredentialCreate

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

func (*CredentialCreate) SetNillablePublicKey added in v0.2.0

func (_c *CredentialCreate) SetNillablePublicKey(v *string) *CredentialCreate

SetNillablePublicKey sets the "public_key" field if the given value is not nil.

func (*CredentialCreate) SetNillableRevoked added in v0.2.0

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

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

func (*CredentialCreate) SetNillableRevokedAt added in v0.2.0

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

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

func (*CredentialCreate) SetNillableRevokedReason added in v0.2.0

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

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

func (*CredentialCreate) SetNillableSecretHash added in v0.2.0

func (_c *CredentialCreate) SetNillableSecretHash(v *string) *CredentialCreate

SetNillableSecretHash sets the "secret_hash" field if the given value is not nil.

func (*CredentialCreate) SetNillableUpdatedAt added in v0.2.0

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

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

func (*CredentialCreate) SetNillableWebauthnAaguid added in v0.2.0

func (_c *CredentialCreate) SetNillableWebauthnAaguid(v *string) *CredentialCreate

SetNillableWebauthnAaguid sets the "webauthn_aaguid" field if the given value is not nil.

func (*CredentialCreate) SetNillableWebauthnSignCount added in v0.2.0

func (_c *CredentialCreate) SetNillableWebauthnSignCount(v *uint32) *CredentialCreate

SetNillableWebauthnSignCount sets the "webauthn_sign_count" field if the given value is not nil.

func (*CredentialCreate) SetPrincipal added in v0.2.0

func (_c *CredentialCreate) SetPrincipal(v *Principal) *CredentialCreate

SetPrincipal sets the "principal" edge to the Principal entity.

func (*CredentialCreate) SetPrincipalID added in v0.2.0

func (_c *CredentialCreate) SetPrincipalID(v uuid.UUID) *CredentialCreate

SetPrincipalID sets the "principal_id" field.

func (*CredentialCreate) SetPublicKey added in v0.2.0

func (_c *CredentialCreate) SetPublicKey(v string) *CredentialCreate

SetPublicKey sets the "public_key" field.

func (*CredentialCreate) SetRevoked added in v0.2.0

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

SetRevoked sets the "revoked" field.

func (*CredentialCreate) SetRevokedAt added in v0.2.0

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

SetRevokedAt sets the "revoked_at" field.

func (*CredentialCreate) SetRevokedReason added in v0.2.0

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

SetRevokedReason sets the "revoked_reason" field.

func (*CredentialCreate) SetScopes added in v0.2.0

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

SetScopes sets the "scopes" field.

func (*CredentialCreate) SetSecretHash added in v0.2.0

func (_c *CredentialCreate) SetSecretHash(v string) *CredentialCreate

SetSecretHash sets the "secret_hash" field.

func (*CredentialCreate) SetType added in v0.2.0

SetType sets the "type" field.

func (*CredentialCreate) SetUpdatedAt added in v0.2.0

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

SetUpdatedAt sets the "updated_at" field.

func (*CredentialCreate) SetWebauthnAaguid added in v0.2.0

func (_c *CredentialCreate) SetWebauthnAaguid(v string) *CredentialCreate

SetWebauthnAaguid sets the "webauthn_aaguid" field.

func (*CredentialCreate) SetWebauthnCredentialID added in v0.2.0

func (_c *CredentialCreate) SetWebauthnCredentialID(v []byte) *CredentialCreate

SetWebauthnCredentialID sets the "webauthn_credential_id" field.

func (*CredentialCreate) SetWebauthnPublicKey added in v0.2.0

func (_c *CredentialCreate) SetWebauthnPublicKey(v []byte) *CredentialCreate

SetWebauthnPublicKey sets the "webauthn_public_key" field.

func (*CredentialCreate) SetWebauthnSignCount added in v0.2.0

func (_c *CredentialCreate) SetWebauthnSignCount(v uint32) *CredentialCreate

SetWebauthnSignCount sets the "webauthn_sign_count" field.

type CredentialCreateBulk added in v0.2.0

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

CredentialCreateBulk is the builder for creating many Credential entities in bulk.

func (*CredentialCreateBulk) Exec added in v0.2.0

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

Exec executes the query.

func (*CredentialCreateBulk) ExecX added in v0.2.0

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

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

func (*CredentialCreateBulk) OnConflict added in v0.2.0

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

client.Credential.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.CredentialUpsert) {
		SetPrincipalID(v+v).
	}).
	Exec(ctx)

func (*CredentialCreateBulk) OnConflictColumns added in v0.2.0

func (_c *CredentialCreateBulk) OnConflictColumns(columns ...string) *CredentialUpsertBulk

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

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

func (*CredentialCreateBulk) Save added in v0.2.0

func (_c *CredentialCreateBulk) Save(ctx context.Context) ([]*Credential, error)

Save creates the Credential entities in the database.

func (*CredentialCreateBulk) SaveX added in v0.2.0

func (_c *CredentialCreateBulk) SaveX(ctx context.Context) []*Credential

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

type CredentialDelete added in v0.2.0

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

CredentialDelete is the builder for deleting a Credential entity.

func (*CredentialDelete) Exec added in v0.2.0

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

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

func (*CredentialDelete) ExecX added in v0.2.0

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

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

func (*CredentialDelete) Where added in v0.2.0

Where appends a list predicates to the CredentialDelete builder.

type CredentialDeleteOne added in v0.2.0

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

CredentialDeleteOne is the builder for deleting a single Credential entity.

func (*CredentialDeleteOne) Exec added in v0.2.0

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

Exec executes the deletion query.

func (*CredentialDeleteOne) ExecX added in v0.2.0

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

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

func (*CredentialDeleteOne) Where added in v0.2.0

Where appends a list predicates to the CredentialDelete builder.

type CredentialEdges added in v0.2.0

type CredentialEdges struct {
	// Principal holds the value of the principal edge.
	Principal *Principal `json:"principal,omitempty"`
	// contains filtered or unexported fields
}

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

func (CredentialEdges) PrincipalOrErr added in v0.2.0

func (e CredentialEdges) PrincipalOrErr() (*Principal, error)

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

type CredentialFilter added in v0.2.0

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

CredentialFilter provides a generic filtering capability at runtime for CredentialQuery.

func (*CredentialFilter) Where added in v0.2.0

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

Where applies the entql predicate on the query filter.

func (*CredentialFilter) WhereActive added in v0.2.0

func (f *CredentialFilter) WhereActive(p entql.BoolP)

WhereActive applies the entql bool predicate on the active field.

func (*CredentialFilter) WhereCreatedAt added in v0.2.0

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

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

func (*CredentialFilter) WhereExpiresAt added in v0.2.0

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

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

func (*CredentialFilter) WhereHasPrincipal added in v0.2.0

func (f *CredentialFilter) WhereHasPrincipal()

WhereHasPrincipal applies a predicate to check if query has an edge principal.

func (*CredentialFilter) WhereHasPrincipalWith added in v0.2.0

func (f *CredentialFilter) WhereHasPrincipalWith(preds ...predicate.Principal)

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

func (*CredentialFilter) WhereID added in v0.2.0

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

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

func (*CredentialFilter) WhereIdentifier added in v0.2.0

func (f *CredentialFilter) WhereIdentifier(p entql.StringP)

WhereIdentifier applies the entql string predicate on the identifier field.

func (*CredentialFilter) WhereKeyAlgorithm added in v0.2.0

func (f *CredentialFilter) WhereKeyAlgorithm(p entql.StringP)

WhereKeyAlgorithm applies the entql string predicate on the key_algorithm field.

func (*CredentialFilter) WhereKeyID added in v0.2.0

func (f *CredentialFilter) WhereKeyID(p entql.StringP)

WhereKeyID applies the entql string predicate on the key_id field.

func (*CredentialFilter) WhereLastUsedAt added in v0.2.0

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

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

func (*CredentialFilter) WhereLastUsedIP added in v0.2.0

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

WhereLastUsedIP applies the entql string predicate on the last_used_ip field.

func (*CredentialFilter) WhereMetadata added in v0.2.0

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

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

func (*CredentialFilter) WhereName added in v0.2.0

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

WhereName applies the entql string predicate on the name field.

func (*CredentialFilter) WherePrincipalID added in v0.2.0

func (f *CredentialFilter) WherePrincipalID(p entql.ValueP)

WherePrincipalID applies the entql [16]byte predicate on the principal_id field.

func (*CredentialFilter) WherePublicKey added in v0.2.0

func (f *CredentialFilter) WherePublicKey(p entql.StringP)

WherePublicKey applies the entql string predicate on the public_key field.

func (*CredentialFilter) WhereRevoked added in v0.2.0

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

WhereRevoked applies the entql bool predicate on the revoked field.

func (*CredentialFilter) WhereRevokedAt added in v0.2.0

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

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

func (*CredentialFilter) WhereRevokedReason added in v0.2.0

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

WhereRevokedReason applies the entql string predicate on the revoked_reason field.

func (*CredentialFilter) WhereScopes added in v0.2.0

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

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

func (*CredentialFilter) WhereSecretHash added in v0.2.0

func (f *CredentialFilter) WhereSecretHash(p entql.StringP)

WhereSecretHash applies the entql string predicate on the secret_hash field.

func (*CredentialFilter) WhereType added in v0.2.0

func (f *CredentialFilter) WhereType(p entql.StringP)

WhereType applies the entql string predicate on the type field.

func (*CredentialFilter) WhereUpdatedAt added in v0.2.0

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

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

func (*CredentialFilter) WhereWebauthnAaguid added in v0.2.0

func (f *CredentialFilter) WhereWebauthnAaguid(p entql.StringP)

WhereWebauthnAaguid applies the entql string predicate on the webauthn_aaguid field.

func (*CredentialFilter) WhereWebauthnCredentialID added in v0.2.0

func (f *CredentialFilter) WhereWebauthnCredentialID(p entql.BytesP)

WhereWebauthnCredentialID applies the entql []byte predicate on the webauthn_credential_id field.

func (*CredentialFilter) WhereWebauthnPublicKey added in v0.2.0

func (f *CredentialFilter) WhereWebauthnPublicKey(p entql.BytesP)

WhereWebauthnPublicKey applies the entql []byte predicate on the webauthn_public_key field.

func (*CredentialFilter) WhereWebauthnSignCount added in v0.2.0

func (f *CredentialFilter) WhereWebauthnSignCount(p entql.Uint32P)

WhereWebauthnSignCount applies the entql uint32 predicate on the webauthn_sign_count field.

type CredentialGroupBy added in v0.2.0

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

CredentialGroupBy is the group-by builder for Credential entities.

func (*CredentialGroupBy) Aggregate added in v0.2.0

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

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

func (*CredentialGroupBy) Bool added in v0.2.0

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

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

func (*CredentialGroupBy) BoolX added in v0.2.0

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

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

func (*CredentialGroupBy) Bools added in v0.2.0

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

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

func (*CredentialGroupBy) BoolsX added in v0.2.0

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

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

func (*CredentialGroupBy) Float64 added in v0.2.0

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

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

func (*CredentialGroupBy) Float64X added in v0.2.0

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

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

func (*CredentialGroupBy) Float64s added in v0.2.0

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

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

func (*CredentialGroupBy) Float64sX added in v0.2.0

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

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

func (*CredentialGroupBy) Int added in v0.2.0

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

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

func (*CredentialGroupBy) IntX added in v0.2.0

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

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

func (*CredentialGroupBy) Ints added in v0.2.0

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

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

func (*CredentialGroupBy) IntsX added in v0.2.0

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

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

func (*CredentialGroupBy) Scan added in v0.2.0

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

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

func (*CredentialGroupBy) ScanX added in v0.2.0

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

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

func (*CredentialGroupBy) String added in v0.2.0

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

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

func (*CredentialGroupBy) StringX added in v0.2.0

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

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

func (*CredentialGroupBy) Strings added in v0.2.0

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

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

func (*CredentialGroupBy) StringsX added in v0.2.0

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

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

type CredentialMutation added in v0.2.0

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

CredentialMutation represents an operation that mutates the Credential nodes in the graph.

func (*CredentialMutation) Active added in v0.2.0

func (m *CredentialMutation) Active() (r bool, exists bool)

Active returns the value of the "active" field in the mutation.

func (*CredentialMutation) AddField added in v0.2.0

func (m *CredentialMutation) 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 (*CredentialMutation) AddWebauthnSignCount added in v0.2.0

func (m *CredentialMutation) AddWebauthnSignCount(u int32)

AddWebauthnSignCount adds u to the "webauthn_sign_count" field.

func (*CredentialMutation) AddedEdges added in v0.2.0

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

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

func (*CredentialMutation) AddedField added in v0.2.0

func (m *CredentialMutation) 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 (*CredentialMutation) AddedFields added in v0.2.0

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

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

func (*CredentialMutation) AddedIDs added in v0.2.0

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

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

func (*CredentialMutation) AddedWebauthnSignCount added in v0.2.0

func (m *CredentialMutation) AddedWebauthnSignCount() (r int32, exists bool)

AddedWebauthnSignCount returns the value that was added to the "webauthn_sign_count" field in this mutation.

func (*CredentialMutation) AppendScopes added in v0.2.0

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

AppendScopes adds s to the "scopes" field.

func (*CredentialMutation) AppendedScopes added in v0.2.0

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

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

func (*CredentialMutation) ClearEdge added in v0.2.0

func (m *CredentialMutation) 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 (*CredentialMutation) ClearExpiresAt added in v0.2.0

func (m *CredentialMutation) ClearExpiresAt()

ClearExpiresAt clears the value of the "expires_at" field.

func (*CredentialMutation) ClearField added in v0.2.0

func (m *CredentialMutation) 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 (*CredentialMutation) ClearIdentifier added in v0.2.0

func (m *CredentialMutation) ClearIdentifier()

ClearIdentifier clears the value of the "identifier" field.

func (*CredentialMutation) ClearKeyAlgorithm added in v0.2.0

func (m *CredentialMutation) ClearKeyAlgorithm()

ClearKeyAlgorithm clears the value of the "key_algorithm" field.

func (*CredentialMutation) ClearKeyID added in v0.2.0

func (m *CredentialMutation) ClearKeyID()

ClearKeyID clears the value of the "key_id" field.

func (*CredentialMutation) ClearLastUsedAt added in v0.2.0

func (m *CredentialMutation) ClearLastUsedAt()

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*CredentialMutation) ClearLastUsedIP added in v0.2.0

func (m *CredentialMutation) ClearLastUsedIP()

ClearLastUsedIP clears the value of the "last_used_ip" field.

func (*CredentialMutation) ClearMetadata added in v0.2.0

func (m *CredentialMutation) ClearMetadata()

ClearMetadata clears the value of the "metadata" field.

func (*CredentialMutation) ClearName added in v0.2.0

func (m *CredentialMutation) ClearName()

ClearName clears the value of the "name" field.

func (*CredentialMutation) ClearPrincipal added in v0.2.0

func (m *CredentialMutation) ClearPrincipal()

ClearPrincipal clears the "principal" edge to the Principal entity.

func (*CredentialMutation) ClearPublicKey added in v0.2.0

func (m *CredentialMutation) ClearPublicKey()

ClearPublicKey clears the value of the "public_key" field.

func (*CredentialMutation) ClearRevokedAt added in v0.2.0

func (m *CredentialMutation) ClearRevokedAt()

ClearRevokedAt clears the value of the "revoked_at" field.

func (*CredentialMutation) ClearRevokedReason added in v0.2.0

func (m *CredentialMutation) ClearRevokedReason()

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*CredentialMutation) ClearSecretHash added in v0.2.0

func (m *CredentialMutation) ClearSecretHash()

ClearSecretHash clears the value of the "secret_hash" field.

func (*CredentialMutation) ClearWebauthnAaguid added in v0.2.0

func (m *CredentialMutation) ClearWebauthnAaguid()

ClearWebauthnAaguid clears the value of the "webauthn_aaguid" field.

func (*CredentialMutation) ClearWebauthnCredentialID added in v0.2.0

func (m *CredentialMutation) ClearWebauthnCredentialID()

ClearWebauthnCredentialID clears the value of the "webauthn_credential_id" field.

func (*CredentialMutation) ClearWebauthnPublicKey added in v0.2.0

func (m *CredentialMutation) ClearWebauthnPublicKey()

ClearWebauthnPublicKey clears the value of the "webauthn_public_key" field.

func (*CredentialMutation) ClearWebauthnSignCount added in v0.2.0

func (m *CredentialMutation) ClearWebauthnSignCount()

ClearWebauthnSignCount clears the value of the "webauthn_sign_count" field.

func (*CredentialMutation) ClearedEdges added in v0.2.0

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

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

func (*CredentialMutation) ClearedFields added in v0.2.0

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

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

func (CredentialMutation) Client added in v0.2.0

func (m CredentialMutation) 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 (*CredentialMutation) CreatedAt added in v0.2.0

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

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

func (*CredentialMutation) EdgeCleared added in v0.2.0

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

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

func (*CredentialMutation) ExpiresAt added in v0.2.0

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

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

func (*CredentialMutation) ExpiresAtCleared added in v0.2.0

func (m *CredentialMutation) ExpiresAtCleared() bool

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

func (*CredentialMutation) Field added in v0.2.0

func (m *CredentialMutation) 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 (*CredentialMutation) FieldCleared added in v0.2.0

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

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

func (*CredentialMutation) Fields added in v0.2.0

func (m *CredentialMutation) 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 (*CredentialMutation) Filter added in v0.2.0

func (m *CredentialMutation) Filter() *CredentialFilter

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

func (*CredentialMutation) GetType added in v0.2.0

func (m *CredentialMutation) GetType() (r credential.Type, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*CredentialMutation) ID added in v0.2.0

func (m *CredentialMutation) 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 (*CredentialMutation) IDs added in v0.2.0

func (m *CredentialMutation) 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 (*CredentialMutation) Identifier added in v0.2.0

func (m *CredentialMutation) Identifier() (r string, exists bool)

Identifier returns the value of the "identifier" field in the mutation.

func (*CredentialMutation) IdentifierCleared added in v0.2.0

func (m *CredentialMutation) IdentifierCleared() bool

IdentifierCleared returns if the "identifier" field was cleared in this mutation.

func (*CredentialMutation) KeyAlgorithm added in v0.2.0

func (m *CredentialMutation) KeyAlgorithm() (r string, exists bool)

KeyAlgorithm returns the value of the "key_algorithm" field in the mutation.

func (*CredentialMutation) KeyAlgorithmCleared added in v0.2.0

func (m *CredentialMutation) KeyAlgorithmCleared() bool

KeyAlgorithmCleared returns if the "key_algorithm" field was cleared in this mutation.

func (*CredentialMutation) KeyID added in v0.2.0

func (m *CredentialMutation) KeyID() (r string, exists bool)

KeyID returns the value of the "key_id" field in the mutation.

func (*CredentialMutation) KeyIDCleared added in v0.2.0

func (m *CredentialMutation) KeyIDCleared() bool

KeyIDCleared returns if the "key_id" field was cleared in this mutation.

func (*CredentialMutation) LastUsedAt added in v0.2.0

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

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

func (*CredentialMutation) LastUsedAtCleared added in v0.2.0

func (m *CredentialMutation) LastUsedAtCleared() bool

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

func (*CredentialMutation) LastUsedIP added in v0.2.0

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

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

func (*CredentialMutation) LastUsedIPCleared added in v0.2.0

func (m *CredentialMutation) LastUsedIPCleared() bool

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

func (*CredentialMutation) Metadata added in v0.2.0

func (m *CredentialMutation) Metadata() (r map[string]interface{}, exists bool)

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

func (*CredentialMutation) MetadataCleared added in v0.2.0

func (m *CredentialMutation) MetadataCleared() bool

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

func (*CredentialMutation) Name added in v0.2.0

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

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

func (*CredentialMutation) NameCleared added in v0.2.0

func (m *CredentialMutation) NameCleared() bool

NameCleared returns if the "name" field was cleared in this mutation.

func (*CredentialMutation) OldActive added in v0.2.0

func (m *CredentialMutation) OldActive(ctx context.Context) (v bool, err error)

OldActive returns the old "active" field's value of the Credential entity. If the Credential 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 (*CredentialMutation) OldCreatedAt added in v0.2.0

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

OldCreatedAt returns the old "created_at" field's value of the Credential entity. If the Credential 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 (*CredentialMutation) OldExpiresAt added in v0.2.0

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

OldExpiresAt returns the old "expires_at" field's value of the Credential entity. If the Credential 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 (*CredentialMutation) OldField added in v0.2.0

func (m *CredentialMutation) 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 (*CredentialMutation) OldIdentifier added in v0.2.0

func (m *CredentialMutation) OldIdentifier(ctx context.Context) (v string, err error)

OldIdentifier returns the old "identifier" field's value of the Credential entity. If the Credential 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 (*CredentialMutation) OldKeyAlgorithm added in v0.2.0

func (m *CredentialMutation) OldKeyAlgorithm(ctx context.Context) (v string, err error)

OldKeyAlgorithm returns the old "key_algorithm" field's value of the Credential entity. If the Credential 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 (*CredentialMutation) OldKeyID added in v0.2.0

func (m *CredentialMutation) OldKeyID(ctx context.Context) (v *string, err error)

OldKeyID returns the old "key_id" field's value of the Credential entity. If the Credential 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 (*CredentialMutation) OldLastUsedAt added in v0.2.0

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

OldLastUsedAt returns the old "last_used_at" field's value of the Credential entity. If the Credential 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 (*CredentialMutation) OldLastUsedIP added in v0.2.0

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

OldLastUsedIP returns the old "last_used_ip" field's value of the Credential entity. If the Credential 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 (*CredentialMutation) OldMetadata added in v0.2.0

func (m *CredentialMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)

OldMetadata returns the old "metadata" field's value of the Credential entity. If the Credential 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 (*CredentialMutation) OldName added in v0.2.0

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

OldName returns the old "name" field's value of the Credential entity. If the Credential 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 (*CredentialMutation) OldPrincipalID added in v0.2.0

func (m *CredentialMutation) OldPrincipalID(ctx context.Context) (v uuid.UUID, err error)

OldPrincipalID returns the old "principal_id" field's value of the Credential entity. If the Credential 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 (*CredentialMutation) OldPublicKey added in v0.2.0

func (m *CredentialMutation) OldPublicKey(ctx context.Context) (v string, err error)

OldPublicKey returns the old "public_key" field's value of the Credential entity. If the Credential 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 (*CredentialMutation) OldRevoked added in v0.2.0

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

OldRevoked returns the old "revoked" field's value of the Credential entity. If the Credential 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 (*CredentialMutation) OldRevokedAt added in v0.2.0

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

OldRevokedAt returns the old "revoked_at" field's value of the Credential entity. If the Credential 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 (*CredentialMutation) OldRevokedReason added in v0.2.0

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

OldRevokedReason returns the old "revoked_reason" field's value of the Credential entity. If the Credential 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 (*CredentialMutation) OldScopes added in v0.2.0

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

OldScopes returns the old "scopes" field's value of the Credential entity. If the Credential 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 (*CredentialMutation) OldSecretHash added in v0.2.0

func (m *CredentialMutation) OldSecretHash(ctx context.Context) (v string, err error)

OldSecretHash returns the old "secret_hash" field's value of the Credential entity. If the Credential 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 (*CredentialMutation) OldType added in v0.2.0

func (m *CredentialMutation) OldType(ctx context.Context) (v credential.Type, err error)

OldType returns the old "type" field's value of the Credential entity. If the Credential 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 (*CredentialMutation) OldUpdatedAt added in v0.2.0

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

OldUpdatedAt returns the old "updated_at" field's value of the Credential entity. If the Credential 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 (*CredentialMutation) OldWebauthnAaguid added in v0.2.0

func (m *CredentialMutation) OldWebauthnAaguid(ctx context.Context) (v string, err error)

OldWebauthnAaguid returns the old "webauthn_aaguid" field's value of the Credential entity. If the Credential 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 (*CredentialMutation) OldWebauthnCredentialID added in v0.2.0

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

OldWebauthnCredentialID returns the old "webauthn_credential_id" field's value of the Credential entity. If the Credential 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 (*CredentialMutation) OldWebauthnPublicKey added in v0.2.0

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

OldWebauthnPublicKey returns the old "webauthn_public_key" field's value of the Credential entity. If the Credential 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 (*CredentialMutation) OldWebauthnSignCount added in v0.2.0

func (m *CredentialMutation) OldWebauthnSignCount(ctx context.Context) (v uint32, err error)

OldWebauthnSignCount returns the old "webauthn_sign_count" field's value of the Credential entity. If the Credential 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 (*CredentialMutation) Op added in v0.2.0

func (m *CredentialMutation) Op() Op

Op returns the operation name.

func (*CredentialMutation) PrincipalCleared added in v0.2.0

func (m *CredentialMutation) PrincipalCleared() bool

PrincipalCleared reports if the "principal" edge to the Principal entity was cleared.

func (*CredentialMutation) PrincipalID added in v0.2.0

func (m *CredentialMutation) PrincipalID() (r uuid.UUID, exists bool)

PrincipalID returns the value of the "principal_id" field in the mutation.

func (*CredentialMutation) PrincipalIDs added in v0.2.0

func (m *CredentialMutation) PrincipalIDs() (ids []uuid.UUID)

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

func (*CredentialMutation) PublicKey added in v0.2.0

func (m *CredentialMutation) PublicKey() (r string, exists bool)

PublicKey returns the value of the "public_key" field in the mutation.

func (*CredentialMutation) PublicKeyCleared added in v0.2.0

func (m *CredentialMutation) PublicKeyCleared() bool

PublicKeyCleared returns if the "public_key" field was cleared in this mutation.

func (*CredentialMutation) RemovedEdges added in v0.2.0

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

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

func (*CredentialMutation) RemovedIDs added in v0.2.0

func (m *CredentialMutation) 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 (*CredentialMutation) ResetActive added in v0.2.0

func (m *CredentialMutation) ResetActive()

ResetActive resets all changes to the "active" field.

func (*CredentialMutation) ResetCreatedAt added in v0.2.0

func (m *CredentialMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*CredentialMutation) ResetEdge added in v0.2.0

func (m *CredentialMutation) 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 (*CredentialMutation) ResetExpiresAt added in v0.2.0

func (m *CredentialMutation) ResetExpiresAt()

ResetExpiresAt resets all changes to the "expires_at" field.

func (*CredentialMutation) ResetField added in v0.2.0

func (m *CredentialMutation) 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 (*CredentialMutation) ResetIdentifier added in v0.2.0

func (m *CredentialMutation) ResetIdentifier()

ResetIdentifier resets all changes to the "identifier" field.

func (*CredentialMutation) ResetKeyAlgorithm added in v0.2.0

func (m *CredentialMutation) ResetKeyAlgorithm()

ResetKeyAlgorithm resets all changes to the "key_algorithm" field.

func (*CredentialMutation) ResetKeyID added in v0.2.0

func (m *CredentialMutation) ResetKeyID()

ResetKeyID resets all changes to the "key_id" field.

func (*CredentialMutation) ResetLastUsedAt added in v0.2.0

func (m *CredentialMutation) ResetLastUsedAt()

ResetLastUsedAt resets all changes to the "last_used_at" field.

func (*CredentialMutation) ResetLastUsedIP added in v0.2.0

func (m *CredentialMutation) ResetLastUsedIP()

ResetLastUsedIP resets all changes to the "last_used_ip" field.

func (*CredentialMutation) ResetMetadata added in v0.2.0

func (m *CredentialMutation) ResetMetadata()

ResetMetadata resets all changes to the "metadata" field.

func (*CredentialMutation) ResetName added in v0.2.0

func (m *CredentialMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*CredentialMutation) ResetPrincipal added in v0.2.0

func (m *CredentialMutation) ResetPrincipal()

ResetPrincipal resets all changes to the "principal" edge.

func (*CredentialMutation) ResetPrincipalID added in v0.2.0

func (m *CredentialMutation) ResetPrincipalID()

ResetPrincipalID resets all changes to the "principal_id" field.

func (*CredentialMutation) ResetPublicKey added in v0.2.0

func (m *CredentialMutation) ResetPublicKey()

ResetPublicKey resets all changes to the "public_key" field.

func (*CredentialMutation) ResetRevoked added in v0.2.0

func (m *CredentialMutation) ResetRevoked()

ResetRevoked resets all changes to the "revoked" field.

func (*CredentialMutation) ResetRevokedAt added in v0.2.0

func (m *CredentialMutation) ResetRevokedAt()

ResetRevokedAt resets all changes to the "revoked_at" field.

func (*CredentialMutation) ResetRevokedReason added in v0.2.0

func (m *CredentialMutation) ResetRevokedReason()

ResetRevokedReason resets all changes to the "revoked_reason" field.

func (*CredentialMutation) ResetScopes added in v0.2.0

func (m *CredentialMutation) ResetScopes()

ResetScopes resets all changes to the "scopes" field.

func (*CredentialMutation) ResetSecretHash added in v0.2.0

func (m *CredentialMutation) ResetSecretHash()

ResetSecretHash resets all changes to the "secret_hash" field.

func (*CredentialMutation) ResetType added in v0.2.0

func (m *CredentialMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*CredentialMutation) ResetUpdatedAt added in v0.2.0

func (m *CredentialMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*CredentialMutation) ResetWebauthnAaguid added in v0.2.0

func (m *CredentialMutation) ResetWebauthnAaguid()

ResetWebauthnAaguid resets all changes to the "webauthn_aaguid" field.

func (*CredentialMutation) ResetWebauthnCredentialID added in v0.2.0

func (m *CredentialMutation) ResetWebauthnCredentialID()

ResetWebauthnCredentialID resets all changes to the "webauthn_credential_id" field.

func (*CredentialMutation) ResetWebauthnPublicKey added in v0.2.0

func (m *CredentialMutation) ResetWebauthnPublicKey()

ResetWebauthnPublicKey resets all changes to the "webauthn_public_key" field.

func (*CredentialMutation) ResetWebauthnSignCount added in v0.2.0

func (m *CredentialMutation) ResetWebauthnSignCount()

ResetWebauthnSignCount resets all changes to the "webauthn_sign_count" field.

func (*CredentialMutation) Revoked added in v0.2.0

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

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

func (*CredentialMutation) RevokedAt added in v0.2.0

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

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

func (*CredentialMutation) RevokedAtCleared added in v0.2.0

func (m *CredentialMutation) RevokedAtCleared() bool

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

func (*CredentialMutation) RevokedReason added in v0.2.0

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

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

func (*CredentialMutation) RevokedReasonCleared added in v0.2.0

func (m *CredentialMutation) RevokedReasonCleared() bool

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

func (*CredentialMutation) Scopes added in v0.2.0

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

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

func (*CredentialMutation) SecretHash added in v0.2.0

func (m *CredentialMutation) SecretHash() (r string, exists bool)

SecretHash returns the value of the "secret_hash" field in the mutation.

func (*CredentialMutation) SecretHashCleared added in v0.2.0

func (m *CredentialMutation) SecretHashCleared() bool

SecretHashCleared returns if the "secret_hash" field was cleared in this mutation.

func (*CredentialMutation) SetActive added in v0.2.0

func (m *CredentialMutation) SetActive(b bool)

SetActive sets the "active" field.

func (*CredentialMutation) SetCreatedAt added in v0.2.0

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

SetCreatedAt sets the "created_at" field.

func (*CredentialMutation) SetExpiresAt added in v0.2.0

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

SetExpiresAt sets the "expires_at" field.

func (*CredentialMutation) SetField added in v0.2.0

func (m *CredentialMutation) 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 (*CredentialMutation) SetID added in v0.2.0

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

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

func (*CredentialMutation) SetIdentifier added in v0.2.0

func (m *CredentialMutation) SetIdentifier(s string)

SetIdentifier sets the "identifier" field.

func (*CredentialMutation) SetKeyAlgorithm added in v0.2.0

func (m *CredentialMutation) SetKeyAlgorithm(s string)

SetKeyAlgorithm sets the "key_algorithm" field.

func (*CredentialMutation) SetKeyID added in v0.2.0

func (m *CredentialMutation) SetKeyID(s string)

SetKeyID sets the "key_id" field.

func (*CredentialMutation) SetLastUsedAt added in v0.2.0

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

SetLastUsedAt sets the "last_used_at" field.

func (*CredentialMutation) SetLastUsedIP added in v0.2.0

func (m *CredentialMutation) SetLastUsedIP(s string)

SetLastUsedIP sets the "last_used_ip" field.

func (*CredentialMutation) SetMetadata added in v0.2.0

func (m *CredentialMutation) SetMetadata(value map[string]interface{})

SetMetadata sets the "metadata" field.

func (*CredentialMutation) SetName added in v0.2.0

func (m *CredentialMutation) SetName(s string)

SetName sets the "name" field.

func (*CredentialMutation) SetOp added in v0.2.0

func (m *CredentialMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CredentialMutation) SetPrincipalID added in v0.2.0

func (m *CredentialMutation) SetPrincipalID(u uuid.UUID)

SetPrincipalID sets the "principal_id" field.

func (*CredentialMutation) SetPublicKey added in v0.2.0

func (m *CredentialMutation) SetPublicKey(s string)

SetPublicKey sets the "public_key" field.

func (*CredentialMutation) SetRevoked added in v0.2.0

func (m *CredentialMutation) SetRevoked(b bool)

SetRevoked sets the "revoked" field.

func (*CredentialMutation) SetRevokedAt added in v0.2.0

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

SetRevokedAt sets the "revoked_at" field.

func (*CredentialMutation) SetRevokedReason added in v0.2.0

func (m *CredentialMutation) SetRevokedReason(s string)

SetRevokedReason sets the "revoked_reason" field.

func (*CredentialMutation) SetScopes added in v0.2.0

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

SetScopes sets the "scopes" field.

func (*CredentialMutation) SetSecretHash added in v0.2.0

func (m *CredentialMutation) SetSecretHash(s string)

SetSecretHash sets the "secret_hash" field.

func (*CredentialMutation) SetType added in v0.2.0

func (m *CredentialMutation) SetType(c credential.Type)

SetType sets the "type" field.

func (*CredentialMutation) SetUpdatedAt added in v0.2.0

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

SetUpdatedAt sets the "updated_at" field.

func (*CredentialMutation) SetWebauthnAaguid added in v0.2.0

func (m *CredentialMutation) SetWebauthnAaguid(s string)

SetWebauthnAaguid sets the "webauthn_aaguid" field.

func (*CredentialMutation) SetWebauthnCredentialID added in v0.2.0

func (m *CredentialMutation) SetWebauthnCredentialID(b []byte)

SetWebauthnCredentialID sets the "webauthn_credential_id" field.

func (*CredentialMutation) SetWebauthnPublicKey added in v0.2.0

func (m *CredentialMutation) SetWebauthnPublicKey(b []byte)

SetWebauthnPublicKey sets the "webauthn_public_key" field.

func (*CredentialMutation) SetWebauthnSignCount added in v0.2.0

func (m *CredentialMutation) SetWebauthnSignCount(u uint32)

SetWebauthnSignCount sets the "webauthn_sign_count" field.

func (CredentialMutation) Tx added in v0.2.0

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

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

func (*CredentialMutation) Type added in v0.2.0

func (m *CredentialMutation) Type() string

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

func (*CredentialMutation) UpdatedAt added in v0.2.0

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

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

func (*CredentialMutation) WebauthnAaguid added in v0.2.0

func (m *CredentialMutation) WebauthnAaguid() (r string, exists bool)

WebauthnAaguid returns the value of the "webauthn_aaguid" field in the mutation.

func (*CredentialMutation) WebauthnAaguidCleared added in v0.2.0

func (m *CredentialMutation) WebauthnAaguidCleared() bool

WebauthnAaguidCleared returns if the "webauthn_aaguid" field was cleared in this mutation.

func (*CredentialMutation) WebauthnCredentialID added in v0.2.0

func (m *CredentialMutation) WebauthnCredentialID() (r []byte, exists bool)

WebauthnCredentialID returns the value of the "webauthn_credential_id" field in the mutation.

func (*CredentialMutation) WebauthnCredentialIDCleared added in v0.2.0

func (m *CredentialMutation) WebauthnCredentialIDCleared() bool

WebauthnCredentialIDCleared returns if the "webauthn_credential_id" field was cleared in this mutation.

func (*CredentialMutation) WebauthnPublicKey added in v0.2.0

func (m *CredentialMutation) WebauthnPublicKey() (r []byte, exists bool)

WebauthnPublicKey returns the value of the "webauthn_public_key" field in the mutation.

func (*CredentialMutation) WebauthnPublicKeyCleared added in v0.2.0

func (m *CredentialMutation) WebauthnPublicKeyCleared() bool

WebauthnPublicKeyCleared returns if the "webauthn_public_key" field was cleared in this mutation.

func (*CredentialMutation) WebauthnSignCount added in v0.2.0

func (m *CredentialMutation) WebauthnSignCount() (r uint32, exists bool)

WebauthnSignCount returns the value of the "webauthn_sign_count" field in the mutation.

func (*CredentialMutation) WebauthnSignCountCleared added in v0.2.0

func (m *CredentialMutation) WebauthnSignCountCleared() bool

WebauthnSignCountCleared returns if the "webauthn_sign_count" field was cleared in this mutation.

func (*CredentialMutation) Where added in v0.2.0

func (m *CredentialMutation) Where(ps ...predicate.Credential)

Where appends a list predicates to the CredentialMutation builder.

func (*CredentialMutation) WhereP added in v0.2.0

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

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

type CredentialQuery added in v0.2.0

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

CredentialQuery is the builder for querying Credential entities.

func (*CredentialQuery) Aggregate added in v0.2.0

func (_q *CredentialQuery) Aggregate(fns ...AggregateFunc) *CredentialSelect

Aggregate returns a CredentialSelect configured with the given aggregations.

func (*CredentialQuery) All added in v0.2.0

func (_q *CredentialQuery) All(ctx context.Context) ([]*Credential, error)

All executes the query and returns a list of Credentials.

func (*CredentialQuery) AllX added in v0.2.0

func (_q *CredentialQuery) AllX(ctx context.Context) []*Credential

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

func (*CredentialQuery) Clone added in v0.2.0

func (_q *CredentialQuery) Clone() *CredentialQuery

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

func (*CredentialQuery) Count added in v0.2.0

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

Count returns the count of the given query.

func (*CredentialQuery) CountX added in v0.2.0

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

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

func (*CredentialQuery) Exist added in v0.2.0

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

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

func (*CredentialQuery) ExistX added in v0.2.0

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

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

func (*CredentialQuery) Filter added in v0.2.0

func (_q *CredentialQuery) Filter() *CredentialFilter

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

func (*CredentialQuery) First added in v0.2.0

func (_q *CredentialQuery) First(ctx context.Context) (*Credential, error)

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

func (*CredentialQuery) FirstID added in v0.2.0

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

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

func (*CredentialQuery) FirstIDX added in v0.2.0

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

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

func (*CredentialQuery) FirstX added in v0.2.0

func (_q *CredentialQuery) FirstX(ctx context.Context) *Credential

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

func (*CredentialQuery) GroupBy added in v0.2.0

func (_q *CredentialQuery) GroupBy(field string, fields ...string) *CredentialGroupBy

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 {
	PrincipalID uuid.UUID `json:"principal_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Credential.Query().
	GroupBy(credential.FieldPrincipalID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CredentialQuery) IDs added in v0.2.0

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

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

func (*CredentialQuery) IDsX added in v0.2.0

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

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

func (*CredentialQuery) Limit added in v0.2.0

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

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

func (*CredentialQuery) Offset added in v0.2.0

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

Offset to start from.

func (*CredentialQuery) Only added in v0.2.0

func (_q *CredentialQuery) Only(ctx context.Context) (*Credential, error)

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

func (*CredentialQuery) OnlyID added in v0.2.0

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

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

func (*CredentialQuery) OnlyIDX added in v0.2.0

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

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

func (*CredentialQuery) OnlyX added in v0.2.0

func (_q *CredentialQuery) OnlyX(ctx context.Context) *Credential

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

func (*CredentialQuery) Order added in v0.2.0

Order specifies how the records should be ordered.

func (*CredentialQuery) QueryPrincipal added in v0.2.0

func (_q *CredentialQuery) QueryPrincipal() *PrincipalQuery

QueryPrincipal chains the current query on the "principal" edge.

func (*CredentialQuery) Select added in v0.2.0

func (_q *CredentialQuery) Select(fields ...string) *CredentialSelect

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 {
	PrincipalID uuid.UUID `json:"principal_id,omitempty"`
}

client.Credential.Query().
	Select(credential.FieldPrincipalID).
	Scan(ctx, &v)

func (*CredentialQuery) Unique added in v0.2.0

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

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 (*CredentialQuery) Where added in v0.2.0

Where adds a new predicate for the CredentialQuery builder.

func (*CredentialQuery) WithPrincipal added in v0.2.0

func (_q *CredentialQuery) WithPrincipal(opts ...func(*PrincipalQuery)) *CredentialQuery

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

type CredentialSelect added in v0.2.0

type CredentialSelect struct {
	*CredentialQuery
	// contains filtered or unexported fields
}

CredentialSelect is the builder for selecting fields of Credential entities.

func (*CredentialSelect) Aggregate added in v0.2.0

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

Aggregate adds the given aggregation functions to the selector query.

func (*CredentialSelect) Bool added in v0.2.0

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

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

func (*CredentialSelect) BoolX added in v0.2.0

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

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

func (*CredentialSelect) Bools added in v0.2.0

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

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

func (*CredentialSelect) BoolsX added in v0.2.0

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

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

func (*CredentialSelect) Float64 added in v0.2.0

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

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

func (*CredentialSelect) Float64X added in v0.2.0

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

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

func (*CredentialSelect) Float64s added in v0.2.0

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

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

func (*CredentialSelect) Float64sX added in v0.2.0

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

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

func (*CredentialSelect) Int added in v0.2.0

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

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

func (*CredentialSelect) IntX added in v0.2.0

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

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

func (*CredentialSelect) Ints added in v0.2.0

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

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

func (*CredentialSelect) IntsX added in v0.2.0

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

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

func (*CredentialSelect) Scan added in v0.2.0

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

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

func (*CredentialSelect) ScanX added in v0.2.0

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

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

func (*CredentialSelect) String added in v0.2.0

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

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

func (*CredentialSelect) StringX added in v0.2.0

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

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

func (*CredentialSelect) Strings added in v0.2.0

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

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

func (*CredentialSelect) StringsX added in v0.2.0

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

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

type CredentialUpdate added in v0.2.0

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

CredentialUpdate is the builder for updating Credential entities.

func (*CredentialUpdate) AddWebauthnSignCount added in v0.2.0

func (_u *CredentialUpdate) AddWebauthnSignCount(v int32) *CredentialUpdate

AddWebauthnSignCount adds value to the "webauthn_sign_count" field.

func (*CredentialUpdate) AppendScopes added in v0.2.0

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

AppendScopes appends value to the "scopes" field.

func (*CredentialUpdate) ClearExpiresAt added in v0.2.0

func (_u *CredentialUpdate) ClearExpiresAt() *CredentialUpdate

ClearExpiresAt clears the value of the "expires_at" field.

func (*CredentialUpdate) ClearIdentifier added in v0.2.0

func (_u *CredentialUpdate) ClearIdentifier() *CredentialUpdate

ClearIdentifier clears the value of the "identifier" field.

func (*CredentialUpdate) ClearKeyAlgorithm added in v0.2.0

func (_u *CredentialUpdate) ClearKeyAlgorithm() *CredentialUpdate

ClearKeyAlgorithm clears the value of the "key_algorithm" field.

func (*CredentialUpdate) ClearKeyID added in v0.2.0

func (_u *CredentialUpdate) ClearKeyID() *CredentialUpdate

ClearKeyID clears the value of the "key_id" field.

func (*CredentialUpdate) ClearLastUsedAt added in v0.2.0

func (_u *CredentialUpdate) ClearLastUsedAt() *CredentialUpdate

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*CredentialUpdate) ClearLastUsedIP added in v0.2.0

func (_u *CredentialUpdate) ClearLastUsedIP() *CredentialUpdate

ClearLastUsedIP clears the value of the "last_used_ip" field.

func (*CredentialUpdate) ClearMetadata added in v0.2.0

func (_u *CredentialUpdate) ClearMetadata() *CredentialUpdate

ClearMetadata clears the value of the "metadata" field.

func (*CredentialUpdate) ClearName added in v0.2.0

func (_u *CredentialUpdate) ClearName() *CredentialUpdate

ClearName clears the value of the "name" field.

func (*CredentialUpdate) ClearPrincipal added in v0.2.0

func (_u *CredentialUpdate) ClearPrincipal() *CredentialUpdate

ClearPrincipal clears the "principal" edge to the Principal entity.

func (*CredentialUpdate) ClearPublicKey added in v0.2.0

func (_u *CredentialUpdate) ClearPublicKey() *CredentialUpdate

ClearPublicKey clears the value of the "public_key" field.

func (*CredentialUpdate) ClearRevokedAt added in v0.2.0

func (_u *CredentialUpdate) ClearRevokedAt() *CredentialUpdate

ClearRevokedAt clears the value of the "revoked_at" field.

func (*CredentialUpdate) ClearRevokedReason added in v0.2.0

func (_u *CredentialUpdate) ClearRevokedReason() *CredentialUpdate

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*CredentialUpdate) ClearSecretHash added in v0.2.0

func (_u *CredentialUpdate) ClearSecretHash() *CredentialUpdate

ClearSecretHash clears the value of the "secret_hash" field.

func (*CredentialUpdate) ClearWebauthnAaguid added in v0.2.0

func (_u *CredentialUpdate) ClearWebauthnAaguid() *CredentialUpdate

ClearWebauthnAaguid clears the value of the "webauthn_aaguid" field.

func (*CredentialUpdate) ClearWebauthnCredentialID added in v0.2.0

func (_u *CredentialUpdate) ClearWebauthnCredentialID() *CredentialUpdate

ClearWebauthnCredentialID clears the value of the "webauthn_credential_id" field.

func (*CredentialUpdate) ClearWebauthnPublicKey added in v0.2.0

func (_u *CredentialUpdate) ClearWebauthnPublicKey() *CredentialUpdate

ClearWebauthnPublicKey clears the value of the "webauthn_public_key" field.

func (*CredentialUpdate) ClearWebauthnSignCount added in v0.2.0

func (_u *CredentialUpdate) ClearWebauthnSignCount() *CredentialUpdate

ClearWebauthnSignCount clears the value of the "webauthn_sign_count" field.

func (*CredentialUpdate) Exec added in v0.2.0

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

Exec executes the query.

func (*CredentialUpdate) ExecX added in v0.2.0

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

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

func (*CredentialUpdate) Mutation added in v0.2.0

func (_u *CredentialUpdate) Mutation() *CredentialMutation

Mutation returns the CredentialMutation object of the builder.

func (*CredentialUpdate) Save added in v0.2.0

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

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

func (*CredentialUpdate) SaveX added in v0.2.0

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

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

func (*CredentialUpdate) SetActive added in v0.2.0

func (_u *CredentialUpdate) SetActive(v bool) *CredentialUpdate

SetActive sets the "active" field.

func (*CredentialUpdate) SetExpiresAt added in v0.2.0

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

SetExpiresAt sets the "expires_at" field.

func (*CredentialUpdate) SetIdentifier added in v0.2.0

func (_u *CredentialUpdate) SetIdentifier(v string) *CredentialUpdate

SetIdentifier sets the "identifier" field.

func (*CredentialUpdate) SetKeyAlgorithm added in v0.2.0

func (_u *CredentialUpdate) SetKeyAlgorithm(v string) *CredentialUpdate

SetKeyAlgorithm sets the "key_algorithm" field.

func (*CredentialUpdate) SetKeyID added in v0.2.0

func (_u *CredentialUpdate) SetKeyID(v string) *CredentialUpdate

SetKeyID sets the "key_id" field.

func (*CredentialUpdate) SetLastUsedAt added in v0.2.0

func (_u *CredentialUpdate) SetLastUsedAt(v time.Time) *CredentialUpdate

SetLastUsedAt sets the "last_used_at" field.

func (*CredentialUpdate) SetLastUsedIP added in v0.2.0

func (_u *CredentialUpdate) SetLastUsedIP(v string) *CredentialUpdate

SetLastUsedIP sets the "last_used_ip" field.

func (*CredentialUpdate) SetMetadata added in v0.2.0

func (_u *CredentialUpdate) SetMetadata(v map[string]interface{}) *CredentialUpdate

SetMetadata sets the "metadata" field.

func (*CredentialUpdate) SetName added in v0.2.0

func (_u *CredentialUpdate) SetName(v string) *CredentialUpdate

SetName sets the "name" field.

func (*CredentialUpdate) SetNillableActive added in v0.2.0

func (_u *CredentialUpdate) SetNillableActive(v *bool) *CredentialUpdate

SetNillableActive sets the "active" field if the given value is not nil.

func (*CredentialUpdate) SetNillableExpiresAt added in v0.2.0

func (_u *CredentialUpdate) SetNillableExpiresAt(v *time.Time) *CredentialUpdate

SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.

func (*CredentialUpdate) SetNillableIdentifier added in v0.2.0

func (_u *CredentialUpdate) SetNillableIdentifier(v *string) *CredentialUpdate

SetNillableIdentifier sets the "identifier" field if the given value is not nil.

func (*CredentialUpdate) SetNillableKeyAlgorithm added in v0.2.0

func (_u *CredentialUpdate) SetNillableKeyAlgorithm(v *string) *CredentialUpdate

SetNillableKeyAlgorithm sets the "key_algorithm" field if the given value is not nil.

func (*CredentialUpdate) SetNillableKeyID added in v0.2.0

func (_u *CredentialUpdate) SetNillableKeyID(v *string) *CredentialUpdate

SetNillableKeyID sets the "key_id" field if the given value is not nil.

func (*CredentialUpdate) SetNillableLastUsedAt added in v0.2.0

func (_u *CredentialUpdate) SetNillableLastUsedAt(v *time.Time) *CredentialUpdate

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*CredentialUpdate) SetNillableLastUsedIP added in v0.2.0

func (_u *CredentialUpdate) SetNillableLastUsedIP(v *string) *CredentialUpdate

SetNillableLastUsedIP sets the "last_used_ip" field if the given value is not nil.

func (*CredentialUpdate) SetNillableName added in v0.2.0

func (_u *CredentialUpdate) SetNillableName(v *string) *CredentialUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*CredentialUpdate) SetNillablePrincipalID added in v0.2.0

func (_u *CredentialUpdate) SetNillablePrincipalID(v *uuid.UUID) *CredentialUpdate

SetNillablePrincipalID sets the "principal_id" field if the given value is not nil.

func (*CredentialUpdate) SetNillablePublicKey added in v0.2.0

func (_u *CredentialUpdate) SetNillablePublicKey(v *string) *CredentialUpdate

SetNillablePublicKey sets the "public_key" field if the given value is not nil.

func (*CredentialUpdate) SetNillableRevoked added in v0.2.0

func (_u *CredentialUpdate) SetNillableRevoked(v *bool) *CredentialUpdate

SetNillableRevoked sets the "revoked" field if the given value is not nil.

func (*CredentialUpdate) SetNillableRevokedAt added in v0.2.0

func (_u *CredentialUpdate) SetNillableRevokedAt(v *time.Time) *CredentialUpdate

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*CredentialUpdate) SetNillableRevokedReason added in v0.2.0

func (_u *CredentialUpdate) SetNillableRevokedReason(v *string) *CredentialUpdate

SetNillableRevokedReason sets the "revoked_reason" field if the given value is not nil.

func (*CredentialUpdate) SetNillableSecretHash added in v0.2.0

func (_u *CredentialUpdate) SetNillableSecretHash(v *string) *CredentialUpdate

SetNillableSecretHash sets the "secret_hash" field if the given value is not nil.

func (*CredentialUpdate) SetNillableType added in v0.2.0

func (_u *CredentialUpdate) SetNillableType(v *credential.Type) *CredentialUpdate

SetNillableType sets the "type" field if the given value is not nil.

func (*CredentialUpdate) SetNillableWebauthnAaguid added in v0.2.0

func (_u *CredentialUpdate) SetNillableWebauthnAaguid(v *string) *CredentialUpdate

SetNillableWebauthnAaguid sets the "webauthn_aaguid" field if the given value is not nil.

func (*CredentialUpdate) SetNillableWebauthnSignCount added in v0.2.0

func (_u *CredentialUpdate) SetNillableWebauthnSignCount(v *uint32) *CredentialUpdate

SetNillableWebauthnSignCount sets the "webauthn_sign_count" field if the given value is not nil.

func (*CredentialUpdate) SetPrincipal added in v0.2.0

func (_u *CredentialUpdate) SetPrincipal(v *Principal) *CredentialUpdate

SetPrincipal sets the "principal" edge to the Principal entity.

func (*CredentialUpdate) SetPrincipalID added in v0.2.0

func (_u *CredentialUpdate) SetPrincipalID(v uuid.UUID) *CredentialUpdate

SetPrincipalID sets the "principal_id" field.

func (*CredentialUpdate) SetPublicKey added in v0.2.0

func (_u *CredentialUpdate) SetPublicKey(v string) *CredentialUpdate

SetPublicKey sets the "public_key" field.

func (*CredentialUpdate) SetRevoked added in v0.2.0

func (_u *CredentialUpdate) SetRevoked(v bool) *CredentialUpdate

SetRevoked sets the "revoked" field.

func (*CredentialUpdate) SetRevokedAt added in v0.2.0

func (_u *CredentialUpdate) SetRevokedAt(v time.Time) *CredentialUpdate

SetRevokedAt sets the "revoked_at" field.

func (*CredentialUpdate) SetRevokedReason added in v0.2.0

func (_u *CredentialUpdate) SetRevokedReason(v string) *CredentialUpdate

SetRevokedReason sets the "revoked_reason" field.

func (*CredentialUpdate) SetScopes added in v0.2.0

func (_u *CredentialUpdate) SetScopes(v []string) *CredentialUpdate

SetScopes sets the "scopes" field.

func (*CredentialUpdate) SetSecretHash added in v0.2.0

func (_u *CredentialUpdate) SetSecretHash(v string) *CredentialUpdate

SetSecretHash sets the "secret_hash" field.

func (*CredentialUpdate) SetType added in v0.2.0

SetType sets the "type" field.

func (*CredentialUpdate) SetUpdatedAt added in v0.2.0

func (_u *CredentialUpdate) SetUpdatedAt(v time.Time) *CredentialUpdate

SetUpdatedAt sets the "updated_at" field.

func (*CredentialUpdate) SetWebauthnAaguid added in v0.2.0

func (_u *CredentialUpdate) SetWebauthnAaguid(v string) *CredentialUpdate

SetWebauthnAaguid sets the "webauthn_aaguid" field.

func (*CredentialUpdate) SetWebauthnCredentialID added in v0.2.0

func (_u *CredentialUpdate) SetWebauthnCredentialID(v []byte) *CredentialUpdate

SetWebauthnCredentialID sets the "webauthn_credential_id" field.

func (*CredentialUpdate) SetWebauthnPublicKey added in v0.2.0

func (_u *CredentialUpdate) SetWebauthnPublicKey(v []byte) *CredentialUpdate

SetWebauthnPublicKey sets the "webauthn_public_key" field.

func (*CredentialUpdate) SetWebauthnSignCount added in v0.2.0

func (_u *CredentialUpdate) SetWebauthnSignCount(v uint32) *CredentialUpdate

SetWebauthnSignCount sets the "webauthn_sign_count" field.

func (*CredentialUpdate) Where added in v0.2.0

Where appends a list predicates to the CredentialUpdate builder.

type CredentialUpdateOne added in v0.2.0

type CredentialUpdateOne struct {
	// contains filtered or unexported fields
}

CredentialUpdateOne is the builder for updating a single Credential entity.

func (*CredentialUpdateOne) AddWebauthnSignCount added in v0.2.0

func (_u *CredentialUpdateOne) AddWebauthnSignCount(v int32) *CredentialUpdateOne

AddWebauthnSignCount adds value to the "webauthn_sign_count" field.

func (*CredentialUpdateOne) AppendScopes added in v0.2.0

func (_u *CredentialUpdateOne) AppendScopes(v []string) *CredentialUpdateOne

AppendScopes appends value to the "scopes" field.

func (*CredentialUpdateOne) ClearExpiresAt added in v0.2.0

func (_u *CredentialUpdateOne) ClearExpiresAt() *CredentialUpdateOne

ClearExpiresAt clears the value of the "expires_at" field.

func (*CredentialUpdateOne) ClearIdentifier added in v0.2.0

func (_u *CredentialUpdateOne) ClearIdentifier() *CredentialUpdateOne

ClearIdentifier clears the value of the "identifier" field.

func (*CredentialUpdateOne) ClearKeyAlgorithm added in v0.2.0

func (_u *CredentialUpdateOne) ClearKeyAlgorithm() *CredentialUpdateOne

ClearKeyAlgorithm clears the value of the "key_algorithm" field.

func (*CredentialUpdateOne) ClearKeyID added in v0.2.0

func (_u *CredentialUpdateOne) ClearKeyID() *CredentialUpdateOne

ClearKeyID clears the value of the "key_id" field.

func (*CredentialUpdateOne) ClearLastUsedAt added in v0.2.0

func (_u *CredentialUpdateOne) ClearLastUsedAt() *CredentialUpdateOne

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*CredentialUpdateOne) ClearLastUsedIP added in v0.2.0

func (_u *CredentialUpdateOne) ClearLastUsedIP() *CredentialUpdateOne

ClearLastUsedIP clears the value of the "last_used_ip" field.

func (*CredentialUpdateOne) ClearMetadata added in v0.2.0

func (_u *CredentialUpdateOne) ClearMetadata() *CredentialUpdateOne

ClearMetadata clears the value of the "metadata" field.

func (*CredentialUpdateOne) ClearName added in v0.2.0

func (_u *CredentialUpdateOne) ClearName() *CredentialUpdateOne

ClearName clears the value of the "name" field.

func (*CredentialUpdateOne) ClearPrincipal added in v0.2.0

func (_u *CredentialUpdateOne) ClearPrincipal() *CredentialUpdateOne

ClearPrincipal clears the "principal" edge to the Principal entity.

func (*CredentialUpdateOne) ClearPublicKey added in v0.2.0

func (_u *CredentialUpdateOne) ClearPublicKey() *CredentialUpdateOne

ClearPublicKey clears the value of the "public_key" field.

func (*CredentialUpdateOne) ClearRevokedAt added in v0.2.0

func (_u *CredentialUpdateOne) ClearRevokedAt() *CredentialUpdateOne

ClearRevokedAt clears the value of the "revoked_at" field.

func (*CredentialUpdateOne) ClearRevokedReason added in v0.2.0

func (_u *CredentialUpdateOne) ClearRevokedReason() *CredentialUpdateOne

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*CredentialUpdateOne) ClearSecretHash added in v0.2.0

func (_u *CredentialUpdateOne) ClearSecretHash() *CredentialUpdateOne

ClearSecretHash clears the value of the "secret_hash" field.

func (*CredentialUpdateOne) ClearWebauthnAaguid added in v0.2.0

func (_u *CredentialUpdateOne) ClearWebauthnAaguid() *CredentialUpdateOne

ClearWebauthnAaguid clears the value of the "webauthn_aaguid" field.

func (*CredentialUpdateOne) ClearWebauthnCredentialID added in v0.2.0

func (_u *CredentialUpdateOne) ClearWebauthnCredentialID() *CredentialUpdateOne

ClearWebauthnCredentialID clears the value of the "webauthn_credential_id" field.

func (*CredentialUpdateOne) ClearWebauthnPublicKey added in v0.2.0

func (_u *CredentialUpdateOne) ClearWebauthnPublicKey() *CredentialUpdateOne

ClearWebauthnPublicKey clears the value of the "webauthn_public_key" field.

func (*CredentialUpdateOne) ClearWebauthnSignCount added in v0.2.0

func (_u *CredentialUpdateOne) ClearWebauthnSignCount() *CredentialUpdateOne

ClearWebauthnSignCount clears the value of the "webauthn_sign_count" field.

func (*CredentialUpdateOne) Exec added in v0.2.0

func (_u *CredentialUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CredentialUpdateOne) ExecX added in v0.2.0

func (_u *CredentialUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CredentialUpdateOne) Mutation added in v0.2.0

func (_u *CredentialUpdateOne) Mutation() *CredentialMutation

Mutation returns the CredentialMutation object of the builder.

func (*CredentialUpdateOne) Save added in v0.2.0

Save executes the query and returns the updated Credential entity.

func (*CredentialUpdateOne) SaveX added in v0.2.0

SaveX is like Save, but panics if an error occurs.

func (*CredentialUpdateOne) Select added in v0.2.0

func (_u *CredentialUpdateOne) Select(field string, fields ...string) *CredentialUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*CredentialUpdateOne) SetActive added in v0.2.0

func (_u *CredentialUpdateOne) SetActive(v bool) *CredentialUpdateOne

SetActive sets the "active" field.

func (*CredentialUpdateOne) SetExpiresAt added in v0.2.0

func (_u *CredentialUpdateOne) SetExpiresAt(v time.Time) *CredentialUpdateOne

SetExpiresAt sets the "expires_at" field.

func (*CredentialUpdateOne) SetIdentifier added in v0.2.0

func (_u *CredentialUpdateOne) SetIdentifier(v string) *CredentialUpdateOne

SetIdentifier sets the "identifier" field.

func (*CredentialUpdateOne) SetKeyAlgorithm added in v0.2.0

func (_u *CredentialUpdateOne) SetKeyAlgorithm(v string) *CredentialUpdateOne

SetKeyAlgorithm sets the "key_algorithm" field.

func (*CredentialUpdateOne) SetKeyID added in v0.2.0

SetKeyID sets the "key_id" field.

func (*CredentialUpdateOne) SetLastUsedAt added in v0.2.0

func (_u *CredentialUpdateOne) SetLastUsedAt(v time.Time) *CredentialUpdateOne

SetLastUsedAt sets the "last_used_at" field.

func (*CredentialUpdateOne) SetLastUsedIP added in v0.2.0

func (_u *CredentialUpdateOne) SetLastUsedIP(v string) *CredentialUpdateOne

SetLastUsedIP sets the "last_used_ip" field.

func (*CredentialUpdateOne) SetMetadata added in v0.2.0

func (_u *CredentialUpdateOne) SetMetadata(v map[string]interface{}) *CredentialUpdateOne

SetMetadata sets the "metadata" field.

func (*CredentialUpdateOne) SetName added in v0.2.0

SetName sets the "name" field.

func (*CredentialUpdateOne) SetNillableActive added in v0.2.0

func (_u *CredentialUpdateOne) SetNillableActive(v *bool) *CredentialUpdateOne

SetNillableActive sets the "active" field if the given value is not nil.

func (*CredentialUpdateOne) SetNillableExpiresAt added in v0.2.0

func (_u *CredentialUpdateOne) SetNillableExpiresAt(v *time.Time) *CredentialUpdateOne

SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.

func (*CredentialUpdateOne) SetNillableIdentifier added in v0.2.0

func (_u *CredentialUpdateOne) SetNillableIdentifier(v *string) *CredentialUpdateOne

SetNillableIdentifier sets the "identifier" field if the given value is not nil.

func (*CredentialUpdateOne) SetNillableKeyAlgorithm added in v0.2.0

func (_u *CredentialUpdateOne) SetNillableKeyAlgorithm(v *string) *CredentialUpdateOne

SetNillableKeyAlgorithm sets the "key_algorithm" field if the given value is not nil.

func (*CredentialUpdateOne) SetNillableKeyID added in v0.2.0

func (_u *CredentialUpdateOne) SetNillableKeyID(v *string) *CredentialUpdateOne

SetNillableKeyID sets the "key_id" field if the given value is not nil.

func (*CredentialUpdateOne) SetNillableLastUsedAt added in v0.2.0

func (_u *CredentialUpdateOne) SetNillableLastUsedAt(v *time.Time) *CredentialUpdateOne

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*CredentialUpdateOne) SetNillableLastUsedIP added in v0.2.0

func (_u *CredentialUpdateOne) SetNillableLastUsedIP(v *string) *CredentialUpdateOne

SetNillableLastUsedIP sets the "last_used_ip" field if the given value is not nil.

func (*CredentialUpdateOne) SetNillableName added in v0.2.0

func (_u *CredentialUpdateOne) SetNillableName(v *string) *CredentialUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*CredentialUpdateOne) SetNillablePrincipalID added in v0.2.0

func (_u *CredentialUpdateOne) SetNillablePrincipalID(v *uuid.UUID) *CredentialUpdateOne

SetNillablePrincipalID sets the "principal_id" field if the given value is not nil.

func (*CredentialUpdateOne) SetNillablePublicKey added in v0.2.0

func (_u *CredentialUpdateOne) SetNillablePublicKey(v *string) *CredentialUpdateOne

SetNillablePublicKey sets the "public_key" field if the given value is not nil.

func (*CredentialUpdateOne) SetNillableRevoked added in v0.2.0

func (_u *CredentialUpdateOne) SetNillableRevoked(v *bool) *CredentialUpdateOne

SetNillableRevoked sets the "revoked" field if the given value is not nil.

func (*CredentialUpdateOne) SetNillableRevokedAt added in v0.2.0

func (_u *CredentialUpdateOne) SetNillableRevokedAt(v *time.Time) *CredentialUpdateOne

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*CredentialUpdateOne) SetNillableRevokedReason added in v0.2.0

func (_u *CredentialUpdateOne) SetNillableRevokedReason(v *string) *CredentialUpdateOne

SetNillableRevokedReason sets the "revoked_reason" field if the given value is not nil.

func (*CredentialUpdateOne) SetNillableSecretHash added in v0.2.0

func (_u *CredentialUpdateOne) SetNillableSecretHash(v *string) *CredentialUpdateOne

SetNillableSecretHash sets the "secret_hash" field if the given value is not nil.

func (*CredentialUpdateOne) SetNillableType added in v0.2.0

func (_u *CredentialUpdateOne) SetNillableType(v *credential.Type) *CredentialUpdateOne

SetNillableType sets the "type" field if the given value is not nil.

func (*CredentialUpdateOne) SetNillableWebauthnAaguid added in v0.2.0

func (_u *CredentialUpdateOne) SetNillableWebauthnAaguid(v *string) *CredentialUpdateOne

SetNillableWebauthnAaguid sets the "webauthn_aaguid" field if the given value is not nil.

func (*CredentialUpdateOne) SetNillableWebauthnSignCount added in v0.2.0

func (_u *CredentialUpdateOne) SetNillableWebauthnSignCount(v *uint32) *CredentialUpdateOne

SetNillableWebauthnSignCount sets the "webauthn_sign_count" field if the given value is not nil.

func (*CredentialUpdateOne) SetPrincipal added in v0.2.0

func (_u *CredentialUpdateOne) SetPrincipal(v *Principal) *CredentialUpdateOne

SetPrincipal sets the "principal" edge to the Principal entity.

func (*CredentialUpdateOne) SetPrincipalID added in v0.2.0

func (_u *CredentialUpdateOne) SetPrincipalID(v uuid.UUID) *CredentialUpdateOne

SetPrincipalID sets the "principal_id" field.

func (*CredentialUpdateOne) SetPublicKey added in v0.2.0

func (_u *CredentialUpdateOne) SetPublicKey(v string) *CredentialUpdateOne

SetPublicKey sets the "public_key" field.

func (*CredentialUpdateOne) SetRevoked added in v0.2.0

func (_u *CredentialUpdateOne) SetRevoked(v bool) *CredentialUpdateOne

SetRevoked sets the "revoked" field.

func (*CredentialUpdateOne) SetRevokedAt added in v0.2.0

func (_u *CredentialUpdateOne) SetRevokedAt(v time.Time) *CredentialUpdateOne

SetRevokedAt sets the "revoked_at" field.

func (*CredentialUpdateOne) SetRevokedReason added in v0.2.0

func (_u *CredentialUpdateOne) SetRevokedReason(v string) *CredentialUpdateOne

SetRevokedReason sets the "revoked_reason" field.

func (*CredentialUpdateOne) SetScopes added in v0.2.0

func (_u *CredentialUpdateOne) SetScopes(v []string) *CredentialUpdateOne

SetScopes sets the "scopes" field.

func (*CredentialUpdateOne) SetSecretHash added in v0.2.0

func (_u *CredentialUpdateOne) SetSecretHash(v string) *CredentialUpdateOne

SetSecretHash sets the "secret_hash" field.

func (*CredentialUpdateOne) SetType added in v0.2.0

SetType sets the "type" field.

func (*CredentialUpdateOne) SetUpdatedAt added in v0.2.0

func (_u *CredentialUpdateOne) SetUpdatedAt(v time.Time) *CredentialUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*CredentialUpdateOne) SetWebauthnAaguid added in v0.2.0

func (_u *CredentialUpdateOne) SetWebauthnAaguid(v string) *CredentialUpdateOne

SetWebauthnAaguid sets the "webauthn_aaguid" field.

func (*CredentialUpdateOne) SetWebauthnCredentialID added in v0.2.0

func (_u *CredentialUpdateOne) SetWebauthnCredentialID(v []byte) *CredentialUpdateOne

SetWebauthnCredentialID sets the "webauthn_credential_id" field.

func (*CredentialUpdateOne) SetWebauthnPublicKey added in v0.2.0

func (_u *CredentialUpdateOne) SetWebauthnPublicKey(v []byte) *CredentialUpdateOne

SetWebauthnPublicKey sets the "webauthn_public_key" field.

func (*CredentialUpdateOne) SetWebauthnSignCount added in v0.2.0

func (_u *CredentialUpdateOne) SetWebauthnSignCount(v uint32) *CredentialUpdateOne

SetWebauthnSignCount sets the "webauthn_sign_count" field.

func (*CredentialUpdateOne) Where added in v0.2.0

Where appends a list predicates to the CredentialUpdate builder.

type CredentialUpsert added in v0.2.0

type CredentialUpsert struct {
	*sql.UpdateSet
}

CredentialUpsert is the "OnConflict" setter.

func (*CredentialUpsert) AddWebauthnSignCount added in v0.2.0

func (u *CredentialUpsert) AddWebauthnSignCount(v uint32) *CredentialUpsert

AddWebauthnSignCount adds v to the "webauthn_sign_count" field.

func (*CredentialUpsert) ClearExpiresAt added in v0.2.0

func (u *CredentialUpsert) ClearExpiresAt() *CredentialUpsert

ClearExpiresAt clears the value of the "expires_at" field.

func (*CredentialUpsert) ClearIdentifier added in v0.2.0

func (u *CredentialUpsert) ClearIdentifier() *CredentialUpsert

ClearIdentifier clears the value of the "identifier" field.

func (*CredentialUpsert) ClearKeyAlgorithm added in v0.2.0

func (u *CredentialUpsert) ClearKeyAlgorithm() *CredentialUpsert

ClearKeyAlgorithm clears the value of the "key_algorithm" field.

func (*CredentialUpsert) ClearKeyID added in v0.2.0

func (u *CredentialUpsert) ClearKeyID() *CredentialUpsert

ClearKeyID clears the value of the "key_id" field.

func (*CredentialUpsert) ClearLastUsedAt added in v0.2.0

func (u *CredentialUpsert) ClearLastUsedAt() *CredentialUpsert

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*CredentialUpsert) ClearLastUsedIP added in v0.2.0

func (u *CredentialUpsert) ClearLastUsedIP() *CredentialUpsert

ClearLastUsedIP clears the value of the "last_used_ip" field.

func (*CredentialUpsert) ClearMetadata added in v0.2.0

func (u *CredentialUpsert) ClearMetadata() *CredentialUpsert

ClearMetadata clears the value of the "metadata" field.

func (*CredentialUpsert) ClearName added in v0.2.0

func (u *CredentialUpsert) ClearName() *CredentialUpsert

ClearName clears the value of the "name" field.

func (*CredentialUpsert) ClearPublicKey added in v0.2.0

func (u *CredentialUpsert) ClearPublicKey() *CredentialUpsert

ClearPublicKey clears the value of the "public_key" field.

func (*CredentialUpsert) ClearRevokedAt added in v0.2.0

func (u *CredentialUpsert) ClearRevokedAt() *CredentialUpsert

ClearRevokedAt clears the value of the "revoked_at" field.

func (*CredentialUpsert) ClearRevokedReason added in v0.2.0

func (u *CredentialUpsert) ClearRevokedReason() *CredentialUpsert

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*CredentialUpsert) ClearSecretHash added in v0.2.0

func (u *CredentialUpsert) ClearSecretHash() *CredentialUpsert

ClearSecretHash clears the value of the "secret_hash" field.

func (*CredentialUpsert) ClearWebauthnAaguid added in v0.2.0

func (u *CredentialUpsert) ClearWebauthnAaguid() *CredentialUpsert

ClearWebauthnAaguid clears the value of the "webauthn_aaguid" field.

func (*CredentialUpsert) ClearWebauthnCredentialID added in v0.2.0

func (u *CredentialUpsert) ClearWebauthnCredentialID() *CredentialUpsert

ClearWebauthnCredentialID clears the value of the "webauthn_credential_id" field.

func (*CredentialUpsert) ClearWebauthnPublicKey added in v0.2.0

func (u *CredentialUpsert) ClearWebauthnPublicKey() *CredentialUpsert

ClearWebauthnPublicKey clears the value of the "webauthn_public_key" field.

func (*CredentialUpsert) ClearWebauthnSignCount added in v0.2.0

func (u *CredentialUpsert) ClearWebauthnSignCount() *CredentialUpsert

ClearWebauthnSignCount clears the value of the "webauthn_sign_count" field.

func (*CredentialUpsert) SetActive added in v0.2.0

func (u *CredentialUpsert) SetActive(v bool) *CredentialUpsert

SetActive sets the "active" field.

func (*CredentialUpsert) SetExpiresAt added in v0.2.0

func (u *CredentialUpsert) SetExpiresAt(v time.Time) *CredentialUpsert

SetExpiresAt sets the "expires_at" field.

func (*CredentialUpsert) SetIdentifier added in v0.2.0

func (u *CredentialUpsert) SetIdentifier(v string) *CredentialUpsert

SetIdentifier sets the "identifier" field.

func (*CredentialUpsert) SetKeyAlgorithm added in v0.2.0

func (u *CredentialUpsert) SetKeyAlgorithm(v string) *CredentialUpsert

SetKeyAlgorithm sets the "key_algorithm" field.

func (*CredentialUpsert) SetKeyID added in v0.2.0

func (u *CredentialUpsert) SetKeyID(v string) *CredentialUpsert

SetKeyID sets the "key_id" field.

func (*CredentialUpsert) SetLastUsedAt added in v0.2.0

func (u *CredentialUpsert) SetLastUsedAt(v time.Time) *CredentialUpsert

SetLastUsedAt sets the "last_used_at" field.

func (*CredentialUpsert) SetLastUsedIP added in v0.2.0

func (u *CredentialUpsert) SetLastUsedIP(v string) *CredentialUpsert

SetLastUsedIP sets the "last_used_ip" field.

func (*CredentialUpsert) SetMetadata added in v0.2.0

func (u *CredentialUpsert) SetMetadata(v map[string]interface{}) *CredentialUpsert

SetMetadata sets the "metadata" field.

func (*CredentialUpsert) SetName added in v0.2.0

func (u *CredentialUpsert) SetName(v string) *CredentialUpsert

SetName sets the "name" field.

func (*CredentialUpsert) SetPrincipalID added in v0.2.0

func (u *CredentialUpsert) SetPrincipalID(v uuid.UUID) *CredentialUpsert

SetPrincipalID sets the "principal_id" field.

func (*CredentialUpsert) SetPublicKey added in v0.2.0

func (u *CredentialUpsert) SetPublicKey(v string) *CredentialUpsert

SetPublicKey sets the "public_key" field.

func (*CredentialUpsert) SetRevoked added in v0.2.0

func (u *CredentialUpsert) SetRevoked(v bool) *CredentialUpsert

SetRevoked sets the "revoked" field.

func (*CredentialUpsert) SetRevokedAt added in v0.2.0

func (u *CredentialUpsert) SetRevokedAt(v time.Time) *CredentialUpsert

SetRevokedAt sets the "revoked_at" field.

func (*CredentialUpsert) SetRevokedReason added in v0.2.0

func (u *CredentialUpsert) SetRevokedReason(v string) *CredentialUpsert

SetRevokedReason sets the "revoked_reason" field.

func (*CredentialUpsert) SetScopes added in v0.2.0

func (u *CredentialUpsert) SetScopes(v []string) *CredentialUpsert

SetScopes sets the "scopes" field.

func (*CredentialUpsert) SetSecretHash added in v0.2.0

func (u *CredentialUpsert) SetSecretHash(v string) *CredentialUpsert

SetSecretHash sets the "secret_hash" field.

func (*CredentialUpsert) SetType added in v0.2.0

SetType sets the "type" field.

func (*CredentialUpsert) SetUpdatedAt added in v0.2.0

func (u *CredentialUpsert) SetUpdatedAt(v time.Time) *CredentialUpsert

SetUpdatedAt sets the "updated_at" field.

func (*CredentialUpsert) SetWebauthnAaguid added in v0.2.0

func (u *CredentialUpsert) SetWebauthnAaguid(v string) *CredentialUpsert

SetWebauthnAaguid sets the "webauthn_aaguid" field.

func (*CredentialUpsert) SetWebauthnCredentialID added in v0.2.0

func (u *CredentialUpsert) SetWebauthnCredentialID(v []byte) *CredentialUpsert

SetWebauthnCredentialID sets the "webauthn_credential_id" field.

func (*CredentialUpsert) SetWebauthnPublicKey added in v0.2.0

func (u *CredentialUpsert) SetWebauthnPublicKey(v []byte) *CredentialUpsert

SetWebauthnPublicKey sets the "webauthn_public_key" field.

func (*CredentialUpsert) SetWebauthnSignCount added in v0.2.0

func (u *CredentialUpsert) SetWebauthnSignCount(v uint32) *CredentialUpsert

SetWebauthnSignCount sets the "webauthn_sign_count" field.

func (*CredentialUpsert) UpdateActive added in v0.2.0

func (u *CredentialUpsert) UpdateActive() *CredentialUpsert

UpdateActive sets the "active" field to the value that was provided on create.

func (*CredentialUpsert) UpdateExpiresAt added in v0.2.0

func (u *CredentialUpsert) UpdateExpiresAt() *CredentialUpsert

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*CredentialUpsert) UpdateIdentifier added in v0.2.0

func (u *CredentialUpsert) UpdateIdentifier() *CredentialUpsert

UpdateIdentifier sets the "identifier" field to the value that was provided on create.

func (*CredentialUpsert) UpdateKeyAlgorithm added in v0.2.0

func (u *CredentialUpsert) UpdateKeyAlgorithm() *CredentialUpsert

UpdateKeyAlgorithm sets the "key_algorithm" field to the value that was provided on create.

func (*CredentialUpsert) UpdateKeyID added in v0.2.0

func (u *CredentialUpsert) UpdateKeyID() *CredentialUpsert

UpdateKeyID sets the "key_id" field to the value that was provided on create.

func (*CredentialUpsert) UpdateLastUsedAt added in v0.2.0

func (u *CredentialUpsert) UpdateLastUsedAt() *CredentialUpsert

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*CredentialUpsert) UpdateLastUsedIP added in v0.2.0

func (u *CredentialUpsert) UpdateLastUsedIP() *CredentialUpsert

UpdateLastUsedIP sets the "last_used_ip" field to the value that was provided on create.

func (*CredentialUpsert) UpdateMetadata added in v0.2.0

func (u *CredentialUpsert) UpdateMetadata() *CredentialUpsert

UpdateMetadata sets the "metadata" field to the value that was provided on create.

func (*CredentialUpsert) UpdateName added in v0.2.0

func (u *CredentialUpsert) UpdateName() *CredentialUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*CredentialUpsert) UpdatePrincipalID added in v0.2.0

func (u *CredentialUpsert) UpdatePrincipalID() *CredentialUpsert

UpdatePrincipalID sets the "principal_id" field to the value that was provided on create.

func (*CredentialUpsert) UpdatePublicKey added in v0.2.0

func (u *CredentialUpsert) UpdatePublicKey() *CredentialUpsert

UpdatePublicKey sets the "public_key" field to the value that was provided on create.

func (*CredentialUpsert) UpdateRevoked added in v0.2.0

func (u *CredentialUpsert) UpdateRevoked() *CredentialUpsert

UpdateRevoked sets the "revoked" field to the value that was provided on create.

func (*CredentialUpsert) UpdateRevokedAt added in v0.2.0

func (u *CredentialUpsert) UpdateRevokedAt() *CredentialUpsert

UpdateRevokedAt sets the "revoked_at" field to the value that was provided on create.

func (*CredentialUpsert) UpdateRevokedReason added in v0.2.0

func (u *CredentialUpsert) UpdateRevokedReason() *CredentialUpsert

UpdateRevokedReason sets the "revoked_reason" field to the value that was provided on create.

func (*CredentialUpsert) UpdateScopes added in v0.2.0

func (u *CredentialUpsert) UpdateScopes() *CredentialUpsert

UpdateScopes sets the "scopes" field to the value that was provided on create.

func (*CredentialUpsert) UpdateSecretHash added in v0.2.0

func (u *CredentialUpsert) UpdateSecretHash() *CredentialUpsert

UpdateSecretHash sets the "secret_hash" field to the value that was provided on create.

func (*CredentialUpsert) UpdateType added in v0.2.0

func (u *CredentialUpsert) UpdateType() *CredentialUpsert

UpdateType sets the "type" field to the value that was provided on create.

func (*CredentialUpsert) UpdateUpdatedAt added in v0.2.0

func (u *CredentialUpsert) UpdateUpdatedAt() *CredentialUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*CredentialUpsert) UpdateWebauthnAaguid added in v0.2.0

func (u *CredentialUpsert) UpdateWebauthnAaguid() *CredentialUpsert

UpdateWebauthnAaguid sets the "webauthn_aaguid" field to the value that was provided on create.

func (*CredentialUpsert) UpdateWebauthnCredentialID added in v0.2.0

func (u *CredentialUpsert) UpdateWebauthnCredentialID() *CredentialUpsert

UpdateWebauthnCredentialID sets the "webauthn_credential_id" field to the value that was provided on create.

func (*CredentialUpsert) UpdateWebauthnPublicKey added in v0.2.0

func (u *CredentialUpsert) UpdateWebauthnPublicKey() *CredentialUpsert

UpdateWebauthnPublicKey sets the "webauthn_public_key" field to the value that was provided on create.

func (*CredentialUpsert) UpdateWebauthnSignCount added in v0.2.0

func (u *CredentialUpsert) UpdateWebauthnSignCount() *CredentialUpsert

UpdateWebauthnSignCount sets the "webauthn_sign_count" field to the value that was provided on create.

type CredentialUpsertBulk added in v0.2.0

type CredentialUpsertBulk struct {
	// contains filtered or unexported fields
}

CredentialUpsertBulk is the builder for "upsert"-ing a bulk of Credential nodes.

func (*CredentialUpsertBulk) AddWebauthnSignCount added in v0.2.0

func (u *CredentialUpsertBulk) AddWebauthnSignCount(v uint32) *CredentialUpsertBulk

AddWebauthnSignCount adds v to the "webauthn_sign_count" field.

func (*CredentialUpsertBulk) ClearExpiresAt added in v0.2.0

func (u *CredentialUpsertBulk) ClearExpiresAt() *CredentialUpsertBulk

ClearExpiresAt clears the value of the "expires_at" field.

func (*CredentialUpsertBulk) ClearIdentifier added in v0.2.0

func (u *CredentialUpsertBulk) ClearIdentifier() *CredentialUpsertBulk

ClearIdentifier clears the value of the "identifier" field.

func (*CredentialUpsertBulk) ClearKeyAlgorithm added in v0.2.0

func (u *CredentialUpsertBulk) ClearKeyAlgorithm() *CredentialUpsertBulk

ClearKeyAlgorithm clears the value of the "key_algorithm" field.

func (*CredentialUpsertBulk) ClearKeyID added in v0.2.0

func (u *CredentialUpsertBulk) ClearKeyID() *CredentialUpsertBulk

ClearKeyID clears the value of the "key_id" field.

func (*CredentialUpsertBulk) ClearLastUsedAt added in v0.2.0

func (u *CredentialUpsertBulk) ClearLastUsedAt() *CredentialUpsertBulk

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*CredentialUpsertBulk) ClearLastUsedIP added in v0.2.0

func (u *CredentialUpsertBulk) ClearLastUsedIP() *CredentialUpsertBulk

ClearLastUsedIP clears the value of the "last_used_ip" field.

func (*CredentialUpsertBulk) ClearMetadata added in v0.2.0

func (u *CredentialUpsertBulk) ClearMetadata() *CredentialUpsertBulk

ClearMetadata clears the value of the "metadata" field.

func (*CredentialUpsertBulk) ClearName added in v0.2.0

ClearName clears the value of the "name" field.

func (*CredentialUpsertBulk) ClearPublicKey added in v0.2.0

func (u *CredentialUpsertBulk) ClearPublicKey() *CredentialUpsertBulk

ClearPublicKey clears the value of the "public_key" field.

func (*CredentialUpsertBulk) ClearRevokedAt added in v0.2.0

func (u *CredentialUpsertBulk) ClearRevokedAt() *CredentialUpsertBulk

ClearRevokedAt clears the value of the "revoked_at" field.

func (*CredentialUpsertBulk) ClearRevokedReason added in v0.2.0

func (u *CredentialUpsertBulk) ClearRevokedReason() *CredentialUpsertBulk

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*CredentialUpsertBulk) ClearSecretHash added in v0.2.0

func (u *CredentialUpsertBulk) ClearSecretHash() *CredentialUpsertBulk

ClearSecretHash clears the value of the "secret_hash" field.

func (*CredentialUpsertBulk) ClearWebauthnAaguid added in v0.2.0

func (u *CredentialUpsertBulk) ClearWebauthnAaguid() *CredentialUpsertBulk

ClearWebauthnAaguid clears the value of the "webauthn_aaguid" field.

func (*CredentialUpsertBulk) ClearWebauthnCredentialID added in v0.2.0

func (u *CredentialUpsertBulk) ClearWebauthnCredentialID() *CredentialUpsertBulk

ClearWebauthnCredentialID clears the value of the "webauthn_credential_id" field.

func (*CredentialUpsertBulk) ClearWebauthnPublicKey added in v0.2.0

func (u *CredentialUpsertBulk) ClearWebauthnPublicKey() *CredentialUpsertBulk

ClearWebauthnPublicKey clears the value of the "webauthn_public_key" field.

func (*CredentialUpsertBulk) ClearWebauthnSignCount added in v0.2.0

func (u *CredentialUpsertBulk) ClearWebauthnSignCount() *CredentialUpsertBulk

ClearWebauthnSignCount clears the value of the "webauthn_sign_count" field.

func (*CredentialUpsertBulk) DoNothing added in v0.2.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*CredentialUpsertBulk) Exec added in v0.2.0

Exec executes the query.

func (*CredentialUpsertBulk) ExecX added in v0.2.0

func (u *CredentialUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CredentialUpsertBulk) Ignore added in v0.2.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Credential.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*CredentialUpsertBulk) SetActive added in v0.2.0

SetActive sets the "active" field.

func (*CredentialUpsertBulk) SetExpiresAt added in v0.2.0

func (u *CredentialUpsertBulk) SetExpiresAt(v time.Time) *CredentialUpsertBulk

SetExpiresAt sets the "expires_at" field.

func (*CredentialUpsertBulk) SetIdentifier added in v0.2.0

func (u *CredentialUpsertBulk) SetIdentifier(v string) *CredentialUpsertBulk

SetIdentifier sets the "identifier" field.

func (*CredentialUpsertBulk) SetKeyAlgorithm added in v0.2.0

func (u *CredentialUpsertBulk) SetKeyAlgorithm(v string) *CredentialUpsertBulk

SetKeyAlgorithm sets the "key_algorithm" field.

func (*CredentialUpsertBulk) SetKeyID added in v0.2.0

SetKeyID sets the "key_id" field.

func (*CredentialUpsertBulk) SetLastUsedAt added in v0.2.0

func (u *CredentialUpsertBulk) SetLastUsedAt(v time.Time) *CredentialUpsertBulk

SetLastUsedAt sets the "last_used_at" field.

func (*CredentialUpsertBulk) SetLastUsedIP added in v0.2.0

func (u *CredentialUpsertBulk) SetLastUsedIP(v string) *CredentialUpsertBulk

SetLastUsedIP sets the "last_used_ip" field.

func (*CredentialUpsertBulk) SetMetadata added in v0.2.0

func (u *CredentialUpsertBulk) SetMetadata(v map[string]interface{}) *CredentialUpsertBulk

SetMetadata sets the "metadata" field.

func (*CredentialUpsertBulk) SetName added in v0.2.0

SetName sets the "name" field.

func (*CredentialUpsertBulk) SetPrincipalID added in v0.2.0

func (u *CredentialUpsertBulk) SetPrincipalID(v uuid.UUID) *CredentialUpsertBulk

SetPrincipalID sets the "principal_id" field.

func (*CredentialUpsertBulk) SetPublicKey added in v0.2.0

func (u *CredentialUpsertBulk) SetPublicKey(v string) *CredentialUpsertBulk

SetPublicKey sets the "public_key" field.

func (*CredentialUpsertBulk) SetRevoked added in v0.2.0

SetRevoked sets the "revoked" field.

func (*CredentialUpsertBulk) SetRevokedAt added in v0.2.0

func (u *CredentialUpsertBulk) SetRevokedAt(v time.Time) *CredentialUpsertBulk

SetRevokedAt sets the "revoked_at" field.

func (*CredentialUpsertBulk) SetRevokedReason added in v0.2.0

func (u *CredentialUpsertBulk) SetRevokedReason(v string) *CredentialUpsertBulk

SetRevokedReason sets the "revoked_reason" field.

func (*CredentialUpsertBulk) SetScopes added in v0.2.0

SetScopes sets the "scopes" field.

func (*CredentialUpsertBulk) SetSecretHash added in v0.2.0

func (u *CredentialUpsertBulk) SetSecretHash(v string) *CredentialUpsertBulk

SetSecretHash sets the "secret_hash" field.

func (*CredentialUpsertBulk) SetType added in v0.2.0

SetType sets the "type" field.

func (*CredentialUpsertBulk) SetUpdatedAt added in v0.2.0

func (u *CredentialUpsertBulk) SetUpdatedAt(v time.Time) *CredentialUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*CredentialUpsertBulk) SetWebauthnAaguid added in v0.2.0

func (u *CredentialUpsertBulk) SetWebauthnAaguid(v string) *CredentialUpsertBulk

SetWebauthnAaguid sets the "webauthn_aaguid" field.

func (*CredentialUpsertBulk) SetWebauthnCredentialID added in v0.2.0

func (u *CredentialUpsertBulk) SetWebauthnCredentialID(v []byte) *CredentialUpsertBulk

SetWebauthnCredentialID sets the "webauthn_credential_id" field.

func (*CredentialUpsertBulk) SetWebauthnPublicKey added in v0.2.0

func (u *CredentialUpsertBulk) SetWebauthnPublicKey(v []byte) *CredentialUpsertBulk

SetWebauthnPublicKey sets the "webauthn_public_key" field.

func (*CredentialUpsertBulk) SetWebauthnSignCount added in v0.2.0

func (u *CredentialUpsertBulk) SetWebauthnSignCount(v uint32) *CredentialUpsertBulk

SetWebauthnSignCount sets the "webauthn_sign_count" field.

func (*CredentialUpsertBulk) Update added in v0.2.0

Update allows overriding fields `UPDATE` values. See the CredentialCreateBulk.OnConflict documentation for more info.

func (*CredentialUpsertBulk) UpdateActive added in v0.2.0

func (u *CredentialUpsertBulk) UpdateActive() *CredentialUpsertBulk

UpdateActive sets the "active" field to the value that was provided on create.

func (*CredentialUpsertBulk) UpdateExpiresAt added in v0.2.0

func (u *CredentialUpsertBulk) UpdateExpiresAt() *CredentialUpsertBulk

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*CredentialUpsertBulk) UpdateIdentifier added in v0.2.0

func (u *CredentialUpsertBulk) UpdateIdentifier() *CredentialUpsertBulk

UpdateIdentifier sets the "identifier" field to the value that was provided on create.

func (*CredentialUpsertBulk) UpdateKeyAlgorithm added in v0.2.0

func (u *CredentialUpsertBulk) UpdateKeyAlgorithm() *CredentialUpsertBulk

UpdateKeyAlgorithm sets the "key_algorithm" field to the value that was provided on create.

func (*CredentialUpsertBulk) UpdateKeyID added in v0.2.0

func (u *CredentialUpsertBulk) UpdateKeyID() *CredentialUpsertBulk

UpdateKeyID sets the "key_id" field to the value that was provided on create.

func (*CredentialUpsertBulk) UpdateLastUsedAt added in v0.2.0

func (u *CredentialUpsertBulk) UpdateLastUsedAt() *CredentialUpsertBulk

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*CredentialUpsertBulk) UpdateLastUsedIP added in v0.2.0

func (u *CredentialUpsertBulk) UpdateLastUsedIP() *CredentialUpsertBulk

UpdateLastUsedIP sets the "last_used_ip" field to the value that was provided on create.

func (*CredentialUpsertBulk) UpdateMetadata added in v0.2.0

func (u *CredentialUpsertBulk) UpdateMetadata() *CredentialUpsertBulk

UpdateMetadata sets the "metadata" field to the value that was provided on create.

func (*CredentialUpsertBulk) UpdateName added in v0.2.0

func (u *CredentialUpsertBulk) UpdateName() *CredentialUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*CredentialUpsertBulk) UpdateNewValues added in v0.2.0

func (u *CredentialUpsertBulk) UpdateNewValues() *CredentialUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Credential.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(credential.FieldID)
		}),
	).
	Exec(ctx)

func (*CredentialUpsertBulk) UpdatePrincipalID added in v0.2.0

func (u *CredentialUpsertBulk) UpdatePrincipalID() *CredentialUpsertBulk

UpdatePrincipalID sets the "principal_id" field to the value that was provided on create.

func (*CredentialUpsertBulk) UpdatePublicKey added in v0.2.0

func (u *CredentialUpsertBulk) UpdatePublicKey() *CredentialUpsertBulk

UpdatePublicKey sets the "public_key" field to the value that was provided on create.

func (*CredentialUpsertBulk) UpdateRevoked added in v0.2.0

func (u *CredentialUpsertBulk) UpdateRevoked() *CredentialUpsertBulk

UpdateRevoked sets the "revoked" field to the value that was provided on create.

func (*CredentialUpsertBulk) UpdateRevokedAt added in v0.2.0

func (u *CredentialUpsertBulk) UpdateRevokedAt() *CredentialUpsertBulk

UpdateRevokedAt sets the "revoked_at" field to the value that was provided on create.

func (*CredentialUpsertBulk) UpdateRevokedReason added in v0.2.0

func (u *CredentialUpsertBulk) UpdateRevokedReason() *CredentialUpsertBulk

UpdateRevokedReason sets the "revoked_reason" field to the value that was provided on create.

func (*CredentialUpsertBulk) UpdateScopes added in v0.2.0

func (u *CredentialUpsertBulk) UpdateScopes() *CredentialUpsertBulk

UpdateScopes sets the "scopes" field to the value that was provided on create.

func (*CredentialUpsertBulk) UpdateSecretHash added in v0.2.0

func (u *CredentialUpsertBulk) UpdateSecretHash() *CredentialUpsertBulk

UpdateSecretHash sets the "secret_hash" field to the value that was provided on create.

func (*CredentialUpsertBulk) UpdateType added in v0.2.0

func (u *CredentialUpsertBulk) UpdateType() *CredentialUpsertBulk

UpdateType sets the "type" field to the value that was provided on create.

func (*CredentialUpsertBulk) UpdateUpdatedAt added in v0.2.0

func (u *CredentialUpsertBulk) UpdateUpdatedAt() *CredentialUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*CredentialUpsertBulk) UpdateWebauthnAaguid added in v0.2.0

func (u *CredentialUpsertBulk) UpdateWebauthnAaguid() *CredentialUpsertBulk

UpdateWebauthnAaguid sets the "webauthn_aaguid" field to the value that was provided on create.

func (*CredentialUpsertBulk) UpdateWebauthnCredentialID added in v0.2.0

func (u *CredentialUpsertBulk) UpdateWebauthnCredentialID() *CredentialUpsertBulk

UpdateWebauthnCredentialID sets the "webauthn_credential_id" field to the value that was provided on create.

func (*CredentialUpsertBulk) UpdateWebauthnPublicKey added in v0.2.0

func (u *CredentialUpsertBulk) UpdateWebauthnPublicKey() *CredentialUpsertBulk

UpdateWebauthnPublicKey sets the "webauthn_public_key" field to the value that was provided on create.

func (*CredentialUpsertBulk) UpdateWebauthnSignCount added in v0.2.0

func (u *CredentialUpsertBulk) UpdateWebauthnSignCount() *CredentialUpsertBulk

UpdateWebauthnSignCount sets the "webauthn_sign_count" field to the value that was provided on create.

type CredentialUpsertOne added in v0.2.0

type CredentialUpsertOne struct {
	// contains filtered or unexported fields
}

CredentialUpsertOne is the builder for "upsert"-ing

one Credential node.

func (*CredentialUpsertOne) AddWebauthnSignCount added in v0.2.0

func (u *CredentialUpsertOne) AddWebauthnSignCount(v uint32) *CredentialUpsertOne

AddWebauthnSignCount adds v to the "webauthn_sign_count" field.

func (*CredentialUpsertOne) ClearExpiresAt added in v0.2.0

func (u *CredentialUpsertOne) ClearExpiresAt() *CredentialUpsertOne

ClearExpiresAt clears the value of the "expires_at" field.

func (*CredentialUpsertOne) ClearIdentifier added in v0.2.0

func (u *CredentialUpsertOne) ClearIdentifier() *CredentialUpsertOne

ClearIdentifier clears the value of the "identifier" field.

func (*CredentialUpsertOne) ClearKeyAlgorithm added in v0.2.0

func (u *CredentialUpsertOne) ClearKeyAlgorithm() *CredentialUpsertOne

ClearKeyAlgorithm clears the value of the "key_algorithm" field.

func (*CredentialUpsertOne) ClearKeyID added in v0.2.0

func (u *CredentialUpsertOne) ClearKeyID() *CredentialUpsertOne

ClearKeyID clears the value of the "key_id" field.

func (*CredentialUpsertOne) ClearLastUsedAt added in v0.2.0

func (u *CredentialUpsertOne) ClearLastUsedAt() *CredentialUpsertOne

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*CredentialUpsertOne) ClearLastUsedIP added in v0.2.0

func (u *CredentialUpsertOne) ClearLastUsedIP() *CredentialUpsertOne

ClearLastUsedIP clears the value of the "last_used_ip" field.

func (*CredentialUpsertOne) ClearMetadata added in v0.2.0

func (u *CredentialUpsertOne) ClearMetadata() *CredentialUpsertOne

ClearMetadata clears the value of the "metadata" field.

func (*CredentialUpsertOne) ClearName added in v0.2.0

func (u *CredentialUpsertOne) ClearName() *CredentialUpsertOne

ClearName clears the value of the "name" field.

func (*CredentialUpsertOne) ClearPublicKey added in v0.2.0

func (u *CredentialUpsertOne) ClearPublicKey() *CredentialUpsertOne

ClearPublicKey clears the value of the "public_key" field.

func (*CredentialUpsertOne) ClearRevokedAt added in v0.2.0

func (u *CredentialUpsertOne) ClearRevokedAt() *CredentialUpsertOne

ClearRevokedAt clears the value of the "revoked_at" field.

func (*CredentialUpsertOne) ClearRevokedReason added in v0.2.0

func (u *CredentialUpsertOne) ClearRevokedReason() *CredentialUpsertOne

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*CredentialUpsertOne) ClearSecretHash added in v0.2.0

func (u *CredentialUpsertOne) ClearSecretHash() *CredentialUpsertOne

ClearSecretHash clears the value of the "secret_hash" field.

func (*CredentialUpsertOne) ClearWebauthnAaguid added in v0.2.0

func (u *CredentialUpsertOne) ClearWebauthnAaguid() *CredentialUpsertOne

ClearWebauthnAaguid clears the value of the "webauthn_aaguid" field.

func (*CredentialUpsertOne) ClearWebauthnCredentialID added in v0.2.0

func (u *CredentialUpsertOne) ClearWebauthnCredentialID() *CredentialUpsertOne

ClearWebauthnCredentialID clears the value of the "webauthn_credential_id" field.

func (*CredentialUpsertOne) ClearWebauthnPublicKey added in v0.2.0

func (u *CredentialUpsertOne) ClearWebauthnPublicKey() *CredentialUpsertOne

ClearWebauthnPublicKey clears the value of the "webauthn_public_key" field.

func (*CredentialUpsertOne) ClearWebauthnSignCount added in v0.2.0

func (u *CredentialUpsertOne) ClearWebauthnSignCount() *CredentialUpsertOne

ClearWebauthnSignCount clears the value of the "webauthn_sign_count" field.

func (*CredentialUpsertOne) DoNothing added in v0.2.0

func (u *CredentialUpsertOne) DoNothing() *CredentialUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*CredentialUpsertOne) Exec added in v0.2.0

Exec executes the query.

func (*CredentialUpsertOne) ExecX added in v0.2.0

func (u *CredentialUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CredentialUpsertOne) ID added in v0.2.0

func (u *CredentialUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*CredentialUpsertOne) IDX added in v0.2.0

IDX is like ID, but panics if an error occurs.

func (*CredentialUpsertOne) Ignore added in v0.2.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Credential.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*CredentialUpsertOne) SetActive added in v0.2.0

func (u *CredentialUpsertOne) SetActive(v bool) *CredentialUpsertOne

SetActive sets the "active" field.

func (*CredentialUpsertOne) SetExpiresAt added in v0.2.0

func (u *CredentialUpsertOne) SetExpiresAt(v time.Time) *CredentialUpsertOne

SetExpiresAt sets the "expires_at" field.

func (*CredentialUpsertOne) SetIdentifier added in v0.2.0

func (u *CredentialUpsertOne) SetIdentifier(v string) *CredentialUpsertOne

SetIdentifier sets the "identifier" field.

func (*CredentialUpsertOne) SetKeyAlgorithm added in v0.2.0

func (u *CredentialUpsertOne) SetKeyAlgorithm(v string) *CredentialUpsertOne

SetKeyAlgorithm sets the "key_algorithm" field.

func (*CredentialUpsertOne) SetKeyID added in v0.2.0

SetKeyID sets the "key_id" field.

func (*CredentialUpsertOne) SetLastUsedAt added in v0.2.0

func (u *CredentialUpsertOne) SetLastUsedAt(v time.Time) *CredentialUpsertOne

SetLastUsedAt sets the "last_used_at" field.

func (*CredentialUpsertOne) SetLastUsedIP added in v0.2.0

func (u *CredentialUpsertOne) SetLastUsedIP(v string) *CredentialUpsertOne

SetLastUsedIP sets the "last_used_ip" field.

func (*CredentialUpsertOne) SetMetadata added in v0.2.0

func (u *CredentialUpsertOne) SetMetadata(v map[string]interface{}) *CredentialUpsertOne

SetMetadata sets the "metadata" field.

func (*CredentialUpsertOne) SetName added in v0.2.0

SetName sets the "name" field.

func (*CredentialUpsertOne) SetPrincipalID added in v0.2.0

func (u *CredentialUpsertOne) SetPrincipalID(v uuid.UUID) *CredentialUpsertOne

SetPrincipalID sets the "principal_id" field.

func (*CredentialUpsertOne) SetPublicKey added in v0.2.0

func (u *CredentialUpsertOne) SetPublicKey(v string) *CredentialUpsertOne

SetPublicKey sets the "public_key" field.

func (*CredentialUpsertOne) SetRevoked added in v0.2.0

func (u *CredentialUpsertOne) SetRevoked(v bool) *CredentialUpsertOne

SetRevoked sets the "revoked" field.

func (*CredentialUpsertOne) SetRevokedAt added in v0.2.0

func (u *CredentialUpsertOne) SetRevokedAt(v time.Time) *CredentialUpsertOne

SetRevokedAt sets the "revoked_at" field.

func (*CredentialUpsertOne) SetRevokedReason added in v0.2.0

func (u *CredentialUpsertOne) SetRevokedReason(v string) *CredentialUpsertOne

SetRevokedReason sets the "revoked_reason" field.

func (*CredentialUpsertOne) SetScopes added in v0.2.0

func (u *CredentialUpsertOne) SetScopes(v []string) *CredentialUpsertOne

SetScopes sets the "scopes" field.

func (*CredentialUpsertOne) SetSecretHash added in v0.2.0

func (u *CredentialUpsertOne) SetSecretHash(v string) *CredentialUpsertOne

SetSecretHash sets the "secret_hash" field.

func (*CredentialUpsertOne) SetType added in v0.2.0

SetType sets the "type" field.

func (*CredentialUpsertOne) SetUpdatedAt added in v0.2.0

func (u *CredentialUpsertOne) SetUpdatedAt(v time.Time) *CredentialUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*CredentialUpsertOne) SetWebauthnAaguid added in v0.2.0

func (u *CredentialUpsertOne) SetWebauthnAaguid(v string) *CredentialUpsertOne

SetWebauthnAaguid sets the "webauthn_aaguid" field.

func (*CredentialUpsertOne) SetWebauthnCredentialID added in v0.2.0

func (u *CredentialUpsertOne) SetWebauthnCredentialID(v []byte) *CredentialUpsertOne

SetWebauthnCredentialID sets the "webauthn_credential_id" field.

func (*CredentialUpsertOne) SetWebauthnPublicKey added in v0.2.0

func (u *CredentialUpsertOne) SetWebauthnPublicKey(v []byte) *CredentialUpsertOne

SetWebauthnPublicKey sets the "webauthn_public_key" field.

func (*CredentialUpsertOne) SetWebauthnSignCount added in v0.2.0

func (u *CredentialUpsertOne) SetWebauthnSignCount(v uint32) *CredentialUpsertOne

SetWebauthnSignCount sets the "webauthn_sign_count" field.

func (*CredentialUpsertOne) Update added in v0.2.0

Update allows overriding fields `UPDATE` values. See the CredentialCreate.OnConflict documentation for more info.

func (*CredentialUpsertOne) UpdateActive added in v0.2.0

func (u *CredentialUpsertOne) UpdateActive() *CredentialUpsertOne

UpdateActive sets the "active" field to the value that was provided on create.

func (*CredentialUpsertOne) UpdateExpiresAt added in v0.2.0

func (u *CredentialUpsertOne) UpdateExpiresAt() *CredentialUpsertOne

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*CredentialUpsertOne) UpdateIdentifier added in v0.2.0

func (u *CredentialUpsertOne) UpdateIdentifier() *CredentialUpsertOne

UpdateIdentifier sets the "identifier" field to the value that was provided on create.

func (*CredentialUpsertOne) UpdateKeyAlgorithm added in v0.2.0

func (u *CredentialUpsertOne) UpdateKeyAlgorithm() *CredentialUpsertOne

UpdateKeyAlgorithm sets the "key_algorithm" field to the value that was provided on create.

func (*CredentialUpsertOne) UpdateKeyID added in v0.2.0

func (u *CredentialUpsertOne) UpdateKeyID() *CredentialUpsertOne

UpdateKeyID sets the "key_id" field to the value that was provided on create.

func (*CredentialUpsertOne) UpdateLastUsedAt added in v0.2.0

func (u *CredentialUpsertOne) UpdateLastUsedAt() *CredentialUpsertOne

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*CredentialUpsertOne) UpdateLastUsedIP added in v0.2.0

func (u *CredentialUpsertOne) UpdateLastUsedIP() *CredentialUpsertOne

UpdateLastUsedIP sets the "last_used_ip" field to the value that was provided on create.

func (*CredentialUpsertOne) UpdateMetadata added in v0.2.0

func (u *CredentialUpsertOne) UpdateMetadata() *CredentialUpsertOne

UpdateMetadata sets the "metadata" field to the value that was provided on create.

func (*CredentialUpsertOne) UpdateName added in v0.2.0

func (u *CredentialUpsertOne) UpdateName() *CredentialUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*CredentialUpsertOne) UpdateNewValues added in v0.2.0

func (u *CredentialUpsertOne) UpdateNewValues() *CredentialUpsertOne

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.Credential.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(credential.FieldID)
		}),
	).
	Exec(ctx)

func (*CredentialUpsertOne) UpdatePrincipalID added in v0.2.0

func (u *CredentialUpsertOne) UpdatePrincipalID() *CredentialUpsertOne

UpdatePrincipalID sets the "principal_id" field to the value that was provided on create.

func (*CredentialUpsertOne) UpdatePublicKey added in v0.2.0

func (u *CredentialUpsertOne) UpdatePublicKey() *CredentialUpsertOne

UpdatePublicKey sets the "public_key" field to the value that was provided on create.

func (*CredentialUpsertOne) UpdateRevoked added in v0.2.0

func (u *CredentialUpsertOne) UpdateRevoked() *CredentialUpsertOne

UpdateRevoked sets the "revoked" field to the value that was provided on create.

func (*CredentialUpsertOne) UpdateRevokedAt added in v0.2.0

func (u *CredentialUpsertOne) UpdateRevokedAt() *CredentialUpsertOne

UpdateRevokedAt sets the "revoked_at" field to the value that was provided on create.

func (*CredentialUpsertOne) UpdateRevokedReason added in v0.2.0

func (u *CredentialUpsertOne) UpdateRevokedReason() *CredentialUpsertOne

UpdateRevokedReason sets the "revoked_reason" field to the value that was provided on create.

func (*CredentialUpsertOne) UpdateScopes added in v0.2.0

func (u *CredentialUpsertOne) UpdateScopes() *CredentialUpsertOne

UpdateScopes sets the "scopes" field to the value that was provided on create.

func (*CredentialUpsertOne) UpdateSecretHash added in v0.2.0

func (u *CredentialUpsertOne) UpdateSecretHash() *CredentialUpsertOne

UpdateSecretHash sets the "secret_hash" field to the value that was provided on create.

func (*CredentialUpsertOne) UpdateType added in v0.2.0

func (u *CredentialUpsertOne) UpdateType() *CredentialUpsertOne

UpdateType sets the "type" field to the value that was provided on create.

func (*CredentialUpsertOne) UpdateUpdatedAt added in v0.2.0

func (u *CredentialUpsertOne) UpdateUpdatedAt() *CredentialUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*CredentialUpsertOne) UpdateWebauthnAaguid added in v0.2.0

func (u *CredentialUpsertOne) UpdateWebauthnAaguid() *CredentialUpsertOne

UpdateWebauthnAaguid sets the "webauthn_aaguid" field to the value that was provided on create.

func (*CredentialUpsertOne) UpdateWebauthnCredentialID added in v0.2.0

func (u *CredentialUpsertOne) UpdateWebauthnCredentialID() *CredentialUpsertOne

UpdateWebauthnCredentialID sets the "webauthn_credential_id" field to the value that was provided on create.

func (*CredentialUpsertOne) UpdateWebauthnPublicKey added in v0.2.0

func (u *CredentialUpsertOne) UpdateWebauthnPublicKey() *CredentialUpsertOne

UpdateWebauthnPublicKey sets the "webauthn_public_key" field to the value that was provided on create.

func (*CredentialUpsertOne) UpdateWebauthnSignCount added in v0.2.0

func (u *CredentialUpsertOne) UpdateWebauthnSignCount() *CredentialUpsertOne

UpdateWebauthnSignCount sets the "webauthn_sign_count" field to the value that was provided on create.

type Credentials added in v0.2.0

type Credentials []*Credential

Credentials is a parsable slice of Credential.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

type Human added in v0.2.0

type Human 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"`
	// Reference to parent Principal
	PrincipalID uuid.UUID `json:"principal_id,omitempty"`
	// Primary email address
	Email string `json:"email,omitempty"`
	// First/given name
	GivenName string `json:"given_name,omitempty"`
	// Last/family name
	FamilyName string `json:"family_name,omitempty"`
	// Profile picture URL
	AvatarURL *string `json:"avatar_url,omitempty"`
	// Preferred locale (e.g., en-US)
	Locale string `json:"locale,omitempty"`
	// Preferred timezone (e.g., America/Los_Angeles)
	Timezone string `json:"timezone,omitempty"`
	// Cross-organization admin access
	IsPlatformAdmin bool `json:"is_platform_admin,omitempty"`
	// Last successful login timestamp
	LastLoginAt *time.Time `json:"last_login_at,omitempty"`
	// When email was verified
	EmailVerifiedAt *time.Time `json:"email_verified_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the HumanQuery when eager-loading is set.
	Edges HumanEdges `json:"edges"`
	// contains filtered or unexported fields
}

Human is the model entity for the Human schema.

func (*Human) QueryPrincipal added in v0.2.0

func (_m *Human) QueryPrincipal() *PrincipalQuery

QueryPrincipal queries the "principal" edge of the Human entity.

func (*Human) String added in v0.2.0

func (_m *Human) String() string

String implements the fmt.Stringer.

func (*Human) Unwrap added in v0.2.0

func (_m *Human) Unwrap() *Human

Unwrap unwraps the Human 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 (*Human) Update added in v0.2.0

func (_m *Human) Update() *HumanUpdateOne

Update returns a builder for updating this Human. Note that you need to call Human.Unwrap() before calling this method if this Human was returned from a transaction, and the transaction was committed or rolled back.

func (*Human) Value added in v0.2.0

func (_m *Human) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Human. This includes values selected through modifiers, order, etc.

type HumanClient added in v0.2.0

type HumanClient struct {
	// contains filtered or unexported fields
}

HumanClient is a client for the Human schema.

func NewHumanClient added in v0.2.0

func NewHumanClient(c config) *HumanClient

NewHumanClient returns a client for the Human from the given config.

func (*HumanClient) Create added in v0.2.0

func (c *HumanClient) Create() *HumanCreate

Create returns a builder for creating a Human entity.

func (*HumanClient) CreateBulk added in v0.2.0

func (c *HumanClient) CreateBulk(builders ...*HumanCreate) *HumanCreateBulk

CreateBulk returns a builder for creating a bulk of Human entities.

func (*HumanClient) Delete added in v0.2.0

func (c *HumanClient) Delete() *HumanDelete

Delete returns a delete builder for Human.

func (*HumanClient) DeleteOne added in v0.2.0

func (c *HumanClient) DeleteOne(_m *Human) *HumanDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*HumanClient) DeleteOneID added in v0.2.0

func (c *HumanClient) DeleteOneID(id uuid.UUID) *HumanDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*HumanClient) Get added in v0.2.0

func (c *HumanClient) Get(ctx context.Context, id uuid.UUID) (*Human, error)

Get returns a Human entity by its id.

func (*HumanClient) GetX added in v0.2.0

func (c *HumanClient) GetX(ctx context.Context, id uuid.UUID) *Human

GetX is like Get, but panics if an error occurs.

func (*HumanClient) Hooks added in v0.2.0

func (c *HumanClient) Hooks() []Hook

Hooks returns the client hooks.

func (*HumanClient) Intercept added in v0.2.0

func (c *HumanClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `human.Intercept(f(g(h())))`.

func (*HumanClient) Interceptors added in v0.2.0

func (c *HumanClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*HumanClient) MapCreateBulk added in v0.2.0

func (c *HumanClient) MapCreateBulk(slice any, setFunc func(*HumanCreate, int)) *HumanCreateBulk

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 (*HumanClient) Query added in v0.2.0

func (c *HumanClient) Query() *HumanQuery

Query returns a query builder for Human.

func (*HumanClient) QueryPrincipal added in v0.2.0

func (c *HumanClient) QueryPrincipal(_m *Human) *PrincipalQuery

QueryPrincipal queries the principal edge of a Human.

func (*HumanClient) Update added in v0.2.0

func (c *HumanClient) Update() *HumanUpdate

Update returns an update builder for Human.

func (*HumanClient) UpdateOne added in v0.2.0

func (c *HumanClient) UpdateOne(_m *Human) *HumanUpdateOne

UpdateOne returns an update builder for the given entity.

func (*HumanClient) UpdateOneID added in v0.2.0

func (c *HumanClient) UpdateOneID(id uuid.UUID) *HumanUpdateOne

UpdateOneID returns an update builder for the given id.

func (*HumanClient) Use added in v0.2.0

func (c *HumanClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `human.Hooks(f(g(h())))`.

type HumanCreate added in v0.2.0

type HumanCreate struct {
	// contains filtered or unexported fields
}

HumanCreate is the builder for creating a Human entity.

func (*HumanCreate) Exec added in v0.2.0

func (_c *HumanCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*HumanCreate) ExecX added in v0.2.0

func (_c *HumanCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HumanCreate) Mutation added in v0.2.0

func (_c *HumanCreate) Mutation() *HumanMutation

Mutation returns the HumanMutation object of the builder.

func (*HumanCreate) OnConflict added in v0.2.0

func (_c *HumanCreate) OnConflict(opts ...sql.ConflictOption) *HumanUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Human.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.HumanUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*HumanCreate) OnConflictColumns added in v0.2.0

func (_c *HumanCreate) OnConflictColumns(columns ...string) *HumanUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Human.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*HumanCreate) Save added in v0.2.0

func (_c *HumanCreate) Save(ctx context.Context) (*Human, error)

Save creates the Human in the database.

func (*HumanCreate) SaveX added in v0.2.0

func (_c *HumanCreate) SaveX(ctx context.Context) *Human

SaveX calls Save and panics if Save returns an error.

func (*HumanCreate) SetAvatarURL added in v0.2.0

func (_c *HumanCreate) SetAvatarURL(v string) *HumanCreate

SetAvatarURL sets the "avatar_url" field.

func (*HumanCreate) SetCreatedAt added in v0.2.0

func (_c *HumanCreate) SetCreatedAt(v time.Time) *HumanCreate

SetCreatedAt sets the "created_at" field.

func (*HumanCreate) SetEmail added in v0.2.0

func (_c *HumanCreate) SetEmail(v string) *HumanCreate

SetEmail sets the "email" field.

func (*HumanCreate) SetEmailVerifiedAt added in v0.2.0

func (_c *HumanCreate) SetEmailVerifiedAt(v time.Time) *HumanCreate

SetEmailVerifiedAt sets the "email_verified_at" field.

func (*HumanCreate) SetFamilyName added in v0.2.0

func (_c *HumanCreate) SetFamilyName(v string) *HumanCreate

SetFamilyName sets the "family_name" field.

func (*HumanCreate) SetGivenName added in v0.2.0

func (_c *HumanCreate) SetGivenName(v string) *HumanCreate

SetGivenName sets the "given_name" field.

func (*HumanCreate) SetID added in v0.2.0

func (_c *HumanCreate) SetID(v uuid.UUID) *HumanCreate

SetID sets the "id" field.

func (*HumanCreate) SetIsPlatformAdmin added in v0.2.0

func (_c *HumanCreate) SetIsPlatformAdmin(v bool) *HumanCreate

SetIsPlatformAdmin sets the "is_platform_admin" field.

func (*HumanCreate) SetLastLoginAt added in v0.2.0

func (_c *HumanCreate) SetLastLoginAt(v time.Time) *HumanCreate

SetLastLoginAt sets the "last_login_at" field.

func (*HumanCreate) SetLocale added in v0.2.0

func (_c *HumanCreate) SetLocale(v string) *HumanCreate

SetLocale sets the "locale" field.

func (*HumanCreate) SetNillableAvatarURL added in v0.2.0

func (_c *HumanCreate) SetNillableAvatarURL(v *string) *HumanCreate

SetNillableAvatarURL sets the "avatar_url" field if the given value is not nil.

func (*HumanCreate) SetNillableCreatedAt added in v0.2.0

func (_c *HumanCreate) SetNillableCreatedAt(v *time.Time) *HumanCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*HumanCreate) SetNillableEmailVerifiedAt added in v0.2.0

func (_c *HumanCreate) SetNillableEmailVerifiedAt(v *time.Time) *HumanCreate

SetNillableEmailVerifiedAt sets the "email_verified_at" field if the given value is not nil.

func (*HumanCreate) SetNillableFamilyName added in v0.2.0

func (_c *HumanCreate) SetNillableFamilyName(v *string) *HumanCreate

SetNillableFamilyName sets the "family_name" field if the given value is not nil.

func (*HumanCreate) SetNillableGivenName added in v0.2.0

func (_c *HumanCreate) SetNillableGivenName(v *string) *HumanCreate

SetNillableGivenName sets the "given_name" field if the given value is not nil.

func (*HumanCreate) SetNillableID added in v0.2.0

func (_c *HumanCreate) SetNillableID(v *uuid.UUID) *HumanCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*HumanCreate) SetNillableIsPlatformAdmin added in v0.2.0

func (_c *HumanCreate) SetNillableIsPlatformAdmin(v *bool) *HumanCreate

SetNillableIsPlatformAdmin sets the "is_platform_admin" field if the given value is not nil.

func (*HumanCreate) SetNillableLastLoginAt added in v0.2.0

func (_c *HumanCreate) SetNillableLastLoginAt(v *time.Time) *HumanCreate

SetNillableLastLoginAt sets the "last_login_at" field if the given value is not nil.

func (*HumanCreate) SetNillableLocale added in v0.2.0

func (_c *HumanCreate) SetNillableLocale(v *string) *HumanCreate

SetNillableLocale sets the "locale" field if the given value is not nil.

func (*HumanCreate) SetNillableTimezone added in v0.2.0

func (_c *HumanCreate) SetNillableTimezone(v *string) *HumanCreate

SetNillableTimezone sets the "timezone" field if the given value is not nil.

func (*HumanCreate) SetNillableUpdatedAt added in v0.2.0

func (_c *HumanCreate) SetNillableUpdatedAt(v *time.Time) *HumanCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*HumanCreate) SetPrincipal added in v0.2.0

func (_c *HumanCreate) SetPrincipal(v *Principal) *HumanCreate

SetPrincipal sets the "principal" edge to the Principal entity.

func (*HumanCreate) SetPrincipalID added in v0.2.0

func (_c *HumanCreate) SetPrincipalID(v uuid.UUID) *HumanCreate

SetPrincipalID sets the "principal_id" field.

func (*HumanCreate) SetTimezone added in v0.2.0

func (_c *HumanCreate) SetTimezone(v string) *HumanCreate

SetTimezone sets the "timezone" field.

func (*HumanCreate) SetUpdatedAt added in v0.2.0

func (_c *HumanCreate) SetUpdatedAt(v time.Time) *HumanCreate

SetUpdatedAt sets the "updated_at" field.

type HumanCreateBulk added in v0.2.0

type HumanCreateBulk struct {
	// contains filtered or unexported fields
}

HumanCreateBulk is the builder for creating many Human entities in bulk.

func (*HumanCreateBulk) Exec added in v0.2.0

func (_c *HumanCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*HumanCreateBulk) ExecX added in v0.2.0

func (_c *HumanCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HumanCreateBulk) OnConflict added in v0.2.0

func (_c *HumanCreateBulk) OnConflict(opts ...sql.ConflictOption) *HumanUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Human.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.HumanUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*HumanCreateBulk) OnConflictColumns added in v0.2.0

func (_c *HumanCreateBulk) OnConflictColumns(columns ...string) *HumanUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Human.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*HumanCreateBulk) Save added in v0.2.0

func (_c *HumanCreateBulk) Save(ctx context.Context) ([]*Human, error)

Save creates the Human entities in the database.

func (*HumanCreateBulk) SaveX added in v0.2.0

func (_c *HumanCreateBulk) SaveX(ctx context.Context) []*Human

SaveX is like Save, but panics if an error occurs.

type HumanDelete added in v0.2.0

type HumanDelete struct {
	// contains filtered or unexported fields
}

HumanDelete is the builder for deleting a Human entity.

func (*HumanDelete) Exec added in v0.2.0

func (_d *HumanDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*HumanDelete) ExecX added in v0.2.0

func (_d *HumanDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*HumanDelete) Where added in v0.2.0

func (_d *HumanDelete) Where(ps ...predicate.Human) *HumanDelete

Where appends a list predicates to the HumanDelete builder.

type HumanDeleteOne added in v0.2.0

type HumanDeleteOne struct {
	// contains filtered or unexported fields
}

HumanDeleteOne is the builder for deleting a single Human entity.

func (*HumanDeleteOne) Exec added in v0.2.0

func (_d *HumanDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*HumanDeleteOne) ExecX added in v0.2.0

func (_d *HumanDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HumanDeleteOne) Where added in v0.2.0

func (_d *HumanDeleteOne) Where(ps ...predicate.Human) *HumanDeleteOne

Where appends a list predicates to the HumanDelete builder.

type HumanEdges added in v0.2.0

type HumanEdges struct {
	// Principal holds the value of the principal edge.
	Principal *Principal `json:"principal,omitempty"`
	// contains filtered or unexported fields
}

HumanEdges holds the relations/edges for other nodes in the graph.

func (HumanEdges) PrincipalOrErr added in v0.2.0

func (e HumanEdges) PrincipalOrErr() (*Principal, error)

PrincipalOrErr returns the Principal value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type HumanFilter added in v0.2.0

type HumanFilter struct {
	// contains filtered or unexported fields
}

HumanFilter provides a generic filtering capability at runtime for HumanQuery.

func (*HumanFilter) Where added in v0.2.0

func (f *HumanFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*HumanFilter) WhereAvatarURL added in v0.2.0

func (f *HumanFilter) WhereAvatarURL(p entql.StringP)

WhereAvatarURL applies the entql string predicate on the avatar_url field.

func (*HumanFilter) WhereCreatedAt added in v0.2.0

func (f *HumanFilter) WhereCreatedAt(p entql.TimeP)

WhereCreatedAt applies the entql time.Time predicate on the created_at field.

func (*HumanFilter) WhereEmail added in v0.2.0

func (f *HumanFilter) WhereEmail(p entql.StringP)

WhereEmail applies the entql string predicate on the email field.

func (*HumanFilter) WhereEmailVerifiedAt added in v0.2.0

func (f *HumanFilter) WhereEmailVerifiedAt(p entql.TimeP)

WhereEmailVerifiedAt applies the entql time.Time predicate on the email_verified_at field.

func (*HumanFilter) WhereFamilyName added in v0.2.0

func (f *HumanFilter) WhereFamilyName(p entql.StringP)

WhereFamilyName applies the entql string predicate on the family_name field.

func (*HumanFilter) WhereGivenName added in v0.2.0

func (f *HumanFilter) WhereGivenName(p entql.StringP)

WhereGivenName applies the entql string predicate on the given_name field.

func (*HumanFilter) WhereHasPrincipal added in v0.2.0

func (f *HumanFilter) WhereHasPrincipal()

WhereHasPrincipal applies a predicate to check if query has an edge principal.

func (*HumanFilter) WhereHasPrincipalWith added in v0.2.0

func (f *HumanFilter) WhereHasPrincipalWith(preds ...predicate.Principal)

WhereHasPrincipalWith applies a predicate to check if query has an edge principal with a given conditions (other predicates).

func (*HumanFilter) WhereID added in v0.2.0

func (f *HumanFilter) WhereID(p entql.ValueP)

WhereID applies the entql [16]byte predicate on the id field.

func (*HumanFilter) WhereIsPlatformAdmin added in v0.2.0

func (f *HumanFilter) WhereIsPlatformAdmin(p entql.BoolP)

WhereIsPlatformAdmin applies the entql bool predicate on the is_platform_admin field.

func (*HumanFilter) WhereLastLoginAt added in v0.2.0

func (f *HumanFilter) WhereLastLoginAt(p entql.TimeP)

WhereLastLoginAt applies the entql time.Time predicate on the last_login_at field.

func (*HumanFilter) WhereLocale added in v0.2.0

func (f *HumanFilter) WhereLocale(p entql.StringP)

WhereLocale applies the entql string predicate on the locale field.

func (*HumanFilter) WherePrincipalID added in v0.2.0

func (f *HumanFilter) WherePrincipalID(p entql.ValueP)

WherePrincipalID applies the entql [16]byte predicate on the principal_id field.

func (*HumanFilter) WhereTimezone added in v0.2.0

func (f *HumanFilter) WhereTimezone(p entql.StringP)

WhereTimezone applies the entql string predicate on the timezone field.

func (*HumanFilter) WhereUpdatedAt added in v0.2.0

func (f *HumanFilter) WhereUpdatedAt(p entql.TimeP)

WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.

type HumanGroupBy added in v0.2.0

type HumanGroupBy struct {
	// contains filtered or unexported fields
}

HumanGroupBy is the group-by builder for Human entities.

func (*HumanGroupBy) Aggregate added in v0.2.0

func (_g *HumanGroupBy) Aggregate(fns ...AggregateFunc) *HumanGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*HumanGroupBy) Bool added in v0.2.0

func (s *HumanGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*HumanGroupBy) BoolX added in v0.2.0

func (s *HumanGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*HumanGroupBy) Bools added in v0.2.0

func (s *HumanGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*HumanGroupBy) BoolsX added in v0.2.0

func (s *HumanGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*HumanGroupBy) Float64 added in v0.2.0

func (s *HumanGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*HumanGroupBy) Float64X added in v0.2.0

func (s *HumanGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*HumanGroupBy) Float64s added in v0.2.0

func (s *HumanGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*HumanGroupBy) Float64sX added in v0.2.0

func (s *HumanGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*HumanGroupBy) Int added in v0.2.0

func (s *HumanGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*HumanGroupBy) IntX added in v0.2.0

func (s *HumanGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*HumanGroupBy) Ints added in v0.2.0

func (s *HumanGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*HumanGroupBy) IntsX added in v0.2.0

func (s *HumanGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*HumanGroupBy) Scan added in v0.2.0

func (_g *HumanGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*HumanGroupBy) ScanX added in v0.2.0

func (s *HumanGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*HumanGroupBy) String added in v0.2.0

func (s *HumanGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*HumanGroupBy) StringX added in v0.2.0

func (s *HumanGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*HumanGroupBy) Strings added in v0.2.0

func (s *HumanGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*HumanGroupBy) StringsX added in v0.2.0

func (s *HumanGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type HumanMutation added in v0.2.0

type HumanMutation struct {
	// contains filtered or unexported fields
}

HumanMutation represents an operation that mutates the Human nodes in the graph.

func (*HumanMutation) AddField added in v0.2.0

func (m *HumanMutation) 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 (*HumanMutation) AddedEdges added in v0.2.0

func (m *HumanMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*HumanMutation) AddedField added in v0.2.0

func (m *HumanMutation) 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 (*HumanMutation) AddedFields added in v0.2.0

func (m *HumanMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*HumanMutation) AddedIDs added in v0.2.0

func (m *HumanMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*HumanMutation) AvatarURL added in v0.2.0

func (m *HumanMutation) AvatarURL() (r string, exists bool)

AvatarURL returns the value of the "avatar_url" field in the mutation.

func (*HumanMutation) AvatarURLCleared added in v0.2.0

func (m *HumanMutation) AvatarURLCleared() bool

AvatarURLCleared returns if the "avatar_url" field was cleared in this mutation.

func (*HumanMutation) ClearAvatarURL added in v0.2.0

func (m *HumanMutation) ClearAvatarURL()

ClearAvatarURL clears the value of the "avatar_url" field.

func (*HumanMutation) ClearEdge added in v0.2.0

func (m *HumanMutation) 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 (*HumanMutation) ClearEmailVerifiedAt added in v0.2.0

func (m *HumanMutation) ClearEmailVerifiedAt()

ClearEmailVerifiedAt clears the value of the "email_verified_at" field.

func (*HumanMutation) ClearFamilyName added in v0.2.0

func (m *HumanMutation) ClearFamilyName()

ClearFamilyName clears the value of the "family_name" field.

func (*HumanMutation) ClearField added in v0.2.0

func (m *HumanMutation) 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 (*HumanMutation) ClearGivenName added in v0.2.0

func (m *HumanMutation) ClearGivenName()

ClearGivenName clears the value of the "given_name" field.

func (*HumanMutation) ClearLastLoginAt added in v0.2.0

func (m *HumanMutation) ClearLastLoginAt()

ClearLastLoginAt clears the value of the "last_login_at" field.

func (*HumanMutation) ClearLocale added in v0.2.0

func (m *HumanMutation) ClearLocale()

ClearLocale clears the value of the "locale" field.

func (*HumanMutation) ClearPrincipal added in v0.2.0

func (m *HumanMutation) ClearPrincipal()

ClearPrincipal clears the "principal" edge to the Principal entity.

func (*HumanMutation) ClearTimezone added in v0.2.0

func (m *HumanMutation) ClearTimezone()

ClearTimezone clears the value of the "timezone" field.

func (*HumanMutation) ClearedEdges added in v0.2.0

func (m *HumanMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*HumanMutation) ClearedFields added in v0.2.0

func (m *HumanMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (HumanMutation) Client added in v0.2.0

func (m HumanMutation) 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 (*HumanMutation) CreatedAt added in v0.2.0

func (m *HumanMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*HumanMutation) EdgeCleared added in v0.2.0

func (m *HumanMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*HumanMutation) Email added in v0.2.0

func (m *HumanMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*HumanMutation) EmailVerifiedAt added in v0.2.0

func (m *HumanMutation) EmailVerifiedAt() (r time.Time, exists bool)

EmailVerifiedAt returns the value of the "email_verified_at" field in the mutation.

func (*HumanMutation) EmailVerifiedAtCleared added in v0.2.0

func (m *HumanMutation) EmailVerifiedAtCleared() bool

EmailVerifiedAtCleared returns if the "email_verified_at" field was cleared in this mutation.

func (*HumanMutation) FamilyName added in v0.2.0

func (m *HumanMutation) FamilyName() (r string, exists bool)

FamilyName returns the value of the "family_name" field in the mutation.

func (*HumanMutation) FamilyNameCleared added in v0.2.0

func (m *HumanMutation) FamilyNameCleared() bool

FamilyNameCleared returns if the "family_name" field was cleared in this mutation.

func (*HumanMutation) Field added in v0.2.0

func (m *HumanMutation) 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 (*HumanMutation) FieldCleared added in v0.2.0

func (m *HumanMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*HumanMutation) Fields added in v0.2.0

func (m *HumanMutation) 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 (*HumanMutation) Filter added in v0.2.0

func (m *HumanMutation) Filter() *HumanFilter

Filter returns an entql.Where implementation to apply filters on the HumanMutation builder.

func (*HumanMutation) GivenName added in v0.2.0

func (m *HumanMutation) GivenName() (r string, exists bool)

GivenName returns the value of the "given_name" field in the mutation.

func (*HumanMutation) GivenNameCleared added in v0.2.0

func (m *HumanMutation) GivenNameCleared() bool

GivenNameCleared returns if the "given_name" field was cleared in this mutation.

func (*HumanMutation) ID added in v0.2.0

func (m *HumanMutation) 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 (*HumanMutation) IDs added in v0.2.0

func (m *HumanMutation) 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 (*HumanMutation) IsPlatformAdmin added in v0.2.0

func (m *HumanMutation) IsPlatformAdmin() (r bool, exists bool)

IsPlatformAdmin returns the value of the "is_platform_admin" field in the mutation.

func (*HumanMutation) LastLoginAt added in v0.2.0

func (m *HumanMutation) LastLoginAt() (r time.Time, exists bool)

LastLoginAt returns the value of the "last_login_at" field in the mutation.

func (*HumanMutation) LastLoginAtCleared added in v0.2.0

func (m *HumanMutation) LastLoginAtCleared() bool

LastLoginAtCleared returns if the "last_login_at" field was cleared in this mutation.

func (*HumanMutation) Locale added in v0.2.0

func (m *HumanMutation) Locale() (r string, exists bool)

Locale returns the value of the "locale" field in the mutation.

func (*HumanMutation) LocaleCleared added in v0.2.0

func (m *HumanMutation) LocaleCleared() bool

LocaleCleared returns if the "locale" field was cleared in this mutation.

func (*HumanMutation) OldAvatarURL added in v0.2.0

func (m *HumanMutation) OldAvatarURL(ctx context.Context) (v *string, err error)

OldAvatarURL returns the old "avatar_url" field's value of the Human entity. If the Human 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 (*HumanMutation) OldCreatedAt added in v0.2.0

func (m *HumanMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Human entity. If the Human 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 (*HumanMutation) OldEmail added in v0.2.0

func (m *HumanMutation) OldEmail(ctx context.Context) (v string, err error)

OldEmail returns the old "email" field's value of the Human entity. If the Human 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 (*HumanMutation) OldEmailVerifiedAt added in v0.2.0

func (m *HumanMutation) OldEmailVerifiedAt(ctx context.Context) (v *time.Time, err error)

OldEmailVerifiedAt returns the old "email_verified_at" field's value of the Human entity. If the Human 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 (*HumanMutation) OldFamilyName added in v0.2.0

func (m *HumanMutation) OldFamilyName(ctx context.Context) (v string, err error)

OldFamilyName returns the old "family_name" field's value of the Human entity. If the Human 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 (*HumanMutation) OldField added in v0.2.0

func (m *HumanMutation) 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 (*HumanMutation) OldGivenName added in v0.2.0

func (m *HumanMutation) OldGivenName(ctx context.Context) (v string, err error)

OldGivenName returns the old "given_name" field's value of the Human entity. If the Human 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 (*HumanMutation) OldIsPlatformAdmin added in v0.2.0

func (m *HumanMutation) OldIsPlatformAdmin(ctx context.Context) (v bool, err error)

OldIsPlatformAdmin returns the old "is_platform_admin" field's value of the Human entity. If the Human 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 (*HumanMutation) OldLastLoginAt added in v0.2.0

func (m *HumanMutation) OldLastLoginAt(ctx context.Context) (v *time.Time, err error)

OldLastLoginAt returns the old "last_login_at" field's value of the Human entity. If the Human 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 (*HumanMutation) OldLocale added in v0.2.0

func (m *HumanMutation) OldLocale(ctx context.Context) (v string, err error)

OldLocale returns the old "locale" field's value of the Human entity. If the Human 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 (*HumanMutation) OldPrincipalID added in v0.2.0

func (m *HumanMutation) OldPrincipalID(ctx context.Context) (v uuid.UUID, err error)

OldPrincipalID returns the old "principal_id" field's value of the Human entity. If the Human 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 (*HumanMutation) OldTimezone added in v0.2.0

func (m *HumanMutation) OldTimezone(ctx context.Context) (v string, err error)

OldTimezone returns the old "timezone" field's value of the Human entity. If the Human 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 (*HumanMutation) OldUpdatedAt added in v0.2.0

func (m *HumanMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Human entity. If the Human 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 (*HumanMutation) Op added in v0.2.0

func (m *HumanMutation) Op() Op

Op returns the operation name.

func (*HumanMutation) PrincipalCleared added in v0.2.0

func (m *HumanMutation) PrincipalCleared() bool

PrincipalCleared reports if the "principal" edge to the Principal entity was cleared.

func (*HumanMutation) PrincipalID added in v0.2.0

func (m *HumanMutation) PrincipalID() (r uuid.UUID, exists bool)

PrincipalID returns the value of the "principal_id" field in the mutation.

func (*HumanMutation) PrincipalIDs added in v0.2.0

func (m *HumanMutation) PrincipalIDs() (ids []uuid.UUID)

PrincipalIDs returns the "principal" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PrincipalID instead. It exists only for internal usage by the builders.

func (*HumanMutation) RemovedEdges added in v0.2.0

func (m *HumanMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*HumanMutation) RemovedIDs added in v0.2.0

func (m *HumanMutation) 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 (*HumanMutation) ResetAvatarURL added in v0.2.0

func (m *HumanMutation) ResetAvatarURL()

ResetAvatarURL resets all changes to the "avatar_url" field.

func (*HumanMutation) ResetCreatedAt added in v0.2.0

func (m *HumanMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*HumanMutation) ResetEdge added in v0.2.0

func (m *HumanMutation) 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 (*HumanMutation) ResetEmail added in v0.2.0

func (m *HumanMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*HumanMutation) ResetEmailVerifiedAt added in v0.2.0

func (m *HumanMutation) ResetEmailVerifiedAt()

ResetEmailVerifiedAt resets all changes to the "email_verified_at" field.

func (*HumanMutation) ResetFamilyName added in v0.2.0

func (m *HumanMutation) ResetFamilyName()

ResetFamilyName resets all changes to the "family_name" field.

func (*HumanMutation) ResetField added in v0.2.0

func (m *HumanMutation) 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 (*HumanMutation) ResetGivenName added in v0.2.0

func (m *HumanMutation) ResetGivenName()

ResetGivenName resets all changes to the "given_name" field.

func (*HumanMutation) ResetIsPlatformAdmin added in v0.2.0

func (m *HumanMutation) ResetIsPlatformAdmin()

ResetIsPlatformAdmin resets all changes to the "is_platform_admin" field.

func (*HumanMutation) ResetLastLoginAt added in v0.2.0

func (m *HumanMutation) ResetLastLoginAt()

ResetLastLoginAt resets all changes to the "last_login_at" field.

func (*HumanMutation) ResetLocale added in v0.2.0

func (m *HumanMutation) ResetLocale()

ResetLocale resets all changes to the "locale" field.

func (*HumanMutation) ResetPrincipal added in v0.2.0

func (m *HumanMutation) ResetPrincipal()

ResetPrincipal resets all changes to the "principal" edge.

func (*HumanMutation) ResetPrincipalID added in v0.2.0

func (m *HumanMutation) ResetPrincipalID()

ResetPrincipalID resets all changes to the "principal_id" field.

func (*HumanMutation) ResetTimezone added in v0.2.0

func (m *HumanMutation) ResetTimezone()

ResetTimezone resets all changes to the "timezone" field.

func (*HumanMutation) ResetUpdatedAt added in v0.2.0

func (m *HumanMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*HumanMutation) SetAvatarURL added in v0.2.0

func (m *HumanMutation) SetAvatarURL(s string)

SetAvatarURL sets the "avatar_url" field.

func (*HumanMutation) SetCreatedAt added in v0.2.0

func (m *HumanMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*HumanMutation) SetEmail added in v0.2.0

func (m *HumanMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*HumanMutation) SetEmailVerifiedAt added in v0.2.0

func (m *HumanMutation) SetEmailVerifiedAt(t time.Time)

SetEmailVerifiedAt sets the "email_verified_at" field.

func (*HumanMutation) SetFamilyName added in v0.2.0

func (m *HumanMutation) SetFamilyName(s string)

SetFamilyName sets the "family_name" field.

func (*HumanMutation) SetField added in v0.2.0

func (m *HumanMutation) 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 (*HumanMutation) SetGivenName added in v0.2.0

func (m *HumanMutation) SetGivenName(s string)

SetGivenName sets the "given_name" field.

func (*HumanMutation) SetID added in v0.2.0

func (m *HumanMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Human entities.

func (*HumanMutation) SetIsPlatformAdmin added in v0.2.0

func (m *HumanMutation) SetIsPlatformAdmin(b bool)

SetIsPlatformAdmin sets the "is_platform_admin" field.

func (*HumanMutation) SetLastLoginAt added in v0.2.0

func (m *HumanMutation) SetLastLoginAt(t time.Time)

SetLastLoginAt sets the "last_login_at" field.

func (*HumanMutation) SetLocale added in v0.2.0

func (m *HumanMutation) SetLocale(s string)

SetLocale sets the "locale" field.

func (*HumanMutation) SetOp added in v0.2.0

func (m *HumanMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*HumanMutation) SetPrincipalID added in v0.2.0

func (m *HumanMutation) SetPrincipalID(u uuid.UUID)

SetPrincipalID sets the "principal_id" field.

func (*HumanMutation) SetTimezone added in v0.2.0

func (m *HumanMutation) SetTimezone(s string)

SetTimezone sets the "timezone" field.

func (*HumanMutation) SetUpdatedAt added in v0.2.0

func (m *HumanMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*HumanMutation) Timezone added in v0.2.0

func (m *HumanMutation) Timezone() (r string, exists bool)

Timezone returns the value of the "timezone" field in the mutation.

func (*HumanMutation) TimezoneCleared added in v0.2.0

func (m *HumanMutation) TimezoneCleared() bool

TimezoneCleared returns if the "timezone" field was cleared in this mutation.

func (HumanMutation) Tx added in v0.2.0

func (m HumanMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*HumanMutation) Type added in v0.2.0

func (m *HumanMutation) Type() string

Type returns the node type of this mutation (Human).

func (*HumanMutation) UpdatedAt added in v0.2.0

func (m *HumanMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*HumanMutation) Where added in v0.2.0

func (m *HumanMutation) Where(ps ...predicate.Human)

Where appends a list predicates to the HumanMutation builder.

func (*HumanMutation) WhereP added in v0.2.0

func (m *HumanMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the HumanMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type HumanQuery added in v0.2.0

type HumanQuery struct {
	// contains filtered or unexported fields
}

HumanQuery is the builder for querying Human entities.

func (*HumanQuery) Aggregate added in v0.2.0

func (_q *HumanQuery) Aggregate(fns ...AggregateFunc) *HumanSelect

Aggregate returns a HumanSelect configured with the given aggregations.

func (*HumanQuery) All added in v0.2.0

func (_q *HumanQuery) All(ctx context.Context) ([]*Human, error)

All executes the query and returns a list of Humen.

func (*HumanQuery) AllX added in v0.2.0

func (_q *HumanQuery) AllX(ctx context.Context) []*Human

AllX is like All, but panics if an error occurs.

func (*HumanQuery) Clone added in v0.2.0

func (_q *HumanQuery) Clone() *HumanQuery

Clone returns a duplicate of the HumanQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*HumanQuery) Count added in v0.2.0

func (_q *HumanQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*HumanQuery) CountX added in v0.2.0

func (_q *HumanQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*HumanQuery) Exist added in v0.2.0

func (_q *HumanQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*HumanQuery) ExistX added in v0.2.0

func (_q *HumanQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*HumanQuery) Filter added in v0.2.0

func (_q *HumanQuery) Filter() *HumanFilter

Filter returns a Filter implementation to apply filters on the HumanQuery builder.

func (*HumanQuery) First added in v0.2.0

func (_q *HumanQuery) First(ctx context.Context) (*Human, error)

First returns the first Human entity from the query. Returns a *NotFoundError when no Human was found.

func (*HumanQuery) FirstID added in v0.2.0

func (_q *HumanQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Human ID from the query. Returns a *NotFoundError when no Human ID was found.

func (*HumanQuery) FirstIDX added in v0.2.0

func (_q *HumanQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*HumanQuery) FirstX added in v0.2.0

func (_q *HumanQuery) FirstX(ctx context.Context) *Human

FirstX is like First, but panics if an error occurs.

func (*HumanQuery) GroupBy added in v0.2.0

func (_q *HumanQuery) GroupBy(field string, fields ...string) *HumanGroupBy

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.Human.Query().
	GroupBy(human.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*HumanQuery) IDs added in v0.2.0

func (_q *HumanQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of Human IDs.

func (*HumanQuery) IDsX added in v0.2.0

func (_q *HumanQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*HumanQuery) Limit added in v0.2.0

func (_q *HumanQuery) Limit(limit int) *HumanQuery

Limit the number of records to be returned by this query.

func (*HumanQuery) Offset added in v0.2.0

func (_q *HumanQuery) Offset(offset int) *HumanQuery

Offset to start from.

func (*HumanQuery) Only added in v0.2.0

func (_q *HumanQuery) Only(ctx context.Context) (*Human, error)

Only returns a single Human entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Human entity is found. Returns a *NotFoundError when no Human entities are found.

func (*HumanQuery) OnlyID added in v0.2.0

func (_q *HumanQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Human ID in the query. Returns a *NotSingularError when more than one Human ID is found. Returns a *NotFoundError when no entities are found.

func (*HumanQuery) OnlyIDX added in v0.2.0

func (_q *HumanQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*HumanQuery) OnlyX added in v0.2.0

func (_q *HumanQuery) OnlyX(ctx context.Context) *Human

OnlyX is like Only, but panics if an error occurs.

func (*HumanQuery) Order added in v0.2.0

func (_q *HumanQuery) Order(o ...human.OrderOption) *HumanQuery

Order specifies how the records should be ordered.

func (*HumanQuery) QueryPrincipal added in v0.2.0

func (_q *HumanQuery) QueryPrincipal() *PrincipalQuery

QueryPrincipal chains the current query on the "principal" edge.

func (*HumanQuery) Select added in v0.2.0

func (_q *HumanQuery) Select(fields ...string) *HumanSelect

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.Human.Query().
	Select(human.FieldCreatedAt).
	Scan(ctx, &v)

func (*HumanQuery) Unique added in v0.2.0

func (_q *HumanQuery) Unique(unique bool) *HumanQuery

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 (*HumanQuery) Where added in v0.2.0

func (_q *HumanQuery) Where(ps ...predicate.Human) *HumanQuery

Where adds a new predicate for the HumanQuery builder.

func (*HumanQuery) WithPrincipal added in v0.2.0

func (_q *HumanQuery) WithPrincipal(opts ...func(*PrincipalQuery)) *HumanQuery

WithPrincipal tells the query-builder to eager-load the nodes that are connected to the "principal" edge. The optional arguments are used to configure the query builder of the edge.

type HumanSelect added in v0.2.0

type HumanSelect struct {
	*HumanQuery
	// contains filtered or unexported fields
}

HumanSelect is the builder for selecting fields of Human entities.

func (*HumanSelect) Aggregate added in v0.2.0

func (_s *HumanSelect) Aggregate(fns ...AggregateFunc) *HumanSelect

Aggregate adds the given aggregation functions to the selector query.

func (*HumanSelect) Bool added in v0.2.0

func (s *HumanSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*HumanSelect) BoolX added in v0.2.0

func (s *HumanSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*HumanSelect) Bools added in v0.2.0

func (s *HumanSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*HumanSelect) BoolsX added in v0.2.0

func (s *HumanSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*HumanSelect) Float64 added in v0.2.0

func (s *HumanSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*HumanSelect) Float64X added in v0.2.0

func (s *HumanSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*HumanSelect) Float64s added in v0.2.0

func (s *HumanSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*HumanSelect) Float64sX added in v0.2.0

func (s *HumanSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*HumanSelect) Int added in v0.2.0

func (s *HumanSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*HumanSelect) IntX added in v0.2.0

func (s *HumanSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*HumanSelect) Ints added in v0.2.0

func (s *HumanSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*HumanSelect) IntsX added in v0.2.0

func (s *HumanSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*HumanSelect) Scan added in v0.2.0

func (_s *HumanSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*HumanSelect) ScanX added in v0.2.0

func (s *HumanSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*HumanSelect) String added in v0.2.0

func (s *HumanSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*HumanSelect) StringX added in v0.2.0

func (s *HumanSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*HumanSelect) Strings added in v0.2.0

func (s *HumanSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*HumanSelect) StringsX added in v0.2.0

func (s *HumanSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type HumanUpdate added in v0.2.0

type HumanUpdate struct {
	// contains filtered or unexported fields
}

HumanUpdate is the builder for updating Human entities.

func (*HumanUpdate) ClearAvatarURL added in v0.2.0

func (_u *HumanUpdate) ClearAvatarURL() *HumanUpdate

ClearAvatarURL clears the value of the "avatar_url" field.

func (*HumanUpdate) ClearEmailVerifiedAt added in v0.2.0

func (_u *HumanUpdate) ClearEmailVerifiedAt() *HumanUpdate

ClearEmailVerifiedAt clears the value of the "email_verified_at" field.

func (*HumanUpdate) ClearFamilyName added in v0.2.0

func (_u *HumanUpdate) ClearFamilyName() *HumanUpdate

ClearFamilyName clears the value of the "family_name" field.

func (*HumanUpdate) ClearGivenName added in v0.2.0

func (_u *HumanUpdate) ClearGivenName() *HumanUpdate

ClearGivenName clears the value of the "given_name" field.

func (*HumanUpdate) ClearLastLoginAt added in v0.2.0

func (_u *HumanUpdate) ClearLastLoginAt() *HumanUpdate

ClearLastLoginAt clears the value of the "last_login_at" field.

func (*HumanUpdate) ClearLocale added in v0.2.0

func (_u *HumanUpdate) ClearLocale() *HumanUpdate

ClearLocale clears the value of the "locale" field.

func (*HumanUpdate) ClearTimezone added in v0.2.0

func (_u *HumanUpdate) ClearTimezone() *HumanUpdate

ClearTimezone clears the value of the "timezone" field.

func (*HumanUpdate) Exec added in v0.2.0

func (_u *HumanUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*HumanUpdate) ExecX added in v0.2.0

func (_u *HumanUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HumanUpdate) Mutation added in v0.2.0

func (_u *HumanUpdate) Mutation() *HumanMutation

Mutation returns the HumanMutation object of the builder.

func (*HumanUpdate) Save added in v0.2.0

func (_u *HumanUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*HumanUpdate) SaveX added in v0.2.0

func (_u *HumanUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*HumanUpdate) SetAvatarURL added in v0.2.0

func (_u *HumanUpdate) SetAvatarURL(v string) *HumanUpdate

SetAvatarURL sets the "avatar_url" field.

func (*HumanUpdate) SetEmail added in v0.2.0

func (_u *HumanUpdate) SetEmail(v string) *HumanUpdate

SetEmail sets the "email" field.

func (*HumanUpdate) SetEmailVerifiedAt added in v0.2.0

func (_u *HumanUpdate) SetEmailVerifiedAt(v time.Time) *HumanUpdate

SetEmailVerifiedAt sets the "email_verified_at" field.

func (*HumanUpdate) SetFamilyName added in v0.2.0

func (_u *HumanUpdate) SetFamilyName(v string) *HumanUpdate

SetFamilyName sets the "family_name" field.

func (*HumanUpdate) SetGivenName added in v0.2.0

func (_u *HumanUpdate) SetGivenName(v string) *HumanUpdate

SetGivenName sets the "given_name" field.

func (*HumanUpdate) SetIsPlatformAdmin added in v0.2.0

func (_u *HumanUpdate) SetIsPlatformAdmin(v bool) *HumanUpdate

SetIsPlatformAdmin sets the "is_platform_admin" field.

func (*HumanUpdate) SetLastLoginAt added in v0.2.0

func (_u *HumanUpdate) SetLastLoginAt(v time.Time) *HumanUpdate

SetLastLoginAt sets the "last_login_at" field.

func (*HumanUpdate) SetLocale added in v0.2.0

func (_u *HumanUpdate) SetLocale(v string) *HumanUpdate

SetLocale sets the "locale" field.

func (*HumanUpdate) SetNillableAvatarURL added in v0.2.0

func (_u *HumanUpdate) SetNillableAvatarURL(v *string) *HumanUpdate

SetNillableAvatarURL sets the "avatar_url" field if the given value is not nil.

func (*HumanUpdate) SetNillableEmail added in v0.2.0

func (_u *HumanUpdate) SetNillableEmail(v *string) *HumanUpdate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*HumanUpdate) SetNillableEmailVerifiedAt added in v0.2.0

func (_u *HumanUpdate) SetNillableEmailVerifiedAt(v *time.Time) *HumanUpdate

SetNillableEmailVerifiedAt sets the "email_verified_at" field if the given value is not nil.

func (*HumanUpdate) SetNillableFamilyName added in v0.2.0

func (_u *HumanUpdate) SetNillableFamilyName(v *string) *HumanUpdate

SetNillableFamilyName sets the "family_name" field if the given value is not nil.

func (*HumanUpdate) SetNillableGivenName added in v0.2.0

func (_u *HumanUpdate) SetNillableGivenName(v *string) *HumanUpdate

SetNillableGivenName sets the "given_name" field if the given value is not nil.

func (*HumanUpdate) SetNillableIsPlatformAdmin added in v0.2.0

func (_u *HumanUpdate) SetNillableIsPlatformAdmin(v *bool) *HumanUpdate

SetNillableIsPlatformAdmin sets the "is_platform_admin" field if the given value is not nil.

func (*HumanUpdate) SetNillableLastLoginAt added in v0.2.0

func (_u *HumanUpdate) SetNillableLastLoginAt(v *time.Time) *HumanUpdate

SetNillableLastLoginAt sets the "last_login_at" field if the given value is not nil.

func (*HumanUpdate) SetNillableLocale added in v0.2.0

func (_u *HumanUpdate) SetNillableLocale(v *string) *HumanUpdate

SetNillableLocale sets the "locale" field if the given value is not nil.

func (*HumanUpdate) SetNillableTimezone added in v0.2.0

func (_u *HumanUpdate) SetNillableTimezone(v *string) *HumanUpdate

SetNillableTimezone sets the "timezone" field if the given value is not nil.

func (*HumanUpdate) SetTimezone added in v0.2.0

func (_u *HumanUpdate) SetTimezone(v string) *HumanUpdate

SetTimezone sets the "timezone" field.

func (*HumanUpdate) SetUpdatedAt added in v0.2.0

func (_u *HumanUpdate) SetUpdatedAt(v time.Time) *HumanUpdate

SetUpdatedAt sets the "updated_at" field.

func (*HumanUpdate) Where added in v0.2.0

func (_u *HumanUpdate) Where(ps ...predicate.Human) *HumanUpdate

Where appends a list predicates to the HumanUpdate builder.

type HumanUpdateOne added in v0.2.0

type HumanUpdateOne struct {
	// contains filtered or unexported fields
}

HumanUpdateOne is the builder for updating a single Human entity.

func (*HumanUpdateOne) ClearAvatarURL added in v0.2.0

func (_u *HumanUpdateOne) ClearAvatarURL() *HumanUpdateOne

ClearAvatarURL clears the value of the "avatar_url" field.

func (*HumanUpdateOne) ClearEmailVerifiedAt added in v0.2.0

func (_u *HumanUpdateOne) ClearEmailVerifiedAt() *HumanUpdateOne

ClearEmailVerifiedAt clears the value of the "email_verified_at" field.

func (*HumanUpdateOne) ClearFamilyName added in v0.2.0

func (_u *HumanUpdateOne) ClearFamilyName() *HumanUpdateOne

ClearFamilyName clears the value of the "family_name" field.

func (*HumanUpdateOne) ClearGivenName added in v0.2.0

func (_u *HumanUpdateOne) ClearGivenName() *HumanUpdateOne

ClearGivenName clears the value of the "given_name" field.

func (*HumanUpdateOne) ClearLastLoginAt added in v0.2.0

func (_u *HumanUpdateOne) ClearLastLoginAt() *HumanUpdateOne

ClearLastLoginAt clears the value of the "last_login_at" field.

func (*HumanUpdateOne) ClearLocale added in v0.2.0

func (_u *HumanUpdateOne) ClearLocale() *HumanUpdateOne

ClearLocale clears the value of the "locale" field.

func (*HumanUpdateOne) ClearTimezone added in v0.2.0

func (_u *HumanUpdateOne) ClearTimezone() *HumanUpdateOne

ClearTimezone clears the value of the "timezone" field.

func (*HumanUpdateOne) Exec added in v0.2.0

func (_u *HumanUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*HumanUpdateOne) ExecX added in v0.2.0

func (_u *HumanUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HumanUpdateOne) Mutation added in v0.2.0

func (_u *HumanUpdateOne) Mutation() *HumanMutation

Mutation returns the HumanMutation object of the builder.

func (*HumanUpdateOne) Save added in v0.2.0

func (_u *HumanUpdateOne) Save(ctx context.Context) (*Human, error)

Save executes the query and returns the updated Human entity.

func (*HumanUpdateOne) SaveX added in v0.2.0

func (_u *HumanUpdateOne) SaveX(ctx context.Context) *Human

SaveX is like Save, but panics if an error occurs.

func (*HumanUpdateOne) Select added in v0.2.0

func (_u *HumanUpdateOne) Select(field string, fields ...string) *HumanUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*HumanUpdateOne) SetAvatarURL added in v0.2.0

func (_u *HumanUpdateOne) SetAvatarURL(v string) *HumanUpdateOne

SetAvatarURL sets the "avatar_url" field.

func (*HumanUpdateOne) SetEmail added in v0.2.0

func (_u *HumanUpdateOne) SetEmail(v string) *HumanUpdateOne

SetEmail sets the "email" field.

func (*HumanUpdateOne) SetEmailVerifiedAt added in v0.2.0

func (_u *HumanUpdateOne) SetEmailVerifiedAt(v time.Time) *HumanUpdateOne

SetEmailVerifiedAt sets the "email_verified_at" field.

func (*HumanUpdateOne) SetFamilyName added in v0.2.0

func (_u *HumanUpdateOne) SetFamilyName(v string) *HumanUpdateOne

SetFamilyName sets the "family_name" field.

func (*HumanUpdateOne) SetGivenName added in v0.2.0

func (_u *HumanUpdateOne) SetGivenName(v string) *HumanUpdateOne

SetGivenName sets the "given_name" field.

func (*HumanUpdateOne) SetIsPlatformAdmin added in v0.2.0

func (_u *HumanUpdateOne) SetIsPlatformAdmin(v bool) *HumanUpdateOne

SetIsPlatformAdmin sets the "is_platform_admin" field.

func (*HumanUpdateOne) SetLastLoginAt added in v0.2.0

func (_u *HumanUpdateOne) SetLastLoginAt(v time.Time) *HumanUpdateOne

SetLastLoginAt sets the "last_login_at" field.

func (*HumanUpdateOne) SetLocale added in v0.2.0

func (_u *HumanUpdateOne) SetLocale(v string) *HumanUpdateOne

SetLocale sets the "locale" field.

func (*HumanUpdateOne) SetNillableAvatarURL added in v0.2.0

func (_u *HumanUpdateOne) SetNillableAvatarURL(v *string) *HumanUpdateOne

SetNillableAvatarURL sets the "avatar_url" field if the given value is not nil.

func (*HumanUpdateOne) SetNillableEmail added in v0.2.0

func (_u *HumanUpdateOne) SetNillableEmail(v *string) *HumanUpdateOne

SetNillableEmail sets the "email" field if the given value is not nil.

func (*HumanUpdateOne) SetNillableEmailVerifiedAt added in v0.2.0

func (_u *HumanUpdateOne) SetNillableEmailVerifiedAt(v *time.Time) *HumanUpdateOne

SetNillableEmailVerifiedAt sets the "email_verified_at" field if the given value is not nil.

func (*HumanUpdateOne) SetNillableFamilyName added in v0.2.0

func (_u *HumanUpdateOne) SetNillableFamilyName(v *string) *HumanUpdateOne

SetNillableFamilyName sets the "family_name" field if the given value is not nil.

func (*HumanUpdateOne) SetNillableGivenName added in v0.2.0

func (_u *HumanUpdateOne) SetNillableGivenName(v *string) *HumanUpdateOne

SetNillableGivenName sets the "given_name" field if the given value is not nil.

func (*HumanUpdateOne) SetNillableIsPlatformAdmin added in v0.2.0

func (_u *HumanUpdateOne) SetNillableIsPlatformAdmin(v *bool) *HumanUpdateOne

SetNillableIsPlatformAdmin sets the "is_platform_admin" field if the given value is not nil.

func (*HumanUpdateOne) SetNillableLastLoginAt added in v0.2.0

func (_u *HumanUpdateOne) SetNillableLastLoginAt(v *time.Time) *HumanUpdateOne

SetNillableLastLoginAt sets the "last_login_at" field if the given value is not nil.

func (*HumanUpdateOne) SetNillableLocale added in v0.2.0

func (_u *HumanUpdateOne) SetNillableLocale(v *string) *HumanUpdateOne

SetNillableLocale sets the "locale" field if the given value is not nil.

func (*HumanUpdateOne) SetNillableTimezone added in v0.2.0

func (_u *HumanUpdateOne) SetNillableTimezone(v *string) *HumanUpdateOne

SetNillableTimezone sets the "timezone" field if the given value is not nil.

func (*HumanUpdateOne) SetTimezone added in v0.2.0

func (_u *HumanUpdateOne) SetTimezone(v string) *HumanUpdateOne

SetTimezone sets the "timezone" field.

func (*HumanUpdateOne) SetUpdatedAt added in v0.2.0

func (_u *HumanUpdateOne) SetUpdatedAt(v time.Time) *HumanUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*HumanUpdateOne) Where added in v0.2.0

func (_u *HumanUpdateOne) Where(ps ...predicate.Human) *HumanUpdateOne

Where appends a list predicates to the HumanUpdate builder.

type HumanUpsert added in v0.2.0

type HumanUpsert struct {
	*sql.UpdateSet
}

HumanUpsert is the "OnConflict" setter.

func (*HumanUpsert) ClearAvatarURL added in v0.2.0

func (u *HumanUpsert) ClearAvatarURL() *HumanUpsert

ClearAvatarURL clears the value of the "avatar_url" field.

func (*HumanUpsert) ClearEmailVerifiedAt added in v0.2.0

func (u *HumanUpsert) ClearEmailVerifiedAt() *HumanUpsert

ClearEmailVerifiedAt clears the value of the "email_verified_at" field.

func (*HumanUpsert) ClearFamilyName added in v0.2.0

func (u *HumanUpsert) ClearFamilyName() *HumanUpsert

ClearFamilyName clears the value of the "family_name" field.

func (*HumanUpsert) ClearGivenName added in v0.2.0

func (u *HumanUpsert) ClearGivenName() *HumanUpsert

ClearGivenName clears the value of the "given_name" field.

func (*HumanUpsert) ClearLastLoginAt added in v0.2.0

func (u *HumanUpsert) ClearLastLoginAt() *HumanUpsert

ClearLastLoginAt clears the value of the "last_login_at" field.

func (*HumanUpsert) ClearLocale added in v0.2.0

func (u *HumanUpsert) ClearLocale() *HumanUpsert

ClearLocale clears the value of the "locale" field.

func (*HumanUpsert) ClearTimezone added in v0.2.0

func (u *HumanUpsert) ClearTimezone() *HumanUpsert

ClearTimezone clears the value of the "timezone" field.

func (*HumanUpsert) SetAvatarURL added in v0.2.0

func (u *HumanUpsert) SetAvatarURL(v string) *HumanUpsert

SetAvatarURL sets the "avatar_url" field.

func (*HumanUpsert) SetEmail added in v0.2.0

func (u *HumanUpsert) SetEmail(v string) *HumanUpsert

SetEmail sets the "email" field.

func (*HumanUpsert) SetEmailVerifiedAt added in v0.2.0

func (u *HumanUpsert) SetEmailVerifiedAt(v time.Time) *HumanUpsert

SetEmailVerifiedAt sets the "email_verified_at" field.

func (*HumanUpsert) SetFamilyName added in v0.2.0

func (u *HumanUpsert) SetFamilyName(v string) *HumanUpsert

SetFamilyName sets the "family_name" field.

func (*HumanUpsert) SetGivenName added in v0.2.0

func (u *HumanUpsert) SetGivenName(v string) *HumanUpsert

SetGivenName sets the "given_name" field.

func (*HumanUpsert) SetIsPlatformAdmin added in v0.2.0

func (u *HumanUpsert) SetIsPlatformAdmin(v bool) *HumanUpsert

SetIsPlatformAdmin sets the "is_platform_admin" field.

func (*HumanUpsert) SetLastLoginAt added in v0.2.0

func (u *HumanUpsert) SetLastLoginAt(v time.Time) *HumanUpsert

SetLastLoginAt sets the "last_login_at" field.

func (*HumanUpsert) SetLocale added in v0.2.0

func (u *HumanUpsert) SetLocale(v string) *HumanUpsert

SetLocale sets the "locale" field.

func (*HumanUpsert) SetTimezone added in v0.2.0

func (u *HumanUpsert) SetTimezone(v string) *HumanUpsert

SetTimezone sets the "timezone" field.

func (*HumanUpsert) SetUpdatedAt added in v0.2.0

func (u *HumanUpsert) SetUpdatedAt(v time.Time) *HumanUpsert

SetUpdatedAt sets the "updated_at" field.

func (*HumanUpsert) UpdateAvatarURL added in v0.2.0

func (u *HumanUpsert) UpdateAvatarURL() *HumanUpsert

UpdateAvatarURL sets the "avatar_url" field to the value that was provided on create.

func (*HumanUpsert) UpdateEmail added in v0.2.0

func (u *HumanUpsert) UpdateEmail() *HumanUpsert

UpdateEmail sets the "email" field to the value that was provided on create.

func (*HumanUpsert) UpdateEmailVerifiedAt added in v0.2.0

func (u *HumanUpsert) UpdateEmailVerifiedAt() *HumanUpsert

UpdateEmailVerifiedAt sets the "email_verified_at" field to the value that was provided on create.

func (*HumanUpsert) UpdateFamilyName added in v0.2.0

func (u *HumanUpsert) UpdateFamilyName() *HumanUpsert

UpdateFamilyName sets the "family_name" field to the value that was provided on create.

func (*HumanUpsert) UpdateGivenName added in v0.2.0

func (u *HumanUpsert) UpdateGivenName() *HumanUpsert

UpdateGivenName sets the "given_name" field to the value that was provided on create.

func (*HumanUpsert) UpdateIsPlatformAdmin added in v0.2.0

func (u *HumanUpsert) UpdateIsPlatformAdmin() *HumanUpsert

UpdateIsPlatformAdmin sets the "is_platform_admin" field to the value that was provided on create.

func (*HumanUpsert) UpdateLastLoginAt added in v0.2.0

func (u *HumanUpsert) UpdateLastLoginAt() *HumanUpsert

UpdateLastLoginAt sets the "last_login_at" field to the value that was provided on create.

func (*HumanUpsert) UpdateLocale added in v0.2.0

func (u *HumanUpsert) UpdateLocale() *HumanUpsert

UpdateLocale sets the "locale" field to the value that was provided on create.

func (*HumanUpsert) UpdateTimezone added in v0.2.0

func (u *HumanUpsert) UpdateTimezone() *HumanUpsert

UpdateTimezone sets the "timezone" field to the value that was provided on create.

func (*HumanUpsert) UpdateUpdatedAt added in v0.2.0

func (u *HumanUpsert) UpdateUpdatedAt() *HumanUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type HumanUpsertBulk added in v0.2.0

type HumanUpsertBulk struct {
	// contains filtered or unexported fields
}

HumanUpsertBulk is the builder for "upsert"-ing a bulk of Human nodes.

func (*HumanUpsertBulk) ClearAvatarURL added in v0.2.0

func (u *HumanUpsertBulk) ClearAvatarURL() *HumanUpsertBulk

ClearAvatarURL clears the value of the "avatar_url" field.

func (*HumanUpsertBulk) ClearEmailVerifiedAt added in v0.2.0

func (u *HumanUpsertBulk) ClearEmailVerifiedAt() *HumanUpsertBulk

ClearEmailVerifiedAt clears the value of the "email_verified_at" field.

func (*HumanUpsertBulk) ClearFamilyName added in v0.2.0

func (u *HumanUpsertBulk) ClearFamilyName() *HumanUpsertBulk

ClearFamilyName clears the value of the "family_name" field.

func (*HumanUpsertBulk) ClearGivenName added in v0.2.0

func (u *HumanUpsertBulk) ClearGivenName() *HumanUpsertBulk

ClearGivenName clears the value of the "given_name" field.

func (*HumanUpsertBulk) ClearLastLoginAt added in v0.2.0

func (u *HumanUpsertBulk) ClearLastLoginAt() *HumanUpsertBulk

ClearLastLoginAt clears the value of the "last_login_at" field.

func (*HumanUpsertBulk) ClearLocale added in v0.2.0

func (u *HumanUpsertBulk) ClearLocale() *HumanUpsertBulk

ClearLocale clears the value of the "locale" field.

func (*HumanUpsertBulk) ClearTimezone added in v0.2.0

func (u *HumanUpsertBulk) ClearTimezone() *HumanUpsertBulk

ClearTimezone clears the value of the "timezone" field.

func (*HumanUpsertBulk) DoNothing added in v0.2.0

func (u *HumanUpsertBulk) DoNothing() *HumanUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*HumanUpsertBulk) Exec added in v0.2.0

func (u *HumanUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*HumanUpsertBulk) ExecX added in v0.2.0

func (u *HumanUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HumanUpsertBulk) Ignore added in v0.2.0

func (u *HumanUpsertBulk) Ignore() *HumanUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Human.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*HumanUpsertBulk) SetAvatarURL added in v0.2.0

func (u *HumanUpsertBulk) SetAvatarURL(v string) *HumanUpsertBulk

SetAvatarURL sets the "avatar_url" field.

func (*HumanUpsertBulk) SetEmail added in v0.2.0

func (u *HumanUpsertBulk) SetEmail(v string) *HumanUpsertBulk

SetEmail sets the "email" field.

func (*HumanUpsertBulk) SetEmailVerifiedAt added in v0.2.0

func (u *HumanUpsertBulk) SetEmailVerifiedAt(v time.Time) *HumanUpsertBulk

SetEmailVerifiedAt sets the "email_verified_at" field.

func (*HumanUpsertBulk) SetFamilyName added in v0.2.0

func (u *HumanUpsertBulk) SetFamilyName(v string) *HumanUpsertBulk

SetFamilyName sets the "family_name" field.

func (*HumanUpsertBulk) SetGivenName added in v0.2.0

func (u *HumanUpsertBulk) SetGivenName(v string) *HumanUpsertBulk

SetGivenName sets the "given_name" field.

func (*HumanUpsertBulk) SetIsPlatformAdmin added in v0.2.0

func (u *HumanUpsertBulk) SetIsPlatformAdmin(v bool) *HumanUpsertBulk

SetIsPlatformAdmin sets the "is_platform_admin" field.

func (*HumanUpsertBulk) SetLastLoginAt added in v0.2.0

func (u *HumanUpsertBulk) SetLastLoginAt(v time.Time) *HumanUpsertBulk

SetLastLoginAt sets the "last_login_at" field.

func (*HumanUpsertBulk) SetLocale added in v0.2.0

func (u *HumanUpsertBulk) SetLocale(v string) *HumanUpsertBulk

SetLocale sets the "locale" field.

func (*HumanUpsertBulk) SetTimezone added in v0.2.0

func (u *HumanUpsertBulk) SetTimezone(v string) *HumanUpsertBulk

SetTimezone sets the "timezone" field.

func (*HumanUpsertBulk) SetUpdatedAt added in v0.2.0

func (u *HumanUpsertBulk) SetUpdatedAt(v time.Time) *HumanUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*HumanUpsertBulk) Update added in v0.2.0

func (u *HumanUpsertBulk) Update(set func(*HumanUpsert)) *HumanUpsertBulk

Update allows overriding fields `UPDATE` values. See the HumanCreateBulk.OnConflict documentation for more info.

func (*HumanUpsertBulk) UpdateAvatarURL added in v0.2.0

func (u *HumanUpsertBulk) UpdateAvatarURL() *HumanUpsertBulk

UpdateAvatarURL sets the "avatar_url" field to the value that was provided on create.

func (*HumanUpsertBulk) UpdateEmail added in v0.2.0

func (u *HumanUpsertBulk) UpdateEmail() *HumanUpsertBulk

UpdateEmail sets the "email" field to the value that was provided on create.

func (*HumanUpsertBulk) UpdateEmailVerifiedAt added in v0.2.0

func (u *HumanUpsertBulk) UpdateEmailVerifiedAt() *HumanUpsertBulk

UpdateEmailVerifiedAt sets the "email_verified_at" field to the value that was provided on create.

func (*HumanUpsertBulk) UpdateFamilyName added in v0.2.0

func (u *HumanUpsertBulk) UpdateFamilyName() *HumanUpsertBulk

UpdateFamilyName sets the "family_name" field to the value that was provided on create.

func (*HumanUpsertBulk) UpdateGivenName added in v0.2.0

func (u *HumanUpsertBulk) UpdateGivenName() *HumanUpsertBulk

UpdateGivenName sets the "given_name" field to the value that was provided on create.

func (*HumanUpsertBulk) UpdateIsPlatformAdmin added in v0.2.0

func (u *HumanUpsertBulk) UpdateIsPlatformAdmin() *HumanUpsertBulk

UpdateIsPlatformAdmin sets the "is_platform_admin" field to the value that was provided on create.

func (*HumanUpsertBulk) UpdateLastLoginAt added in v0.2.0

func (u *HumanUpsertBulk) UpdateLastLoginAt() *HumanUpsertBulk

UpdateLastLoginAt sets the "last_login_at" field to the value that was provided on create.

func (*HumanUpsertBulk) UpdateLocale added in v0.2.0

func (u *HumanUpsertBulk) UpdateLocale() *HumanUpsertBulk

UpdateLocale sets the "locale" field to the value that was provided on create.

func (*HumanUpsertBulk) UpdateNewValues added in v0.2.0

func (u *HumanUpsertBulk) UpdateNewValues() *HumanUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Human.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(human.FieldID)
		}),
	).
	Exec(ctx)

func (*HumanUpsertBulk) UpdateTimezone added in v0.2.0

func (u *HumanUpsertBulk) UpdateTimezone() *HumanUpsertBulk

UpdateTimezone sets the "timezone" field to the value that was provided on create.

func (*HumanUpsertBulk) UpdateUpdatedAt added in v0.2.0

func (u *HumanUpsertBulk) UpdateUpdatedAt() *HumanUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type HumanUpsertOne added in v0.2.0

type HumanUpsertOne struct {
	// contains filtered or unexported fields
}

HumanUpsertOne is the builder for "upsert"-ing

one Human node.

func (*HumanUpsertOne) ClearAvatarURL added in v0.2.0

func (u *HumanUpsertOne) ClearAvatarURL() *HumanUpsertOne

ClearAvatarURL clears the value of the "avatar_url" field.

func (*HumanUpsertOne) ClearEmailVerifiedAt added in v0.2.0

func (u *HumanUpsertOne) ClearEmailVerifiedAt() *HumanUpsertOne

ClearEmailVerifiedAt clears the value of the "email_verified_at" field.

func (*HumanUpsertOne) ClearFamilyName added in v0.2.0

func (u *HumanUpsertOne) ClearFamilyName() *HumanUpsertOne

ClearFamilyName clears the value of the "family_name" field.

func (*HumanUpsertOne) ClearGivenName added in v0.2.0

func (u *HumanUpsertOne) ClearGivenName() *HumanUpsertOne

ClearGivenName clears the value of the "given_name" field.

func (*HumanUpsertOne) ClearLastLoginAt added in v0.2.0

func (u *HumanUpsertOne) ClearLastLoginAt() *HumanUpsertOne

ClearLastLoginAt clears the value of the "last_login_at" field.

func (*HumanUpsertOne) ClearLocale added in v0.2.0

func (u *HumanUpsertOne) ClearLocale() *HumanUpsertOne

ClearLocale clears the value of the "locale" field.

func (*HumanUpsertOne) ClearTimezone added in v0.2.0

func (u *HumanUpsertOne) ClearTimezone() *HumanUpsertOne

ClearTimezone clears the value of the "timezone" field.

func (*HumanUpsertOne) DoNothing added in v0.2.0

func (u *HumanUpsertOne) DoNothing() *HumanUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*HumanUpsertOne) Exec added in v0.2.0

func (u *HumanUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*HumanUpsertOne) ExecX added in v0.2.0

func (u *HumanUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HumanUpsertOne) ID added in v0.2.0

func (u *HumanUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*HumanUpsertOne) IDX added in v0.2.0

func (u *HumanUpsertOne) IDX(ctx context.Context) uuid.UUID

IDX is like ID, but panics if an error occurs.

func (*HumanUpsertOne) Ignore added in v0.2.0

func (u *HumanUpsertOne) Ignore() *HumanUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Human.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*HumanUpsertOne) SetAvatarURL added in v0.2.0

func (u *HumanUpsertOne) SetAvatarURL(v string) *HumanUpsertOne

SetAvatarURL sets the "avatar_url" field.

func (*HumanUpsertOne) SetEmail added in v0.2.0

func (u *HumanUpsertOne) SetEmail(v string) *HumanUpsertOne

SetEmail sets the "email" field.

func (*HumanUpsertOne) SetEmailVerifiedAt added in v0.2.0

func (u *HumanUpsertOne) SetEmailVerifiedAt(v time.Time) *HumanUpsertOne

SetEmailVerifiedAt sets the "email_verified_at" field.

func (*HumanUpsertOne) SetFamilyName added in v0.2.0

func (u *HumanUpsertOne) SetFamilyName(v string) *HumanUpsertOne

SetFamilyName sets the "family_name" field.

func (*HumanUpsertOne) SetGivenName added in v0.2.0

func (u *HumanUpsertOne) SetGivenName(v string) *HumanUpsertOne

SetGivenName sets the "given_name" field.

func (*HumanUpsertOne) SetIsPlatformAdmin added in v0.2.0

func (u *HumanUpsertOne) SetIsPlatformAdmin(v bool) *HumanUpsertOne

SetIsPlatformAdmin sets the "is_platform_admin" field.

func (*HumanUpsertOne) SetLastLoginAt added in v0.2.0

func (u *HumanUpsertOne) SetLastLoginAt(v time.Time) *HumanUpsertOne

SetLastLoginAt sets the "last_login_at" field.

func (*HumanUpsertOne) SetLocale added in v0.2.0

func (u *HumanUpsertOne) SetLocale(v string) *HumanUpsertOne

SetLocale sets the "locale" field.

func (*HumanUpsertOne) SetTimezone added in v0.2.0

func (u *HumanUpsertOne) SetTimezone(v string) *HumanUpsertOne

SetTimezone sets the "timezone" field.

func (*HumanUpsertOne) SetUpdatedAt added in v0.2.0

func (u *HumanUpsertOne) SetUpdatedAt(v time.Time) *HumanUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*HumanUpsertOne) Update added in v0.2.0

func (u *HumanUpsertOne) Update(set func(*HumanUpsert)) *HumanUpsertOne

Update allows overriding fields `UPDATE` values. See the HumanCreate.OnConflict documentation for more info.

func (*HumanUpsertOne) UpdateAvatarURL added in v0.2.0

func (u *HumanUpsertOne) UpdateAvatarURL() *HumanUpsertOne

UpdateAvatarURL sets the "avatar_url" field to the value that was provided on create.

func (*HumanUpsertOne) UpdateEmail added in v0.2.0

func (u *HumanUpsertOne) UpdateEmail() *HumanUpsertOne

UpdateEmail sets the "email" field to the value that was provided on create.

func (*HumanUpsertOne) UpdateEmailVerifiedAt added in v0.2.0

func (u *HumanUpsertOne) UpdateEmailVerifiedAt() *HumanUpsertOne

UpdateEmailVerifiedAt sets the "email_verified_at" field to the value that was provided on create.

func (*HumanUpsertOne) UpdateFamilyName added in v0.2.0

func (u *HumanUpsertOne) UpdateFamilyName() *HumanUpsertOne

UpdateFamilyName sets the "family_name" field to the value that was provided on create.

func (*HumanUpsertOne) UpdateGivenName added in v0.2.0

func (u *HumanUpsertOne) UpdateGivenName() *HumanUpsertOne

UpdateGivenName sets the "given_name" field to the value that was provided on create.

func (*HumanUpsertOne) UpdateIsPlatformAdmin added in v0.2.0

func (u *HumanUpsertOne) UpdateIsPlatformAdmin() *HumanUpsertOne

UpdateIsPlatformAdmin sets the "is_platform_admin" field to the value that was provided on create.

func (*HumanUpsertOne) UpdateLastLoginAt added in v0.2.0

func (u *HumanUpsertOne) UpdateLastLoginAt() *HumanUpsertOne

UpdateLastLoginAt sets the "last_login_at" field to the value that was provided on create.

func (*HumanUpsertOne) UpdateLocale added in v0.2.0

func (u *HumanUpsertOne) UpdateLocale() *HumanUpsertOne

UpdateLocale sets the "locale" field to the value that was provided on create.

func (*HumanUpsertOne) UpdateNewValues added in v0.2.0

func (u *HumanUpsertOne) UpdateNewValues() *HumanUpsertOne

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.Human.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(human.FieldID)
		}),
	).
	Exec(ctx)

func (*HumanUpsertOne) UpdateTimezone added in v0.2.0

func (u *HumanUpsertOne) UpdateTimezone() *HumanUpsertOne

UpdateTimezone sets the "timezone" field to the value that was provided on create.

func (*HumanUpsertOne) UpdateUpdatedAt added in v0.2.0

func (u *HumanUpsertOne) UpdateUpdatedAt() *HumanUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type Humen added in v0.2.0

type Humen []*Human

Humen is a parsable slice of Human.

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 Invite added in v0.2.0

type Invite 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"`
	// Organization the invite is for
	OrganizationID uuid.UUID `json:"organization_id,omitempty"`
	// Principal who created the invite
	InviterPrincipalID uuid.UUID `json:"inviter_principal_id,omitempty"`
	// Email address of the invitee
	Email string `json:"email,omitempty"`
	// Role to assign when invite is accepted
	Role string `json:"role,omitempty"`
	// Secure token for invite URL
	Token string `json:"-"`
	// Current status of the invite
	Status invite.Status `json:"status,omitempty"`
	// Personal message from inviter
	Message *string `json:"message,omitempty"`
	// When this invite expires
	ExpiresAt time.Time `json:"expires_at,omitempty"`
	// When the invite was accepted
	AcceptedAt *time.Time `json:"accepted_at,omitempty"`
	// Principal who accepted the invite
	AcceptedByPrincipalID *uuid.UUID `json:"accepted_by_principal_id,omitempty"`
	// Number of times invite was resent
	ResendCount int `json:"resend_count,omitempty"`
	// When invite was last sent/resent
	LastSentAt time.Time `json:"last_sent_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the InviteQuery when eager-loading is set.
	Edges InviteEdges `json:"edges"`
	// contains filtered or unexported fields
}

Invite is the model entity for the Invite schema.

func (*Invite) QueryInviter added in v0.2.0

func (_m *Invite) QueryInviter() *PrincipalQuery

QueryInviter queries the "inviter" edge of the Invite entity.

func (*Invite) QueryOrganization added in v0.2.0

func (_m *Invite) QueryOrganization() *OrganizationQuery

QueryOrganization queries the "organization" edge of the Invite entity.

func (*Invite) String added in v0.2.0

func (_m *Invite) String() string

String implements the fmt.Stringer.

func (*Invite) Unwrap added in v0.2.0

func (_m *Invite) Unwrap() *Invite

Unwrap unwraps the Invite 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 (*Invite) Update added in v0.2.0

func (_m *Invite) Update() *InviteUpdateOne

Update returns a builder for updating this Invite. Note that you need to call Invite.Unwrap() before calling this method if this Invite was returned from a transaction, and the transaction was committed or rolled back.

func (*Invite) Value added in v0.2.0

func (_m *Invite) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Invite. This includes values selected through modifiers, order, etc.

type InviteClient added in v0.2.0

type InviteClient struct {
	// contains filtered or unexported fields
}

InviteClient is a client for the Invite schema.

func NewInviteClient added in v0.2.0

func NewInviteClient(c config) *InviteClient

NewInviteClient returns a client for the Invite from the given config.

func (*InviteClient) Create added in v0.2.0

func (c *InviteClient) Create() *InviteCreate

Create returns a builder for creating a Invite entity.

func (*InviteClient) CreateBulk added in v0.2.0

func (c *InviteClient) CreateBulk(builders ...*InviteCreate) *InviteCreateBulk

CreateBulk returns a builder for creating a bulk of Invite entities.

func (*InviteClient) Delete added in v0.2.0

func (c *InviteClient) Delete() *InviteDelete

Delete returns a delete builder for Invite.

func (*InviteClient) DeleteOne added in v0.2.0

func (c *InviteClient) DeleteOne(_m *Invite) *InviteDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*InviteClient) DeleteOneID added in v0.2.0

func (c *InviteClient) DeleteOneID(id uuid.UUID) *InviteDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*InviteClient) Get added in v0.2.0

func (c *InviteClient) Get(ctx context.Context, id uuid.UUID) (*Invite, error)

Get returns a Invite entity by its id.

func (*InviteClient) GetX added in v0.2.0

func (c *InviteClient) GetX(ctx context.Context, id uuid.UUID) *Invite

GetX is like Get, but panics if an error occurs.

func (*InviteClient) Hooks added in v0.2.0

func (c *InviteClient) Hooks() []Hook

Hooks returns the client hooks.

func (*InviteClient) Intercept added in v0.2.0

func (c *InviteClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `invite.Intercept(f(g(h())))`.

func (*InviteClient) Interceptors added in v0.2.0

func (c *InviteClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*InviteClient) MapCreateBulk added in v0.2.0

func (c *InviteClient) MapCreateBulk(slice any, setFunc func(*InviteCreate, int)) *InviteCreateBulk

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 (*InviteClient) Query added in v0.2.0

func (c *InviteClient) Query() *InviteQuery

Query returns a query builder for Invite.

func (*InviteClient) QueryInviter added in v0.2.0

func (c *InviteClient) QueryInviter(_m *Invite) *PrincipalQuery

QueryInviter queries the inviter edge of a Invite.

func (*InviteClient) QueryOrganization added in v0.2.0

func (c *InviteClient) QueryOrganization(_m *Invite) *OrganizationQuery

QueryOrganization queries the organization edge of a Invite.

func (*InviteClient) Update added in v0.2.0

func (c *InviteClient) Update() *InviteUpdate

Update returns an update builder for Invite.

func (*InviteClient) UpdateOne added in v0.2.0

func (c *InviteClient) UpdateOne(_m *Invite) *InviteUpdateOne

UpdateOne returns an update builder for the given entity.

func (*InviteClient) UpdateOneID added in v0.2.0

func (c *InviteClient) UpdateOneID(id uuid.UUID) *InviteUpdateOne

UpdateOneID returns an update builder for the given id.

func (*InviteClient) Use added in v0.2.0

func (c *InviteClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `invite.Hooks(f(g(h())))`.

type InviteCreate added in v0.2.0

type InviteCreate struct {
	// contains filtered or unexported fields
}

InviteCreate is the builder for creating a Invite entity.

func (*InviteCreate) Exec added in v0.2.0

func (_c *InviteCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*InviteCreate) ExecX added in v0.2.0

func (_c *InviteCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*InviteCreate) Mutation added in v0.2.0

func (_c *InviteCreate) Mutation() *InviteMutation

Mutation returns the InviteMutation object of the builder.

func (*InviteCreate) OnConflict added in v0.2.0

func (_c *InviteCreate) OnConflict(opts ...sql.ConflictOption) *InviteUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Invite.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.InviteUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*InviteCreate) OnConflictColumns added in v0.2.0

func (_c *InviteCreate) OnConflictColumns(columns ...string) *InviteUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Invite.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*InviteCreate) Save added in v0.2.0

func (_c *InviteCreate) Save(ctx context.Context) (*Invite, error)

Save creates the Invite in the database.

func (*InviteCreate) SaveX added in v0.2.0

func (_c *InviteCreate) SaveX(ctx context.Context) *Invite

SaveX calls Save and panics if Save returns an error.

func (*InviteCreate) SetAcceptedAt added in v0.2.0

func (_c *InviteCreate) SetAcceptedAt(v time.Time) *InviteCreate

SetAcceptedAt sets the "accepted_at" field.

func (*InviteCreate) SetAcceptedByPrincipalID added in v0.2.0

func (_c *InviteCreate) SetAcceptedByPrincipalID(v uuid.UUID) *InviteCreate

SetAcceptedByPrincipalID sets the "accepted_by_principal_id" field.

func (*InviteCreate) SetCreatedAt added in v0.2.0

func (_c *InviteCreate) SetCreatedAt(v time.Time) *InviteCreate

SetCreatedAt sets the "created_at" field.

func (*InviteCreate) SetEmail added in v0.2.0

func (_c *InviteCreate) SetEmail(v string) *InviteCreate

SetEmail sets the "email" field.

func (*InviteCreate) SetExpiresAt added in v0.2.0

func (_c *InviteCreate) SetExpiresAt(v time.Time) *InviteCreate

SetExpiresAt sets the "expires_at" field.

func (*InviteCreate) SetID added in v0.2.0

func (_c *InviteCreate) SetID(v uuid.UUID) *InviteCreate

SetID sets the "id" field.

func (*InviteCreate) SetInviter added in v0.2.0

func (_c *InviteCreate) SetInviter(v *Principal) *InviteCreate

SetInviter sets the "inviter" edge to the Principal entity.

func (*InviteCreate) SetInviterID added in v0.2.0

func (_c *InviteCreate) SetInviterID(id uuid.UUID) *InviteCreate

SetInviterID sets the "inviter" edge to the Principal entity by ID.

func (*InviteCreate) SetInviterPrincipalID added in v0.2.0

func (_c *InviteCreate) SetInviterPrincipalID(v uuid.UUID) *InviteCreate

SetInviterPrincipalID sets the "inviter_principal_id" field.

func (*InviteCreate) SetLastSentAt added in v0.2.0

func (_c *InviteCreate) SetLastSentAt(v time.Time) *InviteCreate

SetLastSentAt sets the "last_sent_at" field.

func (*InviteCreate) SetMessage added in v0.2.0

func (_c *InviteCreate) SetMessage(v string) *InviteCreate

SetMessage sets the "message" field.

func (*InviteCreate) SetNillableAcceptedAt added in v0.2.0

func (_c *InviteCreate) SetNillableAcceptedAt(v *time.Time) *InviteCreate

SetNillableAcceptedAt sets the "accepted_at" field if the given value is not nil.

func (*InviteCreate) SetNillableAcceptedByPrincipalID added in v0.2.0

func (_c *InviteCreate) SetNillableAcceptedByPrincipalID(v *uuid.UUID) *InviteCreate

SetNillableAcceptedByPrincipalID sets the "accepted_by_principal_id" field if the given value is not nil.

func (*InviteCreate) SetNillableCreatedAt added in v0.2.0

func (_c *InviteCreate) SetNillableCreatedAt(v *time.Time) *InviteCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*InviteCreate) SetNillableID added in v0.2.0

func (_c *InviteCreate) SetNillableID(v *uuid.UUID) *InviteCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*InviteCreate) SetNillableLastSentAt added in v0.2.0

func (_c *InviteCreate) SetNillableLastSentAt(v *time.Time) *InviteCreate

SetNillableLastSentAt sets the "last_sent_at" field if the given value is not nil.

func (*InviteCreate) SetNillableMessage added in v0.2.0

func (_c *InviteCreate) SetNillableMessage(v *string) *InviteCreate

SetNillableMessage sets the "message" field if the given value is not nil.

func (*InviteCreate) SetNillableResendCount added in v0.2.0

func (_c *InviteCreate) SetNillableResendCount(v *int) *InviteCreate

SetNillableResendCount sets the "resend_count" field if the given value is not nil.

func (*InviteCreate) SetNillableRole added in v0.2.0

func (_c *InviteCreate) SetNillableRole(v *string) *InviteCreate

SetNillableRole sets the "role" field if the given value is not nil.

func (*InviteCreate) SetNillableStatus added in v0.2.0

func (_c *InviteCreate) SetNillableStatus(v *invite.Status) *InviteCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*InviteCreate) SetNillableUpdatedAt added in v0.2.0

func (_c *InviteCreate) SetNillableUpdatedAt(v *time.Time) *InviteCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*InviteCreate) SetOrganization added in v0.2.0

func (_c *InviteCreate) SetOrganization(v *Organization) *InviteCreate

SetOrganization sets the "organization" edge to the Organization entity.

func (*InviteCreate) SetOrganizationID added in v0.2.0

func (_c *InviteCreate) SetOrganizationID(v uuid.UUID) *InviteCreate

SetOrganizationID sets the "organization_id" field.

func (*InviteCreate) SetResendCount added in v0.2.0

func (_c *InviteCreate) SetResendCount(v int) *InviteCreate

SetResendCount sets the "resend_count" field.

func (*InviteCreate) SetRole added in v0.2.0

func (_c *InviteCreate) SetRole(v string) *InviteCreate

SetRole sets the "role" field.

func (*InviteCreate) SetStatus added in v0.2.0

func (_c *InviteCreate) SetStatus(v invite.Status) *InviteCreate

SetStatus sets the "status" field.

func (*InviteCreate) SetToken added in v0.2.0

func (_c *InviteCreate) SetToken(v string) *InviteCreate

SetToken sets the "token" field.

func (*InviteCreate) SetUpdatedAt added in v0.2.0

func (_c *InviteCreate) SetUpdatedAt(v time.Time) *InviteCreate

SetUpdatedAt sets the "updated_at" field.

type InviteCreateBulk added in v0.2.0

type InviteCreateBulk struct {
	// contains filtered or unexported fields
}

InviteCreateBulk is the builder for creating many Invite entities in bulk.

func (*InviteCreateBulk) Exec added in v0.2.0

func (_c *InviteCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*InviteCreateBulk) ExecX added in v0.2.0

func (_c *InviteCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*InviteCreateBulk) OnConflict added in v0.2.0

func (_c *InviteCreateBulk) OnConflict(opts ...sql.ConflictOption) *InviteUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Invite.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.InviteUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*InviteCreateBulk) OnConflictColumns added in v0.2.0

func (_c *InviteCreateBulk) OnConflictColumns(columns ...string) *InviteUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Invite.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*InviteCreateBulk) Save added in v0.2.0

func (_c *InviteCreateBulk) Save(ctx context.Context) ([]*Invite, error)

Save creates the Invite entities in the database.

func (*InviteCreateBulk) SaveX added in v0.2.0

func (_c *InviteCreateBulk) SaveX(ctx context.Context) []*Invite

SaveX is like Save, but panics if an error occurs.

type InviteDelete added in v0.2.0

type InviteDelete struct {
	// contains filtered or unexported fields
}

InviteDelete is the builder for deleting a Invite entity.

func (*InviteDelete) Exec added in v0.2.0

func (_d *InviteDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*InviteDelete) ExecX added in v0.2.0

func (_d *InviteDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*InviteDelete) Where added in v0.2.0

func (_d *InviteDelete) Where(ps ...predicate.Invite) *InviteDelete

Where appends a list predicates to the InviteDelete builder.

type InviteDeleteOne added in v0.2.0

type InviteDeleteOne struct {
	// contains filtered or unexported fields
}

InviteDeleteOne is the builder for deleting a single Invite entity.

func (*InviteDeleteOne) Exec added in v0.2.0

func (_d *InviteDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*InviteDeleteOne) ExecX added in v0.2.0

func (_d *InviteDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*InviteDeleteOne) Where added in v0.2.0

func (_d *InviteDeleteOne) Where(ps ...predicate.Invite) *InviteDeleteOne

Where appends a list predicates to the InviteDelete builder.

type InviteEdges added in v0.2.0

type InviteEdges struct {
	// Organization holds the value of the organization edge.
	Organization *Organization `json:"organization,omitempty"`
	// Inviter holds the value of the inviter edge.
	Inviter *Principal `json:"inviter,omitempty"`
	// contains filtered or unexported fields
}

InviteEdges holds the relations/edges for other nodes in the graph.

func (InviteEdges) InviterOrErr added in v0.2.0

func (e InviteEdges) InviterOrErr() (*Principal, error)

InviterOrErr returns the Inviter value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (InviteEdges) OrganizationOrErr added in v0.2.0

func (e InviteEdges) 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 InviteFilter added in v0.2.0

type InviteFilter struct {
	// contains filtered or unexported fields
}

InviteFilter provides a generic filtering capability at runtime for InviteQuery.

func (*InviteFilter) Where added in v0.2.0

func (f *InviteFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*InviteFilter) WhereAcceptedAt added in v0.2.0

func (f *InviteFilter) WhereAcceptedAt(p entql.TimeP)

WhereAcceptedAt applies the entql time.Time predicate on the accepted_at field.

func (*InviteFilter) WhereAcceptedByPrincipalID added in v0.2.0

func (f *InviteFilter) WhereAcceptedByPrincipalID(p entql.ValueP)

WhereAcceptedByPrincipalID applies the entql [16]byte predicate on the accepted_by_principal_id field.

func (*InviteFilter) WhereCreatedAt added in v0.2.0

func (f *InviteFilter) WhereCreatedAt(p entql.TimeP)

WhereCreatedAt applies the entql time.Time predicate on the created_at field.

func (*InviteFilter) WhereEmail added in v0.2.0

func (f *InviteFilter) WhereEmail(p entql.StringP)

WhereEmail applies the entql string predicate on the email field.

func (*InviteFilter) WhereExpiresAt added in v0.2.0

func (f *InviteFilter) WhereExpiresAt(p entql.TimeP)

WhereExpiresAt applies the entql time.Time predicate on the expires_at field.

func (*InviteFilter) WhereHasInviter added in v0.2.0

func (f *InviteFilter) WhereHasInviter()

WhereHasInviter applies a predicate to check if query has an edge inviter.

func (*InviteFilter) WhereHasInviterWith added in v0.2.0

func (f *InviteFilter) WhereHasInviterWith(preds ...predicate.Principal)

WhereHasInviterWith applies a predicate to check if query has an edge inviter with a given conditions (other predicates).

func (*InviteFilter) WhereHasOrganization added in v0.2.0

func (f *InviteFilter) WhereHasOrganization()

WhereHasOrganization applies a predicate to check if query has an edge organization.

func (*InviteFilter) WhereHasOrganizationWith added in v0.2.0

func (f *InviteFilter) WhereHasOrganizationWith(preds ...predicate.Organization)

WhereHasOrganizationWith applies a predicate to check if query has an edge organization with a given conditions (other predicates).

func (*InviteFilter) WhereID added in v0.2.0

func (f *InviteFilter) WhereID(p entql.ValueP)

WhereID applies the entql [16]byte predicate on the id field.

func (*InviteFilter) WhereInviterPrincipalID added in v0.2.0

func (f *InviteFilter) WhereInviterPrincipalID(p entql.ValueP)

WhereInviterPrincipalID applies the entql [16]byte predicate on the inviter_principal_id field.

func (*InviteFilter) WhereLastSentAt added in v0.2.0

func (f *InviteFilter) WhereLastSentAt(p entql.TimeP)

WhereLastSentAt applies the entql time.Time predicate on the last_sent_at field.

func (*InviteFilter) WhereMessage added in v0.2.0

func (f *InviteFilter) WhereMessage(p entql.StringP)

WhereMessage applies the entql string predicate on the message field.

func (*InviteFilter) WhereOrganizationID added in v0.2.0

func (f *InviteFilter) WhereOrganizationID(p entql.ValueP)

WhereOrganizationID applies the entql [16]byte predicate on the organization_id field.

func (*InviteFilter) WhereResendCount added in v0.2.0

func (f *InviteFilter) WhereResendCount(p entql.IntP)

WhereResendCount applies the entql int predicate on the resend_count field.

func (*InviteFilter) WhereRole added in v0.2.0

func (f *InviteFilter) WhereRole(p entql.StringP)

WhereRole applies the entql string predicate on the role field.

func (*InviteFilter) WhereStatus added in v0.2.0

func (f *InviteFilter) WhereStatus(p entql.StringP)

WhereStatus applies the entql string predicate on the status field.

func (*InviteFilter) WhereToken added in v0.2.0

func (f *InviteFilter) WhereToken(p entql.StringP)

WhereToken applies the entql string predicate on the token field.

func (*InviteFilter) WhereUpdatedAt added in v0.2.0

func (f *InviteFilter) WhereUpdatedAt(p entql.TimeP)

WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.

type InviteGroupBy added in v0.2.0

type InviteGroupBy struct {
	// contains filtered or unexported fields
}

InviteGroupBy is the group-by builder for Invite entities.

func (*InviteGroupBy) Aggregate added in v0.2.0

func (_g *InviteGroupBy) Aggregate(fns ...AggregateFunc) *InviteGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*InviteGroupBy) Bool added in v0.2.0

func (s *InviteGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*InviteGroupBy) BoolX added in v0.2.0

func (s *InviteGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*InviteGroupBy) Bools added in v0.2.0

func (s *InviteGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*InviteGroupBy) BoolsX added in v0.2.0

func (s *InviteGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*InviteGroupBy) Float64 added in v0.2.0

func (s *InviteGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*InviteGroupBy) Float64X added in v0.2.0

func (s *InviteGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*InviteGroupBy) Float64s added in v0.2.0

func (s *InviteGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*InviteGroupBy) Float64sX added in v0.2.0

func (s *InviteGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*InviteGroupBy) Int added in v0.2.0

func (s *InviteGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*InviteGroupBy) IntX added in v0.2.0

func (s *InviteGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*InviteGroupBy) Ints added in v0.2.0

func (s *InviteGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*InviteGroupBy) IntsX added in v0.2.0

func (s *InviteGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*InviteGroupBy) Scan added in v0.2.0

func (_g *InviteGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*InviteGroupBy) ScanX added in v0.2.0

func (s *InviteGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*InviteGroupBy) String added in v0.2.0

func (s *InviteGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*InviteGroupBy) StringX added in v0.2.0

func (s *InviteGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*InviteGroupBy) Strings added in v0.2.0

func (s *InviteGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*InviteGroupBy) StringsX added in v0.2.0

func (s *InviteGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type InviteMutation added in v0.2.0

type InviteMutation struct {
	// contains filtered or unexported fields
}

InviteMutation represents an operation that mutates the Invite nodes in the graph.

func (*InviteMutation) AcceptedAt added in v0.2.0

func (m *InviteMutation) AcceptedAt() (r time.Time, exists bool)

AcceptedAt returns the value of the "accepted_at" field in the mutation.

func (*InviteMutation) AcceptedAtCleared added in v0.2.0

func (m *InviteMutation) AcceptedAtCleared() bool

AcceptedAtCleared returns if the "accepted_at" field was cleared in this mutation.

func (*InviteMutation) AcceptedByPrincipalID added in v0.2.0

func (m *InviteMutation) AcceptedByPrincipalID() (r uuid.UUID, exists bool)

AcceptedByPrincipalID returns the value of the "accepted_by_principal_id" field in the mutation.

func (*InviteMutation) AcceptedByPrincipalIDCleared added in v0.2.0

func (m *InviteMutation) AcceptedByPrincipalIDCleared() bool

AcceptedByPrincipalIDCleared returns if the "accepted_by_principal_id" field was cleared in this mutation.

func (*InviteMutation) AddField added in v0.2.0

func (m *InviteMutation) 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 (*InviteMutation) AddResendCount added in v0.2.0

func (m *InviteMutation) AddResendCount(i int)

AddResendCount adds i to the "resend_count" field.

func (*InviteMutation) AddedEdges added in v0.2.0

func (m *InviteMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*InviteMutation) AddedField added in v0.2.0

func (m *InviteMutation) 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 (*InviteMutation) AddedFields added in v0.2.0

func (m *InviteMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*InviteMutation) AddedIDs added in v0.2.0

func (m *InviteMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*InviteMutation) AddedResendCount added in v0.2.0

func (m *InviteMutation) AddedResendCount() (r int, exists bool)

AddedResendCount returns the value that was added to the "resend_count" field in this mutation.

func (*InviteMutation) ClearAcceptedAt added in v0.2.0

func (m *InviteMutation) ClearAcceptedAt()

ClearAcceptedAt clears the value of the "accepted_at" field.

func (*InviteMutation) ClearAcceptedByPrincipalID added in v0.2.0

func (m *InviteMutation) ClearAcceptedByPrincipalID()

ClearAcceptedByPrincipalID clears the value of the "accepted_by_principal_id" field.

func (*InviteMutation) ClearEdge added in v0.2.0

func (m *InviteMutation) 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 (*InviteMutation) ClearField added in v0.2.0

func (m *InviteMutation) 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 (*InviteMutation) ClearInviter added in v0.2.0

func (m *InviteMutation) ClearInviter()

ClearInviter clears the "inviter" edge to the Principal entity.

func (*InviteMutation) ClearMessage added in v0.2.0

func (m *InviteMutation) ClearMessage()

ClearMessage clears the value of the "message" field.

func (*InviteMutation) ClearOrganization added in v0.2.0

func (m *InviteMutation) ClearOrganization()

ClearOrganization clears the "organization" edge to the Organization entity.

func (*InviteMutation) ClearedEdges added in v0.2.0

func (m *InviteMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*InviteMutation) ClearedFields added in v0.2.0

func (m *InviteMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (InviteMutation) Client added in v0.2.0

func (m InviteMutation) 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 (*InviteMutation) CreatedAt added in v0.2.0

func (m *InviteMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*InviteMutation) EdgeCleared added in v0.2.0

func (m *InviteMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*InviteMutation) Email added in v0.2.0

func (m *InviteMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*InviteMutation) ExpiresAt added in v0.2.0

func (m *InviteMutation) ExpiresAt() (r time.Time, exists bool)

ExpiresAt returns the value of the "expires_at" field in the mutation.

func (*InviteMutation) Field added in v0.2.0

func (m *InviteMutation) 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 (*InviteMutation) FieldCleared added in v0.2.0

func (m *InviteMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*InviteMutation) Fields added in v0.2.0

func (m *InviteMutation) 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 (*InviteMutation) Filter added in v0.2.0

func (m *InviteMutation) Filter() *InviteFilter

Filter returns an entql.Where implementation to apply filters on the InviteMutation builder.

func (*InviteMutation) ID added in v0.2.0

func (m *InviteMutation) 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 (*InviteMutation) IDs added in v0.2.0

func (m *InviteMutation) 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 (*InviteMutation) InviterCleared added in v0.2.0

func (m *InviteMutation) InviterCleared() bool

InviterCleared reports if the "inviter" edge to the Principal entity was cleared.

func (*InviteMutation) InviterID added in v0.2.0

func (m *InviteMutation) InviterID() (id uuid.UUID, exists bool)

InviterID returns the "inviter" edge ID in the mutation.

func (*InviteMutation) InviterIDs added in v0.2.0

func (m *InviteMutation) InviterIDs() (ids []uuid.UUID)

InviterIDs returns the "inviter" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use InviterID instead. It exists only for internal usage by the builders.

func (*InviteMutation) InviterPrincipalID added in v0.2.0

func (m *InviteMutation) InviterPrincipalID() (r uuid.UUID, exists bool)

InviterPrincipalID returns the value of the "inviter_principal_id" field in the mutation.

func (*InviteMutation) LastSentAt added in v0.2.0

func (m *InviteMutation) LastSentAt() (r time.Time, exists bool)

LastSentAt returns the value of the "last_sent_at" field in the mutation.

func (*InviteMutation) Message added in v0.2.0

func (m *InviteMutation) Message() (r string, exists bool)

Message returns the value of the "message" field in the mutation.

func (*InviteMutation) MessageCleared added in v0.2.0

func (m *InviteMutation) MessageCleared() bool

MessageCleared returns if the "message" field was cleared in this mutation.

func (*InviteMutation) OldAcceptedAt added in v0.2.0

func (m *InviteMutation) OldAcceptedAt(ctx context.Context) (v *time.Time, err error)

OldAcceptedAt returns the old "accepted_at" field's value of the Invite entity. If the Invite 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 (*InviteMutation) OldAcceptedByPrincipalID added in v0.2.0

func (m *InviteMutation) OldAcceptedByPrincipalID(ctx context.Context) (v *uuid.UUID, err error)

OldAcceptedByPrincipalID returns the old "accepted_by_principal_id" field's value of the Invite entity. If the Invite 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 (*InviteMutation) OldCreatedAt added in v0.2.0

func (m *InviteMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Invite entity. If the Invite 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 (*InviteMutation) OldEmail added in v0.2.0

func (m *InviteMutation) OldEmail(ctx context.Context) (v string, err error)

OldEmail returns the old "email" field's value of the Invite entity. If the Invite 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 (*InviteMutation) OldExpiresAt added in v0.2.0

func (m *InviteMutation) OldExpiresAt(ctx context.Context) (v time.Time, err error)

OldExpiresAt returns the old "expires_at" field's value of the Invite entity. If the Invite 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 (*InviteMutation) OldField added in v0.2.0

func (m *InviteMutation) 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 (*InviteMutation) OldInviterPrincipalID added in v0.2.0

func (m *InviteMutation) OldInviterPrincipalID(ctx context.Context) (v uuid.UUID, err error)

OldInviterPrincipalID returns the old "inviter_principal_id" field's value of the Invite entity. If the Invite 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 (*InviteMutation) OldLastSentAt added in v0.2.0

func (m *InviteMutation) OldLastSentAt(ctx context.Context) (v time.Time, err error)

OldLastSentAt returns the old "last_sent_at" field's value of the Invite entity. If the Invite 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 (*InviteMutation) OldMessage added in v0.2.0

func (m *InviteMutation) OldMessage(ctx context.Context) (v *string, err error)

OldMessage returns the old "message" field's value of the Invite entity. If the Invite 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 (*InviteMutation) OldOrganizationID added in v0.2.0

func (m *InviteMutation) OldOrganizationID(ctx context.Context) (v uuid.UUID, err error)

OldOrganizationID returns the old "organization_id" field's value of the Invite entity. If the Invite 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 (*InviteMutation) OldResendCount added in v0.2.0

func (m *InviteMutation) OldResendCount(ctx context.Context) (v int, err error)

OldResendCount returns the old "resend_count" field's value of the Invite entity. If the Invite 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 (*InviteMutation) OldRole added in v0.2.0

func (m *InviteMutation) OldRole(ctx context.Context) (v string, err error)

OldRole returns the old "role" field's value of the Invite entity. If the Invite 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 (*InviteMutation) OldStatus added in v0.2.0

func (m *InviteMutation) OldStatus(ctx context.Context) (v invite.Status, err error)

OldStatus returns the old "status" field's value of the Invite entity. If the Invite 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 (*InviteMutation) OldToken added in v0.2.0

func (m *InviteMutation) OldToken(ctx context.Context) (v string, err error)

OldToken returns the old "token" field's value of the Invite entity. If the Invite 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 (*InviteMutation) OldUpdatedAt added in v0.2.0

func (m *InviteMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Invite entity. If the Invite 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 (*InviteMutation) Op added in v0.2.0

func (m *InviteMutation) Op() Op

Op returns the operation name.

func (*InviteMutation) OrganizationCleared added in v0.2.0

func (m *InviteMutation) OrganizationCleared() bool

OrganizationCleared reports if the "organization" edge to the Organization entity was cleared.

func (*InviteMutation) OrganizationID added in v0.2.0

func (m *InviteMutation) OrganizationID() (r uuid.UUID, exists bool)

OrganizationID returns the value of the "organization_id" field in the mutation.

func (*InviteMutation) OrganizationIDs added in v0.2.0

func (m *InviteMutation) 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 (*InviteMutation) RemovedEdges added in v0.2.0

func (m *InviteMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*InviteMutation) RemovedIDs added in v0.2.0

func (m *InviteMutation) 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 (*InviteMutation) ResendCount added in v0.2.0

func (m *InviteMutation) ResendCount() (r int, exists bool)

ResendCount returns the value of the "resend_count" field in the mutation.

func (*InviteMutation) ResetAcceptedAt added in v0.2.0

func (m *InviteMutation) ResetAcceptedAt()

ResetAcceptedAt resets all changes to the "accepted_at" field.

func (*InviteMutation) ResetAcceptedByPrincipalID added in v0.2.0

func (m *InviteMutation) ResetAcceptedByPrincipalID()

ResetAcceptedByPrincipalID resets all changes to the "accepted_by_principal_id" field.

func (*InviteMutation) ResetCreatedAt added in v0.2.0

func (m *InviteMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*InviteMutation) ResetEdge added in v0.2.0

func (m *InviteMutation) 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 (*InviteMutation) ResetEmail added in v0.2.0

func (m *InviteMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*InviteMutation) ResetExpiresAt added in v0.2.0

func (m *InviteMutation) ResetExpiresAt()

ResetExpiresAt resets all changes to the "expires_at" field.

func (*InviteMutation) ResetField added in v0.2.0

func (m *InviteMutation) 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 (*InviteMutation) ResetInviter added in v0.2.0

func (m *InviteMutation) ResetInviter()

ResetInviter resets all changes to the "inviter" edge.

func (*InviteMutation) ResetInviterPrincipalID added in v0.2.0

func (m *InviteMutation) ResetInviterPrincipalID()

ResetInviterPrincipalID resets all changes to the "inviter_principal_id" field.

func (*InviteMutation) ResetLastSentAt added in v0.2.0

func (m *InviteMutation) ResetLastSentAt()

ResetLastSentAt resets all changes to the "last_sent_at" field.

func (*InviteMutation) ResetMessage added in v0.2.0

func (m *InviteMutation) ResetMessage()

ResetMessage resets all changes to the "message" field.

func (*InviteMutation) ResetOrganization added in v0.2.0

func (m *InviteMutation) ResetOrganization()

ResetOrganization resets all changes to the "organization" edge.

func (*InviteMutation) ResetOrganizationID added in v0.2.0

func (m *InviteMutation) ResetOrganizationID()

ResetOrganizationID resets all changes to the "organization_id" field.

func (*InviteMutation) ResetResendCount added in v0.2.0

func (m *InviteMutation) ResetResendCount()

ResetResendCount resets all changes to the "resend_count" field.

func (*InviteMutation) ResetRole added in v0.2.0

func (m *InviteMutation) ResetRole()

ResetRole resets all changes to the "role" field.

func (*InviteMutation) ResetStatus added in v0.2.0

func (m *InviteMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*InviteMutation) ResetToken added in v0.2.0

func (m *InviteMutation) ResetToken()

ResetToken resets all changes to the "token" field.

func (*InviteMutation) ResetUpdatedAt added in v0.2.0

func (m *InviteMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*InviteMutation) Role added in v0.2.0

func (m *InviteMutation) Role() (r string, exists bool)

Role returns the value of the "role" field in the mutation.

func (*InviteMutation) SetAcceptedAt added in v0.2.0

func (m *InviteMutation) SetAcceptedAt(t time.Time)

SetAcceptedAt sets the "accepted_at" field.

func (*InviteMutation) SetAcceptedByPrincipalID added in v0.2.0

func (m *InviteMutation) SetAcceptedByPrincipalID(u uuid.UUID)

SetAcceptedByPrincipalID sets the "accepted_by_principal_id" field.

func (*InviteMutation) SetCreatedAt added in v0.2.0

func (m *InviteMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*InviteMutation) SetEmail added in v0.2.0

func (m *InviteMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*InviteMutation) SetExpiresAt added in v0.2.0

func (m *InviteMutation) SetExpiresAt(t time.Time)

SetExpiresAt sets the "expires_at" field.

func (*InviteMutation) SetField added in v0.2.0

func (m *InviteMutation) 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 (*InviteMutation) SetID added in v0.2.0

func (m *InviteMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Invite entities.

func (*InviteMutation) SetInviterID added in v0.2.0

func (m *InviteMutation) SetInviterID(id uuid.UUID)

SetInviterID sets the "inviter" edge to the Principal entity by id.

func (*InviteMutation) SetInviterPrincipalID added in v0.2.0

func (m *InviteMutation) SetInviterPrincipalID(u uuid.UUID)

SetInviterPrincipalID sets the "inviter_principal_id" field.

func (*InviteMutation) SetLastSentAt added in v0.2.0

func (m *InviteMutation) SetLastSentAt(t time.Time)

SetLastSentAt sets the "last_sent_at" field.

func (*InviteMutation) SetMessage added in v0.2.0

func (m *InviteMutation) SetMessage(s string)

SetMessage sets the "message" field.

func (*InviteMutation) SetOp added in v0.2.0

func (m *InviteMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*InviteMutation) SetOrganizationID added in v0.2.0

func (m *InviteMutation) SetOrganizationID(u uuid.UUID)

SetOrganizationID sets the "organization_id" field.

func (*InviteMutation) SetResendCount added in v0.2.0

func (m *InviteMutation) SetResendCount(i int)

SetResendCount sets the "resend_count" field.

func (*InviteMutation) SetRole added in v0.2.0

func (m *InviteMutation) SetRole(s string)

SetRole sets the "role" field.

func (*InviteMutation) SetStatus added in v0.2.0

func (m *InviteMutation) SetStatus(i invite.Status)

SetStatus sets the "status" field.

func (*InviteMutation) SetToken added in v0.2.0

func (m *InviteMutation) SetToken(s string)

SetToken sets the "token" field.

func (*InviteMutation) SetUpdatedAt added in v0.2.0

func (m *InviteMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*InviteMutation) Status added in v0.2.0

func (m *InviteMutation) Status() (r invite.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (*InviteMutation) Token added in v0.2.0

func (m *InviteMutation) Token() (r string, exists bool)

Token returns the value of the "token" field in the mutation.

func (InviteMutation) Tx added in v0.2.0

func (m InviteMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*InviteMutation) Type added in v0.2.0

func (m *InviteMutation) Type() string

Type returns the node type of this mutation (Invite).

func (*InviteMutation) UpdatedAt added in v0.2.0

func (m *InviteMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*InviteMutation) Where added in v0.2.0

func (m *InviteMutation) Where(ps ...predicate.Invite)

Where appends a list predicates to the InviteMutation builder.

func (*InviteMutation) WhereP added in v0.2.0

func (m *InviteMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the InviteMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type InviteQuery added in v0.2.0

type InviteQuery struct {
	// contains filtered or unexported fields
}

InviteQuery is the builder for querying Invite entities.

func (*InviteQuery) Aggregate added in v0.2.0

func (_q *InviteQuery) Aggregate(fns ...AggregateFunc) *InviteSelect

Aggregate returns a InviteSelect configured with the given aggregations.

func (*InviteQuery) All added in v0.2.0

func (_q *InviteQuery) All(ctx context.Context) ([]*Invite, error)

All executes the query and returns a list of Invites.

func (*InviteQuery) AllX added in v0.2.0

func (_q *InviteQuery) AllX(ctx context.Context) []*Invite

AllX is like All, but panics if an error occurs.

func (*InviteQuery) Clone added in v0.2.0

func (_q *InviteQuery) Clone() *InviteQuery

Clone returns a duplicate of the InviteQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*InviteQuery) Count added in v0.2.0

func (_q *InviteQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*InviteQuery) CountX added in v0.2.0

func (_q *InviteQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*InviteQuery) Exist added in v0.2.0

func (_q *InviteQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*InviteQuery) ExistX added in v0.2.0

func (_q *InviteQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*InviteQuery) Filter added in v0.2.0

func (_q *InviteQuery) Filter() *InviteFilter

Filter returns a Filter implementation to apply filters on the InviteQuery builder.

func (*InviteQuery) First added in v0.2.0

func (_q *InviteQuery) First(ctx context.Context) (*Invite, error)

First returns the first Invite entity from the query. Returns a *NotFoundError when no Invite was found.

func (*InviteQuery) FirstID added in v0.2.0

func (_q *InviteQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Invite ID from the query. Returns a *NotFoundError when no Invite ID was found.

func (*InviteQuery) FirstIDX added in v0.2.0

func (_q *InviteQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*InviteQuery) FirstX added in v0.2.0

func (_q *InviteQuery) FirstX(ctx context.Context) *Invite

FirstX is like First, but panics if an error occurs.

func (*InviteQuery) GroupBy added in v0.2.0

func (_q *InviteQuery) GroupBy(field string, fields ...string) *InviteGroupBy

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.Invite.Query().
	GroupBy(invite.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*InviteQuery) IDs added in v0.2.0

func (_q *InviteQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of Invite IDs.

func (*InviteQuery) IDsX added in v0.2.0

func (_q *InviteQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*InviteQuery) Limit added in v0.2.0

func (_q *InviteQuery) Limit(limit int) *InviteQuery

Limit the number of records to be returned by this query.

func (*InviteQuery) Offset added in v0.2.0

func (_q *InviteQuery) Offset(offset int) *InviteQuery

Offset to start from.

func (*InviteQuery) Only added in v0.2.0

func (_q *InviteQuery) Only(ctx context.Context) (*Invite, error)

Only returns a single Invite entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Invite entity is found. Returns a *NotFoundError when no Invite entities are found.

func (*InviteQuery) OnlyID added in v0.2.0

func (_q *InviteQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Invite ID in the query. Returns a *NotSingularError when more than one Invite ID is found. Returns a *NotFoundError when no entities are found.

func (*InviteQuery) OnlyIDX added in v0.2.0

func (_q *InviteQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*InviteQuery) OnlyX added in v0.2.0

func (_q *InviteQuery) OnlyX(ctx context.Context) *Invite

OnlyX is like Only, but panics if an error occurs.

func (*InviteQuery) Order added in v0.2.0

func (_q *InviteQuery) Order(o ...invite.OrderOption) *InviteQuery

Order specifies how the records should be ordered.

func (*InviteQuery) QueryInviter added in v0.2.0

func (_q *InviteQuery) QueryInviter() *PrincipalQuery

QueryInviter chains the current query on the "inviter" edge.

func (*InviteQuery) QueryOrganization added in v0.2.0

func (_q *InviteQuery) QueryOrganization() *OrganizationQuery

QueryOrganization chains the current query on the "organization" edge.

func (*InviteQuery) Select added in v0.2.0

func (_q *InviteQuery) Select(fields ...string) *InviteSelect

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.Invite.Query().
	Select(invite.FieldCreatedAt).
	Scan(ctx, &v)

func (*InviteQuery) Unique added in v0.2.0

func (_q *InviteQuery) Unique(unique bool) *InviteQuery

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 (*InviteQuery) Where added in v0.2.0

func (_q *InviteQuery) Where(ps ...predicate.Invite) *InviteQuery

Where adds a new predicate for the InviteQuery builder.

func (*InviteQuery) WithInviter added in v0.2.0

func (_q *InviteQuery) WithInviter(opts ...func(*PrincipalQuery)) *InviteQuery

WithInviter tells the query-builder to eager-load the nodes that are connected to the "inviter" edge. The optional arguments are used to configure the query builder of the edge.

func (*InviteQuery) WithOrganization added in v0.2.0

func (_q *InviteQuery) WithOrganization(opts ...func(*OrganizationQuery)) *InviteQuery

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 InviteSelect added in v0.2.0

type InviteSelect struct {
	*InviteQuery
	// contains filtered or unexported fields
}

InviteSelect is the builder for selecting fields of Invite entities.

func (*InviteSelect) Aggregate added in v0.2.0

func (_s *InviteSelect) Aggregate(fns ...AggregateFunc) *InviteSelect

Aggregate adds the given aggregation functions to the selector query.

func (*InviteSelect) Bool added in v0.2.0

func (s *InviteSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*InviteSelect) BoolX added in v0.2.0

func (s *InviteSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*InviteSelect) Bools added in v0.2.0

func (s *InviteSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*InviteSelect) BoolsX added in v0.2.0

func (s *InviteSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*InviteSelect) Float64 added in v0.2.0

func (s *InviteSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*InviteSelect) Float64X added in v0.2.0

func (s *InviteSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*InviteSelect) Float64s added in v0.2.0

func (s *InviteSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*InviteSelect) Float64sX added in v0.2.0

func (s *InviteSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*InviteSelect) Int added in v0.2.0

func (s *InviteSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*InviteSelect) IntX added in v0.2.0

func (s *InviteSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*InviteSelect) Ints added in v0.2.0

func (s *InviteSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*InviteSelect) IntsX added in v0.2.0

func (s *InviteSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*InviteSelect) Scan added in v0.2.0

func (_s *InviteSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*InviteSelect) ScanX added in v0.2.0

func (s *InviteSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*InviteSelect) String added in v0.2.0

func (s *InviteSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*InviteSelect) StringX added in v0.2.0

func (s *InviteSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*InviteSelect) Strings added in v0.2.0

func (s *InviteSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*InviteSelect) StringsX added in v0.2.0

func (s *InviteSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type InviteUpdate added in v0.2.0

type InviteUpdate struct {
	// contains filtered or unexported fields
}

InviteUpdate is the builder for updating Invite entities.

func (*InviteUpdate) AddResendCount added in v0.2.0

func (_u *InviteUpdate) AddResendCount(v int) *InviteUpdate

AddResendCount adds value to the "resend_count" field.

func (*InviteUpdate) ClearAcceptedAt added in v0.2.0

func (_u *InviteUpdate) ClearAcceptedAt() *InviteUpdate

ClearAcceptedAt clears the value of the "accepted_at" field.

func (*InviteUpdate) ClearAcceptedByPrincipalID added in v0.2.0

func (_u *InviteUpdate) ClearAcceptedByPrincipalID() *InviteUpdate

ClearAcceptedByPrincipalID clears the value of the "accepted_by_principal_id" field.

func (*InviteUpdate) ClearInviter added in v0.2.0

func (_u *InviteUpdate) ClearInviter() *InviteUpdate

ClearInviter clears the "inviter" edge to the Principal entity.

func (*InviteUpdate) ClearMessage added in v0.2.0

func (_u *InviteUpdate) ClearMessage() *InviteUpdate

ClearMessage clears the value of the "message" field.

func (*InviteUpdate) ClearOrganization added in v0.2.0

func (_u *InviteUpdate) ClearOrganization() *InviteUpdate

ClearOrganization clears the "organization" edge to the Organization entity.

func (*InviteUpdate) Exec added in v0.2.0

func (_u *InviteUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*InviteUpdate) ExecX added in v0.2.0

func (_u *InviteUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*InviteUpdate) Mutation added in v0.2.0

func (_u *InviteUpdate) Mutation() *InviteMutation

Mutation returns the InviteMutation object of the builder.

func (*InviteUpdate) Save added in v0.2.0

func (_u *InviteUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*InviteUpdate) SaveX added in v0.2.0

func (_u *InviteUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*InviteUpdate) SetAcceptedAt added in v0.2.0

func (_u *InviteUpdate) SetAcceptedAt(v time.Time) *InviteUpdate

SetAcceptedAt sets the "accepted_at" field.

func (*InviteUpdate) SetAcceptedByPrincipalID added in v0.2.0

func (_u *InviteUpdate) SetAcceptedByPrincipalID(v uuid.UUID) *InviteUpdate

SetAcceptedByPrincipalID sets the "accepted_by_principal_id" field.

func (*InviteUpdate) SetEmail added in v0.2.0

func (_u *InviteUpdate) SetEmail(v string) *InviteUpdate

SetEmail sets the "email" field.

func (*InviteUpdate) SetExpiresAt added in v0.2.0

func (_u *InviteUpdate) SetExpiresAt(v time.Time) *InviteUpdate

SetExpiresAt sets the "expires_at" field.

func (*InviteUpdate) SetInviter added in v0.2.0

func (_u *InviteUpdate) SetInviter(v *Principal) *InviteUpdate

SetInviter sets the "inviter" edge to the Principal entity.

func (*InviteUpdate) SetInviterID added in v0.2.0

func (_u *InviteUpdate) SetInviterID(id uuid.UUID) *InviteUpdate

SetInviterID sets the "inviter" edge to the Principal entity by ID.

func (*InviteUpdate) SetInviterPrincipalID added in v0.2.0

func (_u *InviteUpdate) SetInviterPrincipalID(v uuid.UUID) *InviteUpdate

SetInviterPrincipalID sets the "inviter_principal_id" field.

func (*InviteUpdate) SetLastSentAt added in v0.2.0

func (_u *InviteUpdate) SetLastSentAt(v time.Time) *InviteUpdate

SetLastSentAt sets the "last_sent_at" field.

func (*InviteUpdate) SetMessage added in v0.2.0

func (_u *InviteUpdate) SetMessage(v string) *InviteUpdate

SetMessage sets the "message" field.

func (*InviteUpdate) SetNillableAcceptedAt added in v0.2.0

func (_u *InviteUpdate) SetNillableAcceptedAt(v *time.Time) *InviteUpdate

SetNillableAcceptedAt sets the "accepted_at" field if the given value is not nil.

func (*InviteUpdate) SetNillableAcceptedByPrincipalID added in v0.2.0

func (_u *InviteUpdate) SetNillableAcceptedByPrincipalID(v *uuid.UUID) *InviteUpdate

SetNillableAcceptedByPrincipalID sets the "accepted_by_principal_id" field if the given value is not nil.

func (*InviteUpdate) SetNillableEmail added in v0.2.0

func (_u *InviteUpdate) SetNillableEmail(v *string) *InviteUpdate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*InviteUpdate) SetNillableExpiresAt added in v0.2.0

func (_u *InviteUpdate) SetNillableExpiresAt(v *time.Time) *InviteUpdate

SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.

func (*InviteUpdate) SetNillableInviterPrincipalID added in v0.2.0

func (_u *InviteUpdate) SetNillableInviterPrincipalID(v *uuid.UUID) *InviteUpdate

SetNillableInviterPrincipalID sets the "inviter_principal_id" field if the given value is not nil.

func (*InviteUpdate) SetNillableLastSentAt added in v0.2.0

func (_u *InviteUpdate) SetNillableLastSentAt(v *time.Time) *InviteUpdate

SetNillableLastSentAt sets the "last_sent_at" field if the given value is not nil.

func (*InviteUpdate) SetNillableMessage added in v0.2.0

func (_u *InviteUpdate) SetNillableMessage(v *string) *InviteUpdate

SetNillableMessage sets the "message" field if the given value is not nil.

func (*InviteUpdate) SetNillableOrganizationID added in v0.2.0

func (_u *InviteUpdate) SetNillableOrganizationID(v *uuid.UUID) *InviteUpdate

SetNillableOrganizationID sets the "organization_id" field if the given value is not nil.

func (*InviteUpdate) SetNillableResendCount added in v0.2.0

func (_u *InviteUpdate) SetNillableResendCount(v *int) *InviteUpdate

SetNillableResendCount sets the "resend_count" field if the given value is not nil.

func (*InviteUpdate) SetNillableRole added in v0.2.0

func (_u *InviteUpdate) SetNillableRole(v *string) *InviteUpdate

SetNillableRole sets the "role" field if the given value is not nil.

func (*InviteUpdate) SetNillableStatus added in v0.2.0

func (_u *InviteUpdate) SetNillableStatus(v *invite.Status) *InviteUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*InviteUpdate) SetNillableToken added in v0.2.0

func (_u *InviteUpdate) SetNillableToken(v *string) *InviteUpdate

SetNillableToken sets the "token" field if the given value is not nil.

func (*InviteUpdate) SetOrganization added in v0.2.0

func (_u *InviteUpdate) SetOrganization(v *Organization) *InviteUpdate

SetOrganization sets the "organization" edge to the Organization entity.

func (*InviteUpdate) SetOrganizationID added in v0.2.0

func (_u *InviteUpdate) SetOrganizationID(v uuid.UUID) *InviteUpdate

SetOrganizationID sets the "organization_id" field.

func (*InviteUpdate) SetResendCount added in v0.2.0

func (_u *InviteUpdate) SetResendCount(v int) *InviteUpdate

SetResendCount sets the "resend_count" field.

func (*InviteUpdate) SetRole added in v0.2.0

func (_u *InviteUpdate) SetRole(v string) *InviteUpdate

SetRole sets the "role" field.

func (*InviteUpdate) SetStatus added in v0.2.0

func (_u *InviteUpdate) SetStatus(v invite.Status) *InviteUpdate

SetStatus sets the "status" field.

func (*InviteUpdate) SetToken added in v0.2.0

func (_u *InviteUpdate) SetToken(v string) *InviteUpdate

SetToken sets the "token" field.

func (*InviteUpdate) SetUpdatedAt added in v0.2.0

func (_u *InviteUpdate) SetUpdatedAt(v time.Time) *InviteUpdate

SetUpdatedAt sets the "updated_at" field.

func (*InviteUpdate) Where added in v0.2.0

func (_u *InviteUpdate) Where(ps ...predicate.Invite) *InviteUpdate

Where appends a list predicates to the InviteUpdate builder.

type InviteUpdateOne added in v0.2.0

type InviteUpdateOne struct {
	// contains filtered or unexported fields
}

InviteUpdateOne is the builder for updating a single Invite entity.

func (*InviteUpdateOne) AddResendCount added in v0.2.0

func (_u *InviteUpdateOne) AddResendCount(v int) *InviteUpdateOne

AddResendCount adds value to the "resend_count" field.

func (*InviteUpdateOne) ClearAcceptedAt added in v0.2.0

func (_u *InviteUpdateOne) ClearAcceptedAt() *InviteUpdateOne

ClearAcceptedAt clears the value of the "accepted_at" field.

func (*InviteUpdateOne) ClearAcceptedByPrincipalID added in v0.2.0

func (_u *InviteUpdateOne) ClearAcceptedByPrincipalID() *InviteUpdateOne

ClearAcceptedByPrincipalID clears the value of the "accepted_by_principal_id" field.

func (*InviteUpdateOne) ClearInviter added in v0.2.0

func (_u *InviteUpdateOne) ClearInviter() *InviteUpdateOne

ClearInviter clears the "inviter" edge to the Principal entity.

func (*InviteUpdateOne) ClearMessage added in v0.2.0

func (_u *InviteUpdateOne) ClearMessage() *InviteUpdateOne

ClearMessage clears the value of the "message" field.

func (*InviteUpdateOne) ClearOrganization added in v0.2.0

func (_u *InviteUpdateOne) ClearOrganization() *InviteUpdateOne

ClearOrganization clears the "organization" edge to the Organization entity.

func (*InviteUpdateOne) Exec added in v0.2.0

func (_u *InviteUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*InviteUpdateOne) ExecX added in v0.2.0

func (_u *InviteUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*InviteUpdateOne) Mutation added in v0.2.0

func (_u *InviteUpdateOne) Mutation() *InviteMutation

Mutation returns the InviteMutation object of the builder.

func (*InviteUpdateOne) Save added in v0.2.0

func (_u *InviteUpdateOne) Save(ctx context.Context) (*Invite, error)

Save executes the query and returns the updated Invite entity.

func (*InviteUpdateOne) SaveX added in v0.2.0

func (_u *InviteUpdateOne) SaveX(ctx context.Context) *Invite

SaveX is like Save, but panics if an error occurs.

func (*InviteUpdateOne) Select added in v0.2.0

func (_u *InviteUpdateOne) Select(field string, fields ...string) *InviteUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*InviteUpdateOne) SetAcceptedAt added in v0.2.0

func (_u *InviteUpdateOne) SetAcceptedAt(v time.Time) *InviteUpdateOne

SetAcceptedAt sets the "accepted_at" field.

func (*InviteUpdateOne) SetAcceptedByPrincipalID added in v0.2.0

func (_u *InviteUpdateOne) SetAcceptedByPrincipalID(v uuid.UUID) *InviteUpdateOne

SetAcceptedByPrincipalID sets the "accepted_by_principal_id" field.

func (*InviteUpdateOne) SetEmail added in v0.2.0

func (_u *InviteUpdateOne) SetEmail(v string) *InviteUpdateOne

SetEmail sets the "email" field.

func (*InviteUpdateOne) SetExpiresAt added in v0.2.0

func (_u *InviteUpdateOne) SetExpiresAt(v time.Time) *InviteUpdateOne

SetExpiresAt sets the "expires_at" field.

func (*InviteUpdateOne) SetInviter added in v0.2.0

func (_u *InviteUpdateOne) SetInviter(v *Principal) *InviteUpdateOne

SetInviter sets the "inviter" edge to the Principal entity.

func (*InviteUpdateOne) SetInviterID added in v0.2.0

func (_u *InviteUpdateOne) SetInviterID(id uuid.UUID) *InviteUpdateOne

SetInviterID sets the "inviter" edge to the Principal entity by ID.

func (*InviteUpdateOne) SetInviterPrincipalID added in v0.2.0

func (_u *InviteUpdateOne) SetInviterPrincipalID(v uuid.UUID) *InviteUpdateOne

SetInviterPrincipalID sets the "inviter_principal_id" field.

func (*InviteUpdateOne) SetLastSentAt added in v0.2.0

func (_u *InviteUpdateOne) SetLastSentAt(v time.Time) *InviteUpdateOne

SetLastSentAt sets the "last_sent_at" field.

func (*InviteUpdateOne) SetMessage added in v0.2.0

func (_u *InviteUpdateOne) SetMessage(v string) *InviteUpdateOne

SetMessage sets the "message" field.

func (*InviteUpdateOne) SetNillableAcceptedAt added in v0.2.0

func (_u *InviteUpdateOne) SetNillableAcceptedAt(v *time.Time) *InviteUpdateOne

SetNillableAcceptedAt sets the "accepted_at" field if the given value is not nil.

func (*InviteUpdateOne) SetNillableAcceptedByPrincipalID added in v0.2.0

func (_u *InviteUpdateOne) SetNillableAcceptedByPrincipalID(v *uuid.UUID) *InviteUpdateOne

SetNillableAcceptedByPrincipalID sets the "accepted_by_principal_id" field if the given value is not nil.

func (*InviteUpdateOne) SetNillableEmail added in v0.2.0

func (_u *InviteUpdateOne) SetNillableEmail(v *string) *InviteUpdateOne

SetNillableEmail sets the "email" field if the given value is not nil.

func (*InviteUpdateOne) SetNillableExpiresAt added in v0.2.0

func (_u *InviteUpdateOne) SetNillableExpiresAt(v *time.Time) *InviteUpdateOne

SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.

func (*InviteUpdateOne) SetNillableInviterPrincipalID added in v0.2.0

func (_u *InviteUpdateOne) SetNillableInviterPrincipalID(v *uuid.UUID) *InviteUpdateOne

SetNillableInviterPrincipalID sets the "inviter_principal_id" field if the given value is not nil.

func (*InviteUpdateOne) SetNillableLastSentAt added in v0.2.0

func (_u *InviteUpdateOne) SetNillableLastSentAt(v *time.Time) *InviteUpdateOne

SetNillableLastSentAt sets the "last_sent_at" field if the given value is not nil.

func (*InviteUpdateOne) SetNillableMessage added in v0.2.0

func (_u *InviteUpdateOne) SetNillableMessage(v *string) *InviteUpdateOne

SetNillableMessage sets the "message" field if the given value is not nil.

func (*InviteUpdateOne) SetNillableOrganizationID added in v0.2.0

func (_u *InviteUpdateOne) SetNillableOrganizationID(v *uuid.UUID) *InviteUpdateOne

SetNillableOrganizationID sets the "organization_id" field if the given value is not nil.

func (*InviteUpdateOne) SetNillableResendCount added in v0.2.0

func (_u *InviteUpdateOne) SetNillableResendCount(v *int) *InviteUpdateOne

SetNillableResendCount sets the "resend_count" field if the given value is not nil.

func (*InviteUpdateOne) SetNillableRole added in v0.2.0

func (_u *InviteUpdateOne) SetNillableRole(v *string) *InviteUpdateOne

SetNillableRole sets the "role" field if the given value is not nil.

func (*InviteUpdateOne) SetNillableStatus added in v0.2.0

func (_u *InviteUpdateOne) SetNillableStatus(v *invite.Status) *InviteUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*InviteUpdateOne) SetNillableToken added in v0.2.0

func (_u *InviteUpdateOne) SetNillableToken(v *string) *InviteUpdateOne

SetNillableToken sets the "token" field if the given value is not nil.

func (*InviteUpdateOne) SetOrganization added in v0.2.0

func (_u *InviteUpdateOne) SetOrganization(v *Organization) *InviteUpdateOne

SetOrganization sets the "organization" edge to the Organization entity.

func (*InviteUpdateOne) SetOrganizationID added in v0.2.0

func (_u *InviteUpdateOne) SetOrganizationID(v uuid.UUID) *InviteUpdateOne

SetOrganizationID sets the "organization_id" field.

func (*InviteUpdateOne) SetResendCount added in v0.2.0

func (_u *InviteUpdateOne) SetResendCount(v int) *InviteUpdateOne

SetResendCount sets the "resend_count" field.

func (*InviteUpdateOne) SetRole added in v0.2.0

func (_u *InviteUpdateOne) SetRole(v string) *InviteUpdateOne

SetRole sets the "role" field.

func (*InviteUpdateOne) SetStatus added in v0.2.0

func (_u *InviteUpdateOne) SetStatus(v invite.Status) *InviteUpdateOne

SetStatus sets the "status" field.

func (*InviteUpdateOne) SetToken added in v0.2.0

func (_u *InviteUpdateOne) SetToken(v string) *InviteUpdateOne

SetToken sets the "token" field.

func (*InviteUpdateOne) SetUpdatedAt added in v0.2.0

func (_u *InviteUpdateOne) SetUpdatedAt(v time.Time) *InviteUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*InviteUpdateOne) Where added in v0.2.0

func (_u *InviteUpdateOne) Where(ps ...predicate.Invite) *InviteUpdateOne

Where appends a list predicates to the InviteUpdate builder.

type InviteUpsert added in v0.2.0

type InviteUpsert struct {
	*sql.UpdateSet
}

InviteUpsert is the "OnConflict" setter.

func (*InviteUpsert) AddResendCount added in v0.2.0

func (u *InviteUpsert) AddResendCount(v int) *InviteUpsert

AddResendCount adds v to the "resend_count" field.

func (*InviteUpsert) ClearAcceptedAt added in v0.2.0

func (u *InviteUpsert) ClearAcceptedAt() *InviteUpsert

ClearAcceptedAt clears the value of the "accepted_at" field.

func (*InviteUpsert) ClearAcceptedByPrincipalID added in v0.2.0

func (u *InviteUpsert) ClearAcceptedByPrincipalID() *InviteUpsert

ClearAcceptedByPrincipalID clears the value of the "accepted_by_principal_id" field.

func (*InviteUpsert) ClearMessage added in v0.2.0

func (u *InviteUpsert) ClearMessage() *InviteUpsert

ClearMessage clears the value of the "message" field.

func (*InviteUpsert) SetAcceptedAt added in v0.2.0

func (u *InviteUpsert) SetAcceptedAt(v time.Time) *InviteUpsert

SetAcceptedAt sets the "accepted_at" field.

func (*InviteUpsert) SetAcceptedByPrincipalID added in v0.2.0

func (u *InviteUpsert) SetAcceptedByPrincipalID(v uuid.UUID) *InviteUpsert

SetAcceptedByPrincipalID sets the "accepted_by_principal_id" field.

func (*InviteUpsert) SetEmail added in v0.2.0

func (u *InviteUpsert) SetEmail(v string) *InviteUpsert

SetEmail sets the "email" field.

func (*InviteUpsert) SetExpiresAt added in v0.2.0

func (u *InviteUpsert) SetExpiresAt(v time.Time) *InviteUpsert

SetExpiresAt sets the "expires_at" field.

func (*InviteUpsert) SetInviterPrincipalID added in v0.2.0

func (u *InviteUpsert) SetInviterPrincipalID(v uuid.UUID) *InviteUpsert

SetInviterPrincipalID sets the "inviter_principal_id" field.

func (*InviteUpsert) SetLastSentAt added in v0.2.0

func (u *InviteUpsert) SetLastSentAt(v time.Time) *InviteUpsert

SetLastSentAt sets the "last_sent_at" field.

func (*InviteUpsert) SetMessage added in v0.2.0

func (u *InviteUpsert) SetMessage(v string) *InviteUpsert

SetMessage sets the "message" field.

func (*InviteUpsert) SetOrganizationID added in v0.2.0

func (u *InviteUpsert) SetOrganizationID(v uuid.UUID) *InviteUpsert

SetOrganizationID sets the "organization_id" field.

func (*InviteUpsert) SetResendCount added in v0.2.0

func (u *InviteUpsert) SetResendCount(v int) *InviteUpsert

SetResendCount sets the "resend_count" field.

func (*InviteUpsert) SetRole added in v0.2.0

func (u *InviteUpsert) SetRole(v string) *InviteUpsert

SetRole sets the "role" field.

func (*InviteUpsert) SetStatus added in v0.2.0

func (u *InviteUpsert) SetStatus(v invite.Status) *InviteUpsert

SetStatus sets the "status" field.

func (*InviteUpsert) SetToken added in v0.2.0

func (u *InviteUpsert) SetToken(v string) *InviteUpsert

SetToken sets the "token" field.

func (*InviteUpsert) SetUpdatedAt added in v0.2.0

func (u *InviteUpsert) SetUpdatedAt(v time.Time) *InviteUpsert

SetUpdatedAt sets the "updated_at" field.

func (*InviteUpsert) UpdateAcceptedAt added in v0.2.0

func (u *InviteUpsert) UpdateAcceptedAt() *InviteUpsert

UpdateAcceptedAt sets the "accepted_at" field to the value that was provided on create.

func (*InviteUpsert) UpdateAcceptedByPrincipalID added in v0.2.0

func (u *InviteUpsert) UpdateAcceptedByPrincipalID() *InviteUpsert

UpdateAcceptedByPrincipalID sets the "accepted_by_principal_id" field to the value that was provided on create.

func (*InviteUpsert) UpdateEmail added in v0.2.0

func (u *InviteUpsert) UpdateEmail() *InviteUpsert

UpdateEmail sets the "email" field to the value that was provided on create.

func (*InviteUpsert) UpdateExpiresAt added in v0.2.0

func (u *InviteUpsert) UpdateExpiresAt() *InviteUpsert

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*InviteUpsert) UpdateInviterPrincipalID added in v0.2.0

func (u *InviteUpsert) UpdateInviterPrincipalID() *InviteUpsert

UpdateInviterPrincipalID sets the "inviter_principal_id" field to the value that was provided on create.

func (*InviteUpsert) UpdateLastSentAt added in v0.2.0

func (u *InviteUpsert) UpdateLastSentAt() *InviteUpsert

UpdateLastSentAt sets the "last_sent_at" field to the value that was provided on create.

func (*InviteUpsert) UpdateMessage added in v0.2.0

func (u *InviteUpsert) UpdateMessage() *InviteUpsert

UpdateMessage sets the "message" field to the value that was provided on create.

func (*InviteUpsert) UpdateOrganizationID added in v0.2.0

func (u *InviteUpsert) UpdateOrganizationID() *InviteUpsert

UpdateOrganizationID sets the "organization_id" field to the value that was provided on create.

func (*InviteUpsert) UpdateResendCount added in v0.2.0

func (u *InviteUpsert) UpdateResendCount() *InviteUpsert

UpdateResendCount sets the "resend_count" field to the value that was provided on create.

func (*InviteUpsert) UpdateRole added in v0.2.0

func (u *InviteUpsert) UpdateRole() *InviteUpsert

UpdateRole sets the "role" field to the value that was provided on create.

func (*InviteUpsert) UpdateStatus added in v0.2.0

func (u *InviteUpsert) UpdateStatus() *InviteUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*InviteUpsert) UpdateToken added in v0.2.0

func (u *InviteUpsert) UpdateToken() *InviteUpsert

UpdateToken sets the "token" field to the value that was provided on create.

func (*InviteUpsert) UpdateUpdatedAt added in v0.2.0

func (u *InviteUpsert) UpdateUpdatedAt() *InviteUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type InviteUpsertBulk added in v0.2.0

type InviteUpsertBulk struct {
	// contains filtered or unexported fields
}

InviteUpsertBulk is the builder for "upsert"-ing a bulk of Invite nodes.

func (*InviteUpsertBulk) AddResendCount added in v0.2.0

func (u *InviteUpsertBulk) AddResendCount(v int) *InviteUpsertBulk

AddResendCount adds v to the "resend_count" field.

func (*InviteUpsertBulk) ClearAcceptedAt added in v0.2.0

func (u *InviteUpsertBulk) ClearAcceptedAt() *InviteUpsertBulk

ClearAcceptedAt clears the value of the "accepted_at" field.

func (*InviteUpsertBulk) ClearAcceptedByPrincipalID added in v0.2.0

func (u *InviteUpsertBulk) ClearAcceptedByPrincipalID() *InviteUpsertBulk

ClearAcceptedByPrincipalID clears the value of the "accepted_by_principal_id" field.

func (*InviteUpsertBulk) ClearMessage added in v0.2.0

func (u *InviteUpsertBulk) ClearMessage() *InviteUpsertBulk

ClearMessage clears the value of the "message" field.

func (*InviteUpsertBulk) DoNothing added in v0.2.0

func (u *InviteUpsertBulk) DoNothing() *InviteUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*InviteUpsertBulk) Exec added in v0.2.0

func (u *InviteUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*InviteUpsertBulk) ExecX added in v0.2.0

func (u *InviteUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*InviteUpsertBulk) Ignore added in v0.2.0

func (u *InviteUpsertBulk) Ignore() *InviteUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Invite.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*InviteUpsertBulk) SetAcceptedAt added in v0.2.0

func (u *InviteUpsertBulk) SetAcceptedAt(v time.Time) *InviteUpsertBulk

SetAcceptedAt sets the "accepted_at" field.

func (*InviteUpsertBulk) SetAcceptedByPrincipalID added in v0.2.0

func (u *InviteUpsertBulk) SetAcceptedByPrincipalID(v uuid.UUID) *InviteUpsertBulk

SetAcceptedByPrincipalID sets the "accepted_by_principal_id" field.

func (*InviteUpsertBulk) SetEmail added in v0.2.0

func (u *InviteUpsertBulk) SetEmail(v string) *InviteUpsertBulk

SetEmail sets the "email" field.

func (*InviteUpsertBulk) SetExpiresAt added in v0.2.0

func (u *InviteUpsertBulk) SetExpiresAt(v time.Time) *InviteUpsertBulk

SetExpiresAt sets the "expires_at" field.

func (*InviteUpsertBulk) SetInviterPrincipalID added in v0.2.0

func (u *InviteUpsertBulk) SetInviterPrincipalID(v uuid.UUID) *InviteUpsertBulk

SetInviterPrincipalID sets the "inviter_principal_id" field.

func (*InviteUpsertBulk) SetLastSentAt added in v0.2.0

func (u *InviteUpsertBulk) SetLastSentAt(v time.Time) *InviteUpsertBulk

SetLastSentAt sets the "last_sent_at" field.

func (*InviteUpsertBulk) SetMessage added in v0.2.0

func (u *InviteUpsertBulk) SetMessage(v string) *InviteUpsertBulk

SetMessage sets the "message" field.

func (*InviteUpsertBulk) SetOrganizationID added in v0.2.0

func (u *InviteUpsertBulk) SetOrganizationID(v uuid.UUID) *InviteUpsertBulk

SetOrganizationID sets the "organization_id" field.

func (*InviteUpsertBulk) SetResendCount added in v0.2.0

func (u *InviteUpsertBulk) SetResendCount(v int) *InviteUpsertBulk

SetResendCount sets the "resend_count" field.

func (*InviteUpsertBulk) SetRole added in v0.2.0

func (u *InviteUpsertBulk) SetRole(v string) *InviteUpsertBulk

SetRole sets the "role" field.

func (*InviteUpsertBulk) SetStatus added in v0.2.0

SetStatus sets the "status" field.

func (*InviteUpsertBulk) SetToken added in v0.2.0

func (u *InviteUpsertBulk) SetToken(v string) *InviteUpsertBulk

SetToken sets the "token" field.

func (*InviteUpsertBulk) SetUpdatedAt added in v0.2.0

func (u *InviteUpsertBulk) SetUpdatedAt(v time.Time) *InviteUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*InviteUpsertBulk) Update added in v0.2.0

func (u *InviteUpsertBulk) Update(set func(*InviteUpsert)) *InviteUpsertBulk

Update allows overriding fields `UPDATE` values. See the InviteCreateBulk.OnConflict documentation for more info.

func (*InviteUpsertBulk) UpdateAcceptedAt added in v0.2.0

func (u *InviteUpsertBulk) UpdateAcceptedAt() *InviteUpsertBulk

UpdateAcceptedAt sets the "accepted_at" field to the value that was provided on create.

func (*InviteUpsertBulk) UpdateAcceptedByPrincipalID added in v0.2.0

func (u *InviteUpsertBulk) UpdateAcceptedByPrincipalID() *InviteUpsertBulk

UpdateAcceptedByPrincipalID sets the "accepted_by_principal_id" field to the value that was provided on create.

func (*InviteUpsertBulk) UpdateEmail added in v0.2.0

func (u *InviteUpsertBulk) UpdateEmail() *InviteUpsertBulk

UpdateEmail sets the "email" field to the value that was provided on create.

func (*InviteUpsertBulk) UpdateExpiresAt added in v0.2.0

func (u *InviteUpsertBulk) UpdateExpiresAt() *InviteUpsertBulk

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*InviteUpsertBulk) UpdateInviterPrincipalID added in v0.2.0

func (u *InviteUpsertBulk) UpdateInviterPrincipalID() *InviteUpsertBulk

UpdateInviterPrincipalID sets the "inviter_principal_id" field to the value that was provided on create.

func (*InviteUpsertBulk) UpdateLastSentAt added in v0.2.0

func (u *InviteUpsertBulk) UpdateLastSentAt() *InviteUpsertBulk

UpdateLastSentAt sets the "last_sent_at" field to the value that was provided on create.

func (*InviteUpsertBulk) UpdateMessage added in v0.2.0

func (u *InviteUpsertBulk) UpdateMessage() *InviteUpsertBulk

UpdateMessage sets the "message" field to the value that was provided on create.

func (*InviteUpsertBulk) UpdateNewValues added in v0.2.0

func (u *InviteUpsertBulk) UpdateNewValues() *InviteUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Invite.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(invite.FieldID)
		}),
	).
	Exec(ctx)

func (*InviteUpsertBulk) UpdateOrganizationID added in v0.2.0

func (u *InviteUpsertBulk) UpdateOrganizationID() *InviteUpsertBulk

UpdateOrganizationID sets the "organization_id" field to the value that was provided on create.

func (*InviteUpsertBulk) UpdateResendCount added in v0.2.0

func (u *InviteUpsertBulk) UpdateResendCount() *InviteUpsertBulk

UpdateResendCount sets the "resend_count" field to the value that was provided on create.

func (*InviteUpsertBulk) UpdateRole added in v0.2.0

func (u *InviteUpsertBulk) UpdateRole() *InviteUpsertBulk

UpdateRole sets the "role" field to the value that was provided on create.

func (*InviteUpsertBulk) UpdateStatus added in v0.2.0

func (u *InviteUpsertBulk) UpdateStatus() *InviteUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*InviteUpsertBulk) UpdateToken added in v0.2.0

func (u *InviteUpsertBulk) UpdateToken() *InviteUpsertBulk

UpdateToken sets the "token" field to the value that was provided on create.

func (*InviteUpsertBulk) UpdateUpdatedAt added in v0.2.0

func (u *InviteUpsertBulk) UpdateUpdatedAt() *InviteUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type InviteUpsertOne added in v0.2.0

type InviteUpsertOne struct {
	// contains filtered or unexported fields
}

InviteUpsertOne is the builder for "upsert"-ing

one Invite node.

func (*InviteUpsertOne) AddResendCount added in v0.2.0

func (u *InviteUpsertOne) AddResendCount(v int) *InviteUpsertOne

AddResendCount adds v to the "resend_count" field.

func (*InviteUpsertOne) ClearAcceptedAt added in v0.2.0

func (u *InviteUpsertOne) ClearAcceptedAt() *InviteUpsertOne

ClearAcceptedAt clears the value of the "accepted_at" field.

func (*InviteUpsertOne) ClearAcceptedByPrincipalID added in v0.2.0

func (u *InviteUpsertOne) ClearAcceptedByPrincipalID() *InviteUpsertOne

ClearAcceptedByPrincipalID clears the value of the "accepted_by_principal_id" field.

func (*InviteUpsertOne) ClearMessage added in v0.2.0

func (u *InviteUpsertOne) ClearMessage() *InviteUpsertOne

ClearMessage clears the value of the "message" field.

func (*InviteUpsertOne) DoNothing added in v0.2.0

func (u *InviteUpsertOne) DoNothing() *InviteUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*InviteUpsertOne) Exec added in v0.2.0

func (u *InviteUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*InviteUpsertOne) ExecX added in v0.2.0

func (u *InviteUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*InviteUpsertOne) ID added in v0.2.0

func (u *InviteUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*InviteUpsertOne) IDX added in v0.2.0

func (u *InviteUpsertOne) IDX(ctx context.Context) uuid.UUID

IDX is like ID, but panics if an error occurs.

func (*InviteUpsertOne) Ignore added in v0.2.0

func (u *InviteUpsertOne) Ignore() *InviteUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Invite.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*InviteUpsertOne) SetAcceptedAt added in v0.2.0

func (u *InviteUpsertOne) SetAcceptedAt(v time.Time) *InviteUpsertOne

SetAcceptedAt sets the "accepted_at" field.

func (*InviteUpsertOne) SetAcceptedByPrincipalID added in v0.2.0

func (u *InviteUpsertOne) SetAcceptedByPrincipalID(v uuid.UUID) *InviteUpsertOne

SetAcceptedByPrincipalID sets the "accepted_by_principal_id" field.

func (*InviteUpsertOne) SetEmail added in v0.2.0

func (u *InviteUpsertOne) SetEmail(v string) *InviteUpsertOne

SetEmail sets the "email" field.

func (*InviteUpsertOne) SetExpiresAt added in v0.2.0

func (u *InviteUpsertOne) SetExpiresAt(v time.Time) *InviteUpsertOne

SetExpiresAt sets the "expires_at" field.

func (*InviteUpsertOne) SetInviterPrincipalID added in v0.2.0

func (u *InviteUpsertOne) SetInviterPrincipalID(v uuid.UUID) *InviteUpsertOne

SetInviterPrincipalID sets the "inviter_principal_id" field.

func (*InviteUpsertOne) SetLastSentAt added in v0.2.0

func (u *InviteUpsertOne) SetLastSentAt(v time.Time) *InviteUpsertOne

SetLastSentAt sets the "last_sent_at" field.

func (*InviteUpsertOne) SetMessage added in v0.2.0

func (u *InviteUpsertOne) SetMessage(v string) *InviteUpsertOne

SetMessage sets the "message" field.

func (*InviteUpsertOne) SetOrganizationID added in v0.2.0

func (u *InviteUpsertOne) SetOrganizationID(v uuid.UUID) *InviteUpsertOne

SetOrganizationID sets the "organization_id" field.

func (*InviteUpsertOne) SetResendCount added in v0.2.0

func (u *InviteUpsertOne) SetResendCount(v int) *InviteUpsertOne

SetResendCount sets the "resend_count" field.

func (*InviteUpsertOne) SetRole added in v0.2.0

func (u *InviteUpsertOne) SetRole(v string) *InviteUpsertOne

SetRole sets the "role" field.

func (*InviteUpsertOne) SetStatus added in v0.2.0

func (u *InviteUpsertOne) SetStatus(v invite.Status) *InviteUpsertOne

SetStatus sets the "status" field.

func (*InviteUpsertOne) SetToken added in v0.2.0

func (u *InviteUpsertOne) SetToken(v string) *InviteUpsertOne

SetToken sets the "token" field.

func (*InviteUpsertOne) SetUpdatedAt added in v0.2.0

func (u *InviteUpsertOne) SetUpdatedAt(v time.Time) *InviteUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*InviteUpsertOne) Update added in v0.2.0

func (u *InviteUpsertOne) Update(set func(*InviteUpsert)) *InviteUpsertOne

Update allows overriding fields `UPDATE` values. See the InviteCreate.OnConflict documentation for more info.

func (*InviteUpsertOne) UpdateAcceptedAt added in v0.2.0

func (u *InviteUpsertOne) UpdateAcceptedAt() *InviteUpsertOne

UpdateAcceptedAt sets the "accepted_at" field to the value that was provided on create.

func (*InviteUpsertOne) UpdateAcceptedByPrincipalID added in v0.2.0

func (u *InviteUpsertOne) UpdateAcceptedByPrincipalID() *InviteUpsertOne

UpdateAcceptedByPrincipalID sets the "accepted_by_principal_id" field to the value that was provided on create.

func (*InviteUpsertOne) UpdateEmail added in v0.2.0

func (u *InviteUpsertOne) UpdateEmail() *InviteUpsertOne

UpdateEmail sets the "email" field to the value that was provided on create.

func (*InviteUpsertOne) UpdateExpiresAt added in v0.2.0

func (u *InviteUpsertOne) UpdateExpiresAt() *InviteUpsertOne

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*InviteUpsertOne) UpdateInviterPrincipalID added in v0.2.0

func (u *InviteUpsertOne) UpdateInviterPrincipalID() *InviteUpsertOne

UpdateInviterPrincipalID sets the "inviter_principal_id" field to the value that was provided on create.

func (*InviteUpsertOne) UpdateLastSentAt added in v0.2.0

func (u *InviteUpsertOne) UpdateLastSentAt() *InviteUpsertOne

UpdateLastSentAt sets the "last_sent_at" field to the value that was provided on create.

func (*InviteUpsertOne) UpdateMessage added in v0.2.0

func (u *InviteUpsertOne) UpdateMessage() *InviteUpsertOne

UpdateMessage sets the "message" field to the value that was provided on create.

func (*InviteUpsertOne) UpdateNewValues added in v0.2.0

func (u *InviteUpsertOne) UpdateNewValues() *InviteUpsertOne

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.Invite.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(invite.FieldID)
		}),
	).
	Exec(ctx)

func (*InviteUpsertOne) UpdateOrganizationID added in v0.2.0

func (u *InviteUpsertOne) UpdateOrganizationID() *InviteUpsertOne

UpdateOrganizationID sets the "organization_id" field to the value that was provided on create.

func (*InviteUpsertOne) UpdateResendCount added in v0.2.0

func (u *InviteUpsertOne) UpdateResendCount() *InviteUpsertOne

UpdateResendCount sets the "resend_count" field to the value that was provided on create.

func (*InviteUpsertOne) UpdateRole added in v0.2.0

func (u *InviteUpsertOne) UpdateRole() *InviteUpsertOne

UpdateRole sets the "role" field to the value that was provided on create.

func (*InviteUpsertOne) UpdateStatus added in v0.2.0

func (u *InviteUpsertOne) UpdateStatus() *InviteUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*InviteUpsertOne) UpdateToken added in v0.2.0

func (u *InviteUpsertOne) UpdateToken() *InviteUpsertOne

UpdateToken sets the "token" field to the value that was provided on create.

func (*InviteUpsertOne) UpdateUpdatedAt added in v0.2.0

func (u *InviteUpsertOne) UpdateUpdatedAt() *InviteUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type Invites added in v0.2.0

type Invites []*Invite

Invites is a parsable slice of Invite.

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"`
	// personal=user namespace, team=shared org, enterprise=large org
	OrgType organization.OrgType `json:"org_type,omitempty"`
	// For personal orgs, the principal who owns this namespace
	OwnerPrincipalID *uuid.UUID `json:"owner_principal_id,omitempty"`
	// LogoURL holds the value of the "logo_url" field.
	LogoURL *string `json:"logo_url,omitempty"`
	// Organization description
	Description *string `json:"description,omitempty"`
	// Organization website
	WebsiteURL *string `json:"website_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) QueryInvites added in v0.2.0

func (_m *Organization) QueryInvites() *InviteQuery

QueryInvites queries the "invites" 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) QueryOwner added in v0.2.0

func (_m *Organization) QueryOwner() *PrincipalQuery

QueryOwner queries the "owner" edge of the Organization entity.

func (*Organization) QueryPrincipalMemberships added in v0.2.0

func (_m *Organization) QueryPrincipalMemberships() *PrincipalMembershipQuery

QueryPrincipalMemberships queries the "principal_memberships" edge of the Organization entity.

func (*Organization) QueryPrincipals added in v0.2.0

func (_m *Organization) QueryPrincipals() *PrincipalQuery

QueryPrincipals queries the "principals" 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) QueryInvites added in v0.2.0

func (c *OrganizationClient) QueryInvites(_m *Organization) *InviteQuery

QueryInvites queries the invites 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) QueryOwner added in v0.2.0

func (c *OrganizationClient) QueryOwner(_m *Organization) *PrincipalQuery

QueryOwner queries the owner edge of a Organization.

func (*OrganizationClient) QueryPrincipalMemberships added in v0.2.0

func (c *OrganizationClient) QueryPrincipalMemberships(_m *Organization) *PrincipalMembershipQuery

QueryPrincipalMemberships queries the principal_memberships edge of a Organization.

func (*OrganizationClient) QueryPrincipals added in v0.2.0

func (c *OrganizationClient) QueryPrincipals(_m *Organization) *PrincipalQuery

QueryPrincipals queries the principals 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) AddInviteIDs added in v0.2.0

func (_c *OrganizationCreate) AddInviteIDs(ids ...uuid.UUID) *OrganizationCreate

AddInviteIDs adds the "invites" edge to the Invite entity by IDs.

func (*OrganizationCreate) AddInvites added in v0.2.0

func (_c *OrganizationCreate) AddInvites(v ...*Invite) *OrganizationCreate

AddInvites adds the "invites" edges to the Invite 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) AddPrincipalIDs added in v0.2.0

func (_c *OrganizationCreate) AddPrincipalIDs(ids ...uuid.UUID) *OrganizationCreate

AddPrincipalIDs adds the "principals" edge to the Principal entity by IDs.

func (*OrganizationCreate) AddPrincipalMembershipIDs added in v0.2.0

func (_c *OrganizationCreate) AddPrincipalMembershipIDs(ids ...uuid.UUID) *OrganizationCreate

AddPrincipalMembershipIDs adds the "principal_memberships" edge to the PrincipalMembership entity by IDs.

func (*OrganizationCreate) AddPrincipalMemberships added in v0.2.0

func (_c *OrganizationCreate) AddPrincipalMemberships(v ...*PrincipalMembership) *OrganizationCreate

AddPrincipalMemberships adds the "principal_memberships" edges to the PrincipalMembership entity.

func (*OrganizationCreate) AddPrincipals added in v0.2.0

func (_c *OrganizationCreate) AddPrincipals(v ...*Principal) *OrganizationCreate

AddPrincipals adds the "principals" edges to the Principal 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) SetDescription added in v0.2.0

func (_c *OrganizationCreate) SetDescription(v string) *OrganizationCreate

SetDescription sets the "description" 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) SetNillableDescription added in v0.2.0

func (_c *OrganizationCreate) SetNillableDescription(v *string) *OrganizationCreate

SetNillableDescription sets the "description" 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) SetNillableOrgType added in v0.2.0

func (_c *OrganizationCreate) SetNillableOrgType(v *organization.OrgType) *OrganizationCreate

SetNillableOrgType sets the "org_type" field if the given value is not nil.

func (*OrganizationCreate) SetNillableOwnerID added in v0.2.0

func (_c *OrganizationCreate) SetNillableOwnerID(id *uuid.UUID) *OrganizationCreate

SetNillableOwnerID sets the "owner" edge to the Principal entity by ID if the given value is not nil.

func (*OrganizationCreate) SetNillableOwnerPrincipalID added in v0.2.0

func (_c *OrganizationCreate) SetNillableOwnerPrincipalID(v *uuid.UUID) *OrganizationCreate

SetNillableOwnerPrincipalID sets the "owner_principal_id" 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) SetNillableWebsiteURL added in v0.2.0

func (_c *OrganizationCreate) SetNillableWebsiteURL(v *string) *OrganizationCreate

SetNillableWebsiteURL sets the "website_url" field if the given value is not nil.

func (*OrganizationCreate) SetOrgType added in v0.2.0

SetOrgType sets the "org_type" field.

func (*OrganizationCreate) SetOwner added in v0.2.0

SetOwner sets the "owner" edge to the Principal entity.

func (*OrganizationCreate) SetOwnerID added in v0.2.0

func (_c *OrganizationCreate) SetOwnerID(id uuid.UUID) *OrganizationCreate

SetOwnerID sets the "owner" edge to the Principal entity by ID.

func (*OrganizationCreate) SetOwnerPrincipalID added in v0.2.0

func (_c *OrganizationCreate) SetOwnerPrincipalID(v uuid.UUID) *OrganizationCreate

SetOwnerPrincipalID sets the "owner_principal_id" field.

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.

func (*OrganizationCreate) SetWebsiteURL added in v0.2.0

func (_c *OrganizationCreate) SetWebsiteURL(v string) *OrganizationCreate

SetWebsiteURL sets the "website_url" 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"`
	// Principals holds the value of the principals edge.
	Principals []*Principal `json:"principals,omitempty"`
	// PrincipalMemberships holds the value of the principal_memberships edge.
	PrincipalMemberships []*PrincipalMembership `json:"principal_memberships,omitempty"`
	// Owner principal for personal organizations
	Owner *Principal `json:"owner,omitempty"`
	// Pending invitations to join this organization
	Invites []*Invite `json:"invites,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) InvitesOrErr added in v0.2.0

func (e OrganizationEdges) InvitesOrErr() ([]*Invite, error)

InvitesOrErr returns the Invites 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) OwnerOrErr added in v0.2.0

func (e OrganizationEdges) OwnerOrErr() (*Principal, 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 (OrganizationEdges) PrincipalMembershipsOrErr added in v0.2.0

func (e OrganizationEdges) PrincipalMembershipsOrErr() ([]*PrincipalMembership, error)

PrincipalMembershipsOrErr returns the PrincipalMemberships value or an error if the edge was not loaded in eager-loading.

func (OrganizationEdges) PrincipalsOrErr added in v0.2.0

func (e OrganizationEdges) PrincipalsOrErr() ([]*Principal, error)

PrincipalsOrErr returns the Principals 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) WhereDescription added in v0.2.0

func (f *OrganizationFilter) WhereDescription(p entql.StringP)

WhereDescription applies the entql string predicate on the description 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) WhereHasInvites added in v0.2.0

func (f *OrganizationFilter) WhereHasInvites()

WhereHasInvites applies a predicate to check if query has an edge invites.

func (*OrganizationFilter) WhereHasInvitesWith added in v0.2.0

func (f *OrganizationFilter) WhereHasInvitesWith(preds ...predicate.Invite)

WhereHasInvitesWith applies a predicate to check if query has an edge invites 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) WhereHasOwner added in v0.2.0

func (f *OrganizationFilter) WhereHasOwner()

WhereHasOwner applies a predicate to check if query has an edge owner.

func (*OrganizationFilter) WhereHasOwnerWith added in v0.2.0

func (f *OrganizationFilter) WhereHasOwnerWith(preds ...predicate.Principal)

WhereHasOwnerWith applies a predicate to check if query has an edge owner with a given conditions (other predicates).

func (*OrganizationFilter) WhereHasPrincipalMemberships added in v0.2.0

func (f *OrganizationFilter) WhereHasPrincipalMemberships()

WhereHasPrincipalMemberships applies a predicate to check if query has an edge principal_memberships.

func (*OrganizationFilter) WhereHasPrincipalMembershipsWith added in v0.2.0

func (f *OrganizationFilter) WhereHasPrincipalMembershipsWith(preds ...predicate.PrincipalMembership)

WhereHasPrincipalMembershipsWith applies a predicate to check if query has an edge principal_memberships with a given conditions (other predicates).

func (*OrganizationFilter) WhereHasPrincipals added in v0.2.0

func (f *OrganizationFilter) WhereHasPrincipals()

WhereHasPrincipals applies a predicate to check if query has an edge principals.

func (*OrganizationFilter) WhereHasPrincipalsWith added in v0.2.0

func (f *OrganizationFilter) WhereHasPrincipalsWith(preds ...predicate.Principal)

WhereHasPrincipalsWith applies a predicate to check if query has an edge principals 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) WhereOrgType added in v0.2.0

func (f *OrganizationFilter) WhereOrgType(p entql.StringP)

WhereOrgType applies the entql string predicate on the org_type field.

func (*OrganizationFilter) WhereOwnerPrincipalID added in v0.2.0

func (f *OrganizationFilter) WhereOwnerPrincipalID(p entql.ValueP)

WhereOwnerPrincipalID applies the entql [16]byte predicate on the owner_principal_id 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.

func (*OrganizationFilter) WhereWebsiteURL added in v0.2.0

func (f *OrganizationFilter) WhereWebsiteURL(p entql.StringP)

WhereWebsiteURL applies the entql string predicate on the website_url 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) AddInviteIDs added in v0.2.0

func (m *OrganizationMutation) AddInviteIDs(ids ...uuid.UUID)

AddInviteIDs adds the "invites" edge to the Invite entity by ids.

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) AddPrincipalIDs added in v0.2.0

func (m *OrganizationMutation) AddPrincipalIDs(ids ...uuid.UUID)

AddPrincipalIDs adds the "principals" edge to the Principal entity by ids.

func (*OrganizationMutation) AddPrincipalMembershipIDs added in v0.2.0

func (m *OrganizationMutation) AddPrincipalMembershipIDs(ids ...uuid.UUID)

AddPrincipalMembershipIDs adds the "principal_memberships" edge to the PrincipalMembership 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) ClearDescription added in v0.2.0

func (m *OrganizationMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

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) ClearInvites added in v0.2.0

func (m *OrganizationMutation) ClearInvites()

ClearInvites clears the "invites" edge to the Invite entity.

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) ClearOwner added in v0.2.0

func (m *OrganizationMutation) ClearOwner()

ClearOwner clears the "owner" edge to the Principal entity.

func (*OrganizationMutation) ClearOwnerPrincipalID added in v0.2.0

func (m *OrganizationMutation) ClearOwnerPrincipalID()

ClearOwnerPrincipalID clears the value of the "owner_principal_id" field.

func (*OrganizationMutation) ClearPrincipalMemberships added in v0.2.0

func (m *OrganizationMutation) ClearPrincipalMemberships()

ClearPrincipalMemberships clears the "principal_memberships" edge to the PrincipalMembership entity.

func (*OrganizationMutation) ClearPrincipals added in v0.2.0

func (m *OrganizationMutation) ClearPrincipals()

ClearPrincipals clears the "principals" edge to the Principal 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) ClearWebsiteURL added in v0.2.0

func (m *OrganizationMutation) ClearWebsiteURL()

ClearWebsiteURL clears the value of the "website_url" 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) Description added in v0.2.0

func (m *OrganizationMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*OrganizationMutation) DescriptionCleared added in v0.2.0

func (m *OrganizationMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this 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) InvitesCleared added in v0.2.0

func (m *OrganizationMutation) InvitesCleared() bool

InvitesCleared reports if the "invites" edge to the Invite entity was cleared.

func (*OrganizationMutation) InvitesIDs added in v0.2.0

func (m *OrganizationMutation) InvitesIDs() (ids []uuid.UUID)

InvitesIDs returns the "invites" edge IDs in 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) OldDescription added in v0.2.0

func (m *OrganizationMutation) OldDescription(ctx context.Context) (v *string, err error)

OldDescription returns the old "description" 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) OldOrgType added in v0.2.0

func (m *OrganizationMutation) OldOrgType(ctx context.Context) (v organization.OrgType, err error)

OldOrgType returns the old "org_type" 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) OldOwnerPrincipalID added in v0.2.0

func (m *OrganizationMutation) OldOwnerPrincipalID(ctx context.Context) (v *uuid.UUID, err error)

OldOwnerPrincipalID returns the old "owner_principal_id" 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) OldWebsiteURL added in v0.2.0

func (m *OrganizationMutation) OldWebsiteURL(ctx context.Context) (v *string, err error)

OldWebsiteURL returns the old "website_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) Op

func (m *OrganizationMutation) Op() Op

Op returns the operation name.

func (*OrganizationMutation) OrgType added in v0.2.0

func (m *OrganizationMutation) OrgType() (r organization.OrgType, exists bool)

OrgType returns the value of the "org_type" field in the mutation.

func (*OrganizationMutation) OwnerCleared added in v0.2.0

func (m *OrganizationMutation) OwnerCleared() bool

OwnerCleared reports if the "owner" edge to the Principal entity was cleared.

func (*OrganizationMutation) OwnerID added in v0.2.0

func (m *OrganizationMutation) OwnerID() (id uuid.UUID, exists bool)

OwnerID returns the "owner" edge ID in the mutation.

func (*OrganizationMutation) OwnerIDs added in v0.2.0

func (m *OrganizationMutation) 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 (*OrganizationMutation) OwnerPrincipalID added in v0.2.0

func (m *OrganizationMutation) OwnerPrincipalID() (r uuid.UUID, exists bool)

OwnerPrincipalID returns the value of the "owner_principal_id" field in the mutation.

func (*OrganizationMutation) OwnerPrincipalIDCleared added in v0.2.0

func (m *OrganizationMutation) OwnerPrincipalIDCleared() bool

OwnerPrincipalIDCleared returns if the "owner_principal_id" field was cleared in this mutation.

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) PrincipalMembershipsCleared added in v0.2.0

func (m *OrganizationMutation) PrincipalMembershipsCleared() bool

PrincipalMembershipsCleared reports if the "principal_memberships" edge to the PrincipalMembership entity was cleared.

func (*OrganizationMutation) PrincipalMembershipsIDs added in v0.2.0

func (m *OrganizationMutation) PrincipalMembershipsIDs() (ids []uuid.UUID)

PrincipalMembershipsIDs returns the "principal_memberships" edge IDs in the mutation.

func (*OrganizationMutation) PrincipalsCleared added in v0.2.0

func (m *OrganizationMutation) PrincipalsCleared() bool

PrincipalsCleared reports if the "principals" edge to the Principal entity was cleared.

func (*OrganizationMutation) PrincipalsIDs added in v0.2.0

func (m *OrganizationMutation) PrincipalsIDs() (ids []uuid.UUID)

PrincipalsIDs returns the "principals" edge IDs 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) RemoveInviteIDs added in v0.2.0

func (m *OrganizationMutation) RemoveInviteIDs(ids ...uuid.UUID)

RemoveInviteIDs removes the "invites" edge to the Invite 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) RemovePrincipalIDs added in v0.2.0

func (m *OrganizationMutation) RemovePrincipalIDs(ids ...uuid.UUID)

RemovePrincipalIDs removes the "principals" edge to the Principal entity by IDs.

func (*OrganizationMutation) RemovePrincipalMembershipIDs added in v0.2.0

func (m *OrganizationMutation) RemovePrincipalMembershipIDs(ids ...uuid.UUID)

RemovePrincipalMembershipIDs removes the "principal_memberships" edge to the PrincipalMembership 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) RemovedInvitesIDs added in v0.2.0

func (m *OrganizationMutation) RemovedInvitesIDs() (ids []uuid.UUID)

RemovedInvites returns the removed IDs of the "invites" edge to the Invite entity.

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) RemovedPrincipalMembershipsIDs added in v0.2.0

func (m *OrganizationMutation) RemovedPrincipalMembershipsIDs() (ids []uuid.UUID)

RemovedPrincipalMemberships returns the removed IDs of the "principal_memberships" edge to the PrincipalMembership entity.

func (*OrganizationMutation) RemovedPrincipalsIDs added in v0.2.0

func (m *OrganizationMutation) RemovedPrincipalsIDs() (ids []uuid.UUID)

RemovedPrincipals returns the removed IDs of the "principals" edge to the Principal 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) ResetDescription added in v0.2.0

func (m *OrganizationMutation) ResetDescription()

ResetDescription resets all changes to the "description" 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) ResetInvites added in v0.2.0

func (m *OrganizationMutation) ResetInvites()

ResetInvites resets all changes to the "invites" edge.

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) ResetOrgType added in v0.2.0

func (m *OrganizationMutation) ResetOrgType()

ResetOrgType resets all changes to the "org_type" field.

func (*OrganizationMutation) ResetOwner added in v0.2.0

func (m *OrganizationMutation) ResetOwner()

ResetOwner resets all changes to the "owner" edge.

func (*OrganizationMutation) ResetOwnerPrincipalID added in v0.2.0

func (m *OrganizationMutation) ResetOwnerPrincipalID()

ResetOwnerPrincipalID resets all changes to the "owner_principal_id" field.

func (*OrganizationMutation) ResetPlan

func (m *OrganizationMutation) ResetPlan()

ResetPlan resets all changes to the "plan" field.

func (*OrganizationMutation) ResetPrincipalMemberships added in v0.2.0

func (m *OrganizationMutation) ResetPrincipalMemberships()

ResetPrincipalMemberships resets all changes to the "principal_memberships" edge.

func (*OrganizationMutation) ResetPrincipals added in v0.2.0

func (m *OrganizationMutation) ResetPrincipals()

ResetPrincipals resets all changes to the "principals" edge.

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) ResetWebsiteURL added in v0.2.0

func (m *OrganizationMutation) ResetWebsiteURL()

ResetWebsiteURL resets all changes to the "website_url" 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) SetDescription added in v0.2.0

func (m *OrganizationMutation) SetDescription(s string)

SetDescription sets the "description" 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) SetOrgType added in v0.2.0

func (m *OrganizationMutation) SetOrgType(ot organization.OrgType)

SetOrgType sets the "org_type" field.

func (*OrganizationMutation) SetOwnerID added in v0.2.0

func (m *OrganizationMutation) SetOwnerID(id uuid.UUID)

SetOwnerID sets the "owner" edge to the Principal entity by id.

func (*OrganizationMutation) SetOwnerPrincipalID added in v0.2.0

func (m *OrganizationMutation) SetOwnerPrincipalID(u uuid.UUID)

SetOwnerPrincipalID sets the "owner_principal_id" field.

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) SetWebsiteURL added in v0.2.0

func (m *OrganizationMutation) SetWebsiteURL(s string)

SetWebsiteURL sets the "website_url" 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) WebsiteURL added in v0.2.0

func (m *OrganizationMutation) WebsiteURL() (r string, exists bool)

WebsiteURL returns the value of the "website_url" field in the mutation.

func (*OrganizationMutation) WebsiteURLCleared added in v0.2.0

func (m *OrganizationMutation) WebsiteURLCleared() bool

WebsiteURLCleared returns if the "website_url" field was cleared in this 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) QueryInvites added in v0.2.0

func (_q *OrganizationQuery) QueryInvites() *InviteQuery

QueryInvites chains the current query on the "invites" 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) QueryOwner added in v0.2.0

func (_q *OrganizationQuery) QueryOwner() *PrincipalQuery

QueryOwner chains the current query on the "owner" edge.

func (*OrganizationQuery) QueryPrincipalMemberships added in v0.2.0

func (_q *OrganizationQuery) QueryPrincipalMemberships() *PrincipalMembershipQuery

QueryPrincipalMemberships chains the current query on the "principal_memberships" edge.

func (*OrganizationQuery) QueryPrincipals added in v0.2.0

func (_q *OrganizationQuery) QueryPrincipals() *PrincipalQuery

QueryPrincipals chains the current query on the "principals" 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) WithInvites added in v0.2.0

func (_q *OrganizationQuery) WithInvites(opts ...func(*InviteQuery)) *OrganizationQuery

WithInvites tells the query-builder to eager-load the nodes that are connected to the "invites" 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) WithOwner added in v0.2.0

func (_q *OrganizationQuery) WithOwner(opts ...func(*PrincipalQuery)) *OrganizationQuery

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 (*OrganizationQuery) WithPrincipalMemberships added in v0.2.0

func (_q *OrganizationQuery) WithPrincipalMemberships(opts ...func(*PrincipalMembershipQuery)) *OrganizationQuery

WithPrincipalMemberships tells the query-builder to eager-load the nodes that are connected to the "principal_memberships" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrganizationQuery) WithPrincipals added in v0.2.0

func (_q *OrganizationQuery) WithPrincipals(opts ...func(*PrincipalQuery)) *OrganizationQuery

WithPrincipals tells the query-builder to eager-load the nodes that are connected to the "principals" 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) AddInviteIDs added in v0.2.0

func (_u *OrganizationUpdate) AddInviteIDs(ids ...uuid.UUID) *OrganizationUpdate

AddInviteIDs adds the "invites" edge to the Invite entity by IDs.

func (*OrganizationUpdate) AddInvites added in v0.2.0

func (_u *OrganizationUpdate) AddInvites(v ...*Invite) *OrganizationUpdate

AddInvites adds the "invites" edges to the Invite 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) AddPrincipalIDs added in v0.2.0

func (_u *OrganizationUpdate) AddPrincipalIDs(ids ...uuid.UUID) *OrganizationUpdate

AddPrincipalIDs adds the "principals" edge to the Principal entity by IDs.

func (*OrganizationUpdate) AddPrincipalMembershipIDs added in v0.2.0

func (_u *OrganizationUpdate) AddPrincipalMembershipIDs(ids ...uuid.UUID) *OrganizationUpdate

AddPrincipalMembershipIDs adds the "principal_memberships" edge to the PrincipalMembership entity by IDs.

func (*OrganizationUpdate) AddPrincipalMemberships added in v0.2.0

func (_u *OrganizationUpdate) AddPrincipalMemberships(v ...*PrincipalMembership) *OrganizationUpdate

AddPrincipalMemberships adds the "principal_memberships" edges to the PrincipalMembership entity.

func (*OrganizationUpdate) AddPrincipals added in v0.2.0

func (_u *OrganizationUpdate) AddPrincipals(v ...*Principal) *OrganizationUpdate

AddPrincipals adds the "principals" edges to the Principal 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) ClearDescription added in v0.2.0

func (_u *OrganizationUpdate) ClearDescription() *OrganizationUpdate

ClearDescription clears the value of the "description" field.

func (*OrganizationUpdate) ClearInvites added in v0.2.0

func (_u *OrganizationUpdate) ClearInvites() *OrganizationUpdate

ClearInvites clears all "invites" edges to the Invite 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) ClearOwner added in v0.2.0

func (_u *OrganizationUpdate) ClearOwner() *OrganizationUpdate

ClearOwner clears the "owner" edge to the Principal entity.

func (*OrganizationUpdate) ClearOwnerPrincipalID added in v0.2.0

func (_u *OrganizationUpdate) ClearOwnerPrincipalID() *OrganizationUpdate

ClearOwnerPrincipalID clears the value of the "owner_principal_id" field.

func (*OrganizationUpdate) ClearPrincipalMemberships added in v0.2.0

func (_u *OrganizationUpdate) ClearPrincipalMemberships() *OrganizationUpdate

ClearPrincipalMemberships clears all "principal_memberships" edges to the PrincipalMembership entity.

func (*OrganizationUpdate) ClearPrincipals added in v0.2.0

func (_u *OrganizationUpdate) ClearPrincipals() *OrganizationUpdate

ClearPrincipals clears all "principals" edges to the Principal 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) ClearWebsiteURL added in v0.2.0

func (_u *OrganizationUpdate) ClearWebsiteURL() *OrganizationUpdate

ClearWebsiteURL clears the value of the "website_url" 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) RemoveInviteIDs added in v0.2.0

func (_u *OrganizationUpdate) RemoveInviteIDs(ids ...uuid.UUID) *OrganizationUpdate

RemoveInviteIDs removes the "invites" edge to Invite entities by IDs.

func (*OrganizationUpdate) RemoveInvites added in v0.2.0

func (_u *OrganizationUpdate) RemoveInvites(v ...*Invite) *OrganizationUpdate

RemoveInvites removes "invites" edges to Invite 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) RemovePrincipalIDs added in v0.2.0

func (_u *OrganizationUpdate) RemovePrincipalIDs(ids ...uuid.UUID) *OrganizationUpdate

RemovePrincipalIDs removes the "principals" edge to Principal entities by IDs.

func (*OrganizationUpdate) RemovePrincipalMembershipIDs added in v0.2.0

func (_u *OrganizationUpdate) RemovePrincipalMembershipIDs(ids ...uuid.UUID) *OrganizationUpdate

RemovePrincipalMembershipIDs removes the "principal_memberships" edge to PrincipalMembership entities by IDs.

func (*OrganizationUpdate) RemovePrincipalMemberships added in v0.2.0

func (_u *OrganizationUpdate) RemovePrincipalMemberships(v ...*PrincipalMembership) *OrganizationUpdate

RemovePrincipalMemberships removes "principal_memberships" edges to PrincipalMembership entities.

func (*OrganizationUpdate) RemovePrincipals added in v0.2.0

func (_u *OrganizationUpdate) RemovePrincipals(v ...*Principal) *OrganizationUpdate

RemovePrincipals removes "principals" edges to Principal 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) SetDescription added in v0.2.0

func (_u *OrganizationUpdate) SetDescription(v string) *OrganizationUpdate

SetDescription sets the "description" 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) SetNillableDescription added in v0.2.0

func (_u *OrganizationUpdate) SetNillableDescription(v *string) *OrganizationUpdate

SetNillableDescription sets the "description" 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) SetNillableOrgType added in v0.2.0

func (_u *OrganizationUpdate) SetNillableOrgType(v *organization.OrgType) *OrganizationUpdate

SetNillableOrgType sets the "org_type" field if the given value is not nil.

func (*OrganizationUpdate) SetNillableOwnerID added in v0.2.0

func (_u *OrganizationUpdate) SetNillableOwnerID(id *uuid.UUID) *OrganizationUpdate

SetNillableOwnerID sets the "owner" edge to the Principal entity by ID if the given value is not nil.

func (*OrganizationUpdate) SetNillableOwnerPrincipalID added in v0.2.0

func (_u *OrganizationUpdate) SetNillableOwnerPrincipalID(v *uuid.UUID) *OrganizationUpdate

SetNillableOwnerPrincipalID sets the "owner_principal_id" 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) SetNillableWebsiteURL added in v0.2.0

func (_u *OrganizationUpdate) SetNillableWebsiteURL(v *string) *OrganizationUpdate

SetNillableWebsiteURL sets the "website_url" field if the given value is not nil.

func (*OrganizationUpdate) SetOrgType added in v0.2.0

SetOrgType sets the "org_type" field.

func (*OrganizationUpdate) SetOwner added in v0.2.0

SetOwner sets the "owner" edge to the Principal entity.

func (*OrganizationUpdate) SetOwnerID added in v0.2.0

func (_u *OrganizationUpdate) SetOwnerID(id uuid.UUID) *OrganizationUpdate

SetOwnerID sets the "owner" edge to the Principal entity by ID.

func (*OrganizationUpdate) SetOwnerPrincipalID added in v0.2.0

func (_u *OrganizationUpdate) SetOwnerPrincipalID(v uuid.UUID) *OrganizationUpdate

SetOwnerPrincipalID sets the "owner_principal_id" field.

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) SetWebsiteURL added in v0.2.0

func (_u *OrganizationUpdate) SetWebsiteURL(v string) *OrganizationUpdate

SetWebsiteURL sets the "website_url" 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) AddInviteIDs added in v0.2.0

func (_u *OrganizationUpdateOne) AddInviteIDs(ids ...uuid.UUID) *OrganizationUpdateOne

AddInviteIDs adds the "invites" edge to the Invite entity by IDs.

func (*OrganizationUpdateOne) AddInvites added in v0.2.0

func (_u *OrganizationUpdateOne) AddInvites(v ...*Invite) *OrganizationUpdateOne

AddInvites adds the "invites" edges to the Invite 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) AddPrincipalIDs added in v0.2.0

func (_u *OrganizationUpdateOne) AddPrincipalIDs(ids ...uuid.UUID) *OrganizationUpdateOne

AddPrincipalIDs adds the "principals" edge to the Principal entity by IDs.

func (*OrganizationUpdateOne) AddPrincipalMembershipIDs added in v0.2.0

func (_u *OrganizationUpdateOne) AddPrincipalMembershipIDs(ids ...uuid.UUID) *OrganizationUpdateOne

AddPrincipalMembershipIDs adds the "principal_memberships" edge to the PrincipalMembership entity by IDs.

func (*OrganizationUpdateOne) AddPrincipalMemberships added in v0.2.0

func (_u *OrganizationUpdateOne) AddPrincipalMemberships(v ...*PrincipalMembership) *OrganizationUpdateOne

AddPrincipalMemberships adds the "principal_memberships" edges to the PrincipalMembership entity.

func (*OrganizationUpdateOne) AddPrincipals added in v0.2.0

func (_u *OrganizationUpdateOne) AddPrincipals(v ...*Principal) *OrganizationUpdateOne

AddPrincipals adds the "principals" edges to the Principal 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) ClearDescription added in v0.2.0

func (_u *OrganizationUpdateOne) ClearDescription() *OrganizationUpdateOne

ClearDescription clears the value of the "description" field.

func (*OrganizationUpdateOne) ClearInvites added in v0.2.0

func (_u *OrganizationUpdateOne) ClearInvites() *OrganizationUpdateOne

ClearInvites clears all "invites" edges to the Invite 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) ClearOwner added in v0.2.0

func (_u *OrganizationUpdateOne) ClearOwner() *OrganizationUpdateOne

ClearOwner clears the "owner" edge to the Principal entity.

func (*OrganizationUpdateOne) ClearOwnerPrincipalID added in v0.2.0

func (_u *OrganizationUpdateOne) ClearOwnerPrincipalID() *OrganizationUpdateOne

ClearOwnerPrincipalID clears the value of the "owner_principal_id" field.

func (*OrganizationUpdateOne) ClearPrincipalMemberships added in v0.2.0

func (_u *OrganizationUpdateOne) ClearPrincipalMemberships() *OrganizationUpdateOne

ClearPrincipalMemberships clears all "principal_memberships" edges to the PrincipalMembership entity.

func (*OrganizationUpdateOne) ClearPrincipals added in v0.2.0

func (_u *OrganizationUpdateOne) ClearPrincipals() *OrganizationUpdateOne

ClearPrincipals clears all "principals" edges to the Principal 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) ClearWebsiteURL added in v0.2.0

func (_u *OrganizationUpdateOne) ClearWebsiteURL() *OrganizationUpdateOne

ClearWebsiteURL clears the value of the "website_url" 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) RemoveInviteIDs added in v0.2.0

func (_u *OrganizationUpdateOne) RemoveInviteIDs(ids ...uuid.UUID) *OrganizationUpdateOne

RemoveInviteIDs removes the "invites" edge to Invite entities by IDs.

func (*OrganizationUpdateOne) RemoveInvites added in v0.2.0

func (_u *OrganizationUpdateOne) RemoveInvites(v ...*Invite) *OrganizationUpdateOne

RemoveInvites removes "invites" edges to Invite 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) RemovePrincipalIDs added in v0.2.0

func (_u *OrganizationUpdateOne) RemovePrincipalIDs(ids ...uuid.UUID) *OrganizationUpdateOne

RemovePrincipalIDs removes the "principals" edge to Principal entities by IDs.

func (*OrganizationUpdateOne) RemovePrincipalMembershipIDs added in v0.2.0

func (_u *OrganizationUpdateOne) RemovePrincipalMembershipIDs(ids ...uuid.UUID) *OrganizationUpdateOne

RemovePrincipalMembershipIDs removes the "principal_memberships" edge to PrincipalMembership entities by IDs.

func (*OrganizationUpdateOne) RemovePrincipalMemberships added in v0.2.0

func (_u *OrganizationUpdateOne) RemovePrincipalMemberships(v ...*PrincipalMembership) *OrganizationUpdateOne

RemovePrincipalMemberships removes "principal_memberships" edges to PrincipalMembership entities.

func (*OrganizationUpdateOne) RemovePrincipals added in v0.2.0

func (_u *OrganizationUpdateOne) RemovePrincipals(v ...*Principal) *OrganizationUpdateOne

RemovePrincipals removes "principals" edges to Principal 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) SetDescription added in v0.2.0

func (_u *OrganizationUpdateOne) SetDescription(v string) *OrganizationUpdateOne

SetDescription sets the "description" 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) SetNillableDescription added in v0.2.0

func (_u *OrganizationUpdateOne) SetNillableDescription(v *string) *OrganizationUpdateOne

SetNillableDescription sets the "description" 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) SetNillableOrgType added in v0.2.0

SetNillableOrgType sets the "org_type" field if the given value is not nil.

func (*OrganizationUpdateOne) SetNillableOwnerID added in v0.2.0

func (_u *OrganizationUpdateOne) SetNillableOwnerID(id *uuid.UUID) *OrganizationUpdateOne

SetNillableOwnerID sets the "owner" edge to the Principal entity by ID if the given value is not nil.

func (*OrganizationUpdateOne) SetNillableOwnerPrincipalID added in v0.2.0

func (_u *OrganizationUpdateOne) SetNillableOwnerPrincipalID(v *uuid.UUID) *OrganizationUpdateOne

SetNillableOwnerPrincipalID sets the "owner_principal_id" 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) SetNillableWebsiteURL added in v0.2.0

func (_u *OrganizationUpdateOne) SetNillableWebsiteURL(v *string) *OrganizationUpdateOne

SetNillableWebsiteURL sets the "website_url" field if the given value is not nil.

func (*OrganizationUpdateOne) SetOrgType added in v0.2.0

SetOrgType sets the "org_type" field.

func (*OrganizationUpdateOne) SetOwner added in v0.2.0

SetOwner sets the "owner" edge to the Principal entity.

func (*OrganizationUpdateOne) SetOwnerID added in v0.2.0

SetOwnerID sets the "owner" edge to the Principal entity by ID.

func (*OrganizationUpdateOne) SetOwnerPrincipalID added in v0.2.0

func (_u *OrganizationUpdateOne) SetOwnerPrincipalID(v uuid.UUID) *OrganizationUpdateOne

SetOwnerPrincipalID sets the "owner_principal_id" field.

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) SetWebsiteURL added in v0.2.0

func (_u *OrganizationUpdateOne) SetWebsiteURL(v string) *OrganizationUpdateOne

SetWebsiteURL sets the "website_url" 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) ClearDescription added in v0.2.0

func (u *OrganizationUpsert) ClearDescription() *OrganizationUpsert

ClearDescription clears the value of the "description" field.

func (*OrganizationUpsert) ClearLogoURL

func (u *OrganizationUpsert) ClearLogoURL() *OrganizationUpsert

ClearLogoURL clears the value of the "logo_url" field.

func (*OrganizationUpsert) ClearOwnerPrincipalID added in v0.2.0

func (u *OrganizationUpsert) ClearOwnerPrincipalID() *OrganizationUpsert

ClearOwnerPrincipalID clears the value of the "owner_principal_id" field.

func (*OrganizationUpsert) ClearSettings

func (u *OrganizationUpsert) ClearSettings() *OrganizationUpsert

ClearSettings clears the value of the "settings" field.

func (*OrganizationUpsert) ClearWebsiteURL added in v0.2.0

func (u *OrganizationUpsert) ClearWebsiteURL() *OrganizationUpsert

ClearWebsiteURL clears the value of the "website_url" field.

func (*OrganizationUpsert) SetActive

func (u *OrganizationUpsert) SetActive(v bool) *OrganizationUpsert

SetActive sets the "active" field.

func (*OrganizationUpsert) SetDescription added in v0.2.0

func (u *OrganizationUpsert) SetDescription(v string) *OrganizationUpsert

SetDescription sets the "description" 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) SetOrgType added in v0.2.0

SetOrgType sets the "org_type" field.

func (*OrganizationUpsert) SetOwnerPrincipalID added in v0.2.0

func (u *OrganizationUpsert) SetOwnerPrincipalID(v uuid.UUID) *OrganizationUpsert

SetOwnerPrincipalID sets the "owner_principal_id" 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) SetWebsiteURL added in v0.2.0

func (u *OrganizationUpsert) SetWebsiteURL(v string) *OrganizationUpsert

SetWebsiteURL sets the "website_url" field.

func (*OrganizationUpsert) UpdateActive

func (u *OrganizationUpsert) UpdateActive() *OrganizationUpsert

UpdateActive sets the "active" field to the value that was provided on create.

func (*OrganizationUpsert) UpdateDescription added in v0.2.0

func (u *OrganizationUpsert) UpdateDescription() *OrganizationUpsert

UpdateDescription sets the "description" 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) UpdateOrgType added in v0.2.0

func (u *OrganizationUpsert) UpdateOrgType() *OrganizationUpsert

UpdateOrgType sets the "org_type" field to the value that was provided on create.

func (*OrganizationUpsert) UpdateOwnerPrincipalID added in v0.2.0

func (u *OrganizationUpsert) UpdateOwnerPrincipalID() *OrganizationUpsert

UpdateOwnerPrincipalID sets the "owner_principal_id" 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.

func (*OrganizationUpsert) UpdateWebsiteURL added in v0.2.0

func (u *OrganizationUpsert) UpdateWebsiteURL() *OrganizationUpsert

UpdateWebsiteURL sets the "website_url" 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) ClearDescription added in v0.2.0

func (u *OrganizationUpsertBulk) ClearDescription() *OrganizationUpsertBulk

ClearDescription clears the value of the "description" field.

func (*OrganizationUpsertBulk) ClearLogoURL

ClearLogoURL clears the value of the "logo_url" field.

func (*OrganizationUpsertBulk) ClearOwnerPrincipalID added in v0.2.0

func (u *OrganizationUpsertBulk) ClearOwnerPrincipalID() *OrganizationUpsertBulk

ClearOwnerPrincipalID clears the value of the "owner_principal_id" field.

func (*OrganizationUpsertBulk) ClearSettings

func (u *OrganizationUpsertBulk) ClearSettings() *OrganizationUpsertBulk

ClearSettings clears the value of the "settings" field.

func (*OrganizationUpsertBulk) ClearWebsiteURL added in v0.2.0

func (u *OrganizationUpsertBulk) ClearWebsiteURL() *OrganizationUpsertBulk

ClearWebsiteURL clears the value of the "website_url" 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) SetDescription added in v0.2.0

SetDescription sets the "description" field.

func (*OrganizationUpsertBulk) SetLogoURL

SetLogoURL sets the "logo_url" field.

func (*OrganizationUpsertBulk) SetName

SetName sets the "name" field.

func (*OrganizationUpsertBulk) SetOrgType added in v0.2.0

SetOrgType sets the "org_type" field.

func (*OrganizationUpsertBulk) SetOwnerPrincipalID added in v0.2.0

func (u *OrganizationUpsertBulk) SetOwnerPrincipalID(v uuid.UUID) *OrganizationUpsertBulk

SetOwnerPrincipalID sets the "owner_principal_id" 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) SetWebsiteURL added in v0.2.0

SetWebsiteURL sets the "website_url" 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) UpdateDescription added in v0.2.0

func (u *OrganizationUpsertBulk) UpdateDescription() *OrganizationUpsertBulk

UpdateDescription sets the "description" 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) UpdateOrgType added in v0.2.0

func (u *OrganizationUpsertBulk) UpdateOrgType() *OrganizationUpsertBulk

UpdateOrgType sets the "org_type" field to the value that was provided on create.

func (*OrganizationUpsertBulk) UpdateOwnerPrincipalID added in v0.2.0

func (u *OrganizationUpsertBulk) UpdateOwnerPrincipalID() *OrganizationUpsertBulk

UpdateOwnerPrincipalID sets the "owner_principal_id" field to the value that was provided on create.

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.

func (*OrganizationUpsertBulk) UpdateWebsiteURL added in v0.2.0

func (u *OrganizationUpsertBulk) UpdateWebsiteURL() *OrganizationUpsertBulk

UpdateWebsiteURL sets the "website_url" 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) ClearDescription added in v0.2.0

func (u *OrganizationUpsertOne) ClearDescription() *OrganizationUpsertOne

ClearDescription clears the value of the "description" field.

func (*OrganizationUpsertOne) ClearLogoURL

func (u *OrganizationUpsertOne) ClearLogoURL() *OrganizationUpsertOne

ClearLogoURL clears the value of the "logo_url" field.

func (*OrganizationUpsertOne) ClearOwnerPrincipalID added in v0.2.0

func (u *OrganizationUpsertOne) ClearOwnerPrincipalID() *OrganizationUpsertOne

ClearOwnerPrincipalID clears the value of the "owner_principal_id" field.

func (*OrganizationUpsertOne) ClearSettings

func (u *OrganizationUpsertOne) ClearSettings() *OrganizationUpsertOne

ClearSettings clears the value of the "settings" field.

func (*OrganizationUpsertOne) ClearWebsiteURL added in v0.2.0

func (u *OrganizationUpsertOne) ClearWebsiteURL() *OrganizationUpsertOne

ClearWebsiteURL clears the value of the "website_url" 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) SetDescription added in v0.2.0

func (u *OrganizationUpsertOne) SetDescription(v string) *OrganizationUpsertOne

SetDescription sets the "description" field.

func (*OrganizationUpsertOne) SetLogoURL

SetLogoURL sets the "logo_url" field.

func (*OrganizationUpsertOne) SetName

SetName sets the "name" field.

func (*OrganizationUpsertOne) SetOrgType added in v0.2.0

SetOrgType sets the "org_type" field.

func (*OrganizationUpsertOne) SetOwnerPrincipalID added in v0.2.0

func (u *OrganizationUpsertOne) SetOwnerPrincipalID(v uuid.UUID) *OrganizationUpsertOne

SetOwnerPrincipalID sets the "owner_principal_id" 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) SetWebsiteURL added in v0.2.0

func (u *OrganizationUpsertOne) SetWebsiteURL(v string) *OrganizationUpsertOne

SetWebsiteURL sets the "website_url" 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) UpdateDescription added in v0.2.0

func (u *OrganizationUpsertOne) UpdateDescription() *OrganizationUpsertOne

UpdateDescription sets the "description" 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) UpdateOrgType added in v0.2.0

func (u *OrganizationUpsertOne) UpdateOrgType() *OrganizationUpsertOne

UpdateOrgType sets the "org_type" field to the value that was provided on create.

func (*OrganizationUpsertOne) UpdateOwnerPrincipalID added in v0.2.0

func (u *OrganizationUpsertOne) UpdateOwnerPrincipalID() *OrganizationUpsertOne

UpdateOwnerPrincipalID sets the "owner_principal_id" field to the value that was provided on create.

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.

func (*OrganizationUpsertOne) UpdateWebsiteURL added in v0.2.0

func (u *OrganizationUpsertOne) UpdateWebsiteURL() *OrganizationUpsertOne

UpdateWebsiteURL sets the "website_url" 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 Principal added in v0.2.0

type Principal 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"`
	// Type of principal: human, application, agent, service
	Type principal.Type `json:"type,omitempty"`
	// Unique identifier (email, client_id, service@org)
	Identifier string `json:"identifier,omitempty"`
	// Human-readable display name
	DisplayName string `json:"display_name,omitempty"`
	// Organization this principal belongs to
	OrganizationID *uuid.UUID `json:"organization_id,omitempty"`
	// Whether the principal is active
	Active bool `json:"active,omitempty"`
	// Principal capabilities (can_access_ui, can_delegate, etc.)
	Capabilities map[string]bool `json:"capabilities,omitempty"`
	// Scopes this principal can request
	AllowedScopes []string `json:"allowed_scopes,omitempty"`
	// Custom metadata
	Metadata map[string]interface{} `json:"metadata,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the PrincipalQuery when eager-loading is set.
	Edges PrincipalEdges `json:"edges"`
	// contains filtered or unexported fields
}

Principal is the model entity for the Principal schema.

func (*Principal) QueryAgent added in v0.2.0

func (_m *Principal) QueryAgent() *AgentQuery

QueryAgent queries the "agent" edge of the Principal entity.

func (*Principal) QueryApplication added in v0.2.0

func (_m *Principal) QueryApplication() *ApplicationQuery

QueryApplication queries the "application" edge of the Principal entity.

func (*Principal) QueryCredentials added in v0.2.0

func (_m *Principal) QueryCredentials() *CredentialQuery

QueryCredentials queries the "credentials" edge of the Principal entity.

func (*Principal) QueryHuman added in v0.2.0

func (_m *Principal) QueryHuman() *HumanQuery

QueryHuman queries the "human" edge of the Principal entity.

func (*Principal) QueryOrganization added in v0.2.0

func (_m *Principal) QueryOrganization() *OrganizationQuery

QueryOrganization queries the "organization" edge of the Principal entity.

func (*Principal) QueryOwnedOrganizations added in v0.2.0

func (_m *Principal) QueryOwnedOrganizations() *OrganizationQuery

QueryOwnedOrganizations queries the "owned_organizations" edge of the Principal entity.

func (*Principal) QueryPrincipalMemberships added in v0.2.0

func (_m *Principal) QueryPrincipalMemberships() *PrincipalMembershipQuery

QueryPrincipalMemberships queries the "principal_memberships" edge of the Principal entity.

func (*Principal) QueryPrincipalTokens added in v0.2.0

func (_m *Principal) QueryPrincipalTokens() *PrincipalTokenQuery

QueryPrincipalTokens queries the "principal_tokens" edge of the Principal entity.

func (*Principal) QuerySentInvites added in v0.2.0

func (_m *Principal) QuerySentInvites() *InviteQuery

QuerySentInvites queries the "sent_invites" edge of the Principal entity.

func (*Principal) QueryServicePrincipal added in v0.2.0

func (_m *Principal) QueryServicePrincipal() *ServicePrincipalQuery

QueryServicePrincipal queries the "service_principal" edge of the Principal entity.

func (*Principal) String added in v0.2.0

func (_m *Principal) String() string

String implements the fmt.Stringer.

func (*Principal) Unwrap added in v0.2.0

func (_m *Principal) Unwrap() *Principal

Unwrap unwraps the Principal 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 (*Principal) Update added in v0.2.0

func (_m *Principal) Update() *PrincipalUpdateOne

Update returns a builder for updating this Principal. Note that you need to call Principal.Unwrap() before calling this method if this Principal was returned from a transaction, and the transaction was committed or rolled back.

func (*Principal) Value added in v0.2.0

func (_m *Principal) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Principal. This includes values selected through modifiers, order, etc.

type PrincipalClient added in v0.2.0

type PrincipalClient struct {
	// contains filtered or unexported fields
}

PrincipalClient is a client for the Principal schema.

func NewPrincipalClient added in v0.2.0

func NewPrincipalClient(c config) *PrincipalClient

NewPrincipalClient returns a client for the Principal from the given config.

func (*PrincipalClient) Create added in v0.2.0

func (c *PrincipalClient) Create() *PrincipalCreate

Create returns a builder for creating a Principal entity.

func (*PrincipalClient) CreateBulk added in v0.2.0

func (c *PrincipalClient) CreateBulk(builders ...*PrincipalCreate) *PrincipalCreateBulk

CreateBulk returns a builder for creating a bulk of Principal entities.

func (*PrincipalClient) Delete added in v0.2.0

func (c *PrincipalClient) Delete() *PrincipalDelete

Delete returns a delete builder for Principal.

func (*PrincipalClient) DeleteOne added in v0.2.0

func (c *PrincipalClient) DeleteOne(_m *Principal) *PrincipalDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PrincipalClient) DeleteOneID added in v0.2.0

func (c *PrincipalClient) DeleteOneID(id uuid.UUID) *PrincipalDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*PrincipalClient) Get added in v0.2.0

func (c *PrincipalClient) Get(ctx context.Context, id uuid.UUID) (*Principal, error)

Get returns a Principal entity by its id.

func (*PrincipalClient) GetX added in v0.2.0

func (c *PrincipalClient) GetX(ctx context.Context, id uuid.UUID) *Principal

GetX is like Get, but panics if an error occurs.

func (*PrincipalClient) Hooks added in v0.2.0

func (c *PrincipalClient) Hooks() []Hook

Hooks returns the client hooks.

func (*PrincipalClient) Intercept added in v0.2.0

func (c *PrincipalClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `principal.Intercept(f(g(h())))`.

func (*PrincipalClient) Interceptors added in v0.2.0

func (c *PrincipalClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*PrincipalClient) MapCreateBulk added in v0.2.0

func (c *PrincipalClient) MapCreateBulk(slice any, setFunc func(*PrincipalCreate, int)) *PrincipalCreateBulk

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 (*PrincipalClient) Query added in v0.2.0

func (c *PrincipalClient) Query() *PrincipalQuery

Query returns a query builder for Principal.

func (*PrincipalClient) QueryAgent added in v0.2.0

func (c *PrincipalClient) QueryAgent(_m *Principal) *AgentQuery

QueryAgent queries the agent edge of a Principal.

func (*PrincipalClient) QueryApplication added in v0.2.0

func (c *PrincipalClient) QueryApplication(_m *Principal) *ApplicationQuery

QueryApplication queries the application edge of a Principal.

func (*PrincipalClient) QueryCredentials added in v0.2.0

func (c *PrincipalClient) QueryCredentials(_m *Principal) *CredentialQuery

QueryCredentials queries the credentials edge of a Principal.

func (*PrincipalClient) QueryHuman added in v0.2.0

func (c *PrincipalClient) QueryHuman(_m *Principal) *HumanQuery

QueryHuman queries the human edge of a Principal.

func (*PrincipalClient) QueryOrganization added in v0.2.0

func (c *PrincipalClient) QueryOrganization(_m *Principal) *OrganizationQuery

QueryOrganization queries the organization edge of a Principal.

func (*PrincipalClient) QueryOwnedOrganizations added in v0.2.0

func (c *PrincipalClient) QueryOwnedOrganizations(_m *Principal) *OrganizationQuery

QueryOwnedOrganizations queries the owned_organizations edge of a Principal.

func (*PrincipalClient) QueryPrincipalMemberships added in v0.2.0

func (c *PrincipalClient) QueryPrincipalMemberships(_m *Principal) *PrincipalMembershipQuery

QueryPrincipalMemberships queries the principal_memberships edge of a Principal.

func (*PrincipalClient) QueryPrincipalTokens added in v0.2.0

func (c *PrincipalClient) QueryPrincipalTokens(_m *Principal) *PrincipalTokenQuery

QueryPrincipalTokens queries the principal_tokens edge of a Principal.

func (*PrincipalClient) QuerySentInvites added in v0.2.0

func (c *PrincipalClient) QuerySentInvites(_m *Principal) *InviteQuery

QuerySentInvites queries the sent_invites edge of a Principal.

func (*PrincipalClient) QueryServicePrincipal added in v0.2.0

func (c *PrincipalClient) QueryServicePrincipal(_m *Principal) *ServicePrincipalQuery

QueryServicePrincipal queries the service_principal edge of a Principal.

func (*PrincipalClient) Update added in v0.2.0

func (c *PrincipalClient) Update() *PrincipalUpdate

Update returns an update builder for Principal.

func (*PrincipalClient) UpdateOne added in v0.2.0

func (c *PrincipalClient) UpdateOne(_m *Principal) *PrincipalUpdateOne

UpdateOne returns an update builder for the given entity.

func (*PrincipalClient) UpdateOneID added in v0.2.0

func (c *PrincipalClient) UpdateOneID(id uuid.UUID) *PrincipalUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PrincipalClient) Use added in v0.2.0

func (c *PrincipalClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `principal.Hooks(f(g(h())))`.

type PrincipalCreate added in v0.2.0

type PrincipalCreate struct {
	// contains filtered or unexported fields
}

PrincipalCreate is the builder for creating a Principal entity.

func (*PrincipalCreate) AddCredentialIDs added in v0.2.0

func (_c *PrincipalCreate) AddCredentialIDs(ids ...uuid.UUID) *PrincipalCreate

AddCredentialIDs adds the "credentials" edge to the Credential entity by IDs.

func (*PrincipalCreate) AddCredentials added in v0.2.0

func (_c *PrincipalCreate) AddCredentials(v ...*Credential) *PrincipalCreate

AddCredentials adds the "credentials" edges to the Credential entity.

func (*PrincipalCreate) AddOwnedOrganizationIDs added in v0.2.0

func (_c *PrincipalCreate) AddOwnedOrganizationIDs(ids ...uuid.UUID) *PrincipalCreate

AddOwnedOrganizationIDs adds the "owned_organizations" edge to the Organization entity by IDs.

func (*PrincipalCreate) AddOwnedOrganizations added in v0.2.0

func (_c *PrincipalCreate) AddOwnedOrganizations(v ...*Organization) *PrincipalCreate

AddOwnedOrganizations adds the "owned_organizations" edges to the Organization entity.

func (*PrincipalCreate) AddPrincipalMembershipIDs added in v0.2.0

func (_c *PrincipalCreate) AddPrincipalMembershipIDs(ids ...uuid.UUID) *PrincipalCreate

AddPrincipalMembershipIDs adds the "principal_memberships" edge to the PrincipalMembership entity by IDs.

func (*PrincipalCreate) AddPrincipalMemberships added in v0.2.0

func (_c *PrincipalCreate) AddPrincipalMemberships(v ...*PrincipalMembership) *PrincipalCreate

AddPrincipalMemberships adds the "principal_memberships" edges to the PrincipalMembership entity.

func (*PrincipalCreate) AddPrincipalTokenIDs added in v0.2.0

func (_c *PrincipalCreate) AddPrincipalTokenIDs(ids ...uuid.UUID) *PrincipalCreate

AddPrincipalTokenIDs adds the "principal_tokens" edge to the PrincipalToken entity by IDs.

func (*PrincipalCreate) AddPrincipalTokens added in v0.2.0

func (_c *PrincipalCreate) AddPrincipalTokens(v ...*PrincipalToken) *PrincipalCreate

AddPrincipalTokens adds the "principal_tokens" edges to the PrincipalToken entity.

func (*PrincipalCreate) AddSentInviteIDs added in v0.2.0

func (_c *PrincipalCreate) AddSentInviteIDs(ids ...uuid.UUID) *PrincipalCreate

AddSentInviteIDs adds the "sent_invites" edge to the Invite entity by IDs.

func (*PrincipalCreate) AddSentInvites added in v0.2.0

func (_c *PrincipalCreate) AddSentInvites(v ...*Invite) *PrincipalCreate

AddSentInvites adds the "sent_invites" edges to the Invite entity.

func (*PrincipalCreate) Exec added in v0.2.0

func (_c *PrincipalCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PrincipalCreate) ExecX added in v0.2.0

func (_c *PrincipalCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PrincipalCreate) Mutation added in v0.2.0

func (_c *PrincipalCreate) Mutation() *PrincipalMutation

Mutation returns the PrincipalMutation object of the builder.

func (*PrincipalCreate) OnConflict added in v0.2.0

func (_c *PrincipalCreate) OnConflict(opts ...sql.ConflictOption) *PrincipalUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Principal.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.PrincipalUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*PrincipalCreate) OnConflictColumns added in v0.2.0

func (_c *PrincipalCreate) OnConflictColumns(columns ...string) *PrincipalUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Principal.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PrincipalCreate) Save added in v0.2.0

func (_c *PrincipalCreate) Save(ctx context.Context) (*Principal, error)

Save creates the Principal in the database.

func (*PrincipalCreate) SaveX added in v0.2.0

func (_c *PrincipalCreate) SaveX(ctx context.Context) *Principal

SaveX calls Save and panics if Save returns an error.

func (*PrincipalCreate) SetActive added in v0.2.0

func (_c *PrincipalCreate) SetActive(v bool) *PrincipalCreate

SetActive sets the "active" field.

func (*PrincipalCreate) SetAgent added in v0.2.0

func (_c *PrincipalCreate) SetAgent(v *Agent) *PrincipalCreate

SetAgent sets the "agent" edge to the Agent entity.

func (*PrincipalCreate) SetAgentID added in v0.2.0

func (_c *PrincipalCreate) SetAgentID(id uuid.UUID) *PrincipalCreate

SetAgentID sets the "agent" edge to the Agent entity by ID.

func (*PrincipalCreate) SetAllowedScopes added in v0.2.0

func (_c *PrincipalCreate) SetAllowedScopes(v []string) *PrincipalCreate

SetAllowedScopes sets the "allowed_scopes" field.

func (*PrincipalCreate) SetApplication added in v0.2.0

func (_c *PrincipalCreate) SetApplication(v *Application) *PrincipalCreate

SetApplication sets the "application" edge to the Application entity.

func (*PrincipalCreate) SetApplicationID added in v0.2.0

func (_c *PrincipalCreate) SetApplicationID(id uuid.UUID) *PrincipalCreate

SetApplicationID sets the "application" edge to the Application entity by ID.

func (*PrincipalCreate) SetCapabilities added in v0.2.0

func (_c *PrincipalCreate) SetCapabilities(v map[string]bool) *PrincipalCreate

SetCapabilities sets the "capabilities" field.

func (*PrincipalCreate) SetCreatedAt added in v0.2.0

func (_c *PrincipalCreate) SetCreatedAt(v time.Time) *PrincipalCreate

SetCreatedAt sets the "created_at" field.

func (*PrincipalCreate) SetDisplayName added in v0.2.0

func (_c *PrincipalCreate) SetDisplayName(v string) *PrincipalCreate

SetDisplayName sets the "display_name" field.

func (*PrincipalCreate) SetHuman added in v0.2.0

func (_c *PrincipalCreate) SetHuman(v *Human) *PrincipalCreate

SetHuman sets the "human" edge to the Human entity.

func (*PrincipalCreate) SetHumanID added in v0.2.0

func (_c *PrincipalCreate) SetHumanID(id uuid.UUID) *PrincipalCreate

SetHumanID sets the "human" edge to the Human entity by ID.

func (*PrincipalCreate) SetID added in v0.2.0

func (_c *PrincipalCreate) SetID(v uuid.UUID) *PrincipalCreate

SetID sets the "id" field.

func (*PrincipalCreate) SetIdentifier added in v0.2.0

func (_c *PrincipalCreate) SetIdentifier(v string) *PrincipalCreate

SetIdentifier sets the "identifier" field.

func (*PrincipalCreate) SetMetadata added in v0.2.0

func (_c *PrincipalCreate) SetMetadata(v map[string]interface{}) *PrincipalCreate

SetMetadata sets the "metadata" field.

func (*PrincipalCreate) SetNillableActive added in v0.2.0

func (_c *PrincipalCreate) SetNillableActive(v *bool) *PrincipalCreate

SetNillableActive sets the "active" field if the given value is not nil.

func (*PrincipalCreate) SetNillableAgentID added in v0.2.0

func (_c *PrincipalCreate) SetNillableAgentID(id *uuid.UUID) *PrincipalCreate

SetNillableAgentID sets the "agent" edge to the Agent entity by ID if the given value is not nil.

func (*PrincipalCreate) SetNillableApplicationID added in v0.2.0

func (_c *PrincipalCreate) SetNillableApplicationID(id *uuid.UUID) *PrincipalCreate

SetNillableApplicationID sets the "application" edge to the Application entity by ID if the given value is not nil.

func (*PrincipalCreate) SetNillableCreatedAt added in v0.2.0

func (_c *PrincipalCreate) SetNillableCreatedAt(v *time.Time) *PrincipalCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*PrincipalCreate) SetNillableHumanID added in v0.2.0

func (_c *PrincipalCreate) SetNillableHumanID(id *uuid.UUID) *PrincipalCreate

SetNillableHumanID sets the "human" edge to the Human entity by ID if the given value is not nil.

func (*PrincipalCreate) SetNillableID added in v0.2.0

func (_c *PrincipalCreate) SetNillableID(v *uuid.UUID) *PrincipalCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*PrincipalCreate) SetNillableOrganizationID added in v0.2.0

func (_c *PrincipalCreate) SetNillableOrganizationID(v *uuid.UUID) *PrincipalCreate

SetNillableOrganizationID sets the "organization_id" field if the given value is not nil.

func (*PrincipalCreate) SetNillableServicePrincipalID added in v0.2.0

func (_c *PrincipalCreate) SetNillableServicePrincipalID(id *uuid.UUID) *PrincipalCreate

SetNillableServicePrincipalID sets the "service_principal" edge to the ServicePrincipal entity by ID if the given value is not nil.

func (*PrincipalCreate) SetNillableUpdatedAt added in v0.2.0

func (_c *PrincipalCreate) SetNillableUpdatedAt(v *time.Time) *PrincipalCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*PrincipalCreate) SetOrganization added in v0.2.0

func (_c *PrincipalCreate) SetOrganization(v *Organization) *PrincipalCreate

SetOrganization sets the "organization" edge to the Organization entity.

func (*PrincipalCreate) SetOrganizationID added in v0.2.0

func (_c *PrincipalCreate) SetOrganizationID(v uuid.UUID) *PrincipalCreate

SetOrganizationID sets the "organization_id" field.

func (*PrincipalCreate) SetServicePrincipal added in v0.2.0

func (_c *PrincipalCreate) SetServicePrincipal(v *ServicePrincipal) *PrincipalCreate

SetServicePrincipal sets the "service_principal" edge to the ServicePrincipal entity.

func (*PrincipalCreate) SetServicePrincipalID added in v0.2.0

func (_c *PrincipalCreate) SetServicePrincipalID(id uuid.UUID) *PrincipalCreate

SetServicePrincipalID sets the "service_principal" edge to the ServicePrincipal entity by ID.

func (*PrincipalCreate) SetType added in v0.2.0

SetType sets the "type" field.

func (*PrincipalCreate) SetUpdatedAt added in v0.2.0

func (_c *PrincipalCreate) SetUpdatedAt(v time.Time) *PrincipalCreate

SetUpdatedAt sets the "updated_at" field.

type PrincipalCreateBulk added in v0.2.0

type PrincipalCreateBulk struct {
	// contains filtered or unexported fields
}

PrincipalCreateBulk is the builder for creating many Principal entities in bulk.

func (*PrincipalCreateBulk) Exec added in v0.2.0

func (_c *PrincipalCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PrincipalCreateBulk) ExecX added in v0.2.0

func (_c *PrincipalCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PrincipalCreateBulk) OnConflict added in v0.2.0

func (_c *PrincipalCreateBulk) OnConflict(opts ...sql.ConflictOption) *PrincipalUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Principal.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.PrincipalUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*PrincipalCreateBulk) OnConflictColumns added in v0.2.0

func (_c *PrincipalCreateBulk) OnConflictColumns(columns ...string) *PrincipalUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Principal.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PrincipalCreateBulk) Save added in v0.2.0

func (_c *PrincipalCreateBulk) Save(ctx context.Context) ([]*Principal, error)

Save creates the Principal entities in the database.

func (*PrincipalCreateBulk) SaveX added in v0.2.0

func (_c *PrincipalCreateBulk) SaveX(ctx context.Context) []*Principal

SaveX is like Save, but panics if an error occurs.

type PrincipalDelete added in v0.2.0

type PrincipalDelete struct {
	// contains filtered or unexported fields
}

PrincipalDelete is the builder for deleting a Principal entity.

func (*PrincipalDelete) Exec added in v0.2.0

func (_d *PrincipalDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*PrincipalDelete) ExecX added in v0.2.0

func (_d *PrincipalDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*PrincipalDelete) Where added in v0.2.0

Where appends a list predicates to the PrincipalDelete builder.

type PrincipalDeleteOne added in v0.2.0

type PrincipalDeleteOne struct {
	// contains filtered or unexported fields
}

PrincipalDeleteOne is the builder for deleting a single Principal entity.

func (*PrincipalDeleteOne) Exec added in v0.2.0

func (_d *PrincipalDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PrincipalDeleteOne) ExecX added in v0.2.0

func (_d *PrincipalDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PrincipalDeleteOne) Where added in v0.2.0

Where appends a list predicates to the PrincipalDelete builder.

type PrincipalEdges added in v0.2.0

type PrincipalEdges struct {
	// Organization holds the value of the organization edge.
	Organization *Organization `json:"organization,omitempty"`
	// Human extension (when type=human)
	Human *Human `json:"human,omitempty"`
	// Application extension (when type=application)
	Application *Application `json:"application,omitempty"`
	// Agent extension (when type=agent)
	Agent *Agent `json:"agent,omitempty"`
	// Service extension (when type=service)
	ServicePrincipal *ServicePrincipal `json:"service_principal,omitempty"`
	// Credentials for authentication
	Credentials []*Credential `json:"credentials,omitempty"`
	// Tokens issued to this principal
	PrincipalTokens []*PrincipalToken `json:"principal_tokens,omitempty"`
	// Organization memberships
	PrincipalMemberships []*PrincipalMembership `json:"principal_memberships,omitempty"`
	// Personal organizations owned by this principal
	OwnedOrganizations []*Organization `json:"owned_organizations,omitempty"`
	// Invitations sent by this principal
	SentInvites []*Invite `json:"sent_invites,omitempty"`
	// contains filtered or unexported fields
}

PrincipalEdges holds the relations/edges for other nodes in the graph.

func (PrincipalEdges) AgentOrErr added in v0.2.0

func (e PrincipalEdges) AgentOrErr() (*Agent, error)

AgentOrErr returns the Agent value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (PrincipalEdges) ApplicationOrErr added in v0.2.0

func (e PrincipalEdges) ApplicationOrErr() (*Application, error)

ApplicationOrErr returns the Application value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (PrincipalEdges) CredentialsOrErr added in v0.2.0

func (e PrincipalEdges) CredentialsOrErr() ([]*Credential, error)

CredentialsOrErr returns the Credentials value or an error if the edge was not loaded in eager-loading.

func (PrincipalEdges) HumanOrErr added in v0.2.0

func (e PrincipalEdges) HumanOrErr() (*Human, error)

HumanOrErr returns the Human value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (PrincipalEdges) OrganizationOrErr added in v0.2.0

func (e PrincipalEdges) 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 (PrincipalEdges) OwnedOrganizationsOrErr added in v0.2.0

func (e PrincipalEdges) OwnedOrganizationsOrErr() ([]*Organization, error)

OwnedOrganizationsOrErr returns the OwnedOrganizations value or an error if the edge was not loaded in eager-loading.

func (PrincipalEdges) PrincipalMembershipsOrErr added in v0.2.0

func (e PrincipalEdges) PrincipalMembershipsOrErr() ([]*PrincipalMembership, error)

PrincipalMembershipsOrErr returns the PrincipalMemberships value or an error if the edge was not loaded in eager-loading.

func (PrincipalEdges) PrincipalTokensOrErr added in v0.2.0

func (e PrincipalEdges) PrincipalTokensOrErr() ([]*PrincipalToken, error)

PrincipalTokensOrErr returns the PrincipalTokens value or an error if the edge was not loaded in eager-loading.

func (PrincipalEdges) SentInvitesOrErr added in v0.2.0

func (e PrincipalEdges) SentInvitesOrErr() ([]*Invite, error)

SentInvitesOrErr returns the SentInvites value or an error if the edge was not loaded in eager-loading.

func (PrincipalEdges) ServicePrincipalOrErr added in v0.2.0

func (e PrincipalEdges) ServicePrincipalOrErr() (*ServicePrincipal, error)

ServicePrincipalOrErr returns the ServicePrincipal value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type PrincipalFilter added in v0.2.0

type PrincipalFilter struct {
	// contains filtered or unexported fields
}

PrincipalFilter provides a generic filtering capability at runtime for PrincipalQuery.

func (*PrincipalFilter) Where added in v0.2.0

func (f *PrincipalFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*PrincipalFilter) WhereActive added in v0.2.0

func (f *PrincipalFilter) WhereActive(p entql.BoolP)

WhereActive applies the entql bool predicate on the active field.

func (*PrincipalFilter) WhereAllowedScopes added in v0.2.0

func (f *PrincipalFilter) WhereAllowedScopes(p entql.BytesP)

WhereAllowedScopes applies the entql json.RawMessage predicate on the allowed_scopes field.

func (*PrincipalFilter) WhereCapabilities added in v0.2.0

func (f *PrincipalFilter) WhereCapabilities(p entql.BytesP)

WhereCapabilities applies the entql json.RawMessage predicate on the capabilities field.

func (*PrincipalFilter) WhereCreatedAt added in v0.2.0

func (f *PrincipalFilter) WhereCreatedAt(p entql.TimeP)

WhereCreatedAt applies the entql time.Time predicate on the created_at field.

func (*PrincipalFilter) WhereDisplayName added in v0.2.0

func (f *PrincipalFilter) WhereDisplayName(p entql.StringP)

WhereDisplayName applies the entql string predicate on the display_name field.

func (*PrincipalFilter) WhereHasAgent added in v0.2.0

func (f *PrincipalFilter) WhereHasAgent()

WhereHasAgent applies a predicate to check if query has an edge agent.

func (*PrincipalFilter) WhereHasAgentWith added in v0.2.0

func (f *PrincipalFilter) WhereHasAgentWith(preds ...predicate.Agent)

WhereHasAgentWith applies a predicate to check if query has an edge agent with a given conditions (other predicates).

func (*PrincipalFilter) WhereHasApplication added in v0.2.0

func (f *PrincipalFilter) WhereHasApplication()

WhereHasApplication applies a predicate to check if query has an edge application.

func (*PrincipalFilter) WhereHasApplicationWith added in v0.2.0

func (f *PrincipalFilter) WhereHasApplicationWith(preds ...predicate.Application)

WhereHasApplicationWith applies a predicate to check if query has an edge application with a given conditions (other predicates).

func (*PrincipalFilter) WhereHasCredentials added in v0.2.0

func (f *PrincipalFilter) WhereHasCredentials()

WhereHasCredentials applies a predicate to check if query has an edge credentials.

func (*PrincipalFilter) WhereHasCredentialsWith added in v0.2.0

func (f *PrincipalFilter) WhereHasCredentialsWith(preds ...predicate.Credential)

WhereHasCredentialsWith applies a predicate to check if query has an edge credentials with a given conditions (other predicates).

func (*PrincipalFilter) WhereHasHuman added in v0.2.0

func (f *PrincipalFilter) WhereHasHuman()

WhereHasHuman applies a predicate to check if query has an edge human.

func (*PrincipalFilter) WhereHasHumanWith added in v0.2.0

func (f *PrincipalFilter) WhereHasHumanWith(preds ...predicate.Human)

WhereHasHumanWith applies a predicate to check if query has an edge human with a given conditions (other predicates).

func (*PrincipalFilter) WhereHasOrganization added in v0.2.0

func (f *PrincipalFilter) WhereHasOrganization()

WhereHasOrganization applies a predicate to check if query has an edge organization.

func (*PrincipalFilter) WhereHasOrganizationWith added in v0.2.0

func (f *PrincipalFilter) WhereHasOrganizationWith(preds ...predicate.Organization)

WhereHasOrganizationWith applies a predicate to check if query has an edge organization with a given conditions (other predicates).

func (*PrincipalFilter) WhereHasOwnedOrganizations added in v0.2.0

func (f *PrincipalFilter) WhereHasOwnedOrganizations()

WhereHasOwnedOrganizations applies a predicate to check if query has an edge owned_organizations.

func (*PrincipalFilter) WhereHasOwnedOrganizationsWith added in v0.2.0

func (f *PrincipalFilter) WhereHasOwnedOrganizationsWith(preds ...predicate.Organization)

WhereHasOwnedOrganizationsWith applies a predicate to check if query has an edge owned_organizations with a given conditions (other predicates).

func (*PrincipalFilter) WhereHasPrincipalMemberships added in v0.2.0

func (f *PrincipalFilter) WhereHasPrincipalMemberships()

WhereHasPrincipalMemberships applies a predicate to check if query has an edge principal_memberships.

func (*PrincipalFilter) WhereHasPrincipalMembershipsWith added in v0.2.0

func (f *PrincipalFilter) WhereHasPrincipalMembershipsWith(preds ...predicate.PrincipalMembership)

WhereHasPrincipalMembershipsWith applies a predicate to check if query has an edge principal_memberships with a given conditions (other predicates).

func (*PrincipalFilter) WhereHasPrincipalTokens added in v0.2.0

func (f *PrincipalFilter) WhereHasPrincipalTokens()

WhereHasPrincipalTokens applies a predicate to check if query has an edge principal_tokens.

func (*PrincipalFilter) WhereHasPrincipalTokensWith added in v0.2.0

func (f *PrincipalFilter) WhereHasPrincipalTokensWith(preds ...predicate.PrincipalToken)

WhereHasPrincipalTokensWith applies a predicate to check if query has an edge principal_tokens with a given conditions (other predicates).

func (*PrincipalFilter) WhereHasSentInvites added in v0.2.0

func (f *PrincipalFilter) WhereHasSentInvites()

WhereHasSentInvites applies a predicate to check if query has an edge sent_invites.

func (*PrincipalFilter) WhereHasSentInvitesWith added in v0.2.0

func (f *PrincipalFilter) WhereHasSentInvitesWith(preds ...predicate.Invite)

WhereHasSentInvitesWith applies a predicate to check if query has an edge sent_invites with a given conditions (other predicates).

func (*PrincipalFilter) WhereHasServicePrincipal added in v0.2.0

func (f *PrincipalFilter) WhereHasServicePrincipal()

WhereHasServicePrincipal applies a predicate to check if query has an edge service_principal.

func (*PrincipalFilter) WhereHasServicePrincipalWith added in v0.2.0

func (f *PrincipalFilter) WhereHasServicePrincipalWith(preds ...predicate.ServicePrincipal)

WhereHasServicePrincipalWith applies a predicate to check if query has an edge service_principal with a given conditions (other predicates).

func (*PrincipalFilter) WhereID added in v0.2.0

func (f *PrincipalFilter) WhereID(p entql.ValueP)

WhereID applies the entql [16]byte predicate on the id field.

func (*PrincipalFilter) WhereIdentifier added in v0.2.0

func (f *PrincipalFilter) WhereIdentifier(p entql.StringP)

WhereIdentifier applies the entql string predicate on the identifier field.

func (*PrincipalFilter) WhereMetadata added in v0.2.0

func (f *PrincipalFilter) WhereMetadata(p entql.BytesP)

WhereMetadata applies the entql json.RawMessage predicate on the metadata field.

func (*PrincipalFilter) WhereOrganizationID added in v0.2.0

func (f *PrincipalFilter) WhereOrganizationID(p entql.ValueP)

WhereOrganizationID applies the entql [16]byte predicate on the organization_id field.

func (*PrincipalFilter) WhereType added in v0.2.0

func (f *PrincipalFilter) WhereType(p entql.StringP)

WhereType applies the entql string predicate on the type field.

func (*PrincipalFilter) WhereUpdatedAt added in v0.2.0

func (f *PrincipalFilter) WhereUpdatedAt(p entql.TimeP)

WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.

type PrincipalGroupBy added in v0.2.0

type PrincipalGroupBy struct {
	// contains filtered or unexported fields
}

PrincipalGroupBy is the group-by builder for Principal entities.

func (*PrincipalGroupBy) Aggregate added in v0.2.0

func (_g *PrincipalGroupBy) Aggregate(fns ...AggregateFunc) *PrincipalGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*PrincipalGroupBy) Bool added in v0.2.0

func (s *PrincipalGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PrincipalGroupBy) BoolX added in v0.2.0

func (s *PrincipalGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PrincipalGroupBy) Bools added in v0.2.0

func (s *PrincipalGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PrincipalGroupBy) BoolsX added in v0.2.0

func (s *PrincipalGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PrincipalGroupBy) Float64 added in v0.2.0

func (s *PrincipalGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PrincipalGroupBy) Float64X added in v0.2.0

func (s *PrincipalGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PrincipalGroupBy) Float64s added in v0.2.0

func (s *PrincipalGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PrincipalGroupBy) Float64sX added in v0.2.0

func (s *PrincipalGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PrincipalGroupBy) Int added in v0.2.0

func (s *PrincipalGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PrincipalGroupBy) IntX added in v0.2.0

func (s *PrincipalGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PrincipalGroupBy) Ints added in v0.2.0

func (s *PrincipalGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PrincipalGroupBy) IntsX added in v0.2.0

func (s *PrincipalGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PrincipalGroupBy) Scan added in v0.2.0

func (_g *PrincipalGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PrincipalGroupBy) ScanX added in v0.2.0

func (s *PrincipalGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PrincipalGroupBy) String added in v0.2.0

func (s *PrincipalGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PrincipalGroupBy) StringX added in v0.2.0

func (s *PrincipalGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PrincipalGroupBy) Strings added in v0.2.0

func (s *PrincipalGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PrincipalGroupBy) StringsX added in v0.2.0

func (s *PrincipalGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PrincipalMembership added in v0.2.0

type PrincipalMembership 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"`
	// PrincipalID holds the value of the "principal_id" field.
	PrincipalID uuid.UUID `json:"principal_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)
	Role string `json:"role,omitempty"`
	// Optional fine-grained permissions
	Permissions []string `json:"permissions,omitempty"`
	// Whether this membership is active
	Active bool `json:"active,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the PrincipalMembershipQuery when eager-loading is set.
	Edges PrincipalMembershipEdges `json:"edges"`
	// contains filtered or unexported fields
}

PrincipalMembership is the model entity for the PrincipalMembership schema.

func (*PrincipalMembership) QueryOrganization added in v0.2.0

func (_m *PrincipalMembership) QueryOrganization() *OrganizationQuery

QueryOrganization queries the "organization" edge of the PrincipalMembership entity.

func (*PrincipalMembership) QueryPrincipal added in v0.2.0

func (_m *PrincipalMembership) QueryPrincipal() *PrincipalQuery

QueryPrincipal queries the "principal" edge of the PrincipalMembership entity.

func (*PrincipalMembership) String added in v0.2.0

func (_m *PrincipalMembership) String() string

String implements the fmt.Stringer.

func (*PrincipalMembership) Unwrap added in v0.2.0

Unwrap unwraps the PrincipalMembership 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 (*PrincipalMembership) Update added in v0.2.0

Update returns a builder for updating this PrincipalMembership. Note that you need to call PrincipalMembership.Unwrap() before calling this method if this PrincipalMembership was returned from a transaction, and the transaction was committed or rolled back.

func (*PrincipalMembership) Value added in v0.2.0

func (_m *PrincipalMembership) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the PrincipalMembership. This includes values selected through modifiers, order, etc.

type PrincipalMembershipClient added in v0.2.0

type PrincipalMembershipClient struct {
	// contains filtered or unexported fields
}

PrincipalMembershipClient is a client for the PrincipalMembership schema.

func NewPrincipalMembershipClient added in v0.2.0

func NewPrincipalMembershipClient(c config) *PrincipalMembershipClient

NewPrincipalMembershipClient returns a client for the PrincipalMembership from the given config.

func (*PrincipalMembershipClient) Create added in v0.2.0

Create returns a builder for creating a PrincipalMembership entity.

func (*PrincipalMembershipClient) CreateBulk added in v0.2.0

CreateBulk returns a builder for creating a bulk of PrincipalMembership entities.

func (*PrincipalMembershipClient) Delete added in v0.2.0

Delete returns a delete builder for PrincipalMembership.

func (*PrincipalMembershipClient) DeleteOne added in v0.2.0

DeleteOne returns a builder for deleting the given entity.

func (*PrincipalMembershipClient) DeleteOneID added in v0.2.0

DeleteOneID returns a builder for deleting the given entity by its id.

func (*PrincipalMembershipClient) Get added in v0.2.0

Get returns a PrincipalMembership entity by its id.

func (*PrincipalMembershipClient) GetX added in v0.2.0

GetX is like Get, but panics if an error occurs.

func (*PrincipalMembershipClient) Hooks added in v0.2.0

func (c *PrincipalMembershipClient) Hooks() []Hook

Hooks returns the client hooks.

func (*PrincipalMembershipClient) Intercept added in v0.2.0

func (c *PrincipalMembershipClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `principalmembership.Intercept(f(g(h())))`.

func (*PrincipalMembershipClient) Interceptors added in v0.2.0

func (c *PrincipalMembershipClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*PrincipalMembershipClient) MapCreateBulk added in v0.2.0

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 (*PrincipalMembershipClient) Query added in v0.2.0

Query returns a query builder for PrincipalMembership.

func (*PrincipalMembershipClient) QueryOrganization added in v0.2.0

QueryOrganization queries the organization edge of a PrincipalMembership.

func (*PrincipalMembershipClient) QueryPrincipal added in v0.2.0

QueryPrincipal queries the principal edge of a PrincipalMembership.

func (*PrincipalMembershipClient) Update added in v0.2.0

Update returns an update builder for PrincipalMembership.

func (*PrincipalMembershipClient) UpdateOne added in v0.2.0

UpdateOne returns an update builder for the given entity.

func (*PrincipalMembershipClient) UpdateOneID added in v0.2.0

UpdateOneID returns an update builder for the given id.

func (*PrincipalMembershipClient) Use added in v0.2.0

func (c *PrincipalMembershipClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `principalmembership.Hooks(f(g(h())))`.

type PrincipalMembershipCreate added in v0.2.0

type PrincipalMembershipCreate struct {
	// contains filtered or unexported fields
}

PrincipalMembershipCreate is the builder for creating a PrincipalMembership entity.

func (*PrincipalMembershipCreate) Exec added in v0.2.0

Exec executes the query.

func (*PrincipalMembershipCreate) ExecX added in v0.2.0

func (_c *PrincipalMembershipCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PrincipalMembershipCreate) Mutation added in v0.2.0

Mutation returns the PrincipalMembershipMutation object of the builder.

func (*PrincipalMembershipCreate) OnConflict added in v0.2.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.PrincipalMembership.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.PrincipalMembershipUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*PrincipalMembershipCreate) OnConflictColumns added in v0.2.0

func (_c *PrincipalMembershipCreate) OnConflictColumns(columns ...string) *PrincipalMembershipUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.PrincipalMembership.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PrincipalMembershipCreate) Save added in v0.2.0

Save creates the PrincipalMembership in the database.

func (*PrincipalMembershipCreate) SaveX added in v0.2.0

SaveX calls Save and panics if Save returns an error.

func (*PrincipalMembershipCreate) SetActive added in v0.2.0

SetActive sets the "active" field.

func (*PrincipalMembershipCreate) SetCreatedAt added in v0.2.0

SetCreatedAt sets the "created_at" field.

func (*PrincipalMembershipCreate) SetID added in v0.2.0

SetID sets the "id" field.

func (*PrincipalMembershipCreate) SetNillableActive added in v0.2.0

func (_c *PrincipalMembershipCreate) SetNillableActive(v *bool) *PrincipalMembershipCreate

SetNillableActive sets the "active" field if the given value is not nil.

func (*PrincipalMembershipCreate) SetNillableCreatedAt added in v0.2.0

func (_c *PrincipalMembershipCreate) SetNillableCreatedAt(v *time.Time) *PrincipalMembershipCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*PrincipalMembershipCreate) SetNillableID added in v0.2.0

SetNillableID sets the "id" field if the given value is not nil.

func (*PrincipalMembershipCreate) SetNillableUpdatedAt added in v0.2.0

func (_c *PrincipalMembershipCreate) SetNillableUpdatedAt(v *time.Time) *PrincipalMembershipCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*PrincipalMembershipCreate) SetOrganization added in v0.2.0

SetOrganization sets the "organization" edge to the Organization entity.

func (*PrincipalMembershipCreate) SetOrganizationID added in v0.2.0

SetOrganizationID sets the "organization_id" field.

func (*PrincipalMembershipCreate) SetPermissions added in v0.2.0

SetPermissions sets the "permissions" field.

func (*PrincipalMembershipCreate) SetPrincipal added in v0.2.0

SetPrincipal sets the "principal" edge to the Principal entity.

func (*PrincipalMembershipCreate) SetPrincipalID added in v0.2.0

SetPrincipalID sets the "principal_id" field.

func (*PrincipalMembershipCreate) SetRole added in v0.2.0

SetRole sets the "role" field.

func (*PrincipalMembershipCreate) SetUpdatedAt added in v0.2.0

SetUpdatedAt sets the "updated_at" field.

type PrincipalMembershipCreateBulk added in v0.2.0

type PrincipalMembershipCreateBulk struct {
	// contains filtered or unexported fields
}

PrincipalMembershipCreateBulk is the builder for creating many PrincipalMembership entities in bulk.

func (*PrincipalMembershipCreateBulk) Exec added in v0.2.0

Exec executes the query.

func (*PrincipalMembershipCreateBulk) ExecX added in v0.2.0

ExecX is like Exec, but panics if an error occurs.

func (*PrincipalMembershipCreateBulk) OnConflict added in v0.2.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.PrincipalMembership.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.PrincipalMembershipUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*PrincipalMembershipCreateBulk) OnConflictColumns added in v0.2.0

func (_c *PrincipalMembershipCreateBulk) OnConflictColumns(columns ...string) *PrincipalMembershipUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.PrincipalMembership.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PrincipalMembershipCreateBulk) Save added in v0.2.0

Save creates the PrincipalMembership entities in the database.

func (*PrincipalMembershipCreateBulk) SaveX added in v0.2.0

SaveX is like Save, but panics if an error occurs.

type PrincipalMembershipDelete added in v0.2.0

type PrincipalMembershipDelete struct {
	// contains filtered or unexported fields
}

PrincipalMembershipDelete is the builder for deleting a PrincipalMembership entity.

func (*PrincipalMembershipDelete) Exec added in v0.2.0

Exec executes the deletion query and returns how many vertices were deleted.

func (*PrincipalMembershipDelete) ExecX added in v0.2.0

ExecX is like Exec, but panics if an error occurs.

func (*PrincipalMembershipDelete) Where added in v0.2.0

Where appends a list predicates to the PrincipalMembershipDelete builder.

type PrincipalMembershipDeleteOne added in v0.2.0

type PrincipalMembershipDeleteOne struct {
	// contains filtered or unexported fields
}

PrincipalMembershipDeleteOne is the builder for deleting a single PrincipalMembership entity.

func (*PrincipalMembershipDeleteOne) Exec added in v0.2.0

Exec executes the deletion query.

func (*PrincipalMembershipDeleteOne) ExecX added in v0.2.0

ExecX is like Exec, but panics if an error occurs.

func (*PrincipalMembershipDeleteOne) Where added in v0.2.0

Where appends a list predicates to the PrincipalMembershipDelete builder.

type PrincipalMembershipEdges added in v0.2.0

type PrincipalMembershipEdges struct {
	// Principal holds the value of the principal edge.
	Principal *Principal `json:"principal,omitempty"`
	// Organization holds the value of the organization edge.
	Organization *Organization `json:"organization,omitempty"`
	// contains filtered or unexported fields
}

PrincipalMembershipEdges holds the relations/edges for other nodes in the graph.

func (PrincipalMembershipEdges) OrganizationOrErr added in v0.2.0

func (e PrincipalMembershipEdges) 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 (PrincipalMembershipEdges) PrincipalOrErr added in v0.2.0

func (e PrincipalMembershipEdges) PrincipalOrErr() (*Principal, error)

PrincipalOrErr returns the Principal value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type PrincipalMembershipFilter added in v0.2.0

type PrincipalMembershipFilter struct {
	// contains filtered or unexported fields
}

PrincipalMembershipFilter provides a generic filtering capability at runtime for PrincipalMembershipQuery.

func (*PrincipalMembershipFilter) Where added in v0.2.0

func (f *PrincipalMembershipFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*PrincipalMembershipFilter) WhereActive added in v0.2.0

func (f *PrincipalMembershipFilter) WhereActive(p entql.BoolP)

WhereActive applies the entql bool predicate on the active field.

func (*PrincipalMembershipFilter) WhereCreatedAt added in v0.2.0

func (f *PrincipalMembershipFilter) WhereCreatedAt(p entql.TimeP)

WhereCreatedAt applies the entql time.Time predicate on the created_at field.

func (*PrincipalMembershipFilter) WhereHasOrganization added in v0.2.0

func (f *PrincipalMembershipFilter) WhereHasOrganization()

WhereHasOrganization applies a predicate to check if query has an edge organization.

func (*PrincipalMembershipFilter) WhereHasOrganizationWith added in v0.2.0

func (f *PrincipalMembershipFilter) WhereHasOrganizationWith(preds ...predicate.Organization)

WhereHasOrganizationWith applies a predicate to check if query has an edge organization with a given conditions (other predicates).

func (*PrincipalMembershipFilter) WhereHasPrincipal added in v0.2.0

func (f *PrincipalMembershipFilter) WhereHasPrincipal()

WhereHasPrincipal applies a predicate to check if query has an edge principal.

func (*PrincipalMembershipFilter) WhereHasPrincipalWith added in v0.2.0

func (f *PrincipalMembershipFilter) WhereHasPrincipalWith(preds ...predicate.Principal)

WhereHasPrincipalWith applies a predicate to check if query has an edge principal with a given conditions (other predicates).

func (*PrincipalMembershipFilter) WhereID added in v0.2.0

func (f *PrincipalMembershipFilter) WhereID(p entql.ValueP)

WhereID applies the entql [16]byte predicate on the id field.

func (*PrincipalMembershipFilter) WhereOrganizationID added in v0.2.0

func (f *PrincipalMembershipFilter) WhereOrganizationID(p entql.ValueP)

WhereOrganizationID applies the entql [16]byte predicate on the organization_id field.

func (*PrincipalMembershipFilter) WherePermissions added in v0.2.0

func (f *PrincipalMembershipFilter) WherePermissions(p entql.BytesP)

WherePermissions applies the entql json.RawMessage predicate on the permissions field.

func (*PrincipalMembershipFilter) WherePrincipalID added in v0.2.0

func (f *PrincipalMembershipFilter) WherePrincipalID(p entql.ValueP)

WherePrincipalID applies the entql [16]byte predicate on the principal_id field.

func (*PrincipalMembershipFilter) WhereRole added in v0.2.0

func (f *PrincipalMembershipFilter) WhereRole(p entql.StringP)

WhereRole applies the entql string predicate on the role field.

func (*PrincipalMembershipFilter) WhereUpdatedAt added in v0.2.0

func (f *PrincipalMembershipFilter) WhereUpdatedAt(p entql.TimeP)

WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.

type PrincipalMembershipGroupBy added in v0.2.0

type PrincipalMembershipGroupBy struct {
	// contains filtered or unexported fields
}

PrincipalMembershipGroupBy is the group-by builder for PrincipalMembership entities.

func (*PrincipalMembershipGroupBy) Aggregate added in v0.2.0

Aggregate adds the given aggregation functions to the group-by query.

func (*PrincipalMembershipGroupBy) Bool added in v0.2.0

func (s *PrincipalMembershipGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PrincipalMembershipGroupBy) BoolX added in v0.2.0

func (s *PrincipalMembershipGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PrincipalMembershipGroupBy) Bools added in v0.2.0

func (s *PrincipalMembershipGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PrincipalMembershipGroupBy) BoolsX added in v0.2.0

func (s *PrincipalMembershipGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PrincipalMembershipGroupBy) Float64 added in v0.2.0

func (s *PrincipalMembershipGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PrincipalMembershipGroupBy) Float64X added in v0.2.0

func (s *PrincipalMembershipGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PrincipalMembershipGroupBy) Float64s added in v0.2.0

func (s *PrincipalMembershipGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PrincipalMembershipGroupBy) Float64sX added in v0.2.0

func (s *PrincipalMembershipGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PrincipalMembershipGroupBy) Int added in v0.2.0

func (s *PrincipalMembershipGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PrincipalMembershipGroupBy) IntX added in v0.2.0

func (s *PrincipalMembershipGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PrincipalMembershipGroupBy) Ints added in v0.2.0

func (s *PrincipalMembershipGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PrincipalMembershipGroupBy) IntsX added in v0.2.0

func (s *PrincipalMembershipGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PrincipalMembershipGroupBy) Scan added in v0.2.0

Scan applies the selector query and scans the result into the given value.

func (*PrincipalMembershipGroupBy) ScanX added in v0.2.0

func (s *PrincipalMembershipGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PrincipalMembershipGroupBy) String added in v0.2.0

func (s *PrincipalMembershipGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PrincipalMembershipGroupBy) StringX added in v0.2.0

func (s *PrincipalMembershipGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PrincipalMembershipGroupBy) Strings added in v0.2.0

func (s *PrincipalMembershipGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PrincipalMembershipGroupBy) StringsX added in v0.2.0

func (s *PrincipalMembershipGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PrincipalMembershipMutation added in v0.2.0

type PrincipalMembershipMutation struct {
	// contains filtered or unexported fields
}

PrincipalMembershipMutation represents an operation that mutates the PrincipalMembership nodes in the graph.

func (*PrincipalMembershipMutation) Active added in v0.2.0

func (m *PrincipalMembershipMutation) Active() (r bool, exists bool)

Active returns the value of the "active" field in the mutation.

func (*PrincipalMembershipMutation) AddField added in v0.2.0

func (m *PrincipalMembershipMutation) 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 (*PrincipalMembershipMutation) AddedEdges added in v0.2.0

func (m *PrincipalMembershipMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*PrincipalMembershipMutation) AddedField added in v0.2.0

func (m *PrincipalMembershipMutation) 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 (*PrincipalMembershipMutation) AddedFields added in v0.2.0

func (m *PrincipalMembershipMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*PrincipalMembershipMutation) AddedIDs added in v0.2.0

func (m *PrincipalMembershipMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*PrincipalMembershipMutation) AppendPermissions added in v0.2.0

func (m *PrincipalMembershipMutation) AppendPermissions(s []string)

AppendPermissions adds s to the "permissions" field.

func (*PrincipalMembershipMutation) AppendedPermissions added in v0.2.0

func (m *PrincipalMembershipMutation) AppendedPermissions() ([]string, bool)

AppendedPermissions returns the list of values that were appended to the "permissions" field in this mutation.

func (*PrincipalMembershipMutation) ClearEdge added in v0.2.0

func (m *PrincipalMembershipMutation) 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 (*PrincipalMembershipMutation) ClearField added in v0.2.0

func (m *PrincipalMembershipMutation) 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 (*PrincipalMembershipMutation) ClearOrganization added in v0.2.0

func (m *PrincipalMembershipMutation) ClearOrganization()

ClearOrganization clears the "organization" edge to the Organization entity.

func (*PrincipalMembershipMutation) ClearPermissions added in v0.2.0

func (m *PrincipalMembershipMutation) ClearPermissions()

ClearPermissions clears the value of the "permissions" field.

func (*PrincipalMembershipMutation) ClearPrincipal added in v0.2.0

func (m *PrincipalMembershipMutation) ClearPrincipal()

ClearPrincipal clears the "principal" edge to the Principal entity.

func (*PrincipalMembershipMutation) ClearedEdges added in v0.2.0

func (m *PrincipalMembershipMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*PrincipalMembershipMutation) ClearedFields added in v0.2.0

func (m *PrincipalMembershipMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (PrincipalMembershipMutation) Client added in v0.2.0

func (m PrincipalMembershipMutation) 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 (*PrincipalMembershipMutation) CreatedAt added in v0.2.0

func (m *PrincipalMembershipMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*PrincipalMembershipMutation) EdgeCleared added in v0.2.0

func (m *PrincipalMembershipMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*PrincipalMembershipMutation) Field added in v0.2.0

func (m *PrincipalMembershipMutation) 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 (*PrincipalMembershipMutation) FieldCleared added in v0.2.0

func (m *PrincipalMembershipMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*PrincipalMembershipMutation) Fields added in v0.2.0

func (m *PrincipalMembershipMutation) 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 (*PrincipalMembershipMutation) Filter added in v0.2.0

Filter returns an entql.Where implementation to apply filters on the PrincipalMembershipMutation builder.

func (*PrincipalMembershipMutation) ID added in v0.2.0

func (m *PrincipalMembershipMutation) 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 (*PrincipalMembershipMutation) IDs added in v0.2.0

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 (*PrincipalMembershipMutation) OldActive added in v0.2.0

func (m *PrincipalMembershipMutation) OldActive(ctx context.Context) (v bool, err error)

OldActive returns the old "active" field's value of the PrincipalMembership entity. If the PrincipalMembership 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 (*PrincipalMembershipMutation) OldCreatedAt added in v0.2.0

func (m *PrincipalMembershipMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the PrincipalMembership entity. If the PrincipalMembership 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 (*PrincipalMembershipMutation) OldField added in v0.2.0

func (m *PrincipalMembershipMutation) 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 (*PrincipalMembershipMutation) OldOrganizationID added in v0.2.0

func (m *PrincipalMembershipMutation) OldOrganizationID(ctx context.Context) (v uuid.UUID, err error)

OldOrganizationID returns the old "organization_id" field's value of the PrincipalMembership entity. If the PrincipalMembership 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 (*PrincipalMembershipMutation) OldPermissions added in v0.2.0

func (m *PrincipalMembershipMutation) OldPermissions(ctx context.Context) (v []string, err error)

OldPermissions returns the old "permissions" field's value of the PrincipalMembership entity. If the PrincipalMembership 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 (*PrincipalMembershipMutation) OldPrincipalID added in v0.2.0

func (m *PrincipalMembershipMutation) OldPrincipalID(ctx context.Context) (v uuid.UUID, err error)

OldPrincipalID returns the old "principal_id" field's value of the PrincipalMembership entity. If the PrincipalMembership 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 (*PrincipalMembershipMutation) OldRole added in v0.2.0

func (m *PrincipalMembershipMutation) OldRole(ctx context.Context) (v string, err error)

OldRole returns the old "role" field's value of the PrincipalMembership entity. If the PrincipalMembership 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 (*PrincipalMembershipMutation) OldUpdatedAt added in v0.2.0

func (m *PrincipalMembershipMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the PrincipalMembership entity. If the PrincipalMembership 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 (*PrincipalMembershipMutation) Op added in v0.2.0

Op returns the operation name.

func (*PrincipalMembershipMutation) OrganizationCleared added in v0.2.0

func (m *PrincipalMembershipMutation) OrganizationCleared() bool

OrganizationCleared reports if the "organization" edge to the Organization entity was cleared.

func (*PrincipalMembershipMutation) OrganizationID added in v0.2.0

func (m *PrincipalMembershipMutation) OrganizationID() (r uuid.UUID, exists bool)

OrganizationID returns the value of the "organization_id" field in the mutation.

func (*PrincipalMembershipMutation) OrganizationIDs added in v0.2.0

func (m *PrincipalMembershipMutation) 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 (*PrincipalMembershipMutation) Permissions added in v0.2.0

func (m *PrincipalMembershipMutation) Permissions() (r []string, exists bool)

Permissions returns the value of the "permissions" field in the mutation.

func (*PrincipalMembershipMutation) PermissionsCleared added in v0.2.0

func (m *PrincipalMembershipMutation) PermissionsCleared() bool

PermissionsCleared returns if the "permissions" field was cleared in this mutation.

func (*PrincipalMembershipMutation) PrincipalCleared added in v0.2.0

func (m *PrincipalMembershipMutation) PrincipalCleared() bool

PrincipalCleared reports if the "principal" edge to the Principal entity was cleared.

func (*PrincipalMembershipMutation) PrincipalID added in v0.2.0

func (m *PrincipalMembershipMutation) PrincipalID() (r uuid.UUID, exists bool)

PrincipalID returns the value of the "principal_id" field in the mutation.

func (*PrincipalMembershipMutation) PrincipalIDs added in v0.2.0

func (m *PrincipalMembershipMutation) PrincipalIDs() (ids []uuid.UUID)

PrincipalIDs returns the "principal" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PrincipalID instead. It exists only for internal usage by the builders.

func (*PrincipalMembershipMutation) RemovedEdges added in v0.2.0

func (m *PrincipalMembershipMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*PrincipalMembershipMutation) RemovedIDs added in v0.2.0

func (m *PrincipalMembershipMutation) 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 (*PrincipalMembershipMutation) ResetActive added in v0.2.0

func (m *PrincipalMembershipMutation) ResetActive()

ResetActive resets all changes to the "active" field.

func (*PrincipalMembershipMutation) ResetCreatedAt added in v0.2.0

func (m *PrincipalMembershipMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*PrincipalMembershipMutation) ResetEdge added in v0.2.0

func (m *PrincipalMembershipMutation) 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 (*PrincipalMembershipMutation) ResetField added in v0.2.0

func (m *PrincipalMembershipMutation) 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 (*PrincipalMembershipMutation) ResetOrganization added in v0.2.0

func (m *PrincipalMembershipMutation) ResetOrganization()

ResetOrganization resets all changes to the "organization" edge.

func (*PrincipalMembershipMutation) ResetOrganizationID added in v0.2.0

func (m *PrincipalMembershipMutation) ResetOrganizationID()

ResetOrganizationID resets all changes to the "organization_id" field.

func (*PrincipalMembershipMutation) ResetPermissions added in v0.2.0

func (m *PrincipalMembershipMutation) ResetPermissions()

ResetPermissions resets all changes to the "permissions" field.

func (*PrincipalMembershipMutation) ResetPrincipal added in v0.2.0

func (m *PrincipalMembershipMutation) ResetPrincipal()

ResetPrincipal resets all changes to the "principal" edge.

func (*PrincipalMembershipMutation) ResetPrincipalID added in v0.2.0

func (m *PrincipalMembershipMutation) ResetPrincipalID()

ResetPrincipalID resets all changes to the "principal_id" field.

func (*PrincipalMembershipMutation) ResetRole added in v0.2.0

func (m *PrincipalMembershipMutation) ResetRole()

ResetRole resets all changes to the "role" field.

func (*PrincipalMembershipMutation) ResetUpdatedAt added in v0.2.0

func (m *PrincipalMembershipMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*PrincipalMembershipMutation) Role added in v0.2.0

func (m *PrincipalMembershipMutation) Role() (r string, exists bool)

Role returns the value of the "role" field in the mutation.

func (*PrincipalMembershipMutation) SetActive added in v0.2.0

func (m *PrincipalMembershipMutation) SetActive(b bool)

SetActive sets the "active" field.

func (*PrincipalMembershipMutation) SetCreatedAt added in v0.2.0

func (m *PrincipalMembershipMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*PrincipalMembershipMutation) SetField added in v0.2.0

func (m *PrincipalMembershipMutation) 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 (*PrincipalMembershipMutation) SetID added in v0.2.0

func (m *PrincipalMembershipMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of PrincipalMembership entities.

func (*PrincipalMembershipMutation) SetOp added in v0.2.0

func (m *PrincipalMembershipMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*PrincipalMembershipMutation) SetOrganizationID added in v0.2.0

func (m *PrincipalMembershipMutation) SetOrganizationID(u uuid.UUID)

SetOrganizationID sets the "organization_id" field.

func (*PrincipalMembershipMutation) SetPermissions added in v0.2.0

func (m *PrincipalMembershipMutation) SetPermissions(s []string)

SetPermissions sets the "permissions" field.

func (*PrincipalMembershipMutation) SetPrincipalID added in v0.2.0

func (m *PrincipalMembershipMutation) SetPrincipalID(u uuid.UUID)

SetPrincipalID sets the "principal_id" field.

func (*PrincipalMembershipMutation) SetRole added in v0.2.0

func (m *PrincipalMembershipMutation) SetRole(s string)

SetRole sets the "role" field.

func (*PrincipalMembershipMutation) SetUpdatedAt added in v0.2.0

func (m *PrincipalMembershipMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (PrincipalMembershipMutation) Tx added in v0.2.0

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*PrincipalMembershipMutation) Type added in v0.2.0

Type returns the node type of this mutation (PrincipalMembership).

func (*PrincipalMembershipMutation) UpdatedAt added in v0.2.0

func (m *PrincipalMembershipMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*PrincipalMembershipMutation) Where added in v0.2.0

Where appends a list predicates to the PrincipalMembershipMutation builder.

func (*PrincipalMembershipMutation) WhereP added in v0.2.0

func (m *PrincipalMembershipMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the PrincipalMembershipMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type PrincipalMembershipQuery added in v0.2.0

type PrincipalMembershipQuery struct {
	// contains filtered or unexported fields
}

PrincipalMembershipQuery is the builder for querying PrincipalMembership entities.

func (*PrincipalMembershipQuery) Aggregate added in v0.2.0

Aggregate returns a PrincipalMembershipSelect configured with the given aggregations.

func (*PrincipalMembershipQuery) All added in v0.2.0

All executes the query and returns a list of PrincipalMemberships.

func (*PrincipalMembershipQuery) AllX added in v0.2.0

AllX is like All, but panics if an error occurs.

func (*PrincipalMembershipQuery) Clone added in v0.2.0

Clone returns a duplicate of the PrincipalMembershipQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*PrincipalMembershipQuery) Count added in v0.2.0

func (_q *PrincipalMembershipQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PrincipalMembershipQuery) CountX added in v0.2.0

func (_q *PrincipalMembershipQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PrincipalMembershipQuery) Exist added in v0.2.0

Exist returns true if the query has elements in the graph.

func (*PrincipalMembershipQuery) ExistX added in v0.2.0

func (_q *PrincipalMembershipQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PrincipalMembershipQuery) Filter added in v0.2.0

Filter returns a Filter implementation to apply filters on the PrincipalMembershipQuery builder.

func (*PrincipalMembershipQuery) First added in v0.2.0

First returns the first PrincipalMembership entity from the query. Returns a *NotFoundError when no PrincipalMembership was found.

func (*PrincipalMembershipQuery) FirstID added in v0.2.0

func (_q *PrincipalMembershipQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first PrincipalMembership ID from the query. Returns a *NotFoundError when no PrincipalMembership ID was found.

func (*PrincipalMembershipQuery) FirstIDX added in v0.2.0

func (_q *PrincipalMembershipQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*PrincipalMembershipQuery) FirstX added in v0.2.0

FirstX is like First, but panics if an error occurs.

func (*PrincipalMembershipQuery) GroupBy added in v0.2.0

func (_q *PrincipalMembershipQuery) GroupBy(field string, fields ...string) *PrincipalMembershipGroupBy

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.PrincipalMembership.Query().
	GroupBy(principalmembership.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PrincipalMembershipQuery) IDs added in v0.2.0

func (_q *PrincipalMembershipQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of PrincipalMembership IDs.

func (*PrincipalMembershipQuery) IDsX added in v0.2.0

IDsX is like IDs, but panics if an error occurs.

func (*PrincipalMembershipQuery) Limit added in v0.2.0

Limit the number of records to be returned by this query.

func (*PrincipalMembershipQuery) Offset added in v0.2.0

Offset to start from.

func (*PrincipalMembershipQuery) Only added in v0.2.0

Only returns a single PrincipalMembership entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PrincipalMembership entity is found. Returns a *NotFoundError when no PrincipalMembership entities are found.

func (*PrincipalMembershipQuery) OnlyID added in v0.2.0

func (_q *PrincipalMembershipQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only PrincipalMembership ID in the query. Returns a *NotSingularError when more than one PrincipalMembership ID is found. Returns a *NotFoundError when no entities are found.

func (*PrincipalMembershipQuery) OnlyIDX added in v0.2.0

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*PrincipalMembershipQuery) OnlyX added in v0.2.0

OnlyX is like Only, but panics if an error occurs.

func (*PrincipalMembershipQuery) Order added in v0.2.0

Order specifies how the records should be ordered.

func (*PrincipalMembershipQuery) QueryOrganization added in v0.2.0

func (_q *PrincipalMembershipQuery) QueryOrganization() *OrganizationQuery

QueryOrganization chains the current query on the "organization" edge.

func (*PrincipalMembershipQuery) QueryPrincipal added in v0.2.0

func (_q *PrincipalMembershipQuery) QueryPrincipal() *PrincipalQuery

QueryPrincipal chains the current query on the "principal" edge.

func (*PrincipalMembershipQuery) Select added in v0.2.0

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.PrincipalMembership.Query().
	Select(principalmembership.FieldCreatedAt).
	Scan(ctx, &v)

func (*PrincipalMembershipQuery) Unique added in v0.2.0

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 (*PrincipalMembershipQuery) Where added in v0.2.0

Where adds a new predicate for the PrincipalMembershipQuery builder.

func (*PrincipalMembershipQuery) WithOrganization added in v0.2.0

func (_q *PrincipalMembershipQuery) WithOrganization(opts ...func(*OrganizationQuery)) *PrincipalMembershipQuery

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 (*PrincipalMembershipQuery) WithPrincipal added in v0.2.0

func (_q *PrincipalMembershipQuery) WithPrincipal(opts ...func(*PrincipalQuery)) *PrincipalMembershipQuery

WithPrincipal tells the query-builder to eager-load the nodes that are connected to the "principal" edge. The optional arguments are used to configure the query builder of the edge.

type PrincipalMembershipSelect added in v0.2.0

type PrincipalMembershipSelect struct {
	*PrincipalMembershipQuery
	// contains filtered or unexported fields
}

PrincipalMembershipSelect is the builder for selecting fields of PrincipalMembership entities.

func (*PrincipalMembershipSelect) Aggregate added in v0.2.0

Aggregate adds the given aggregation functions to the selector query.

func (*PrincipalMembershipSelect) Bool added in v0.2.0

func (s *PrincipalMembershipSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PrincipalMembershipSelect) BoolX added in v0.2.0

func (s *PrincipalMembershipSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PrincipalMembershipSelect) Bools added in v0.2.0

func (s *PrincipalMembershipSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PrincipalMembershipSelect) BoolsX added in v0.2.0

func (s *PrincipalMembershipSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PrincipalMembershipSelect) Float64 added in v0.2.0

func (s *PrincipalMembershipSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PrincipalMembershipSelect) Float64X added in v0.2.0

func (s *PrincipalMembershipSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PrincipalMembershipSelect) Float64s added in v0.2.0

func (s *PrincipalMembershipSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PrincipalMembershipSelect) Float64sX added in v0.2.0

func (s *PrincipalMembershipSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PrincipalMembershipSelect) Int added in v0.2.0

func (s *PrincipalMembershipSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PrincipalMembershipSelect) IntX added in v0.2.0

func (s *PrincipalMembershipSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PrincipalMembershipSelect) Ints added in v0.2.0

func (s *PrincipalMembershipSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PrincipalMembershipSelect) IntsX added in v0.2.0

func (s *PrincipalMembershipSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PrincipalMembershipSelect) Scan added in v0.2.0

Scan applies the selector query and scans the result into the given value.

func (*PrincipalMembershipSelect) ScanX added in v0.2.0

func (s *PrincipalMembershipSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PrincipalMembershipSelect) String added in v0.2.0

func (s *PrincipalMembershipSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PrincipalMembershipSelect) StringX added in v0.2.0

func (s *PrincipalMembershipSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PrincipalMembershipSelect) Strings added in v0.2.0

func (s *PrincipalMembershipSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PrincipalMembershipSelect) StringsX added in v0.2.0

func (s *PrincipalMembershipSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PrincipalMembershipUpdate added in v0.2.0

type PrincipalMembershipUpdate struct {
	// contains filtered or unexported fields
}

PrincipalMembershipUpdate is the builder for updating PrincipalMembership entities.

func (*PrincipalMembershipUpdate) AppendPermissions added in v0.2.0

func (_u *PrincipalMembershipUpdate) AppendPermissions(v []string) *PrincipalMembershipUpdate

AppendPermissions appends value to the "permissions" field.

func (*PrincipalMembershipUpdate) ClearOrganization added in v0.2.0

func (_u *PrincipalMembershipUpdate) ClearOrganization() *PrincipalMembershipUpdate

ClearOrganization clears the "organization" edge to the Organization entity.

func (*PrincipalMembershipUpdate) ClearPermissions added in v0.2.0

func (_u *PrincipalMembershipUpdate) ClearPermissions() *PrincipalMembershipUpdate

ClearPermissions clears the value of the "permissions" field.

func (*PrincipalMembershipUpdate) ClearPrincipal added in v0.2.0

ClearPrincipal clears the "principal" edge to the Principal entity.

func (*PrincipalMembershipUpdate) Exec added in v0.2.0

Exec executes the query.

func (*PrincipalMembershipUpdate) ExecX added in v0.2.0

func (_u *PrincipalMembershipUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PrincipalMembershipUpdate) Mutation added in v0.2.0

Mutation returns the PrincipalMembershipMutation object of the builder.

func (*PrincipalMembershipUpdate) Save added in v0.2.0

Save executes the query and returns the number of nodes affected by the update operation.

func (*PrincipalMembershipUpdate) SaveX added in v0.2.0

SaveX is like Save, but panics if an error occurs.

func (*PrincipalMembershipUpdate) SetActive added in v0.2.0

SetActive sets the "active" field.

func (*PrincipalMembershipUpdate) SetNillableActive added in v0.2.0

func (_u *PrincipalMembershipUpdate) SetNillableActive(v *bool) *PrincipalMembershipUpdate

SetNillableActive sets the "active" field if the given value is not nil.

func (*PrincipalMembershipUpdate) SetNillableOrganizationID added in v0.2.0

func (_u *PrincipalMembershipUpdate) SetNillableOrganizationID(v *uuid.UUID) *PrincipalMembershipUpdate

SetNillableOrganizationID sets the "organization_id" field if the given value is not nil.

func (*PrincipalMembershipUpdate) SetNillablePrincipalID added in v0.2.0

func (_u *PrincipalMembershipUpdate) SetNillablePrincipalID(v *uuid.UUID) *PrincipalMembershipUpdate

SetNillablePrincipalID sets the "principal_id" field if the given value is not nil.

func (*PrincipalMembershipUpdate) SetNillableRole added in v0.2.0

SetNillableRole sets the "role" field if the given value is not nil.

func (*PrincipalMembershipUpdate) SetOrganization added in v0.2.0

SetOrganization sets the "organization" edge to the Organization entity.

func (*PrincipalMembershipUpdate) SetOrganizationID added in v0.2.0

SetOrganizationID sets the "organization_id" field.

func (*PrincipalMembershipUpdate) SetPermissions added in v0.2.0

SetPermissions sets the "permissions" field.

func (*PrincipalMembershipUpdate) SetPrincipal added in v0.2.0

SetPrincipal sets the "principal" edge to the Principal entity.

func (*PrincipalMembershipUpdate) SetPrincipalID added in v0.2.0

SetPrincipalID sets the "principal_id" field.

func (*PrincipalMembershipUpdate) SetRole added in v0.2.0

SetRole sets the "role" field.

func (*PrincipalMembershipUpdate) SetUpdatedAt added in v0.2.0

SetUpdatedAt sets the "updated_at" field.

func (*PrincipalMembershipUpdate) Where added in v0.2.0

Where appends a list predicates to the PrincipalMembershipUpdate builder.

type PrincipalMembershipUpdateOne added in v0.2.0

type PrincipalMembershipUpdateOne struct {
	// contains filtered or unexported fields
}

PrincipalMembershipUpdateOne is the builder for updating a single PrincipalMembership entity.

func (*PrincipalMembershipUpdateOne) AppendPermissions added in v0.2.0

AppendPermissions appends value to the "permissions" field.

func (*PrincipalMembershipUpdateOne) ClearOrganization added in v0.2.0

ClearOrganization clears the "organization" edge to the Organization entity.

func (*PrincipalMembershipUpdateOne) ClearPermissions added in v0.2.0

ClearPermissions clears the value of the "permissions" field.

func (*PrincipalMembershipUpdateOne) ClearPrincipal added in v0.2.0

ClearPrincipal clears the "principal" edge to the Principal entity.

func (*PrincipalMembershipUpdateOne) Exec added in v0.2.0

Exec executes the query on the entity.

func (*PrincipalMembershipUpdateOne) ExecX added in v0.2.0

ExecX is like Exec, but panics if an error occurs.

func (*PrincipalMembershipUpdateOne) Mutation added in v0.2.0

Mutation returns the PrincipalMembershipMutation object of the builder.

func (*PrincipalMembershipUpdateOne) Save added in v0.2.0

Save executes the query and returns the updated PrincipalMembership entity.

func (*PrincipalMembershipUpdateOne) SaveX added in v0.2.0

SaveX is like Save, but panics if an error occurs.

func (*PrincipalMembershipUpdateOne) Select added in v0.2.0

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PrincipalMembershipUpdateOne) SetActive added in v0.2.0

SetActive sets the "active" field.

func (*PrincipalMembershipUpdateOne) SetNillableActive added in v0.2.0

SetNillableActive sets the "active" field if the given value is not nil.

func (*PrincipalMembershipUpdateOne) SetNillableOrganizationID added in v0.2.0

func (_u *PrincipalMembershipUpdateOne) SetNillableOrganizationID(v *uuid.UUID) *PrincipalMembershipUpdateOne

SetNillableOrganizationID sets the "organization_id" field if the given value is not nil.

func (*PrincipalMembershipUpdateOne) SetNillablePrincipalID added in v0.2.0

func (_u *PrincipalMembershipUpdateOne) SetNillablePrincipalID(v *uuid.UUID) *PrincipalMembershipUpdateOne

SetNillablePrincipalID sets the "principal_id" field if the given value is not nil.

func (*PrincipalMembershipUpdateOne) SetNillableRole added in v0.2.0

SetNillableRole sets the "role" field if the given value is not nil.

func (*PrincipalMembershipUpdateOne) SetOrganization added in v0.2.0

SetOrganization sets the "organization" edge to the Organization entity.

func (*PrincipalMembershipUpdateOne) SetOrganizationID added in v0.2.0

SetOrganizationID sets the "organization_id" field.

func (*PrincipalMembershipUpdateOne) SetPermissions added in v0.2.0

SetPermissions sets the "permissions" field.

func (*PrincipalMembershipUpdateOne) SetPrincipal added in v0.2.0

SetPrincipal sets the "principal" edge to the Principal entity.

func (*PrincipalMembershipUpdateOne) SetPrincipalID added in v0.2.0

SetPrincipalID sets the "principal_id" field.

func (*PrincipalMembershipUpdateOne) SetRole added in v0.2.0

SetRole sets the "role" field.

func (*PrincipalMembershipUpdateOne) SetUpdatedAt added in v0.2.0

SetUpdatedAt sets the "updated_at" field.

func (*PrincipalMembershipUpdateOne) Where added in v0.2.0

Where appends a list predicates to the PrincipalMembershipUpdate builder.

type PrincipalMembershipUpsert added in v0.2.0

type PrincipalMembershipUpsert struct {
	*sql.UpdateSet
}

PrincipalMembershipUpsert is the "OnConflict" setter.

func (*PrincipalMembershipUpsert) ClearPermissions added in v0.2.0

ClearPermissions clears the value of the "permissions" field.

func (*PrincipalMembershipUpsert) SetActive added in v0.2.0

SetActive sets the "active" field.

func (*PrincipalMembershipUpsert) SetOrganizationID added in v0.2.0

SetOrganizationID sets the "organization_id" field.

func (*PrincipalMembershipUpsert) SetPermissions added in v0.2.0

SetPermissions sets the "permissions" field.

func (*PrincipalMembershipUpsert) SetPrincipalID added in v0.2.0

SetPrincipalID sets the "principal_id" field.

func (*PrincipalMembershipUpsert) SetRole added in v0.2.0

SetRole sets the "role" field.

func (*PrincipalMembershipUpsert) SetUpdatedAt added in v0.2.0

SetUpdatedAt sets the "updated_at" field.

func (*PrincipalMembershipUpsert) UpdateActive added in v0.2.0

UpdateActive sets the "active" field to the value that was provided on create.

func (*PrincipalMembershipUpsert) UpdateOrganizationID added in v0.2.0

func (u *PrincipalMembershipUpsert) UpdateOrganizationID() *PrincipalMembershipUpsert

UpdateOrganizationID sets the "organization_id" field to the value that was provided on create.

func (*PrincipalMembershipUpsert) UpdatePermissions added in v0.2.0

func (u *PrincipalMembershipUpsert) UpdatePermissions() *PrincipalMembershipUpsert

UpdatePermissions sets the "permissions" field to the value that was provided on create.

func (*PrincipalMembershipUpsert) UpdatePrincipalID added in v0.2.0

func (u *PrincipalMembershipUpsert) UpdatePrincipalID() *PrincipalMembershipUpsert

UpdatePrincipalID sets the "principal_id" field to the value that was provided on create.

func (*PrincipalMembershipUpsert) UpdateRole added in v0.2.0

UpdateRole sets the "role" field to the value that was provided on create.

func (*PrincipalMembershipUpsert) UpdateUpdatedAt added in v0.2.0

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type PrincipalMembershipUpsertBulk added in v0.2.0

type PrincipalMembershipUpsertBulk struct {
	// contains filtered or unexported fields
}

PrincipalMembershipUpsertBulk is the builder for "upsert"-ing a bulk of PrincipalMembership nodes.

func (*PrincipalMembershipUpsertBulk) ClearPermissions added in v0.2.0

ClearPermissions clears the value of the "permissions" field.

func (*PrincipalMembershipUpsertBulk) DoNothing added in v0.2.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PrincipalMembershipUpsertBulk) Exec added in v0.2.0

Exec executes the query.

func (*PrincipalMembershipUpsertBulk) ExecX added in v0.2.0

ExecX is like Exec, but panics if an error occurs.

func (*PrincipalMembershipUpsertBulk) Ignore added in v0.2.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.PrincipalMembership.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*PrincipalMembershipUpsertBulk) SetActive added in v0.2.0

SetActive sets the "active" field.

func (*PrincipalMembershipUpsertBulk) SetOrganizationID added in v0.2.0

SetOrganizationID sets the "organization_id" field.

func (*PrincipalMembershipUpsertBulk) SetPermissions added in v0.2.0

SetPermissions sets the "permissions" field.

func (*PrincipalMembershipUpsertBulk) SetPrincipalID added in v0.2.0

SetPrincipalID sets the "principal_id" field.

func (*PrincipalMembershipUpsertBulk) SetRole added in v0.2.0

SetRole sets the "role" field.

func (*PrincipalMembershipUpsertBulk) SetUpdatedAt added in v0.2.0

SetUpdatedAt sets the "updated_at" field.

func (*PrincipalMembershipUpsertBulk) Update added in v0.2.0

Update allows overriding fields `UPDATE` values. See the PrincipalMembershipCreateBulk.OnConflict documentation for more info.

func (*PrincipalMembershipUpsertBulk) UpdateActive added in v0.2.0

UpdateActive sets the "active" field to the value that was provided on create.

func (*PrincipalMembershipUpsertBulk) UpdateNewValues added in v0.2.0

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.PrincipalMembership.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(principalmembership.FieldID)
		}),
	).
	Exec(ctx)

func (*PrincipalMembershipUpsertBulk) UpdateOrganizationID added in v0.2.0

UpdateOrganizationID sets the "organization_id" field to the value that was provided on create.

func (*PrincipalMembershipUpsertBulk) UpdatePermissions added in v0.2.0

UpdatePermissions sets the "permissions" field to the value that was provided on create.

func (*PrincipalMembershipUpsertBulk) UpdatePrincipalID added in v0.2.0

UpdatePrincipalID sets the "principal_id" field to the value that was provided on create.

func (*PrincipalMembershipUpsertBulk) UpdateRole added in v0.2.0

UpdateRole sets the "role" field to the value that was provided on create.

func (*PrincipalMembershipUpsertBulk) UpdateUpdatedAt added in v0.2.0

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type PrincipalMembershipUpsertOne added in v0.2.0

type PrincipalMembershipUpsertOne struct {
	// contains filtered or unexported fields
}

PrincipalMembershipUpsertOne is the builder for "upsert"-ing

one PrincipalMembership node.

func (*PrincipalMembershipUpsertOne) ClearPermissions added in v0.2.0

ClearPermissions clears the value of the "permissions" field.

func (*PrincipalMembershipUpsertOne) DoNothing added in v0.2.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PrincipalMembershipUpsertOne) Exec added in v0.2.0

Exec executes the query.

func (*PrincipalMembershipUpsertOne) ExecX added in v0.2.0

ExecX is like Exec, but panics if an error occurs.

func (*PrincipalMembershipUpsertOne) ID added in v0.2.0

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*PrincipalMembershipUpsertOne) IDX added in v0.2.0

IDX is like ID, but panics if an error occurs.

func (*PrincipalMembershipUpsertOne) Ignore added in v0.2.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.PrincipalMembership.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*PrincipalMembershipUpsertOne) SetActive added in v0.2.0

SetActive sets the "active" field.

func (*PrincipalMembershipUpsertOne) SetOrganizationID added in v0.2.0

SetOrganizationID sets the "organization_id" field.

func (*PrincipalMembershipUpsertOne) SetPermissions added in v0.2.0

SetPermissions sets the "permissions" field.

func (*PrincipalMembershipUpsertOne) SetPrincipalID added in v0.2.0

SetPrincipalID sets the "principal_id" field.

func (*PrincipalMembershipUpsertOne) SetRole added in v0.2.0

SetRole sets the "role" field.

func (*PrincipalMembershipUpsertOne) SetUpdatedAt added in v0.2.0

SetUpdatedAt sets the "updated_at" field.

func (*PrincipalMembershipUpsertOne) Update added in v0.2.0

Update allows overriding fields `UPDATE` values. See the PrincipalMembershipCreate.OnConflict documentation for more info.

func (*PrincipalMembershipUpsertOne) UpdateActive added in v0.2.0

UpdateActive sets the "active" field to the value that was provided on create.

func (*PrincipalMembershipUpsertOne) UpdateNewValues added in v0.2.0

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.PrincipalMembership.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(principalmembership.FieldID)
		}),
	).
	Exec(ctx)

func (*PrincipalMembershipUpsertOne) UpdateOrganizationID added in v0.2.0

UpdateOrganizationID sets the "organization_id" field to the value that was provided on create.

func (*PrincipalMembershipUpsertOne) UpdatePermissions added in v0.2.0

UpdatePermissions sets the "permissions" field to the value that was provided on create.

func (*PrincipalMembershipUpsertOne) UpdatePrincipalID added in v0.2.0

UpdatePrincipalID sets the "principal_id" field to the value that was provided on create.

func (*PrincipalMembershipUpsertOne) UpdateRole added in v0.2.0

UpdateRole sets the "role" field to the value that was provided on create.

func (*PrincipalMembershipUpsertOne) UpdateUpdatedAt added in v0.2.0

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type PrincipalMemberships added in v0.2.0

type PrincipalMemberships []*PrincipalMembership

PrincipalMemberships is a parsable slice of PrincipalMembership.

type PrincipalMutation added in v0.2.0

type PrincipalMutation struct {
	// contains filtered or unexported fields
}

PrincipalMutation represents an operation that mutates the Principal nodes in the graph.

func (*PrincipalMutation) Active added in v0.2.0

func (m *PrincipalMutation) Active() (r bool, exists bool)

Active returns the value of the "active" field in the mutation.

func (*PrincipalMutation) AddCredentialIDs added in v0.2.0

func (m *PrincipalMutation) AddCredentialIDs(ids ...uuid.UUID)

AddCredentialIDs adds the "credentials" edge to the Credential entity by ids.

func (*PrincipalMutation) AddField added in v0.2.0

func (m *PrincipalMutation) 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 (*PrincipalMutation) AddOwnedOrganizationIDs added in v0.2.0

func (m *PrincipalMutation) AddOwnedOrganizationIDs(ids ...uuid.UUID)

AddOwnedOrganizationIDs adds the "owned_organizations" edge to the Organization entity by ids.

func (*PrincipalMutation) AddPrincipalMembershipIDs added in v0.2.0

func (m *PrincipalMutation) AddPrincipalMembershipIDs(ids ...uuid.UUID)

AddPrincipalMembershipIDs adds the "principal_memberships" edge to the PrincipalMembership entity by ids.

func (*PrincipalMutation) AddPrincipalTokenIDs added in v0.2.0

func (m *PrincipalMutation) AddPrincipalTokenIDs(ids ...uuid.UUID)

AddPrincipalTokenIDs adds the "principal_tokens" edge to the PrincipalToken entity by ids.

func (*PrincipalMutation) AddSentInviteIDs added in v0.2.0

func (m *PrincipalMutation) AddSentInviteIDs(ids ...uuid.UUID)

AddSentInviteIDs adds the "sent_invites" edge to the Invite entity by ids.

func (*PrincipalMutation) AddedEdges added in v0.2.0

func (m *PrincipalMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*PrincipalMutation) AddedField added in v0.2.0

func (m *PrincipalMutation) 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 (*PrincipalMutation) AddedFields added in v0.2.0

func (m *PrincipalMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*PrincipalMutation) AddedIDs added in v0.2.0

func (m *PrincipalMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*PrincipalMutation) AgentCleared added in v0.2.0

func (m *PrincipalMutation) AgentCleared() bool

AgentCleared reports if the "agent" edge to the Agent entity was cleared.

func (*PrincipalMutation) AgentID added in v0.2.0

func (m *PrincipalMutation) AgentID() (id uuid.UUID, exists bool)

AgentID returns the "agent" edge ID in the mutation.

func (*PrincipalMutation) AgentIDs added in v0.2.0

func (m *PrincipalMutation) AgentIDs() (ids []uuid.UUID)

AgentIDs returns the "agent" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AgentID instead. It exists only for internal usage by the builders.

func (*PrincipalMutation) AllowedScopes added in v0.2.0

func (m *PrincipalMutation) AllowedScopes() (r []string, exists bool)

AllowedScopes returns the value of the "allowed_scopes" field in the mutation.

func (*PrincipalMutation) AppendAllowedScopes added in v0.2.0

func (m *PrincipalMutation) AppendAllowedScopes(s []string)

AppendAllowedScopes adds s to the "allowed_scopes" field.

func (*PrincipalMutation) AppendedAllowedScopes added in v0.2.0

func (m *PrincipalMutation) AppendedAllowedScopes() ([]string, bool)

AppendedAllowedScopes returns the list of values that were appended to the "allowed_scopes" field in this mutation.

func (*PrincipalMutation) ApplicationCleared added in v0.2.0

func (m *PrincipalMutation) ApplicationCleared() bool

ApplicationCleared reports if the "application" edge to the Application entity was cleared.

func (*PrincipalMutation) ApplicationID added in v0.2.0

func (m *PrincipalMutation) ApplicationID() (id uuid.UUID, exists bool)

ApplicationID returns the "application" edge ID in the mutation.

func (*PrincipalMutation) ApplicationIDs added in v0.2.0

func (m *PrincipalMutation) ApplicationIDs() (ids []uuid.UUID)

ApplicationIDs returns the "application" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ApplicationID instead. It exists only for internal usage by the builders.

func (*PrincipalMutation) Capabilities added in v0.2.0

func (m *PrincipalMutation) Capabilities() (r map[string]bool, exists bool)

Capabilities returns the value of the "capabilities" field in the mutation.

func (*PrincipalMutation) ClearAgent added in v0.2.0

func (m *PrincipalMutation) ClearAgent()

ClearAgent clears the "agent" edge to the Agent entity.

func (*PrincipalMutation) ClearApplication added in v0.2.0

func (m *PrincipalMutation) ClearApplication()

ClearApplication clears the "application" edge to the Application entity.

func (*PrincipalMutation) ClearCredentials added in v0.2.0

func (m *PrincipalMutation) ClearCredentials()

ClearCredentials clears the "credentials" edge to the Credential entity.

func (*PrincipalMutation) ClearEdge added in v0.2.0

func (m *PrincipalMutation) 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 (*PrincipalMutation) ClearField added in v0.2.0

func (m *PrincipalMutation) 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 (*PrincipalMutation) ClearHuman added in v0.2.0

func (m *PrincipalMutation) ClearHuman()

ClearHuman clears the "human" edge to the Human entity.

func (*PrincipalMutation) ClearMetadata added in v0.2.0

func (m *PrincipalMutation) ClearMetadata()

ClearMetadata clears the value of the "metadata" field.

func (*PrincipalMutation) ClearOrganization added in v0.2.0

func (m *PrincipalMutation) ClearOrganization()

ClearOrganization clears the "organization" edge to the Organization entity.

func (*PrincipalMutation) ClearOrganizationID added in v0.2.0

func (m *PrincipalMutation) ClearOrganizationID()

ClearOrganizationID clears the value of the "organization_id" field.

func (*PrincipalMutation) ClearOwnedOrganizations added in v0.2.0

func (m *PrincipalMutation) ClearOwnedOrganizations()

ClearOwnedOrganizations clears the "owned_organizations" edge to the Organization entity.

func (*PrincipalMutation) ClearPrincipalMemberships added in v0.2.0

func (m *PrincipalMutation) ClearPrincipalMemberships()

ClearPrincipalMemberships clears the "principal_memberships" edge to the PrincipalMembership entity.

func (*PrincipalMutation) ClearPrincipalTokens added in v0.2.0

func (m *PrincipalMutation) ClearPrincipalTokens()

ClearPrincipalTokens clears the "principal_tokens" edge to the PrincipalToken entity.

func (*PrincipalMutation) ClearSentInvites added in v0.2.0

func (m *PrincipalMutation) ClearSentInvites()

ClearSentInvites clears the "sent_invites" edge to the Invite entity.

func (*PrincipalMutation) ClearServicePrincipal added in v0.2.0

func (m *PrincipalMutation) ClearServicePrincipal()

ClearServicePrincipal clears the "service_principal" edge to the ServicePrincipal entity.

func (*PrincipalMutation) ClearedEdges added in v0.2.0

func (m *PrincipalMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*PrincipalMutation) ClearedFields added in v0.2.0

func (m *PrincipalMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (PrincipalMutation) Client added in v0.2.0

func (m PrincipalMutation) 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 (*PrincipalMutation) CreatedAt added in v0.2.0

func (m *PrincipalMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*PrincipalMutation) CredentialsCleared added in v0.2.0

func (m *PrincipalMutation) CredentialsCleared() bool

CredentialsCleared reports if the "credentials" edge to the Credential entity was cleared.

func (*PrincipalMutation) CredentialsIDs added in v0.2.0

func (m *PrincipalMutation) CredentialsIDs() (ids []uuid.UUID)

CredentialsIDs returns the "credentials" edge IDs in the mutation.

func (*PrincipalMutation) DisplayName added in v0.2.0

func (m *PrincipalMutation) DisplayName() (r string, exists bool)

DisplayName returns the value of the "display_name" field in the mutation.

func (*PrincipalMutation) EdgeCleared added in v0.2.0

func (m *PrincipalMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*PrincipalMutation) Field added in v0.2.0

func (m *PrincipalMutation) 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 (*PrincipalMutation) FieldCleared added in v0.2.0

func (m *PrincipalMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*PrincipalMutation) Fields added in v0.2.0

func (m *PrincipalMutation) 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 (*PrincipalMutation) Filter added in v0.2.0

func (m *PrincipalMutation) Filter() *PrincipalFilter

Filter returns an entql.Where implementation to apply filters on the PrincipalMutation builder.

func (*PrincipalMutation) GetType added in v0.2.0

func (m *PrincipalMutation) GetType() (r principal.Type, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*PrincipalMutation) HumanCleared added in v0.2.0

func (m *PrincipalMutation) HumanCleared() bool

HumanCleared reports if the "human" edge to the Human entity was cleared.

func (*PrincipalMutation) HumanID added in v0.2.0

func (m *PrincipalMutation) HumanID() (id uuid.UUID, exists bool)

HumanID returns the "human" edge ID in the mutation.

func (*PrincipalMutation) HumanIDs added in v0.2.0

func (m *PrincipalMutation) HumanIDs() (ids []uuid.UUID)

HumanIDs returns the "human" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use HumanID instead. It exists only for internal usage by the builders.

func (*PrincipalMutation) ID added in v0.2.0

func (m *PrincipalMutation) 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 (*PrincipalMutation) IDs added in v0.2.0

func (m *PrincipalMutation) 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 (*PrincipalMutation) Identifier added in v0.2.0

func (m *PrincipalMutation) Identifier() (r string, exists bool)

Identifier returns the value of the "identifier" field in the mutation.

func (*PrincipalMutation) Metadata added in v0.2.0

func (m *PrincipalMutation) Metadata() (r map[string]interface{}, exists bool)

Metadata returns the value of the "metadata" field in the mutation.

func (*PrincipalMutation) MetadataCleared added in v0.2.0

func (m *PrincipalMutation) MetadataCleared() bool

MetadataCleared returns if the "metadata" field was cleared in this mutation.

func (*PrincipalMutation) OldActive added in v0.2.0

func (m *PrincipalMutation) OldActive(ctx context.Context) (v bool, err error)

OldActive returns the old "active" field's value of the Principal entity. If the Principal 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 (*PrincipalMutation) OldAllowedScopes added in v0.2.0

func (m *PrincipalMutation) OldAllowedScopes(ctx context.Context) (v []string, err error)

OldAllowedScopes returns the old "allowed_scopes" field's value of the Principal entity. If the Principal 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 (*PrincipalMutation) OldCapabilities added in v0.2.0

func (m *PrincipalMutation) OldCapabilities(ctx context.Context) (v map[string]bool, err error)

OldCapabilities returns the old "capabilities" field's value of the Principal entity. If the Principal 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 (*PrincipalMutation) OldCreatedAt added in v0.2.0

func (m *PrincipalMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Principal entity. If the Principal 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 (*PrincipalMutation) OldDisplayName added in v0.2.0

func (m *PrincipalMutation) OldDisplayName(ctx context.Context) (v string, err error)

OldDisplayName returns the old "display_name" field's value of the Principal entity. If the Principal 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 (*PrincipalMutation) OldField added in v0.2.0

func (m *PrincipalMutation) 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 (*PrincipalMutation) OldIdentifier added in v0.2.0

func (m *PrincipalMutation) OldIdentifier(ctx context.Context) (v string, err error)

OldIdentifier returns the old "identifier" field's value of the Principal entity. If the Principal 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 (*PrincipalMutation) OldMetadata added in v0.2.0

func (m *PrincipalMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)

OldMetadata returns the old "metadata" field's value of the Principal entity. If the Principal 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 (*PrincipalMutation) OldOrganizationID added in v0.2.0

func (m *PrincipalMutation) OldOrganizationID(ctx context.Context) (v *uuid.UUID, err error)

OldOrganizationID returns the old "organization_id" field's value of the Principal entity. If the Principal 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 (*PrincipalMutation) OldType added in v0.2.0

func (m *PrincipalMutation) OldType(ctx context.Context) (v principal.Type, err error)

OldType returns the old "type" field's value of the Principal entity. If the Principal 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 (*PrincipalMutation) OldUpdatedAt added in v0.2.0

func (m *PrincipalMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Principal entity. If the Principal 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 (*PrincipalMutation) Op added in v0.2.0

func (m *PrincipalMutation) Op() Op

Op returns the operation name.

func (*PrincipalMutation) OrganizationCleared added in v0.2.0

func (m *PrincipalMutation) OrganizationCleared() bool

OrganizationCleared reports if the "organization" edge to the Organization entity was cleared.

func (*PrincipalMutation) OrganizationID added in v0.2.0

func (m *PrincipalMutation) OrganizationID() (r uuid.UUID, exists bool)

OrganizationID returns the value of the "organization_id" field in the mutation.

func (*PrincipalMutation) OrganizationIDCleared added in v0.2.0

func (m *PrincipalMutation) OrganizationIDCleared() bool

OrganizationIDCleared returns if the "organization_id" field was cleared in this mutation.

func (*PrincipalMutation) OrganizationIDs added in v0.2.0

func (m *PrincipalMutation) 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 (*PrincipalMutation) OwnedOrganizationsCleared added in v0.2.0

func (m *PrincipalMutation) OwnedOrganizationsCleared() bool

OwnedOrganizationsCleared reports if the "owned_organizations" edge to the Organization entity was cleared.

func (*PrincipalMutation) OwnedOrganizationsIDs added in v0.2.0

func (m *PrincipalMutation) OwnedOrganizationsIDs() (ids []uuid.UUID)

OwnedOrganizationsIDs returns the "owned_organizations" edge IDs in the mutation.

func (*PrincipalMutation) PrincipalMembershipsCleared added in v0.2.0

func (m *PrincipalMutation) PrincipalMembershipsCleared() bool

PrincipalMembershipsCleared reports if the "principal_memberships" edge to the PrincipalMembership entity was cleared.

func (*PrincipalMutation) PrincipalMembershipsIDs added in v0.2.0

func (m *PrincipalMutation) PrincipalMembershipsIDs() (ids []uuid.UUID)

PrincipalMembershipsIDs returns the "principal_memberships" edge IDs in the mutation.

func (*PrincipalMutation) PrincipalTokensCleared added in v0.2.0

func (m *PrincipalMutation) PrincipalTokensCleared() bool

PrincipalTokensCleared reports if the "principal_tokens" edge to the PrincipalToken entity was cleared.

func (*PrincipalMutation) PrincipalTokensIDs added in v0.2.0

func (m *PrincipalMutation) PrincipalTokensIDs() (ids []uuid.UUID)

PrincipalTokensIDs returns the "principal_tokens" edge IDs in the mutation.

func (*PrincipalMutation) RemoveCredentialIDs added in v0.2.0

func (m *PrincipalMutation) RemoveCredentialIDs(ids ...uuid.UUID)

RemoveCredentialIDs removes the "credentials" edge to the Credential entity by IDs.

func (*PrincipalMutation) RemoveOwnedOrganizationIDs added in v0.2.0

func (m *PrincipalMutation) RemoveOwnedOrganizationIDs(ids ...uuid.UUID)

RemoveOwnedOrganizationIDs removes the "owned_organizations" edge to the Organization entity by IDs.

func (*PrincipalMutation) RemovePrincipalMembershipIDs added in v0.2.0

func (m *PrincipalMutation) RemovePrincipalMembershipIDs(ids ...uuid.UUID)

RemovePrincipalMembershipIDs removes the "principal_memberships" edge to the PrincipalMembership entity by IDs.

func (*PrincipalMutation) RemovePrincipalTokenIDs added in v0.2.0

func (m *PrincipalMutation) RemovePrincipalTokenIDs(ids ...uuid.UUID)

RemovePrincipalTokenIDs removes the "principal_tokens" edge to the PrincipalToken entity by IDs.

func (*PrincipalMutation) RemoveSentInviteIDs added in v0.2.0

func (m *PrincipalMutation) RemoveSentInviteIDs(ids ...uuid.UUID)

RemoveSentInviteIDs removes the "sent_invites" edge to the Invite entity by IDs.

func (*PrincipalMutation) RemovedCredentialsIDs added in v0.2.0

func (m *PrincipalMutation) RemovedCredentialsIDs() (ids []uuid.UUID)

RemovedCredentials returns the removed IDs of the "credentials" edge to the Credential entity.

func (*PrincipalMutation) RemovedEdges added in v0.2.0

func (m *PrincipalMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*PrincipalMutation) RemovedIDs added in v0.2.0

func (m *PrincipalMutation) 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 (*PrincipalMutation) RemovedOwnedOrganizationsIDs added in v0.2.0

func (m *PrincipalMutation) RemovedOwnedOrganizationsIDs() (ids []uuid.UUID)

RemovedOwnedOrganizations returns the removed IDs of the "owned_organizations" edge to the Organization entity.

func (*PrincipalMutation) RemovedPrincipalMembershipsIDs added in v0.2.0

func (m *PrincipalMutation) RemovedPrincipalMembershipsIDs() (ids []uuid.UUID)

RemovedPrincipalMemberships returns the removed IDs of the "principal_memberships" edge to the PrincipalMembership entity.

func (*PrincipalMutation) RemovedPrincipalTokensIDs added in v0.2.0

func (m *PrincipalMutation) RemovedPrincipalTokensIDs() (ids []uuid.UUID)

RemovedPrincipalTokens returns the removed IDs of the "principal_tokens" edge to the PrincipalToken entity.

func (*PrincipalMutation) RemovedSentInvitesIDs added in v0.2.0

func (m *PrincipalMutation) RemovedSentInvitesIDs() (ids []uuid.UUID)

RemovedSentInvites returns the removed IDs of the "sent_invites" edge to the Invite entity.

func (*PrincipalMutation) ResetActive added in v0.2.0

func (m *PrincipalMutation) ResetActive()

ResetActive resets all changes to the "active" field.

func (*PrincipalMutation) ResetAgent added in v0.2.0

func (m *PrincipalMutation) ResetAgent()

ResetAgent resets all changes to the "agent" edge.

func (*PrincipalMutation) ResetAllowedScopes added in v0.2.0

func (m *PrincipalMutation) ResetAllowedScopes()

ResetAllowedScopes resets all changes to the "allowed_scopes" field.

func (*PrincipalMutation) ResetApplication added in v0.2.0

func (m *PrincipalMutation) ResetApplication()

ResetApplication resets all changes to the "application" edge.

func (*PrincipalMutation) ResetCapabilities added in v0.2.0

func (m *PrincipalMutation) ResetCapabilities()

ResetCapabilities resets all changes to the "capabilities" field.

func (*PrincipalMutation) ResetCreatedAt added in v0.2.0

func (m *PrincipalMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*PrincipalMutation) ResetCredentials added in v0.2.0

func (m *PrincipalMutation) ResetCredentials()

ResetCredentials resets all changes to the "credentials" edge.

func (*PrincipalMutation) ResetDisplayName added in v0.2.0

func (m *PrincipalMutation) ResetDisplayName()

ResetDisplayName resets all changes to the "display_name" field.

func (*PrincipalMutation) ResetEdge added in v0.2.0

func (m *PrincipalMutation) 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 (*PrincipalMutation) ResetField added in v0.2.0

func (m *PrincipalMutation) 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 (*PrincipalMutation) ResetHuman added in v0.2.0

func (m *PrincipalMutation) ResetHuman()

ResetHuman resets all changes to the "human" edge.

func (*PrincipalMutation) ResetIdentifier added in v0.2.0

func (m *PrincipalMutation) ResetIdentifier()

ResetIdentifier resets all changes to the "identifier" field.

func (*PrincipalMutation) ResetMetadata added in v0.2.0

func (m *PrincipalMutation) ResetMetadata()

ResetMetadata resets all changes to the "metadata" field.

func (*PrincipalMutation) ResetOrganization added in v0.2.0

func (m *PrincipalMutation) ResetOrganization()

ResetOrganization resets all changes to the "organization" edge.

func (*PrincipalMutation) ResetOrganizationID added in v0.2.0

func (m *PrincipalMutation) ResetOrganizationID()

ResetOrganizationID resets all changes to the "organization_id" field.

func (*PrincipalMutation) ResetOwnedOrganizations added in v0.2.0

func (m *PrincipalMutation) ResetOwnedOrganizations()

ResetOwnedOrganizations resets all changes to the "owned_organizations" edge.

func (*PrincipalMutation) ResetPrincipalMemberships added in v0.2.0

func (m *PrincipalMutation) ResetPrincipalMemberships()

ResetPrincipalMemberships resets all changes to the "principal_memberships" edge.

func (*PrincipalMutation) ResetPrincipalTokens added in v0.2.0

func (m *PrincipalMutation) ResetPrincipalTokens()

ResetPrincipalTokens resets all changes to the "principal_tokens" edge.

func (*PrincipalMutation) ResetSentInvites added in v0.2.0

func (m *PrincipalMutation) ResetSentInvites()

ResetSentInvites resets all changes to the "sent_invites" edge.

func (*PrincipalMutation) ResetServicePrincipal added in v0.2.0

func (m *PrincipalMutation) ResetServicePrincipal()

ResetServicePrincipal resets all changes to the "service_principal" edge.

func (*PrincipalMutation) ResetType added in v0.2.0

func (m *PrincipalMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*PrincipalMutation) ResetUpdatedAt added in v0.2.0

func (m *PrincipalMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*PrincipalMutation) SentInvitesCleared added in v0.2.0

func (m *PrincipalMutation) SentInvitesCleared() bool

SentInvitesCleared reports if the "sent_invites" edge to the Invite entity was cleared.

func (*PrincipalMutation) SentInvitesIDs added in v0.2.0

func (m *PrincipalMutation) SentInvitesIDs() (ids []uuid.UUID)

SentInvitesIDs returns the "sent_invites" edge IDs in the mutation.

func (*PrincipalMutation) ServicePrincipalCleared added in v0.2.0

func (m *PrincipalMutation) ServicePrincipalCleared() bool

ServicePrincipalCleared reports if the "service_principal" edge to the ServicePrincipal entity was cleared.

func (*PrincipalMutation) ServicePrincipalID added in v0.2.0

func (m *PrincipalMutation) ServicePrincipalID() (id uuid.UUID, exists bool)

ServicePrincipalID returns the "service_principal" edge ID in the mutation.

func (*PrincipalMutation) ServicePrincipalIDs added in v0.2.0

func (m *PrincipalMutation) ServicePrincipalIDs() (ids []uuid.UUID)

ServicePrincipalIDs returns the "service_principal" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ServicePrincipalID instead. It exists only for internal usage by the builders.

func (*PrincipalMutation) SetActive added in v0.2.0

func (m *PrincipalMutation) SetActive(b bool)

SetActive sets the "active" field.

func (*PrincipalMutation) SetAgentID added in v0.2.0

func (m *PrincipalMutation) SetAgentID(id uuid.UUID)

SetAgentID sets the "agent" edge to the Agent entity by id.

func (*PrincipalMutation) SetAllowedScopes added in v0.2.0

func (m *PrincipalMutation) SetAllowedScopes(s []string)

SetAllowedScopes sets the "allowed_scopes" field.

func (*PrincipalMutation) SetApplicationID added in v0.2.0

func (m *PrincipalMutation) SetApplicationID(id uuid.UUID)

SetApplicationID sets the "application" edge to the Application entity by id.

func (*PrincipalMutation) SetCapabilities added in v0.2.0

func (m *PrincipalMutation) SetCapabilities(value map[string]bool)

SetCapabilities sets the "capabilities" field.

func (*PrincipalMutation) SetCreatedAt added in v0.2.0

func (m *PrincipalMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*PrincipalMutation) SetDisplayName added in v0.2.0

func (m *PrincipalMutation) SetDisplayName(s string)

SetDisplayName sets the "display_name" field.

func (*PrincipalMutation) SetField added in v0.2.0

func (m *PrincipalMutation) 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 (*PrincipalMutation) SetHumanID added in v0.2.0

func (m *PrincipalMutation) SetHumanID(id uuid.UUID)

SetHumanID sets the "human" edge to the Human entity by id.

func (*PrincipalMutation) SetID added in v0.2.0

func (m *PrincipalMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Principal entities.

func (*PrincipalMutation) SetIdentifier added in v0.2.0

func (m *PrincipalMutation) SetIdentifier(s string)

SetIdentifier sets the "identifier" field.

func (*PrincipalMutation) SetMetadata added in v0.2.0

func (m *PrincipalMutation) SetMetadata(value map[string]interface{})

SetMetadata sets the "metadata" field.

func (*PrincipalMutation) SetOp added in v0.2.0

func (m *PrincipalMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*PrincipalMutation) SetOrganizationID added in v0.2.0

func (m *PrincipalMutation) SetOrganizationID(u uuid.UUID)

SetOrganizationID sets the "organization_id" field.

func (*PrincipalMutation) SetServicePrincipalID added in v0.2.0

func (m *PrincipalMutation) SetServicePrincipalID(id uuid.UUID)

SetServicePrincipalID sets the "service_principal" edge to the ServicePrincipal entity by id.

func (*PrincipalMutation) SetType added in v0.2.0

func (m *PrincipalMutation) SetType(pr principal.Type)

SetType sets the "type" field.

func (*PrincipalMutation) SetUpdatedAt added in v0.2.0

func (m *PrincipalMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (PrincipalMutation) Tx added in v0.2.0

func (m PrincipalMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*PrincipalMutation) Type added in v0.2.0

func (m *PrincipalMutation) Type() string

Type returns the node type of this mutation (Principal).

func (*PrincipalMutation) UpdatedAt added in v0.2.0

func (m *PrincipalMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*PrincipalMutation) Where added in v0.2.0

func (m *PrincipalMutation) Where(ps ...predicate.Principal)

Where appends a list predicates to the PrincipalMutation builder.

func (*PrincipalMutation) WhereP added in v0.2.0

func (m *PrincipalMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the PrincipalMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type PrincipalQuery added in v0.2.0

type PrincipalQuery struct {
	// contains filtered or unexported fields
}

PrincipalQuery is the builder for querying Principal entities.

func (*PrincipalQuery) Aggregate added in v0.2.0

func (_q *PrincipalQuery) Aggregate(fns ...AggregateFunc) *PrincipalSelect

Aggregate returns a PrincipalSelect configured with the given aggregations.

func (*PrincipalQuery) All added in v0.2.0

func (_q *PrincipalQuery) All(ctx context.Context) ([]*Principal, error)

All executes the query and returns a list of Principals.

func (*PrincipalQuery) AllX added in v0.2.0

func (_q *PrincipalQuery) AllX(ctx context.Context) []*Principal

AllX is like All, but panics if an error occurs.

func (*PrincipalQuery) Clone added in v0.2.0

func (_q *PrincipalQuery) Clone() *PrincipalQuery

Clone returns a duplicate of the PrincipalQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*PrincipalQuery) Count added in v0.2.0

func (_q *PrincipalQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PrincipalQuery) CountX added in v0.2.0

func (_q *PrincipalQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PrincipalQuery) Exist added in v0.2.0

func (_q *PrincipalQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PrincipalQuery) ExistX added in v0.2.0

func (_q *PrincipalQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PrincipalQuery) Filter added in v0.2.0

func (_q *PrincipalQuery) Filter() *PrincipalFilter

Filter returns a Filter implementation to apply filters on the PrincipalQuery builder.

func (*PrincipalQuery) First added in v0.2.0

func (_q *PrincipalQuery) First(ctx context.Context) (*Principal, error)

First returns the first Principal entity from the query. Returns a *NotFoundError when no Principal was found.

func (*PrincipalQuery) FirstID added in v0.2.0

func (_q *PrincipalQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Principal ID from the query. Returns a *NotFoundError when no Principal ID was found.

func (*PrincipalQuery) FirstIDX added in v0.2.0

func (_q *PrincipalQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*PrincipalQuery) FirstX added in v0.2.0

func (_q *PrincipalQuery) FirstX(ctx context.Context) *Principal

FirstX is like First, but panics if an error occurs.

func (*PrincipalQuery) GroupBy added in v0.2.0

func (_q *PrincipalQuery) GroupBy(field string, fields ...string) *PrincipalGroupBy

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.Principal.Query().
	GroupBy(principal.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PrincipalQuery) IDs added in v0.2.0

func (_q *PrincipalQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of Principal IDs.

func (*PrincipalQuery) IDsX added in v0.2.0

func (_q *PrincipalQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*PrincipalQuery) Limit added in v0.2.0

func (_q *PrincipalQuery) Limit(limit int) *PrincipalQuery

Limit the number of records to be returned by this query.

func (*PrincipalQuery) Offset added in v0.2.0

func (_q *PrincipalQuery) Offset(offset int) *PrincipalQuery

Offset to start from.

func (*PrincipalQuery) Only added in v0.2.0

func (_q *PrincipalQuery) Only(ctx context.Context) (*Principal, error)

Only returns a single Principal entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Principal entity is found. Returns a *NotFoundError when no Principal entities are found.

func (*PrincipalQuery) OnlyID added in v0.2.0

func (_q *PrincipalQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Principal ID in the query. Returns a *NotSingularError when more than one Principal ID is found. Returns a *NotFoundError when no entities are found.

func (*PrincipalQuery) OnlyIDX added in v0.2.0

func (_q *PrincipalQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*PrincipalQuery) OnlyX added in v0.2.0

func (_q *PrincipalQuery) OnlyX(ctx context.Context) *Principal

OnlyX is like Only, but panics if an error occurs.

func (*PrincipalQuery) Order added in v0.2.0

Order specifies how the records should be ordered.

func (*PrincipalQuery) QueryAgent added in v0.2.0

func (_q *PrincipalQuery) QueryAgent() *AgentQuery

QueryAgent chains the current query on the "agent" edge.

func (*PrincipalQuery) QueryApplication added in v0.2.0

func (_q *PrincipalQuery) QueryApplication() *ApplicationQuery

QueryApplication chains the current query on the "application" edge.

func (*PrincipalQuery) QueryCredentials added in v0.2.0

func (_q *PrincipalQuery) QueryCredentials() *CredentialQuery

QueryCredentials chains the current query on the "credentials" edge.

func (*PrincipalQuery) QueryHuman added in v0.2.0

func (_q *PrincipalQuery) QueryHuman() *HumanQuery

QueryHuman chains the current query on the "human" edge.

func (*PrincipalQuery) QueryOrganization added in v0.2.0

func (_q *PrincipalQuery) QueryOrganization() *OrganizationQuery

QueryOrganization chains the current query on the "organization" edge.

func (*PrincipalQuery) QueryOwnedOrganizations added in v0.2.0

func (_q *PrincipalQuery) QueryOwnedOrganizations() *OrganizationQuery

QueryOwnedOrganizations chains the current query on the "owned_organizations" edge.

func (*PrincipalQuery) QueryPrincipalMemberships added in v0.2.0

func (_q *PrincipalQuery) QueryPrincipalMemberships() *PrincipalMembershipQuery

QueryPrincipalMemberships chains the current query on the "principal_memberships" edge.

func (*PrincipalQuery) QueryPrincipalTokens added in v0.2.0

func (_q *PrincipalQuery) QueryPrincipalTokens() *PrincipalTokenQuery

QueryPrincipalTokens chains the current query on the "principal_tokens" edge.

func (*PrincipalQuery) QuerySentInvites added in v0.2.0

func (_q *PrincipalQuery) QuerySentInvites() *InviteQuery

QuerySentInvites chains the current query on the "sent_invites" edge.

func (*PrincipalQuery) QueryServicePrincipal added in v0.2.0

func (_q *PrincipalQuery) QueryServicePrincipal() *ServicePrincipalQuery

QueryServicePrincipal chains the current query on the "service_principal" edge.

func (*PrincipalQuery) Select added in v0.2.0

func (_q *PrincipalQuery) Select(fields ...string) *PrincipalSelect

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.Principal.Query().
	Select(principal.FieldCreatedAt).
	Scan(ctx, &v)

func (*PrincipalQuery) Unique added in v0.2.0

func (_q *PrincipalQuery) Unique(unique bool) *PrincipalQuery

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 (*PrincipalQuery) Where added in v0.2.0

Where adds a new predicate for the PrincipalQuery builder.

func (*PrincipalQuery) WithAgent added in v0.2.0

func (_q *PrincipalQuery) WithAgent(opts ...func(*AgentQuery)) *PrincipalQuery

WithAgent tells the query-builder to eager-load the nodes that are connected to the "agent" edge. The optional arguments are used to configure the query builder of the edge.

func (*PrincipalQuery) WithApplication added in v0.2.0

func (_q *PrincipalQuery) WithApplication(opts ...func(*ApplicationQuery)) *PrincipalQuery

WithApplication tells the query-builder to eager-load the nodes that are connected to the "application" edge. The optional arguments are used to configure the query builder of the edge.

func (*PrincipalQuery) WithCredentials added in v0.2.0

func (_q *PrincipalQuery) WithCredentials(opts ...func(*CredentialQuery)) *PrincipalQuery

WithCredentials tells the query-builder to eager-load the nodes that are connected to the "credentials" edge. The optional arguments are used to configure the query builder of the edge.

func (*PrincipalQuery) WithHuman added in v0.2.0

func (_q *PrincipalQuery) WithHuman(opts ...func(*HumanQuery)) *PrincipalQuery

WithHuman tells the query-builder to eager-load the nodes that are connected to the "human" edge. The optional arguments are used to configure the query builder of the edge.

func (*PrincipalQuery) WithOrganization added in v0.2.0

func (_q *PrincipalQuery) WithOrganization(opts ...func(*OrganizationQuery)) *PrincipalQuery

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 (*PrincipalQuery) WithOwnedOrganizations added in v0.2.0

func (_q *PrincipalQuery) WithOwnedOrganizations(opts ...func(*OrganizationQuery)) *PrincipalQuery

WithOwnedOrganizations tells the query-builder to eager-load the nodes that are connected to the "owned_organizations" edge. The optional arguments are used to configure the query builder of the edge.

func (*PrincipalQuery) WithPrincipalMemberships added in v0.2.0

func (_q *PrincipalQuery) WithPrincipalMemberships(opts ...func(*PrincipalMembershipQuery)) *PrincipalQuery

WithPrincipalMemberships tells the query-builder to eager-load the nodes that are connected to the "principal_memberships" edge. The optional arguments are used to configure the query builder of the edge.

func (*PrincipalQuery) WithPrincipalTokens added in v0.2.0

func (_q *PrincipalQuery) WithPrincipalTokens(opts ...func(*PrincipalTokenQuery)) *PrincipalQuery

WithPrincipalTokens tells the query-builder to eager-load the nodes that are connected to the "principal_tokens" edge. The optional arguments are used to configure the query builder of the edge.

func (*PrincipalQuery) WithSentInvites added in v0.2.0

func (_q *PrincipalQuery) WithSentInvites(opts ...func(*InviteQuery)) *PrincipalQuery

WithSentInvites tells the query-builder to eager-load the nodes that are connected to the "sent_invites" edge. The optional arguments are used to configure the query builder of the edge.

func (*PrincipalQuery) WithServicePrincipal added in v0.2.0

func (_q *PrincipalQuery) WithServicePrincipal(opts ...func(*ServicePrincipalQuery)) *PrincipalQuery

WithServicePrincipal tells the query-builder to eager-load the nodes that are connected to the "service_principal" edge. The optional arguments are used to configure the query builder of the edge.

type PrincipalSelect added in v0.2.0

type PrincipalSelect struct {
	*PrincipalQuery
	// contains filtered or unexported fields
}

PrincipalSelect is the builder for selecting fields of Principal entities.

func (*PrincipalSelect) Aggregate added in v0.2.0

func (_s *PrincipalSelect) Aggregate(fns ...AggregateFunc) *PrincipalSelect

Aggregate adds the given aggregation functions to the selector query.

func (*PrincipalSelect) Bool added in v0.2.0

func (s *PrincipalSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PrincipalSelect) BoolX added in v0.2.0

func (s *PrincipalSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PrincipalSelect) Bools added in v0.2.0

func (s *PrincipalSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PrincipalSelect) BoolsX added in v0.2.0

func (s *PrincipalSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PrincipalSelect) Float64 added in v0.2.0

func (s *PrincipalSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PrincipalSelect) Float64X added in v0.2.0

func (s *PrincipalSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PrincipalSelect) Float64s added in v0.2.0

func (s *PrincipalSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PrincipalSelect) Float64sX added in v0.2.0

func (s *PrincipalSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PrincipalSelect) Int added in v0.2.0

func (s *PrincipalSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PrincipalSelect) IntX added in v0.2.0

func (s *PrincipalSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PrincipalSelect) Ints added in v0.2.0

func (s *PrincipalSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PrincipalSelect) IntsX added in v0.2.0

func (s *PrincipalSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PrincipalSelect) Scan added in v0.2.0

func (_s *PrincipalSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PrincipalSelect) ScanX added in v0.2.0

func (s *PrincipalSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PrincipalSelect) String added in v0.2.0

func (s *PrincipalSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PrincipalSelect) StringX added in v0.2.0

func (s *PrincipalSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PrincipalSelect) Strings added in v0.2.0

func (s *PrincipalSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PrincipalSelect) StringsX added in v0.2.0

func (s *PrincipalSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PrincipalToken added in v0.2.0

type PrincipalToken struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Principal this token represents
	PrincipalID uuid.UUID `json:"principal_id,omitempty"`
	// Type of the principal (denormalized for fast lookup)
	PrincipalType principaltoken.PrincipalType `json:"principal_type,omitempty"`
	// Application principal that issued this token
	IssuedByAppID *uuid.UUID `json:"issued_by_app_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"`
	// Parent token ID (for delegated tokens)
	ParentTokenID *uuid.UUID `json:"parent_token_id,omitempty"`
	// Granted scopes
	Scopes []string `json:"scopes,omitempty"`
	// Token audience
	Audience []string `json:"audience,omitempty"`
	// Capabilities granted to this token
	Capabilities map[string]bool `json:"capabilities,omitempty"`
	// Chain of principal IDs in delegation (root to current)
	DelegationChain []string `json:"delegation_chain,omitempty"`
	// DPoP JWK thumbprint for proof-of-possession
	DpopJkt string `json:"dpop_jkt,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 PrincipalTokenQuery when eager-loading is set.
	Edges PrincipalTokenEdges `json:"edges"`
	// contains filtered or unexported fields
}

PrincipalToken is the model entity for the PrincipalToken schema.

func (*PrincipalToken) QueryChildTokens added in v0.2.0

func (_m *PrincipalToken) QueryChildTokens() *PrincipalTokenQuery

QueryChildTokens queries the "child_tokens" edge of the PrincipalToken entity.

func (*PrincipalToken) QueryIssuedByApp added in v0.2.0

func (_m *PrincipalToken) QueryIssuedByApp() *ApplicationQuery

QueryIssuedByApp queries the "issued_by_app" edge of the PrincipalToken entity.

func (*PrincipalToken) QueryParentToken added in v0.2.0

func (_m *PrincipalToken) QueryParentToken() *PrincipalTokenQuery

QueryParentToken queries the "parent_token" edge of the PrincipalToken entity.

func (*PrincipalToken) QueryPrincipal added in v0.2.0

func (_m *PrincipalToken) QueryPrincipal() *PrincipalQuery

QueryPrincipal queries the "principal" edge of the PrincipalToken entity.

func (*PrincipalToken) String added in v0.2.0

func (_m *PrincipalToken) String() string

String implements the fmt.Stringer.

func (*PrincipalToken) Unwrap added in v0.2.0

func (_m *PrincipalToken) Unwrap() *PrincipalToken

Unwrap unwraps the PrincipalToken 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 (*PrincipalToken) Update added in v0.2.0

Update returns a builder for updating this PrincipalToken. Note that you need to call PrincipalToken.Unwrap() before calling this method if this PrincipalToken was returned from a transaction, and the transaction was committed or rolled back.

func (*PrincipalToken) Value added in v0.2.0

func (_m *PrincipalToken) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the PrincipalToken. This includes values selected through modifiers, order, etc.

type PrincipalTokenClient added in v0.2.0

type PrincipalTokenClient struct {
	// contains filtered or unexported fields
}

PrincipalTokenClient is a client for the PrincipalToken schema.

func NewPrincipalTokenClient added in v0.2.0

func NewPrincipalTokenClient(c config) *PrincipalTokenClient

NewPrincipalTokenClient returns a client for the PrincipalToken from the given config.

func (*PrincipalTokenClient) Create added in v0.2.0

Create returns a builder for creating a PrincipalToken entity.

func (*PrincipalTokenClient) CreateBulk added in v0.2.0

CreateBulk returns a builder for creating a bulk of PrincipalToken entities.

func (*PrincipalTokenClient) Delete added in v0.2.0

Delete returns a delete builder for PrincipalToken.

func (*PrincipalTokenClient) DeleteOne added in v0.2.0

DeleteOne returns a builder for deleting the given entity.

func (*PrincipalTokenClient) DeleteOneID added in v0.2.0

DeleteOneID returns a builder for deleting the given entity by its id.

func (*PrincipalTokenClient) Get added in v0.2.0

Get returns a PrincipalToken entity by its id.

func (*PrincipalTokenClient) GetX added in v0.2.0

GetX is like Get, but panics if an error occurs.

func (*PrincipalTokenClient) Hooks added in v0.2.0

func (c *PrincipalTokenClient) Hooks() []Hook

Hooks returns the client hooks.

func (*PrincipalTokenClient) Intercept added in v0.2.0

func (c *PrincipalTokenClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `principaltoken.Intercept(f(g(h())))`.

func (*PrincipalTokenClient) Interceptors added in v0.2.0

func (c *PrincipalTokenClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*PrincipalTokenClient) MapCreateBulk added in v0.2.0

func (c *PrincipalTokenClient) MapCreateBulk(slice any, setFunc func(*PrincipalTokenCreate, int)) *PrincipalTokenCreateBulk

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 (*PrincipalTokenClient) Query added in v0.2.0

Query returns a query builder for PrincipalToken.

func (*PrincipalTokenClient) QueryChildTokens added in v0.2.0

func (c *PrincipalTokenClient) QueryChildTokens(_m *PrincipalToken) *PrincipalTokenQuery

QueryChildTokens queries the child_tokens edge of a PrincipalToken.

func (*PrincipalTokenClient) QueryIssuedByApp added in v0.2.0

func (c *PrincipalTokenClient) QueryIssuedByApp(_m *PrincipalToken) *ApplicationQuery

QueryIssuedByApp queries the issued_by_app edge of a PrincipalToken.

func (*PrincipalTokenClient) QueryParentToken added in v0.2.0

func (c *PrincipalTokenClient) QueryParentToken(_m *PrincipalToken) *PrincipalTokenQuery

QueryParentToken queries the parent_token edge of a PrincipalToken.

func (*PrincipalTokenClient) QueryPrincipal added in v0.2.0

func (c *PrincipalTokenClient) QueryPrincipal(_m *PrincipalToken) *PrincipalQuery

QueryPrincipal queries the principal edge of a PrincipalToken.

func (*PrincipalTokenClient) Update added in v0.2.0

Update returns an update builder for PrincipalToken.

func (*PrincipalTokenClient) UpdateOne added in v0.2.0

UpdateOne returns an update builder for the given entity.

func (*PrincipalTokenClient) UpdateOneID added in v0.2.0

UpdateOneID returns an update builder for the given id.

func (*PrincipalTokenClient) Use added in v0.2.0

func (c *PrincipalTokenClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `principaltoken.Hooks(f(g(h())))`.

type PrincipalTokenCreate added in v0.2.0

type PrincipalTokenCreate struct {
	// contains filtered or unexported fields
}

PrincipalTokenCreate is the builder for creating a PrincipalToken entity.

func (*PrincipalTokenCreate) AddChildTokenIDs added in v0.2.0

func (_c *PrincipalTokenCreate) AddChildTokenIDs(ids ...uuid.UUID) *PrincipalTokenCreate

AddChildTokenIDs adds the "child_tokens" edge to the PrincipalToken entity by IDs.

func (*PrincipalTokenCreate) AddChildTokens added in v0.2.0

func (_c *PrincipalTokenCreate) AddChildTokens(v ...*PrincipalToken) *PrincipalTokenCreate

AddChildTokens adds the "child_tokens" edges to the PrincipalToken entity.

func (*PrincipalTokenCreate) Exec added in v0.2.0

func (_c *PrincipalTokenCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PrincipalTokenCreate) ExecX added in v0.2.0

func (_c *PrincipalTokenCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PrincipalTokenCreate) Mutation added in v0.2.0

Mutation returns the PrincipalTokenMutation object of the builder.

func (*PrincipalTokenCreate) OnConflict added in v0.2.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.PrincipalToken.Create().
	SetPrincipalID(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.PrincipalTokenUpsert) {
		SetPrincipalID(v+v).
	}).
	Exec(ctx)

func (*PrincipalTokenCreate) OnConflictColumns added in v0.2.0

func (_c *PrincipalTokenCreate) OnConflictColumns(columns ...string) *PrincipalTokenUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.PrincipalToken.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PrincipalTokenCreate) Save added in v0.2.0

Save creates the PrincipalToken in the database.

func (*PrincipalTokenCreate) SaveX added in v0.2.0

SaveX calls Save and panics if Save returns an error.

func (*PrincipalTokenCreate) SetAccessExpiresAt added in v0.2.0

func (_c *PrincipalTokenCreate) SetAccessExpiresAt(v time.Time) *PrincipalTokenCreate

SetAccessExpiresAt sets the "access_expires_at" field.

func (*PrincipalTokenCreate) SetAccessTokenSignature added in v0.2.0

func (_c *PrincipalTokenCreate) SetAccessTokenSignature(v string) *PrincipalTokenCreate

SetAccessTokenSignature sets the "access_token_signature" field.

func (*PrincipalTokenCreate) SetAudience added in v0.2.0

func (_c *PrincipalTokenCreate) SetAudience(v []string) *PrincipalTokenCreate

SetAudience sets the "audience" field.

func (*PrincipalTokenCreate) SetCapabilities added in v0.2.0

func (_c *PrincipalTokenCreate) SetCapabilities(v map[string]bool) *PrincipalTokenCreate

SetCapabilities sets the "capabilities" field.

func (*PrincipalTokenCreate) SetClientIP added in v0.2.0

func (_c *PrincipalTokenCreate) SetClientIP(v string) *PrincipalTokenCreate

SetClientIP sets the "client_ip" field.

func (*PrincipalTokenCreate) SetCreatedAt added in v0.2.0

func (_c *PrincipalTokenCreate) SetCreatedAt(v time.Time) *PrincipalTokenCreate

SetCreatedAt sets the "created_at" field.

func (*PrincipalTokenCreate) SetDelegationChain added in v0.2.0

func (_c *PrincipalTokenCreate) SetDelegationChain(v []string) *PrincipalTokenCreate

SetDelegationChain sets the "delegation_chain" field.

func (*PrincipalTokenCreate) SetDpopJkt added in v0.2.0

SetDpopJkt sets the "dpop_jkt" field.

func (*PrincipalTokenCreate) SetFamilyID added in v0.2.0

func (_c *PrincipalTokenCreate) SetFamilyID(v uuid.UUID) *PrincipalTokenCreate

SetFamilyID sets the "family_id" field.

func (*PrincipalTokenCreate) SetID added in v0.2.0

SetID sets the "id" field.

func (*PrincipalTokenCreate) SetIssuedByApp added in v0.2.0

func (_c *PrincipalTokenCreate) SetIssuedByApp(v *Application) *PrincipalTokenCreate

SetIssuedByApp sets the "issued_by_app" edge to the Application entity.

func (*PrincipalTokenCreate) SetIssuedByAppID added in v0.2.0

func (_c *PrincipalTokenCreate) SetIssuedByAppID(v uuid.UUID) *PrincipalTokenCreate

SetIssuedByAppID sets the "issued_by_app_id" field.

func (*PrincipalTokenCreate) SetLastUsedAt added in v0.2.0

func (_c *PrincipalTokenCreate) SetLastUsedAt(v time.Time) *PrincipalTokenCreate

SetLastUsedAt sets the "last_used_at" field.

func (*PrincipalTokenCreate) SetNillableClientIP added in v0.2.0

func (_c *PrincipalTokenCreate) SetNillableClientIP(v *string) *PrincipalTokenCreate

SetNillableClientIP sets the "client_ip" field if the given value is not nil.

func (*PrincipalTokenCreate) SetNillableCreatedAt added in v0.2.0

func (_c *PrincipalTokenCreate) SetNillableCreatedAt(v *time.Time) *PrincipalTokenCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*PrincipalTokenCreate) SetNillableDpopJkt added in v0.2.0

func (_c *PrincipalTokenCreate) SetNillableDpopJkt(v *string) *PrincipalTokenCreate

SetNillableDpopJkt sets the "dpop_jkt" field if the given value is not nil.

func (*PrincipalTokenCreate) SetNillableFamilyID added in v0.2.0

func (_c *PrincipalTokenCreate) SetNillableFamilyID(v *uuid.UUID) *PrincipalTokenCreate

SetNillableFamilyID sets the "family_id" field if the given value is not nil.

func (*PrincipalTokenCreate) SetNillableID added in v0.2.0

func (_c *PrincipalTokenCreate) SetNillableID(v *uuid.UUID) *PrincipalTokenCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*PrincipalTokenCreate) SetNillableIssuedByAppID added in v0.2.0

func (_c *PrincipalTokenCreate) SetNillableIssuedByAppID(v *uuid.UUID) *PrincipalTokenCreate

SetNillableIssuedByAppID sets the "issued_by_app_id" field if the given value is not nil.

func (*PrincipalTokenCreate) SetNillableLastUsedAt added in v0.2.0

func (_c *PrincipalTokenCreate) SetNillableLastUsedAt(v *time.Time) *PrincipalTokenCreate

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*PrincipalTokenCreate) SetNillableParentTokenID added in v0.2.0

func (_c *PrincipalTokenCreate) SetNillableParentTokenID(v *uuid.UUID) *PrincipalTokenCreate

SetNillableParentTokenID sets the "parent_token_id" field if the given value is not nil.

func (*PrincipalTokenCreate) SetNillableRefreshExpiresAt added in v0.2.0

func (_c *PrincipalTokenCreate) SetNillableRefreshExpiresAt(v *time.Time) *PrincipalTokenCreate

SetNillableRefreshExpiresAt sets the "refresh_expires_at" field if the given value is not nil.

func (*PrincipalTokenCreate) SetNillableRefreshTokenSignature added in v0.2.0

func (_c *PrincipalTokenCreate) SetNillableRefreshTokenSignature(v *string) *PrincipalTokenCreate

SetNillableRefreshTokenSignature sets the "refresh_token_signature" field if the given value is not nil.

func (*PrincipalTokenCreate) SetNillableRequestData added in v0.2.0

func (_c *PrincipalTokenCreate) SetNillableRequestData(v *string) *PrincipalTokenCreate

SetNillableRequestData sets the "request_data" field if the given value is not nil.

func (*PrincipalTokenCreate) SetNillableRevoked added in v0.2.0

func (_c *PrincipalTokenCreate) SetNillableRevoked(v *bool) *PrincipalTokenCreate

SetNillableRevoked sets the "revoked" field if the given value is not nil.

func (*PrincipalTokenCreate) SetNillableRevokedAt added in v0.2.0

func (_c *PrincipalTokenCreate) SetNillableRevokedAt(v *time.Time) *PrincipalTokenCreate

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*PrincipalTokenCreate) SetNillableRevokedReason added in v0.2.0

func (_c *PrincipalTokenCreate) SetNillableRevokedReason(v *string) *PrincipalTokenCreate

SetNillableRevokedReason sets the "revoked_reason" field if the given value is not nil.

func (*PrincipalTokenCreate) SetNillableSessionID added in v0.2.0

func (_c *PrincipalTokenCreate) SetNillableSessionID(v *string) *PrincipalTokenCreate

SetNillableSessionID sets the "session_id" field if the given value is not nil.

func (*PrincipalTokenCreate) SetNillableUserAgent added in v0.2.0

func (_c *PrincipalTokenCreate) SetNillableUserAgent(v *string) *PrincipalTokenCreate

SetNillableUserAgent sets the "user_agent" field if the given value is not nil.

func (*PrincipalTokenCreate) SetParentToken added in v0.2.0

SetParentToken sets the "parent_token" edge to the PrincipalToken entity.

func (*PrincipalTokenCreate) SetParentTokenID added in v0.2.0

func (_c *PrincipalTokenCreate) SetParentTokenID(v uuid.UUID) *PrincipalTokenCreate

SetParentTokenID sets the "parent_token_id" field.

func (*PrincipalTokenCreate) SetPrincipal added in v0.2.0

func (_c *PrincipalTokenCreate) SetPrincipal(v *Principal) *PrincipalTokenCreate

SetPrincipal sets the "principal" edge to the Principal entity.

func (*PrincipalTokenCreate) SetPrincipalID added in v0.2.0

func (_c *PrincipalTokenCreate) SetPrincipalID(v uuid.UUID) *PrincipalTokenCreate

SetPrincipalID sets the "principal_id" field.

func (*PrincipalTokenCreate) SetPrincipalType added in v0.2.0

SetPrincipalType sets the "principal_type" field.

func (*PrincipalTokenCreate) SetRefreshExpiresAt added in v0.2.0

func (_c *PrincipalTokenCreate) SetRefreshExpiresAt(v time.Time) *PrincipalTokenCreate

SetRefreshExpiresAt sets the "refresh_expires_at" field.

func (*PrincipalTokenCreate) SetRefreshTokenSignature added in v0.2.0

func (_c *PrincipalTokenCreate) SetRefreshTokenSignature(v string) *PrincipalTokenCreate

SetRefreshTokenSignature sets the "refresh_token_signature" field.

func (*PrincipalTokenCreate) SetRequestData added in v0.2.0

func (_c *PrincipalTokenCreate) SetRequestData(v string) *PrincipalTokenCreate

SetRequestData sets the "request_data" field.

func (*PrincipalTokenCreate) SetRevoked added in v0.2.0

func (_c *PrincipalTokenCreate) SetRevoked(v bool) *PrincipalTokenCreate

SetRevoked sets the "revoked" field.

func (*PrincipalTokenCreate) SetRevokedAt added in v0.2.0

func (_c *PrincipalTokenCreate) SetRevokedAt(v time.Time) *PrincipalTokenCreate

SetRevokedAt sets the "revoked_at" field.

func (*PrincipalTokenCreate) SetRevokedReason added in v0.2.0

func (_c *PrincipalTokenCreate) SetRevokedReason(v string) *PrincipalTokenCreate

SetRevokedReason sets the "revoked_reason" field.

func (*PrincipalTokenCreate) SetScopes added in v0.2.0

func (_c *PrincipalTokenCreate) SetScopes(v []string) *PrincipalTokenCreate

SetScopes sets the "scopes" field.

func (*PrincipalTokenCreate) SetSessionID added in v0.2.0

func (_c *PrincipalTokenCreate) SetSessionID(v string) *PrincipalTokenCreate

SetSessionID sets the "session_id" field.

func (*PrincipalTokenCreate) SetUserAgent added in v0.2.0

func (_c *PrincipalTokenCreate) SetUserAgent(v string) *PrincipalTokenCreate

SetUserAgent sets the "user_agent" field.

type PrincipalTokenCreateBulk added in v0.2.0

type PrincipalTokenCreateBulk struct {
	// contains filtered or unexported fields
}

PrincipalTokenCreateBulk is the builder for creating many PrincipalToken entities in bulk.

func (*PrincipalTokenCreateBulk) Exec added in v0.2.0

Exec executes the query.

func (*PrincipalTokenCreateBulk) ExecX added in v0.2.0

func (_c *PrincipalTokenCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PrincipalTokenCreateBulk) OnConflict added in v0.2.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.PrincipalToken.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.PrincipalTokenUpsert) {
		SetPrincipalID(v+v).
	}).
	Exec(ctx)

func (*PrincipalTokenCreateBulk) OnConflictColumns added in v0.2.0

func (_c *PrincipalTokenCreateBulk) OnConflictColumns(columns ...string) *PrincipalTokenUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.PrincipalToken.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PrincipalTokenCreateBulk) Save added in v0.2.0

Save creates the PrincipalToken entities in the database.

func (*PrincipalTokenCreateBulk) SaveX added in v0.2.0

SaveX is like Save, but panics if an error occurs.

type PrincipalTokenDelete added in v0.2.0

type PrincipalTokenDelete struct {
	// contains filtered or unexported fields
}

PrincipalTokenDelete is the builder for deleting a PrincipalToken entity.

func (*PrincipalTokenDelete) Exec added in v0.2.0

func (_d *PrincipalTokenDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*PrincipalTokenDelete) ExecX added in v0.2.0

func (_d *PrincipalTokenDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*PrincipalTokenDelete) Where added in v0.2.0

Where appends a list predicates to the PrincipalTokenDelete builder.

type PrincipalTokenDeleteOne added in v0.2.0

type PrincipalTokenDeleteOne struct {
	// contains filtered or unexported fields
}

PrincipalTokenDeleteOne is the builder for deleting a single PrincipalToken entity.

func (*PrincipalTokenDeleteOne) Exec added in v0.2.0

Exec executes the deletion query.

func (*PrincipalTokenDeleteOne) ExecX added in v0.2.0

func (_d *PrincipalTokenDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PrincipalTokenDeleteOne) Where added in v0.2.0

Where appends a list predicates to the PrincipalTokenDelete builder.

type PrincipalTokenEdges added in v0.2.0

type PrincipalTokenEdges struct {
	// Principal holds the value of the principal edge.
	Principal *Principal `json:"principal,omitempty"`
	// IssuedByApp holds the value of the issued_by_app edge.
	IssuedByApp *Application `json:"issued_by_app,omitempty"`
	// ParentToken holds the value of the parent_token edge.
	ParentToken *PrincipalToken `json:"parent_token,omitempty"`
	// ChildTokens holds the value of the child_tokens edge.
	ChildTokens []*PrincipalToken `json:"child_tokens,omitempty"`
	// contains filtered or unexported fields
}

PrincipalTokenEdges holds the relations/edges for other nodes in the graph.

func (PrincipalTokenEdges) ChildTokensOrErr added in v0.2.0

func (e PrincipalTokenEdges) ChildTokensOrErr() ([]*PrincipalToken, error)

ChildTokensOrErr returns the ChildTokens value or an error if the edge was not loaded in eager-loading.

func (PrincipalTokenEdges) IssuedByAppOrErr added in v0.2.0

func (e PrincipalTokenEdges) IssuedByAppOrErr() (*Application, error)

IssuedByAppOrErr returns the IssuedByApp value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (PrincipalTokenEdges) ParentTokenOrErr added in v0.2.0

func (e PrincipalTokenEdges) ParentTokenOrErr() (*PrincipalToken, error)

ParentTokenOrErr returns the ParentToken value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (PrincipalTokenEdges) PrincipalOrErr added in v0.2.0

func (e PrincipalTokenEdges) PrincipalOrErr() (*Principal, error)

PrincipalOrErr returns the Principal value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type PrincipalTokenFilter added in v0.2.0

type PrincipalTokenFilter struct {
	// contains filtered or unexported fields
}

PrincipalTokenFilter provides a generic filtering capability at runtime for PrincipalTokenQuery.

func (*PrincipalTokenFilter) Where added in v0.2.0

func (f *PrincipalTokenFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*PrincipalTokenFilter) WhereAccessExpiresAt added in v0.2.0

func (f *PrincipalTokenFilter) WhereAccessExpiresAt(p entql.TimeP)

WhereAccessExpiresAt applies the entql time.Time predicate on the access_expires_at field.

func (*PrincipalTokenFilter) WhereAccessTokenSignature added in v0.2.0

func (f *PrincipalTokenFilter) WhereAccessTokenSignature(p entql.StringP)

WhereAccessTokenSignature applies the entql string predicate on the access_token_signature field.

func (*PrincipalTokenFilter) WhereAudience added in v0.2.0

func (f *PrincipalTokenFilter) WhereAudience(p entql.BytesP)

WhereAudience applies the entql json.RawMessage predicate on the audience field.

func (*PrincipalTokenFilter) WhereCapabilities added in v0.2.0

func (f *PrincipalTokenFilter) WhereCapabilities(p entql.BytesP)

WhereCapabilities applies the entql json.RawMessage predicate on the capabilities field.

func (*PrincipalTokenFilter) WhereClientIP added in v0.2.0

func (f *PrincipalTokenFilter) WhereClientIP(p entql.StringP)

WhereClientIP applies the entql string predicate on the client_ip field.

func (*PrincipalTokenFilter) WhereCreatedAt added in v0.2.0

func (f *PrincipalTokenFilter) WhereCreatedAt(p entql.TimeP)

WhereCreatedAt applies the entql time.Time predicate on the created_at field.

func (*PrincipalTokenFilter) WhereDelegationChain added in v0.2.0

func (f *PrincipalTokenFilter) WhereDelegationChain(p entql.BytesP)

WhereDelegationChain applies the entql json.RawMessage predicate on the delegation_chain field.

func (*PrincipalTokenFilter) WhereDpopJkt added in v0.2.0

func (f *PrincipalTokenFilter) WhereDpopJkt(p entql.StringP)

WhereDpopJkt applies the entql string predicate on the dpop_jkt field.

func (*PrincipalTokenFilter) WhereFamilyID added in v0.2.0

func (f *PrincipalTokenFilter) WhereFamilyID(p entql.ValueP)

WhereFamilyID applies the entql [16]byte predicate on the family_id field.

func (*PrincipalTokenFilter) WhereHasChildTokens added in v0.2.0

func (f *PrincipalTokenFilter) WhereHasChildTokens()

WhereHasChildTokens applies a predicate to check if query has an edge child_tokens.

func (*PrincipalTokenFilter) WhereHasChildTokensWith added in v0.2.0

func (f *PrincipalTokenFilter) WhereHasChildTokensWith(preds ...predicate.PrincipalToken)

WhereHasChildTokensWith applies a predicate to check if query has an edge child_tokens with a given conditions (other predicates).

func (*PrincipalTokenFilter) WhereHasIssuedByApp added in v0.2.0

func (f *PrincipalTokenFilter) WhereHasIssuedByApp()

WhereHasIssuedByApp applies a predicate to check if query has an edge issued_by_app.

func (*PrincipalTokenFilter) WhereHasIssuedByAppWith added in v0.2.0

func (f *PrincipalTokenFilter) WhereHasIssuedByAppWith(preds ...predicate.Application)

WhereHasIssuedByAppWith applies a predicate to check if query has an edge issued_by_app with a given conditions (other predicates).

func (*PrincipalTokenFilter) WhereHasParentToken added in v0.2.0

func (f *PrincipalTokenFilter) WhereHasParentToken()

WhereHasParentToken applies a predicate to check if query has an edge parent_token.

func (*PrincipalTokenFilter) WhereHasParentTokenWith added in v0.2.0

func (f *PrincipalTokenFilter) WhereHasParentTokenWith(preds ...predicate.PrincipalToken)

WhereHasParentTokenWith applies a predicate to check if query has an edge parent_token with a given conditions (other predicates).

func (*PrincipalTokenFilter) WhereHasPrincipal added in v0.2.0

func (f *PrincipalTokenFilter) WhereHasPrincipal()

WhereHasPrincipal applies a predicate to check if query has an edge principal.

func (*PrincipalTokenFilter) WhereHasPrincipalWith added in v0.2.0

func (f *PrincipalTokenFilter) WhereHasPrincipalWith(preds ...predicate.Principal)

WhereHasPrincipalWith applies a predicate to check if query has an edge principal with a given conditions (other predicates).

func (*PrincipalTokenFilter) WhereID added in v0.2.0

func (f *PrincipalTokenFilter) WhereID(p entql.ValueP)

WhereID applies the entql [16]byte predicate on the id field.

func (*PrincipalTokenFilter) WhereIssuedByAppID added in v0.2.0

func (f *PrincipalTokenFilter) WhereIssuedByAppID(p entql.ValueP)

WhereIssuedByAppID applies the entql [16]byte predicate on the issued_by_app_id field.

func (*PrincipalTokenFilter) WhereLastUsedAt added in v0.2.0

func (f *PrincipalTokenFilter) WhereLastUsedAt(p entql.TimeP)

WhereLastUsedAt applies the entql time.Time predicate on the last_used_at field.

func (*PrincipalTokenFilter) WhereParentTokenID added in v0.2.0

func (f *PrincipalTokenFilter) WhereParentTokenID(p entql.ValueP)

WhereParentTokenID applies the entql [16]byte predicate on the parent_token_id field.

func (*PrincipalTokenFilter) WherePrincipalID added in v0.2.0

func (f *PrincipalTokenFilter) WherePrincipalID(p entql.ValueP)

WherePrincipalID applies the entql [16]byte predicate on the principal_id field.

func (*PrincipalTokenFilter) WherePrincipalType added in v0.2.0

func (f *PrincipalTokenFilter) WherePrincipalType(p entql.StringP)

WherePrincipalType applies the entql string predicate on the principal_type field.

func (*PrincipalTokenFilter) WhereRefreshExpiresAt added in v0.2.0

func (f *PrincipalTokenFilter) WhereRefreshExpiresAt(p entql.TimeP)

WhereRefreshExpiresAt applies the entql time.Time predicate on the refresh_expires_at field.

func (*PrincipalTokenFilter) WhereRefreshTokenSignature added in v0.2.0

func (f *PrincipalTokenFilter) WhereRefreshTokenSignature(p entql.StringP)

WhereRefreshTokenSignature applies the entql string predicate on the refresh_token_signature field.

func (*PrincipalTokenFilter) WhereRequestData added in v0.2.0

func (f *PrincipalTokenFilter) WhereRequestData(p entql.StringP)

WhereRequestData applies the entql string predicate on the request_data field.

func (*PrincipalTokenFilter) WhereRevoked added in v0.2.0

func (f *PrincipalTokenFilter) WhereRevoked(p entql.BoolP)

WhereRevoked applies the entql bool predicate on the revoked field.

func (*PrincipalTokenFilter) WhereRevokedAt added in v0.2.0

func (f *PrincipalTokenFilter) WhereRevokedAt(p entql.TimeP)

WhereRevokedAt applies the entql time.Time predicate on the revoked_at field.

func (*PrincipalTokenFilter) WhereRevokedReason added in v0.2.0

func (f *PrincipalTokenFilter) WhereRevokedReason(p entql.StringP)

WhereRevokedReason applies the entql string predicate on the revoked_reason field.

func (*PrincipalTokenFilter) WhereScopes added in v0.2.0

func (f *PrincipalTokenFilter) WhereScopes(p entql.BytesP)

WhereScopes applies the entql json.RawMessage predicate on the scopes field.

func (*PrincipalTokenFilter) WhereSessionID added in v0.2.0

func (f *PrincipalTokenFilter) WhereSessionID(p entql.StringP)

WhereSessionID applies the entql string predicate on the session_id field.

func (*PrincipalTokenFilter) WhereUserAgent added in v0.2.0

func (f *PrincipalTokenFilter) WhereUserAgent(p entql.StringP)

WhereUserAgent applies the entql string predicate on the user_agent field.

type PrincipalTokenGroupBy added in v0.2.0

type PrincipalTokenGroupBy struct {
	// contains filtered or unexported fields
}

PrincipalTokenGroupBy is the group-by builder for PrincipalToken entities.

func (*PrincipalTokenGroupBy) Aggregate added in v0.2.0

Aggregate adds the given aggregation functions to the group-by query.

func (*PrincipalTokenGroupBy) Bool added in v0.2.0

func (s *PrincipalTokenGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PrincipalTokenGroupBy) BoolX added in v0.2.0

func (s *PrincipalTokenGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PrincipalTokenGroupBy) Bools added in v0.2.0

func (s *PrincipalTokenGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PrincipalTokenGroupBy) BoolsX added in v0.2.0

func (s *PrincipalTokenGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PrincipalTokenGroupBy) Float64 added in v0.2.0

func (s *PrincipalTokenGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PrincipalTokenGroupBy) Float64X added in v0.2.0

func (s *PrincipalTokenGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PrincipalTokenGroupBy) Float64s added in v0.2.0

func (s *PrincipalTokenGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PrincipalTokenGroupBy) Float64sX added in v0.2.0

func (s *PrincipalTokenGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PrincipalTokenGroupBy) Int added in v0.2.0

func (s *PrincipalTokenGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PrincipalTokenGroupBy) IntX added in v0.2.0

func (s *PrincipalTokenGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PrincipalTokenGroupBy) Ints added in v0.2.0

func (s *PrincipalTokenGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PrincipalTokenGroupBy) IntsX added in v0.2.0

func (s *PrincipalTokenGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PrincipalTokenGroupBy) Scan added in v0.2.0

func (_g *PrincipalTokenGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PrincipalTokenGroupBy) ScanX added in v0.2.0

func (s *PrincipalTokenGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PrincipalTokenGroupBy) String added in v0.2.0

func (s *PrincipalTokenGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PrincipalTokenGroupBy) StringX added in v0.2.0

func (s *PrincipalTokenGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PrincipalTokenGroupBy) Strings added in v0.2.0

func (s *PrincipalTokenGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PrincipalTokenGroupBy) StringsX added in v0.2.0

func (s *PrincipalTokenGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PrincipalTokenMutation added in v0.2.0

type PrincipalTokenMutation struct {
	// contains filtered or unexported fields
}

PrincipalTokenMutation represents an operation that mutates the PrincipalToken nodes in the graph.

func (*PrincipalTokenMutation) AccessExpiresAt added in v0.2.0

func (m *PrincipalTokenMutation) AccessExpiresAt() (r time.Time, exists bool)

AccessExpiresAt returns the value of the "access_expires_at" field in the mutation.

func (*PrincipalTokenMutation) AccessTokenSignature added in v0.2.0

func (m *PrincipalTokenMutation) AccessTokenSignature() (r string, exists bool)

AccessTokenSignature returns the value of the "access_token_signature" field in the mutation.

func (*PrincipalTokenMutation) AddChildTokenIDs added in v0.2.0

func (m *PrincipalTokenMutation) AddChildTokenIDs(ids ...uuid.UUID)

AddChildTokenIDs adds the "child_tokens" edge to the PrincipalToken entity by ids.

func (*PrincipalTokenMutation) AddField added in v0.2.0

func (m *PrincipalTokenMutation) 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 (*PrincipalTokenMutation) AddedEdges added in v0.2.0

func (m *PrincipalTokenMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*PrincipalTokenMutation) AddedField added in v0.2.0

func (m *PrincipalTokenMutation) 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 (*PrincipalTokenMutation) AddedFields added in v0.2.0

func (m *PrincipalTokenMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*PrincipalTokenMutation) AddedIDs added in v0.2.0

func (m *PrincipalTokenMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*PrincipalTokenMutation) AppendAudience added in v0.2.0

func (m *PrincipalTokenMutation) AppendAudience(s []string)

AppendAudience adds s to the "audience" field.

func (*PrincipalTokenMutation) AppendDelegationChain added in v0.2.0

func (m *PrincipalTokenMutation) AppendDelegationChain(s []string)

AppendDelegationChain adds s to the "delegation_chain" field.

func (*PrincipalTokenMutation) AppendScopes added in v0.2.0

func (m *PrincipalTokenMutation) AppendScopes(s []string)

AppendScopes adds s to the "scopes" field.

func (*PrincipalTokenMutation) AppendedAudience added in v0.2.0

func (m *PrincipalTokenMutation) AppendedAudience() ([]string, bool)

AppendedAudience returns the list of values that were appended to the "audience" field in this mutation.

func (*PrincipalTokenMutation) AppendedDelegationChain added in v0.2.0

func (m *PrincipalTokenMutation) AppendedDelegationChain() ([]string, bool)

AppendedDelegationChain returns the list of values that were appended to the "delegation_chain" field in this mutation.

func (*PrincipalTokenMutation) AppendedScopes added in v0.2.0

func (m *PrincipalTokenMutation) AppendedScopes() ([]string, bool)

AppendedScopes returns the list of values that were appended to the "scopes" field in this mutation.

func (*PrincipalTokenMutation) Audience added in v0.2.0

func (m *PrincipalTokenMutation) Audience() (r []string, exists bool)

Audience returns the value of the "audience" field in the mutation.

func (*PrincipalTokenMutation) Capabilities added in v0.2.0

func (m *PrincipalTokenMutation) Capabilities() (r map[string]bool, exists bool)

Capabilities returns the value of the "capabilities" field in the mutation.

func (*PrincipalTokenMutation) ChildTokensCleared added in v0.2.0

func (m *PrincipalTokenMutation) ChildTokensCleared() bool

ChildTokensCleared reports if the "child_tokens" edge to the PrincipalToken entity was cleared.

func (*PrincipalTokenMutation) ChildTokensIDs added in v0.2.0

func (m *PrincipalTokenMutation) ChildTokensIDs() (ids []uuid.UUID)

ChildTokensIDs returns the "child_tokens" edge IDs in the mutation.

func (*PrincipalTokenMutation) ClearChildTokens added in v0.2.0

func (m *PrincipalTokenMutation) ClearChildTokens()

ClearChildTokens clears the "child_tokens" edge to the PrincipalToken entity.

func (*PrincipalTokenMutation) ClearClientIP added in v0.2.0

func (m *PrincipalTokenMutation) ClearClientIP()

ClearClientIP clears the value of the "client_ip" field.

func (*PrincipalTokenMutation) ClearDpopJkt added in v0.2.0

func (m *PrincipalTokenMutation) ClearDpopJkt()

ClearDpopJkt clears the value of the "dpop_jkt" field.

func (*PrincipalTokenMutation) ClearEdge added in v0.2.0

func (m *PrincipalTokenMutation) 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 (*PrincipalTokenMutation) ClearField added in v0.2.0

func (m *PrincipalTokenMutation) 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 (*PrincipalTokenMutation) ClearIssuedByApp added in v0.2.0

func (m *PrincipalTokenMutation) ClearIssuedByApp()

ClearIssuedByApp clears the "issued_by_app" edge to the Application entity.

func (*PrincipalTokenMutation) ClearIssuedByAppID added in v0.2.0

func (m *PrincipalTokenMutation) ClearIssuedByAppID()

ClearIssuedByAppID clears the value of the "issued_by_app_id" field.

func (*PrincipalTokenMutation) ClearLastUsedAt added in v0.2.0

func (m *PrincipalTokenMutation) ClearLastUsedAt()

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*PrincipalTokenMutation) ClearParentToken added in v0.2.0

func (m *PrincipalTokenMutation) ClearParentToken()

ClearParentToken clears the "parent_token" edge to the PrincipalToken entity.

func (*PrincipalTokenMutation) ClearParentTokenID added in v0.2.0

func (m *PrincipalTokenMutation) ClearParentTokenID()

ClearParentTokenID clears the value of the "parent_token_id" field.

func (*PrincipalTokenMutation) ClearPrincipal added in v0.2.0

func (m *PrincipalTokenMutation) ClearPrincipal()

ClearPrincipal clears the "principal" edge to the Principal entity.

func (*PrincipalTokenMutation) ClearRefreshExpiresAt added in v0.2.0

func (m *PrincipalTokenMutation) ClearRefreshExpiresAt()

ClearRefreshExpiresAt clears the value of the "refresh_expires_at" field.

func (*PrincipalTokenMutation) ClearRefreshTokenSignature added in v0.2.0

func (m *PrincipalTokenMutation) ClearRefreshTokenSignature()

ClearRefreshTokenSignature clears the value of the "refresh_token_signature" field.

func (*PrincipalTokenMutation) ClearRequestData added in v0.2.0

func (m *PrincipalTokenMutation) ClearRequestData()

ClearRequestData clears the value of the "request_data" field.

func (*PrincipalTokenMutation) ClearRevokedAt added in v0.2.0

func (m *PrincipalTokenMutation) ClearRevokedAt()

ClearRevokedAt clears the value of the "revoked_at" field.

func (*PrincipalTokenMutation) ClearRevokedReason added in v0.2.0

func (m *PrincipalTokenMutation) ClearRevokedReason()

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*PrincipalTokenMutation) ClearSessionID added in v0.2.0

func (m *PrincipalTokenMutation) ClearSessionID()

ClearSessionID clears the value of the "session_id" field.

func (*PrincipalTokenMutation) ClearUserAgent added in v0.2.0

func (m *PrincipalTokenMutation) ClearUserAgent()

ClearUserAgent clears the value of the "user_agent" field.

func (*PrincipalTokenMutation) ClearedEdges added in v0.2.0

func (m *PrincipalTokenMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*PrincipalTokenMutation) ClearedFields added in v0.2.0

func (m *PrincipalTokenMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (PrincipalTokenMutation) Client added in v0.2.0

func (m PrincipalTokenMutation) 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 (*PrincipalTokenMutation) ClientIP added in v0.2.0

func (m *PrincipalTokenMutation) ClientIP() (r string, exists bool)

ClientIP returns the value of the "client_ip" field in the mutation.

func (*PrincipalTokenMutation) ClientIPCleared added in v0.2.0

func (m *PrincipalTokenMutation) ClientIPCleared() bool

ClientIPCleared returns if the "client_ip" field was cleared in this mutation.

func (*PrincipalTokenMutation) CreatedAt added in v0.2.0

func (m *PrincipalTokenMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*PrincipalTokenMutation) DelegationChain added in v0.2.0

func (m *PrincipalTokenMutation) DelegationChain() (r []string, exists bool)

DelegationChain returns the value of the "delegation_chain" field in the mutation.

func (*PrincipalTokenMutation) DpopJkt added in v0.2.0

func (m *PrincipalTokenMutation) DpopJkt() (r string, exists bool)

DpopJkt returns the value of the "dpop_jkt" field in the mutation.

func (*PrincipalTokenMutation) DpopJktCleared added in v0.2.0

func (m *PrincipalTokenMutation) DpopJktCleared() bool

DpopJktCleared returns if the "dpop_jkt" field was cleared in this mutation.

func (*PrincipalTokenMutation) EdgeCleared added in v0.2.0

func (m *PrincipalTokenMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*PrincipalTokenMutation) FamilyID added in v0.2.0

func (m *PrincipalTokenMutation) FamilyID() (r uuid.UUID, exists bool)

FamilyID returns the value of the "family_id" field in the mutation.

func (*PrincipalTokenMutation) Field added in v0.2.0

func (m *PrincipalTokenMutation) 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 (*PrincipalTokenMutation) FieldCleared added in v0.2.0

func (m *PrincipalTokenMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*PrincipalTokenMutation) Fields added in v0.2.0

func (m *PrincipalTokenMutation) 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 (*PrincipalTokenMutation) Filter added in v0.2.0

Filter returns an entql.Where implementation to apply filters on the PrincipalTokenMutation builder.

func (*PrincipalTokenMutation) ID added in v0.2.0

func (m *PrincipalTokenMutation) 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 (*PrincipalTokenMutation) IDs added in v0.2.0

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 (*PrincipalTokenMutation) IssuedByAppCleared added in v0.2.0

func (m *PrincipalTokenMutation) IssuedByAppCleared() bool

IssuedByAppCleared reports if the "issued_by_app" edge to the Application entity was cleared.

func (*PrincipalTokenMutation) IssuedByAppID added in v0.2.0

func (m *PrincipalTokenMutation) IssuedByAppID() (r uuid.UUID, exists bool)

IssuedByAppID returns the value of the "issued_by_app_id" field in the mutation.

func (*PrincipalTokenMutation) IssuedByAppIDCleared added in v0.2.0

func (m *PrincipalTokenMutation) IssuedByAppIDCleared() bool

IssuedByAppIDCleared returns if the "issued_by_app_id" field was cleared in this mutation.

func (*PrincipalTokenMutation) IssuedByAppIDs added in v0.2.0

func (m *PrincipalTokenMutation) IssuedByAppIDs() (ids []uuid.UUID)

IssuedByAppIDs returns the "issued_by_app" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use IssuedByAppID instead. It exists only for internal usage by the builders.

func (*PrincipalTokenMutation) LastUsedAt added in v0.2.0

func (m *PrincipalTokenMutation) LastUsedAt() (r time.Time, exists bool)

LastUsedAt returns the value of the "last_used_at" field in the mutation.

func (*PrincipalTokenMutation) LastUsedAtCleared added in v0.2.0

func (m *PrincipalTokenMutation) LastUsedAtCleared() bool

LastUsedAtCleared returns if the "last_used_at" field was cleared in this mutation.

func (*PrincipalTokenMutation) OldAccessExpiresAt added in v0.2.0

func (m *PrincipalTokenMutation) OldAccessExpiresAt(ctx context.Context) (v time.Time, err error)

OldAccessExpiresAt returns the old "access_expires_at" field's value of the PrincipalToken entity. If the PrincipalToken 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 (*PrincipalTokenMutation) OldAccessTokenSignature added in v0.2.0

func (m *PrincipalTokenMutation) OldAccessTokenSignature(ctx context.Context) (v string, err error)

OldAccessTokenSignature returns the old "access_token_signature" field's value of the PrincipalToken entity. If the PrincipalToken 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 (*PrincipalTokenMutation) OldAudience added in v0.2.0

func (m *PrincipalTokenMutation) OldAudience(ctx context.Context) (v []string, err error)

OldAudience returns the old "audience" field's value of the PrincipalToken entity. If the PrincipalToken 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 (*PrincipalTokenMutation) OldCapabilities added in v0.2.0

func (m *PrincipalTokenMutation) OldCapabilities(ctx context.Context) (v map[string]bool, err error)

OldCapabilities returns the old "capabilities" field's value of the PrincipalToken entity. If the PrincipalToken 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 (*PrincipalTokenMutation) OldClientIP added in v0.2.0

func (m *PrincipalTokenMutation) OldClientIP(ctx context.Context) (v string, err error)

OldClientIP returns the old "client_ip" field's value of the PrincipalToken entity. If the PrincipalToken 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 (*PrincipalTokenMutation) OldCreatedAt added in v0.2.0

func (m *PrincipalTokenMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the PrincipalToken entity. If the PrincipalToken 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 (*PrincipalTokenMutation) OldDelegationChain added in v0.2.0

func (m *PrincipalTokenMutation) OldDelegationChain(ctx context.Context) (v []string, err error)

OldDelegationChain returns the old "delegation_chain" field's value of the PrincipalToken entity. If the PrincipalToken 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 (*PrincipalTokenMutation) OldDpopJkt added in v0.2.0

func (m *PrincipalTokenMutation) OldDpopJkt(ctx context.Context) (v string, err error)

OldDpopJkt returns the old "dpop_jkt" field's value of the PrincipalToken entity. If the PrincipalToken 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 (*PrincipalTokenMutation) OldFamilyID added in v0.2.0

func (m *PrincipalTokenMutation) OldFamilyID(ctx context.Context) (v uuid.UUID, err error)

OldFamilyID returns the old "family_id" field's value of the PrincipalToken entity. If the PrincipalToken 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 (*PrincipalTokenMutation) OldField added in v0.2.0

func (m *PrincipalTokenMutation) 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 (*PrincipalTokenMutation) OldIssuedByAppID added in v0.2.0

func (m *PrincipalTokenMutation) OldIssuedByAppID(ctx context.Context) (v *uuid.UUID, err error)

OldIssuedByAppID returns the old "issued_by_app_id" field's value of the PrincipalToken entity. If the PrincipalToken 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 (*PrincipalTokenMutation) OldLastUsedAt added in v0.2.0

func (m *PrincipalTokenMutation) OldLastUsedAt(ctx context.Context) (v *time.Time, err error)

OldLastUsedAt returns the old "last_used_at" field's value of the PrincipalToken entity. If the PrincipalToken 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 (*PrincipalTokenMutation) OldParentTokenID added in v0.2.0

func (m *PrincipalTokenMutation) OldParentTokenID(ctx context.Context) (v *uuid.UUID, err error)

OldParentTokenID returns the old "parent_token_id" field's value of the PrincipalToken entity. If the PrincipalToken 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 (*PrincipalTokenMutation) OldPrincipalID added in v0.2.0

func (m *PrincipalTokenMutation) OldPrincipalID(ctx context.Context) (v uuid.UUID, err error)

OldPrincipalID returns the old "principal_id" field's value of the PrincipalToken entity. If the PrincipalToken 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 (*PrincipalTokenMutation) OldPrincipalType added in v0.2.0

func (m *PrincipalTokenMutation) OldPrincipalType(ctx context.Context) (v principaltoken.PrincipalType, err error)

OldPrincipalType returns the old "principal_type" field's value of the PrincipalToken entity. If the PrincipalToken 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 (*PrincipalTokenMutation) OldRefreshExpiresAt added in v0.2.0

func (m *PrincipalTokenMutation) OldRefreshExpiresAt(ctx context.Context) (v *time.Time, err error)

OldRefreshExpiresAt returns the old "refresh_expires_at" field's value of the PrincipalToken entity. If the PrincipalToken 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 (*PrincipalTokenMutation) OldRefreshTokenSignature added in v0.2.0

func (m *PrincipalTokenMutation) OldRefreshTokenSignature(ctx context.Context) (v *string, err error)

OldRefreshTokenSignature returns the old "refresh_token_signature" field's value of the PrincipalToken entity. If the PrincipalToken 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 (*PrincipalTokenMutation) OldRequestData added in v0.2.0

func (m *PrincipalTokenMutation) OldRequestData(ctx context.Context) (v string, err error)

OldRequestData returns the old "request_data" field's value of the PrincipalToken entity. If the PrincipalToken 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 (*PrincipalTokenMutation) OldRevoked added in v0.2.0

func (m *PrincipalTokenMutation) OldRevoked(ctx context.Context) (v bool, err error)

OldRevoked returns the old "revoked" field's value of the PrincipalToken entity. If the PrincipalToken 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 (*PrincipalTokenMutation) OldRevokedAt added in v0.2.0

func (m *PrincipalTokenMutation) OldRevokedAt(ctx context.Context) (v *time.Time, err error)

OldRevokedAt returns the old "revoked_at" field's value of the PrincipalToken entity. If the PrincipalToken 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 (*PrincipalTokenMutation) OldRevokedReason added in v0.2.0

func (m *PrincipalTokenMutation) OldRevokedReason(ctx context.Context) (v string, err error)

OldRevokedReason returns the old "revoked_reason" field's value of the PrincipalToken entity. If the PrincipalToken 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 (*PrincipalTokenMutation) OldScopes added in v0.2.0

func (m *PrincipalTokenMutation) OldScopes(ctx context.Context) (v []string, err error)

OldScopes returns the old "scopes" field's value of the PrincipalToken entity. If the PrincipalToken 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 (*PrincipalTokenMutation) OldSessionID added in v0.2.0

func (m *PrincipalTokenMutation) OldSessionID(ctx context.Context) (v string, err error)

OldSessionID returns the old "session_id" field's value of the PrincipalToken entity. If the PrincipalToken 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 (*PrincipalTokenMutation) OldUserAgent added in v0.2.0

func (m *PrincipalTokenMutation) OldUserAgent(ctx context.Context) (v string, err error)

OldUserAgent returns the old "user_agent" field's value of the PrincipalToken entity. If the PrincipalToken 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 (*PrincipalTokenMutation) Op added in v0.2.0

func (m *PrincipalTokenMutation) Op() Op

Op returns the operation name.

func (*PrincipalTokenMutation) ParentTokenCleared added in v0.2.0

func (m *PrincipalTokenMutation) ParentTokenCleared() bool

ParentTokenCleared reports if the "parent_token" edge to the PrincipalToken entity was cleared.

func (*PrincipalTokenMutation) ParentTokenID added in v0.2.0

func (m *PrincipalTokenMutation) ParentTokenID() (r uuid.UUID, exists bool)

ParentTokenID returns the value of the "parent_token_id" field in the mutation.

func (*PrincipalTokenMutation) ParentTokenIDCleared added in v0.2.0

func (m *PrincipalTokenMutation) ParentTokenIDCleared() bool

ParentTokenIDCleared returns if the "parent_token_id" field was cleared in this mutation.

func (*PrincipalTokenMutation) ParentTokenIDs added in v0.2.0

func (m *PrincipalTokenMutation) ParentTokenIDs() (ids []uuid.UUID)

ParentTokenIDs returns the "parent_token" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ParentTokenID instead. It exists only for internal usage by the builders.

func (*PrincipalTokenMutation) PrincipalCleared added in v0.2.0

func (m *PrincipalTokenMutation) PrincipalCleared() bool

PrincipalCleared reports if the "principal" edge to the Principal entity was cleared.

func (*PrincipalTokenMutation) PrincipalID added in v0.2.0

func (m *PrincipalTokenMutation) PrincipalID() (r uuid.UUID, exists bool)

PrincipalID returns the value of the "principal_id" field in the mutation.

func (*PrincipalTokenMutation) PrincipalIDs added in v0.2.0

func (m *PrincipalTokenMutation) PrincipalIDs() (ids []uuid.UUID)

PrincipalIDs returns the "principal" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PrincipalID instead. It exists only for internal usage by the builders.

func (*PrincipalTokenMutation) PrincipalType added in v0.2.0

func (m *PrincipalTokenMutation) PrincipalType() (r principaltoken.PrincipalType, exists bool)

PrincipalType returns the value of the "principal_type" field in the mutation.

func (*PrincipalTokenMutation) RefreshExpiresAt added in v0.2.0

func (m *PrincipalTokenMutation) RefreshExpiresAt() (r time.Time, exists bool)

RefreshExpiresAt returns the value of the "refresh_expires_at" field in the mutation.

func (*PrincipalTokenMutation) RefreshExpiresAtCleared added in v0.2.0

func (m *PrincipalTokenMutation) RefreshExpiresAtCleared() bool

RefreshExpiresAtCleared returns if the "refresh_expires_at" field was cleared in this mutation.

func (*PrincipalTokenMutation) RefreshTokenSignature added in v0.2.0

func (m *PrincipalTokenMutation) RefreshTokenSignature() (r string, exists bool)

RefreshTokenSignature returns the value of the "refresh_token_signature" field in the mutation.

func (*PrincipalTokenMutation) RefreshTokenSignatureCleared added in v0.2.0

func (m *PrincipalTokenMutation) RefreshTokenSignatureCleared() bool

RefreshTokenSignatureCleared returns if the "refresh_token_signature" field was cleared in this mutation.

func (*PrincipalTokenMutation) RemoveChildTokenIDs added in v0.2.0

func (m *PrincipalTokenMutation) RemoveChildTokenIDs(ids ...uuid.UUID)

RemoveChildTokenIDs removes the "child_tokens" edge to the PrincipalToken entity by IDs.

func (*PrincipalTokenMutation) RemovedChildTokensIDs added in v0.2.0

func (m *PrincipalTokenMutation) RemovedChildTokensIDs() (ids []uuid.UUID)

RemovedChildTokens returns the removed IDs of the "child_tokens" edge to the PrincipalToken entity.

func (*PrincipalTokenMutation) RemovedEdges added in v0.2.0

func (m *PrincipalTokenMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*PrincipalTokenMutation) RemovedIDs added in v0.2.0

func (m *PrincipalTokenMutation) 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 (*PrincipalTokenMutation) RequestData added in v0.2.0

func (m *PrincipalTokenMutation) RequestData() (r string, exists bool)

RequestData returns the value of the "request_data" field in the mutation.

func (*PrincipalTokenMutation) RequestDataCleared added in v0.2.0

func (m *PrincipalTokenMutation) RequestDataCleared() bool

RequestDataCleared returns if the "request_data" field was cleared in this mutation.

func (*PrincipalTokenMutation) ResetAccessExpiresAt added in v0.2.0

func (m *PrincipalTokenMutation) ResetAccessExpiresAt()

ResetAccessExpiresAt resets all changes to the "access_expires_at" field.

func (*PrincipalTokenMutation) ResetAccessTokenSignature added in v0.2.0

func (m *PrincipalTokenMutation) ResetAccessTokenSignature()

ResetAccessTokenSignature resets all changes to the "access_token_signature" field.

func (*PrincipalTokenMutation) ResetAudience added in v0.2.0

func (m *PrincipalTokenMutation) ResetAudience()

ResetAudience resets all changes to the "audience" field.

func (*PrincipalTokenMutation) ResetCapabilities added in v0.2.0

func (m *PrincipalTokenMutation) ResetCapabilities()

ResetCapabilities resets all changes to the "capabilities" field.

func (*PrincipalTokenMutation) ResetChildTokens added in v0.2.0

func (m *PrincipalTokenMutation) ResetChildTokens()

ResetChildTokens resets all changes to the "child_tokens" edge.

func (*PrincipalTokenMutation) ResetClientIP added in v0.2.0

func (m *PrincipalTokenMutation) ResetClientIP()

ResetClientIP resets all changes to the "client_ip" field.

func (*PrincipalTokenMutation) ResetCreatedAt added in v0.2.0

func (m *PrincipalTokenMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*PrincipalTokenMutation) ResetDelegationChain added in v0.2.0

func (m *PrincipalTokenMutation) ResetDelegationChain()

ResetDelegationChain resets all changes to the "delegation_chain" field.

func (*PrincipalTokenMutation) ResetDpopJkt added in v0.2.0

func (m *PrincipalTokenMutation) ResetDpopJkt()

ResetDpopJkt resets all changes to the "dpop_jkt" field.

func (*PrincipalTokenMutation) ResetEdge added in v0.2.0

func (m *PrincipalTokenMutation) 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 (*PrincipalTokenMutation) ResetFamilyID added in v0.2.0

func (m *PrincipalTokenMutation) ResetFamilyID()

ResetFamilyID resets all changes to the "family_id" field.

func (*PrincipalTokenMutation) ResetField added in v0.2.0

func (m *PrincipalTokenMutation) 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 (*PrincipalTokenMutation) ResetIssuedByApp added in v0.2.0

func (m *PrincipalTokenMutation) ResetIssuedByApp()

ResetIssuedByApp resets all changes to the "issued_by_app" edge.

func (*PrincipalTokenMutation) ResetIssuedByAppID added in v0.2.0

func (m *PrincipalTokenMutation) ResetIssuedByAppID()

ResetIssuedByAppID resets all changes to the "issued_by_app_id" field.

func (*PrincipalTokenMutation) ResetLastUsedAt added in v0.2.0

func (m *PrincipalTokenMutation) ResetLastUsedAt()

ResetLastUsedAt resets all changes to the "last_used_at" field.

func (*PrincipalTokenMutation) ResetParentToken added in v0.2.0

func (m *PrincipalTokenMutation) ResetParentToken()

ResetParentToken resets all changes to the "parent_token" edge.

func (*PrincipalTokenMutation) ResetParentTokenID added in v0.2.0

func (m *PrincipalTokenMutation) ResetParentTokenID()

ResetParentTokenID resets all changes to the "parent_token_id" field.

func (*PrincipalTokenMutation) ResetPrincipal added in v0.2.0

func (m *PrincipalTokenMutation) ResetPrincipal()

ResetPrincipal resets all changes to the "principal" edge.

func (*PrincipalTokenMutation) ResetPrincipalID added in v0.2.0

func (m *PrincipalTokenMutation) ResetPrincipalID()

ResetPrincipalID resets all changes to the "principal_id" field.

func (*PrincipalTokenMutation) ResetPrincipalType added in v0.2.0

func (m *PrincipalTokenMutation) ResetPrincipalType()

ResetPrincipalType resets all changes to the "principal_type" field.

func (*PrincipalTokenMutation) ResetRefreshExpiresAt added in v0.2.0

func (m *PrincipalTokenMutation) ResetRefreshExpiresAt()

ResetRefreshExpiresAt resets all changes to the "refresh_expires_at" field.

func (*PrincipalTokenMutation) ResetRefreshTokenSignature added in v0.2.0

func (m *PrincipalTokenMutation) ResetRefreshTokenSignature()

ResetRefreshTokenSignature resets all changes to the "refresh_token_signature" field.

func (*PrincipalTokenMutation) ResetRequestData added in v0.2.0

func (m *PrincipalTokenMutation) ResetRequestData()

ResetRequestData resets all changes to the "request_data" field.

func (*PrincipalTokenMutation) ResetRevoked added in v0.2.0

func (m *PrincipalTokenMutation) ResetRevoked()

ResetRevoked resets all changes to the "revoked" field.

func (*PrincipalTokenMutation) ResetRevokedAt added in v0.2.0

func (m *PrincipalTokenMutation) ResetRevokedAt()

ResetRevokedAt resets all changes to the "revoked_at" field.

func (*PrincipalTokenMutation) ResetRevokedReason added in v0.2.0

func (m *PrincipalTokenMutation) ResetRevokedReason()

ResetRevokedReason resets all changes to the "revoked_reason" field.

func (*PrincipalTokenMutation) ResetScopes added in v0.2.0

func (m *PrincipalTokenMutation) ResetScopes()

ResetScopes resets all changes to the "scopes" field.

func (*PrincipalTokenMutation) ResetSessionID added in v0.2.0

func (m *PrincipalTokenMutation) ResetSessionID()

ResetSessionID resets all changes to the "session_id" field.

func (*PrincipalTokenMutation) ResetUserAgent added in v0.2.0

func (m *PrincipalTokenMutation) ResetUserAgent()

ResetUserAgent resets all changes to the "user_agent" field.

func (*PrincipalTokenMutation) Revoked added in v0.2.0

func (m *PrincipalTokenMutation) Revoked() (r bool, exists bool)

Revoked returns the value of the "revoked" field in the mutation.

func (*PrincipalTokenMutation) RevokedAt added in v0.2.0

func (m *PrincipalTokenMutation) RevokedAt() (r time.Time, exists bool)

RevokedAt returns the value of the "revoked_at" field in the mutation.

func (*PrincipalTokenMutation) RevokedAtCleared added in v0.2.0

func (m *PrincipalTokenMutation) RevokedAtCleared() bool

RevokedAtCleared returns if the "revoked_at" field was cleared in this mutation.

func (*PrincipalTokenMutation) RevokedReason added in v0.2.0

func (m *PrincipalTokenMutation) RevokedReason() (r string, exists bool)

RevokedReason returns the value of the "revoked_reason" field in the mutation.

func (*PrincipalTokenMutation) RevokedReasonCleared added in v0.2.0

func (m *PrincipalTokenMutation) RevokedReasonCleared() bool

RevokedReasonCleared returns if the "revoked_reason" field was cleared in this mutation.

func (*PrincipalTokenMutation) Scopes added in v0.2.0

func (m *PrincipalTokenMutation) Scopes() (r []string, exists bool)

Scopes returns the value of the "scopes" field in the mutation.

func (*PrincipalTokenMutation) SessionID added in v0.2.0

func (m *PrincipalTokenMutation) SessionID() (r string, exists bool)

SessionID returns the value of the "session_id" field in the mutation.

func (*PrincipalTokenMutation) SessionIDCleared added in v0.2.0

func (m *PrincipalTokenMutation) SessionIDCleared() bool

SessionIDCleared returns if the "session_id" field was cleared in this mutation.

func (*PrincipalTokenMutation) SetAccessExpiresAt added in v0.2.0

func (m *PrincipalTokenMutation) SetAccessExpiresAt(t time.Time)

SetAccessExpiresAt sets the "access_expires_at" field.

func (*PrincipalTokenMutation) SetAccessTokenSignature added in v0.2.0

func (m *PrincipalTokenMutation) SetAccessTokenSignature(s string)

SetAccessTokenSignature sets the "access_token_signature" field.

func (*PrincipalTokenMutation) SetAudience added in v0.2.0

func (m *PrincipalTokenMutation) SetAudience(s []string)

SetAudience sets the "audience" field.

func (*PrincipalTokenMutation) SetCapabilities added in v0.2.0

func (m *PrincipalTokenMutation) SetCapabilities(value map[string]bool)

SetCapabilities sets the "capabilities" field.

func (*PrincipalTokenMutation) SetClientIP added in v0.2.0

func (m *PrincipalTokenMutation) SetClientIP(s string)

SetClientIP sets the "client_ip" field.

func (*PrincipalTokenMutation) SetCreatedAt added in v0.2.0

func (m *PrincipalTokenMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*PrincipalTokenMutation) SetDelegationChain added in v0.2.0

func (m *PrincipalTokenMutation) SetDelegationChain(s []string)

SetDelegationChain sets the "delegation_chain" field.

func (*PrincipalTokenMutation) SetDpopJkt added in v0.2.0

func (m *PrincipalTokenMutation) SetDpopJkt(s string)

SetDpopJkt sets the "dpop_jkt" field.

func (*PrincipalTokenMutation) SetFamilyID added in v0.2.0

func (m *PrincipalTokenMutation) SetFamilyID(u uuid.UUID)

SetFamilyID sets the "family_id" field.

func (*PrincipalTokenMutation) SetField added in v0.2.0

func (m *PrincipalTokenMutation) 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 (*PrincipalTokenMutation) SetID added in v0.2.0

func (m *PrincipalTokenMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of PrincipalToken entities.

func (*PrincipalTokenMutation) SetIssuedByAppID added in v0.2.0

func (m *PrincipalTokenMutation) SetIssuedByAppID(u uuid.UUID)

SetIssuedByAppID sets the "issued_by_app_id" field.

func (*PrincipalTokenMutation) SetLastUsedAt added in v0.2.0

func (m *PrincipalTokenMutation) SetLastUsedAt(t time.Time)

SetLastUsedAt sets the "last_used_at" field.

func (*PrincipalTokenMutation) SetOp added in v0.2.0

func (m *PrincipalTokenMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*PrincipalTokenMutation) SetParentTokenID added in v0.2.0

func (m *PrincipalTokenMutation) SetParentTokenID(u uuid.UUID)

SetParentTokenID sets the "parent_token_id" field.

func (*PrincipalTokenMutation) SetPrincipalID added in v0.2.0

func (m *PrincipalTokenMutation) SetPrincipalID(u uuid.UUID)

SetPrincipalID sets the "principal_id" field.

func (*PrincipalTokenMutation) SetPrincipalType added in v0.2.0

func (m *PrincipalTokenMutation) SetPrincipalType(pt principaltoken.PrincipalType)

SetPrincipalType sets the "principal_type" field.

func (*PrincipalTokenMutation) SetRefreshExpiresAt added in v0.2.0

func (m *PrincipalTokenMutation) SetRefreshExpiresAt(t time.Time)

SetRefreshExpiresAt sets the "refresh_expires_at" field.

func (*PrincipalTokenMutation) SetRefreshTokenSignature added in v0.2.0

func (m *PrincipalTokenMutation) SetRefreshTokenSignature(s string)

SetRefreshTokenSignature sets the "refresh_token_signature" field.

func (*PrincipalTokenMutation) SetRequestData added in v0.2.0

func (m *PrincipalTokenMutation) SetRequestData(s string)

SetRequestData sets the "request_data" field.

func (*PrincipalTokenMutation) SetRevoked added in v0.2.0

func (m *PrincipalTokenMutation) SetRevoked(b bool)

SetRevoked sets the "revoked" field.

func (*PrincipalTokenMutation) SetRevokedAt added in v0.2.0

func (m *PrincipalTokenMutation) SetRevokedAt(t time.Time)

SetRevokedAt sets the "revoked_at" field.

func (*PrincipalTokenMutation) SetRevokedReason added in v0.2.0

func (m *PrincipalTokenMutation) SetRevokedReason(s string)

SetRevokedReason sets the "revoked_reason" field.

func (*PrincipalTokenMutation) SetScopes added in v0.2.0

func (m *PrincipalTokenMutation) SetScopes(s []string)

SetScopes sets the "scopes" field.

func (*PrincipalTokenMutation) SetSessionID added in v0.2.0

func (m *PrincipalTokenMutation) SetSessionID(s string)

SetSessionID sets the "session_id" field.

func (*PrincipalTokenMutation) SetUserAgent added in v0.2.0

func (m *PrincipalTokenMutation) SetUserAgent(s string)

SetUserAgent sets the "user_agent" field.

func (PrincipalTokenMutation) Tx added in v0.2.0

func (m PrincipalTokenMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*PrincipalTokenMutation) Type added in v0.2.0

func (m *PrincipalTokenMutation) Type() string

Type returns the node type of this mutation (PrincipalToken).

func (*PrincipalTokenMutation) UserAgent added in v0.2.0

func (m *PrincipalTokenMutation) UserAgent() (r string, exists bool)

UserAgent returns the value of the "user_agent" field in the mutation.

func (*PrincipalTokenMutation) UserAgentCleared added in v0.2.0

func (m *PrincipalTokenMutation) UserAgentCleared() bool

UserAgentCleared returns if the "user_agent" field was cleared in this mutation.

func (*PrincipalTokenMutation) Where added in v0.2.0

Where appends a list predicates to the PrincipalTokenMutation builder.

func (*PrincipalTokenMutation) WhereP added in v0.2.0

func (m *PrincipalTokenMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the PrincipalTokenMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type PrincipalTokenQuery added in v0.2.0

type PrincipalTokenQuery struct {
	// contains filtered or unexported fields
}

PrincipalTokenQuery is the builder for querying PrincipalToken entities.

func (*PrincipalTokenQuery) Aggregate added in v0.2.0

Aggregate returns a PrincipalTokenSelect configured with the given aggregations.

func (*PrincipalTokenQuery) All added in v0.2.0

All executes the query and returns a list of PrincipalTokens.

func (*PrincipalTokenQuery) AllX added in v0.2.0

AllX is like All, but panics if an error occurs.

func (*PrincipalTokenQuery) Clone added in v0.2.0

Clone returns a duplicate of the PrincipalTokenQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*PrincipalTokenQuery) Count added in v0.2.0

func (_q *PrincipalTokenQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PrincipalTokenQuery) CountX added in v0.2.0

func (_q *PrincipalTokenQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PrincipalTokenQuery) Exist added in v0.2.0

func (_q *PrincipalTokenQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PrincipalTokenQuery) ExistX added in v0.2.0

func (_q *PrincipalTokenQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PrincipalTokenQuery) Filter added in v0.2.0

Filter returns a Filter implementation to apply filters on the PrincipalTokenQuery builder.

func (*PrincipalTokenQuery) First added in v0.2.0

First returns the first PrincipalToken entity from the query. Returns a *NotFoundError when no PrincipalToken was found.

func (*PrincipalTokenQuery) FirstID added in v0.2.0

func (_q *PrincipalTokenQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first PrincipalToken ID from the query. Returns a *NotFoundError when no PrincipalToken ID was found.

func (*PrincipalTokenQuery) FirstIDX added in v0.2.0

func (_q *PrincipalTokenQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*PrincipalTokenQuery) FirstX added in v0.2.0

FirstX is like First, but panics if an error occurs.

func (*PrincipalTokenQuery) GroupBy added in v0.2.0

func (_q *PrincipalTokenQuery) GroupBy(field string, fields ...string) *PrincipalTokenGroupBy

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 {
	PrincipalID uuid.UUID `json:"principal_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.PrincipalToken.Query().
	GroupBy(principaltoken.FieldPrincipalID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PrincipalTokenQuery) IDs added in v0.2.0

func (_q *PrincipalTokenQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of PrincipalToken IDs.

func (*PrincipalTokenQuery) IDsX added in v0.2.0

func (_q *PrincipalTokenQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*PrincipalTokenQuery) Limit added in v0.2.0

func (_q *PrincipalTokenQuery) Limit(limit int) *PrincipalTokenQuery

Limit the number of records to be returned by this query.

func (*PrincipalTokenQuery) Offset added in v0.2.0

func (_q *PrincipalTokenQuery) Offset(offset int) *PrincipalTokenQuery

Offset to start from.

func (*PrincipalTokenQuery) Only added in v0.2.0

Only returns a single PrincipalToken entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PrincipalToken entity is found. Returns a *NotFoundError when no PrincipalToken entities are found.

func (*PrincipalTokenQuery) OnlyID added in v0.2.0

func (_q *PrincipalTokenQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only PrincipalToken ID in the query. Returns a *NotSingularError when more than one PrincipalToken ID is found. Returns a *NotFoundError when no entities are found.

func (*PrincipalTokenQuery) OnlyIDX added in v0.2.0

func (_q *PrincipalTokenQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*PrincipalTokenQuery) OnlyX added in v0.2.0

OnlyX is like Only, but panics if an error occurs.

func (*PrincipalTokenQuery) Order added in v0.2.0

Order specifies how the records should be ordered.

func (*PrincipalTokenQuery) QueryChildTokens added in v0.2.0

func (_q *PrincipalTokenQuery) QueryChildTokens() *PrincipalTokenQuery

QueryChildTokens chains the current query on the "child_tokens" edge.

func (*PrincipalTokenQuery) QueryIssuedByApp added in v0.2.0

func (_q *PrincipalTokenQuery) QueryIssuedByApp() *ApplicationQuery

QueryIssuedByApp chains the current query on the "issued_by_app" edge.

func (*PrincipalTokenQuery) QueryParentToken added in v0.2.0

func (_q *PrincipalTokenQuery) QueryParentToken() *PrincipalTokenQuery

QueryParentToken chains the current query on the "parent_token" edge.

func (*PrincipalTokenQuery) QueryPrincipal added in v0.2.0

func (_q *PrincipalTokenQuery) QueryPrincipal() *PrincipalQuery

QueryPrincipal chains the current query on the "principal" edge.

func (*PrincipalTokenQuery) Select added in v0.2.0

func (_q *PrincipalTokenQuery) Select(fields ...string) *PrincipalTokenSelect

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 {
	PrincipalID uuid.UUID `json:"principal_id,omitempty"`
}

client.PrincipalToken.Query().
	Select(principaltoken.FieldPrincipalID).
	Scan(ctx, &v)

func (*PrincipalTokenQuery) Unique added in v0.2.0

func (_q *PrincipalTokenQuery) Unique(unique bool) *PrincipalTokenQuery

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 (*PrincipalTokenQuery) Where added in v0.2.0

Where adds a new predicate for the PrincipalTokenQuery builder.

func (*PrincipalTokenQuery) WithChildTokens added in v0.2.0

func (_q *PrincipalTokenQuery) WithChildTokens(opts ...func(*PrincipalTokenQuery)) *PrincipalTokenQuery

WithChildTokens tells the query-builder to eager-load the nodes that are connected to the "child_tokens" edge. The optional arguments are used to configure the query builder of the edge.

func (*PrincipalTokenQuery) WithIssuedByApp added in v0.2.0

func (_q *PrincipalTokenQuery) WithIssuedByApp(opts ...func(*ApplicationQuery)) *PrincipalTokenQuery

WithIssuedByApp tells the query-builder to eager-load the nodes that are connected to the "issued_by_app" edge. The optional arguments are used to configure the query builder of the edge.

func (*PrincipalTokenQuery) WithParentToken added in v0.2.0

func (_q *PrincipalTokenQuery) WithParentToken(opts ...func(*PrincipalTokenQuery)) *PrincipalTokenQuery

WithParentToken tells the query-builder to eager-load the nodes that are connected to the "parent_token" edge. The optional arguments are used to configure the query builder of the edge.

func (*PrincipalTokenQuery) WithPrincipal added in v0.2.0

func (_q *PrincipalTokenQuery) WithPrincipal(opts ...func(*PrincipalQuery)) *PrincipalTokenQuery

WithPrincipal tells the query-builder to eager-load the nodes that are connected to the "principal" edge. The optional arguments are used to configure the query builder of the edge.

type PrincipalTokenSelect added in v0.2.0

type PrincipalTokenSelect struct {
	*PrincipalTokenQuery
	// contains filtered or unexported fields
}

PrincipalTokenSelect is the builder for selecting fields of PrincipalToken entities.

func (*PrincipalTokenSelect) Aggregate added in v0.2.0

Aggregate adds the given aggregation functions to the selector query.

func (*PrincipalTokenSelect) Bool added in v0.2.0

func (s *PrincipalTokenSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PrincipalTokenSelect) BoolX added in v0.2.0

func (s *PrincipalTokenSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PrincipalTokenSelect) Bools added in v0.2.0

func (s *PrincipalTokenSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PrincipalTokenSelect) BoolsX added in v0.2.0

func (s *PrincipalTokenSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PrincipalTokenSelect) Float64 added in v0.2.0

func (s *PrincipalTokenSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PrincipalTokenSelect) Float64X added in v0.2.0

func (s *PrincipalTokenSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PrincipalTokenSelect) Float64s added in v0.2.0

func (s *PrincipalTokenSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PrincipalTokenSelect) Float64sX added in v0.2.0

func (s *PrincipalTokenSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PrincipalTokenSelect) Int added in v0.2.0

func (s *PrincipalTokenSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PrincipalTokenSelect) IntX added in v0.2.0

func (s *PrincipalTokenSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PrincipalTokenSelect) Ints added in v0.2.0

func (s *PrincipalTokenSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PrincipalTokenSelect) IntsX added in v0.2.0

func (s *PrincipalTokenSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PrincipalTokenSelect) Scan added in v0.2.0

func (_s *PrincipalTokenSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PrincipalTokenSelect) ScanX added in v0.2.0

func (s *PrincipalTokenSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PrincipalTokenSelect) String added in v0.2.0

func (s *PrincipalTokenSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PrincipalTokenSelect) StringX added in v0.2.0

func (s *PrincipalTokenSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PrincipalTokenSelect) Strings added in v0.2.0

func (s *PrincipalTokenSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PrincipalTokenSelect) StringsX added in v0.2.0

func (s *PrincipalTokenSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PrincipalTokenUpdate added in v0.2.0

type PrincipalTokenUpdate struct {
	// contains filtered or unexported fields
}

PrincipalTokenUpdate is the builder for updating PrincipalToken entities.

func (*PrincipalTokenUpdate) AddChildTokenIDs added in v0.2.0

func (_u *PrincipalTokenUpdate) AddChildTokenIDs(ids ...uuid.UUID) *PrincipalTokenUpdate

AddChildTokenIDs adds the "child_tokens" edge to the PrincipalToken entity by IDs.

func (*PrincipalTokenUpdate) AddChildTokens added in v0.2.0

func (_u *PrincipalTokenUpdate) AddChildTokens(v ...*PrincipalToken) *PrincipalTokenUpdate

AddChildTokens adds the "child_tokens" edges to the PrincipalToken entity.

func (*PrincipalTokenUpdate) AppendAudience added in v0.2.0

func (_u *PrincipalTokenUpdate) AppendAudience(v []string) *PrincipalTokenUpdate

AppendAudience appends value to the "audience" field.

func (*PrincipalTokenUpdate) AppendDelegationChain added in v0.2.0

func (_u *PrincipalTokenUpdate) AppendDelegationChain(v []string) *PrincipalTokenUpdate

AppendDelegationChain appends value to the "delegation_chain" field.

func (*PrincipalTokenUpdate) AppendScopes added in v0.2.0

func (_u *PrincipalTokenUpdate) AppendScopes(v []string) *PrincipalTokenUpdate

AppendScopes appends value to the "scopes" field.

func (*PrincipalTokenUpdate) ClearChildTokens added in v0.2.0

func (_u *PrincipalTokenUpdate) ClearChildTokens() *PrincipalTokenUpdate

ClearChildTokens clears all "child_tokens" edges to the PrincipalToken entity.

func (*PrincipalTokenUpdate) ClearClientIP added in v0.2.0

func (_u *PrincipalTokenUpdate) ClearClientIP() *PrincipalTokenUpdate

ClearClientIP clears the value of the "client_ip" field.

func (*PrincipalTokenUpdate) ClearDpopJkt added in v0.2.0

func (_u *PrincipalTokenUpdate) ClearDpopJkt() *PrincipalTokenUpdate

ClearDpopJkt clears the value of the "dpop_jkt" field.

func (*PrincipalTokenUpdate) ClearIssuedByApp added in v0.2.0

func (_u *PrincipalTokenUpdate) ClearIssuedByApp() *PrincipalTokenUpdate

ClearIssuedByApp clears the "issued_by_app" edge to the Application entity.

func (*PrincipalTokenUpdate) ClearIssuedByAppID added in v0.2.0

func (_u *PrincipalTokenUpdate) ClearIssuedByAppID() *PrincipalTokenUpdate

ClearIssuedByAppID clears the value of the "issued_by_app_id" field.

func (*PrincipalTokenUpdate) ClearLastUsedAt added in v0.2.0

func (_u *PrincipalTokenUpdate) ClearLastUsedAt() *PrincipalTokenUpdate

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*PrincipalTokenUpdate) ClearParentToken added in v0.2.0

func (_u *PrincipalTokenUpdate) ClearParentToken() *PrincipalTokenUpdate

ClearParentToken clears the "parent_token" edge to the PrincipalToken entity.

func (*PrincipalTokenUpdate) ClearParentTokenID added in v0.2.0

func (_u *PrincipalTokenUpdate) ClearParentTokenID() *PrincipalTokenUpdate

ClearParentTokenID clears the value of the "parent_token_id" field.

func (*PrincipalTokenUpdate) ClearPrincipal added in v0.2.0

func (_u *PrincipalTokenUpdate) ClearPrincipal() *PrincipalTokenUpdate

ClearPrincipal clears the "principal" edge to the Principal entity.

func (*PrincipalTokenUpdate) ClearRefreshExpiresAt added in v0.2.0

func (_u *PrincipalTokenUpdate) ClearRefreshExpiresAt() *PrincipalTokenUpdate

ClearRefreshExpiresAt clears the value of the "refresh_expires_at" field.

func (*PrincipalTokenUpdate) ClearRefreshTokenSignature added in v0.2.0

func (_u *PrincipalTokenUpdate) ClearRefreshTokenSignature() *PrincipalTokenUpdate

ClearRefreshTokenSignature clears the value of the "refresh_token_signature" field.

func (*PrincipalTokenUpdate) ClearRequestData added in v0.2.0

func (_u *PrincipalTokenUpdate) ClearRequestData() *PrincipalTokenUpdate

ClearRequestData clears the value of the "request_data" field.

func (*PrincipalTokenUpdate) ClearRevokedAt added in v0.2.0

func (_u *PrincipalTokenUpdate) ClearRevokedAt() *PrincipalTokenUpdate

ClearRevokedAt clears the value of the "revoked_at" field.

func (*PrincipalTokenUpdate) ClearRevokedReason added in v0.2.0

func (_u *PrincipalTokenUpdate) ClearRevokedReason() *PrincipalTokenUpdate

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*PrincipalTokenUpdate) ClearSessionID added in v0.2.0

func (_u *PrincipalTokenUpdate) ClearSessionID() *PrincipalTokenUpdate

ClearSessionID clears the value of the "session_id" field.

func (*PrincipalTokenUpdate) ClearUserAgent added in v0.2.0

func (_u *PrincipalTokenUpdate) ClearUserAgent() *PrincipalTokenUpdate

ClearUserAgent clears the value of the "user_agent" field.

func (*PrincipalTokenUpdate) Exec added in v0.2.0

func (_u *PrincipalTokenUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PrincipalTokenUpdate) ExecX added in v0.2.0

func (_u *PrincipalTokenUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PrincipalTokenUpdate) Mutation added in v0.2.0

Mutation returns the PrincipalTokenMutation object of the builder.

func (*PrincipalTokenUpdate) RemoveChildTokenIDs added in v0.2.0

func (_u *PrincipalTokenUpdate) RemoveChildTokenIDs(ids ...uuid.UUID) *PrincipalTokenUpdate

RemoveChildTokenIDs removes the "child_tokens" edge to PrincipalToken entities by IDs.

func (*PrincipalTokenUpdate) RemoveChildTokens added in v0.2.0

func (_u *PrincipalTokenUpdate) RemoveChildTokens(v ...*PrincipalToken) *PrincipalTokenUpdate

RemoveChildTokens removes "child_tokens" edges to PrincipalToken entities.

func (*PrincipalTokenUpdate) Save added in v0.2.0

func (_u *PrincipalTokenUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PrincipalTokenUpdate) SaveX added in v0.2.0

func (_u *PrincipalTokenUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PrincipalTokenUpdate) SetAccessExpiresAt added in v0.2.0

func (_u *PrincipalTokenUpdate) SetAccessExpiresAt(v time.Time) *PrincipalTokenUpdate

SetAccessExpiresAt sets the "access_expires_at" field.

func (*PrincipalTokenUpdate) SetAccessTokenSignature added in v0.2.0

func (_u *PrincipalTokenUpdate) SetAccessTokenSignature(v string) *PrincipalTokenUpdate

SetAccessTokenSignature sets the "access_token_signature" field.

func (*PrincipalTokenUpdate) SetAudience added in v0.2.0

func (_u *PrincipalTokenUpdate) SetAudience(v []string) *PrincipalTokenUpdate

SetAudience sets the "audience" field.

func (*PrincipalTokenUpdate) SetCapabilities added in v0.2.0

func (_u *PrincipalTokenUpdate) SetCapabilities(v map[string]bool) *PrincipalTokenUpdate

SetCapabilities sets the "capabilities" field.

func (*PrincipalTokenUpdate) SetClientIP added in v0.2.0

func (_u *PrincipalTokenUpdate) SetClientIP(v string) *PrincipalTokenUpdate

SetClientIP sets the "client_ip" field.

func (*PrincipalTokenUpdate) SetDelegationChain added in v0.2.0

func (_u *PrincipalTokenUpdate) SetDelegationChain(v []string) *PrincipalTokenUpdate

SetDelegationChain sets the "delegation_chain" field.

func (*PrincipalTokenUpdate) SetDpopJkt added in v0.2.0

SetDpopJkt sets the "dpop_jkt" field.

func (*PrincipalTokenUpdate) SetFamilyID added in v0.2.0

func (_u *PrincipalTokenUpdate) SetFamilyID(v uuid.UUID) *PrincipalTokenUpdate

SetFamilyID sets the "family_id" field.

func (*PrincipalTokenUpdate) SetIssuedByApp added in v0.2.0

func (_u *PrincipalTokenUpdate) SetIssuedByApp(v *Application) *PrincipalTokenUpdate

SetIssuedByApp sets the "issued_by_app" edge to the Application entity.

func (*PrincipalTokenUpdate) SetIssuedByAppID added in v0.2.0

func (_u *PrincipalTokenUpdate) SetIssuedByAppID(v uuid.UUID) *PrincipalTokenUpdate

SetIssuedByAppID sets the "issued_by_app_id" field.

func (*PrincipalTokenUpdate) SetLastUsedAt added in v0.2.0

func (_u *PrincipalTokenUpdate) SetLastUsedAt(v time.Time) *PrincipalTokenUpdate

SetLastUsedAt sets the "last_used_at" field.

func (*PrincipalTokenUpdate) SetNillableAccessExpiresAt added in v0.2.0

func (_u *PrincipalTokenUpdate) SetNillableAccessExpiresAt(v *time.Time) *PrincipalTokenUpdate

SetNillableAccessExpiresAt sets the "access_expires_at" field if the given value is not nil.

func (*PrincipalTokenUpdate) SetNillableAccessTokenSignature added in v0.2.0

func (_u *PrincipalTokenUpdate) SetNillableAccessTokenSignature(v *string) *PrincipalTokenUpdate

SetNillableAccessTokenSignature sets the "access_token_signature" field if the given value is not nil.

func (*PrincipalTokenUpdate) SetNillableClientIP added in v0.2.0

func (_u *PrincipalTokenUpdate) SetNillableClientIP(v *string) *PrincipalTokenUpdate

SetNillableClientIP sets the "client_ip" field if the given value is not nil.

func (*PrincipalTokenUpdate) SetNillableDpopJkt added in v0.2.0

func (_u *PrincipalTokenUpdate) SetNillableDpopJkt(v *string) *PrincipalTokenUpdate

SetNillableDpopJkt sets the "dpop_jkt" field if the given value is not nil.

func (*PrincipalTokenUpdate) SetNillableFamilyID added in v0.2.0

func (_u *PrincipalTokenUpdate) SetNillableFamilyID(v *uuid.UUID) *PrincipalTokenUpdate

SetNillableFamilyID sets the "family_id" field if the given value is not nil.

func (*PrincipalTokenUpdate) SetNillableIssuedByAppID added in v0.2.0

func (_u *PrincipalTokenUpdate) SetNillableIssuedByAppID(v *uuid.UUID) *PrincipalTokenUpdate

SetNillableIssuedByAppID sets the "issued_by_app_id" field if the given value is not nil.

func (*PrincipalTokenUpdate) SetNillableLastUsedAt added in v0.2.0

func (_u *PrincipalTokenUpdate) SetNillableLastUsedAt(v *time.Time) *PrincipalTokenUpdate

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*PrincipalTokenUpdate) SetNillableParentTokenID added in v0.2.0

func (_u *PrincipalTokenUpdate) SetNillableParentTokenID(v *uuid.UUID) *PrincipalTokenUpdate

SetNillableParentTokenID sets the "parent_token_id" field if the given value is not nil.

func (*PrincipalTokenUpdate) SetNillablePrincipalID added in v0.2.0

func (_u *PrincipalTokenUpdate) SetNillablePrincipalID(v *uuid.UUID) *PrincipalTokenUpdate

SetNillablePrincipalID sets the "principal_id" field if the given value is not nil.

func (*PrincipalTokenUpdate) SetNillablePrincipalType added in v0.2.0

func (_u *PrincipalTokenUpdate) SetNillablePrincipalType(v *principaltoken.PrincipalType) *PrincipalTokenUpdate

SetNillablePrincipalType sets the "principal_type" field if the given value is not nil.

func (*PrincipalTokenUpdate) SetNillableRefreshExpiresAt added in v0.2.0

func (_u *PrincipalTokenUpdate) SetNillableRefreshExpiresAt(v *time.Time) *PrincipalTokenUpdate

SetNillableRefreshExpiresAt sets the "refresh_expires_at" field if the given value is not nil.

func (*PrincipalTokenUpdate) SetNillableRefreshTokenSignature added in v0.2.0

func (_u *PrincipalTokenUpdate) SetNillableRefreshTokenSignature(v *string) *PrincipalTokenUpdate

SetNillableRefreshTokenSignature sets the "refresh_token_signature" field if the given value is not nil.

func (*PrincipalTokenUpdate) SetNillableRequestData added in v0.2.0

func (_u *PrincipalTokenUpdate) SetNillableRequestData(v *string) *PrincipalTokenUpdate

SetNillableRequestData sets the "request_data" field if the given value is not nil.

func (*PrincipalTokenUpdate) SetNillableRevoked added in v0.2.0

func (_u *PrincipalTokenUpdate) SetNillableRevoked(v *bool) *PrincipalTokenUpdate

SetNillableRevoked sets the "revoked" field if the given value is not nil.

func (*PrincipalTokenUpdate) SetNillableRevokedAt added in v0.2.0

func (_u *PrincipalTokenUpdate) SetNillableRevokedAt(v *time.Time) *PrincipalTokenUpdate

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*PrincipalTokenUpdate) SetNillableRevokedReason added in v0.2.0

func (_u *PrincipalTokenUpdate) SetNillableRevokedReason(v *string) *PrincipalTokenUpdate

SetNillableRevokedReason sets the "revoked_reason" field if the given value is not nil.

func (*PrincipalTokenUpdate) SetNillableSessionID added in v0.2.0

func (_u *PrincipalTokenUpdate) SetNillableSessionID(v *string) *PrincipalTokenUpdate

SetNillableSessionID sets the "session_id" field if the given value is not nil.

func (*PrincipalTokenUpdate) SetNillableUserAgent added in v0.2.0

func (_u *PrincipalTokenUpdate) SetNillableUserAgent(v *string) *PrincipalTokenUpdate

SetNillableUserAgent sets the "user_agent" field if the given value is not nil.

func (*PrincipalTokenUpdate) SetParentToken added in v0.2.0

SetParentToken sets the "parent_token" edge to the PrincipalToken entity.

func (*PrincipalTokenUpdate) SetParentTokenID added in v0.2.0

func (_u *PrincipalTokenUpdate) SetParentTokenID(v uuid.UUID) *PrincipalTokenUpdate

SetParentTokenID sets the "parent_token_id" field.

func (*PrincipalTokenUpdate) SetPrincipal added in v0.2.0

func (_u *PrincipalTokenUpdate) SetPrincipal(v *Principal) *PrincipalTokenUpdate

SetPrincipal sets the "principal" edge to the Principal entity.

func (*PrincipalTokenUpdate) SetPrincipalID added in v0.2.0

func (_u *PrincipalTokenUpdate) SetPrincipalID(v uuid.UUID) *PrincipalTokenUpdate

SetPrincipalID sets the "principal_id" field.

func (*PrincipalTokenUpdate) SetPrincipalType added in v0.2.0

SetPrincipalType sets the "principal_type" field.

func (*PrincipalTokenUpdate) SetRefreshExpiresAt added in v0.2.0

func (_u *PrincipalTokenUpdate) SetRefreshExpiresAt(v time.Time) *PrincipalTokenUpdate

SetRefreshExpiresAt sets the "refresh_expires_at" field.

func (*PrincipalTokenUpdate) SetRefreshTokenSignature added in v0.2.0

func (_u *PrincipalTokenUpdate) SetRefreshTokenSignature(v string) *PrincipalTokenUpdate

SetRefreshTokenSignature sets the "refresh_token_signature" field.

func (*PrincipalTokenUpdate) SetRequestData added in v0.2.0

func (_u *PrincipalTokenUpdate) SetRequestData(v string) *PrincipalTokenUpdate

SetRequestData sets the "request_data" field.

func (*PrincipalTokenUpdate) SetRevoked added in v0.2.0

func (_u *PrincipalTokenUpdate) SetRevoked(v bool) *PrincipalTokenUpdate

SetRevoked sets the "revoked" field.

func (*PrincipalTokenUpdate) SetRevokedAt added in v0.2.0

func (_u *PrincipalTokenUpdate) SetRevokedAt(v time.Time) *PrincipalTokenUpdate

SetRevokedAt sets the "revoked_at" field.

func (*PrincipalTokenUpdate) SetRevokedReason added in v0.2.0

func (_u *PrincipalTokenUpdate) SetRevokedReason(v string) *PrincipalTokenUpdate

SetRevokedReason sets the "revoked_reason" field.

func (*PrincipalTokenUpdate) SetScopes added in v0.2.0

func (_u *PrincipalTokenUpdate) SetScopes(v []string) *PrincipalTokenUpdate

SetScopes sets the "scopes" field.

func (*PrincipalTokenUpdate) SetSessionID added in v0.2.0

func (_u *PrincipalTokenUpdate) SetSessionID(v string) *PrincipalTokenUpdate

SetSessionID sets the "session_id" field.

func (*PrincipalTokenUpdate) SetUserAgent added in v0.2.0

func (_u *PrincipalTokenUpdate) SetUserAgent(v string) *PrincipalTokenUpdate

SetUserAgent sets the "user_agent" field.

func (*PrincipalTokenUpdate) Where added in v0.2.0

Where appends a list predicates to the PrincipalTokenUpdate builder.

type PrincipalTokenUpdateOne added in v0.2.0

type PrincipalTokenUpdateOne struct {
	// contains filtered or unexported fields
}

PrincipalTokenUpdateOne is the builder for updating a single PrincipalToken entity.

func (*PrincipalTokenUpdateOne) AddChildTokenIDs added in v0.2.0

func (_u *PrincipalTokenUpdateOne) AddChildTokenIDs(ids ...uuid.UUID) *PrincipalTokenUpdateOne

AddChildTokenIDs adds the "child_tokens" edge to the PrincipalToken entity by IDs.

func (*PrincipalTokenUpdateOne) AddChildTokens added in v0.2.0

AddChildTokens adds the "child_tokens" edges to the PrincipalToken entity.

func (*PrincipalTokenUpdateOne) AppendAudience added in v0.2.0

func (_u *PrincipalTokenUpdateOne) AppendAudience(v []string) *PrincipalTokenUpdateOne

AppendAudience appends value to the "audience" field.

func (*PrincipalTokenUpdateOne) AppendDelegationChain added in v0.2.0

func (_u *PrincipalTokenUpdateOne) AppendDelegationChain(v []string) *PrincipalTokenUpdateOne

AppendDelegationChain appends value to the "delegation_chain" field.

func (*PrincipalTokenUpdateOne) AppendScopes added in v0.2.0

AppendScopes appends value to the "scopes" field.

func (*PrincipalTokenUpdateOne) ClearChildTokens added in v0.2.0

func (_u *PrincipalTokenUpdateOne) ClearChildTokens() *PrincipalTokenUpdateOne

ClearChildTokens clears all "child_tokens" edges to the PrincipalToken entity.

func (*PrincipalTokenUpdateOne) ClearClientIP added in v0.2.0

func (_u *PrincipalTokenUpdateOne) ClearClientIP() *PrincipalTokenUpdateOne

ClearClientIP clears the value of the "client_ip" field.

func (*PrincipalTokenUpdateOne) ClearDpopJkt added in v0.2.0

ClearDpopJkt clears the value of the "dpop_jkt" field.

func (*PrincipalTokenUpdateOne) ClearIssuedByApp added in v0.2.0

func (_u *PrincipalTokenUpdateOne) ClearIssuedByApp() *PrincipalTokenUpdateOne

ClearIssuedByApp clears the "issued_by_app" edge to the Application entity.

func (*PrincipalTokenUpdateOne) ClearIssuedByAppID added in v0.2.0

func (_u *PrincipalTokenUpdateOne) ClearIssuedByAppID() *PrincipalTokenUpdateOne

ClearIssuedByAppID clears the value of the "issued_by_app_id" field.

func (*PrincipalTokenUpdateOne) ClearLastUsedAt added in v0.2.0

func (_u *PrincipalTokenUpdateOne) ClearLastUsedAt() *PrincipalTokenUpdateOne

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*PrincipalTokenUpdateOne) ClearParentToken added in v0.2.0

func (_u *PrincipalTokenUpdateOne) ClearParentToken() *PrincipalTokenUpdateOne

ClearParentToken clears the "parent_token" edge to the PrincipalToken entity.

func (*PrincipalTokenUpdateOne) ClearParentTokenID added in v0.2.0

func (_u *PrincipalTokenUpdateOne) ClearParentTokenID() *PrincipalTokenUpdateOne

ClearParentTokenID clears the value of the "parent_token_id" field.

func (*PrincipalTokenUpdateOne) ClearPrincipal added in v0.2.0

func (_u *PrincipalTokenUpdateOne) ClearPrincipal() *PrincipalTokenUpdateOne

ClearPrincipal clears the "principal" edge to the Principal entity.

func (*PrincipalTokenUpdateOne) ClearRefreshExpiresAt added in v0.2.0

func (_u *PrincipalTokenUpdateOne) ClearRefreshExpiresAt() *PrincipalTokenUpdateOne

ClearRefreshExpiresAt clears the value of the "refresh_expires_at" field.

func (*PrincipalTokenUpdateOne) ClearRefreshTokenSignature added in v0.2.0

func (_u *PrincipalTokenUpdateOne) ClearRefreshTokenSignature() *PrincipalTokenUpdateOne

ClearRefreshTokenSignature clears the value of the "refresh_token_signature" field.

func (*PrincipalTokenUpdateOne) ClearRequestData added in v0.2.0

func (_u *PrincipalTokenUpdateOne) ClearRequestData() *PrincipalTokenUpdateOne

ClearRequestData clears the value of the "request_data" field.

func (*PrincipalTokenUpdateOne) ClearRevokedAt added in v0.2.0

func (_u *PrincipalTokenUpdateOne) ClearRevokedAt() *PrincipalTokenUpdateOne

ClearRevokedAt clears the value of the "revoked_at" field.

func (*PrincipalTokenUpdateOne) ClearRevokedReason added in v0.2.0

func (_u *PrincipalTokenUpdateOne) ClearRevokedReason() *PrincipalTokenUpdateOne

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*PrincipalTokenUpdateOne) ClearSessionID added in v0.2.0

func (_u *PrincipalTokenUpdateOne) ClearSessionID() *PrincipalTokenUpdateOne

ClearSessionID clears the value of the "session_id" field.

func (*PrincipalTokenUpdateOne) ClearUserAgent added in v0.2.0

func (_u *PrincipalTokenUpdateOne) ClearUserAgent() *PrincipalTokenUpdateOne

ClearUserAgent clears the value of the "user_agent" field.

func (*PrincipalTokenUpdateOne) Exec added in v0.2.0

Exec executes the query on the entity.

func (*PrincipalTokenUpdateOne) ExecX added in v0.2.0

func (_u *PrincipalTokenUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PrincipalTokenUpdateOne) Mutation added in v0.2.0

Mutation returns the PrincipalTokenMutation object of the builder.

func (*PrincipalTokenUpdateOne) RemoveChildTokenIDs added in v0.2.0

func (_u *PrincipalTokenUpdateOne) RemoveChildTokenIDs(ids ...uuid.UUID) *PrincipalTokenUpdateOne

RemoveChildTokenIDs removes the "child_tokens" edge to PrincipalToken entities by IDs.

func (*PrincipalTokenUpdateOne) RemoveChildTokens added in v0.2.0

func (_u *PrincipalTokenUpdateOne) RemoveChildTokens(v ...*PrincipalToken) *PrincipalTokenUpdateOne

RemoveChildTokens removes "child_tokens" edges to PrincipalToken entities.

func (*PrincipalTokenUpdateOne) Save added in v0.2.0

Save executes the query and returns the updated PrincipalToken entity.

func (*PrincipalTokenUpdateOne) SaveX added in v0.2.0

SaveX is like Save, but panics if an error occurs.

func (*PrincipalTokenUpdateOne) Select added in v0.2.0

func (_u *PrincipalTokenUpdateOne) Select(field string, fields ...string) *PrincipalTokenUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PrincipalTokenUpdateOne) SetAccessExpiresAt added in v0.2.0

func (_u *PrincipalTokenUpdateOne) SetAccessExpiresAt(v time.Time) *PrincipalTokenUpdateOne

SetAccessExpiresAt sets the "access_expires_at" field.

func (*PrincipalTokenUpdateOne) SetAccessTokenSignature added in v0.2.0

func (_u *PrincipalTokenUpdateOne) SetAccessTokenSignature(v string) *PrincipalTokenUpdateOne

SetAccessTokenSignature sets the "access_token_signature" field.

func (*PrincipalTokenUpdateOne) SetAudience added in v0.2.0

SetAudience sets the "audience" field.

func (*PrincipalTokenUpdateOne) SetCapabilities added in v0.2.0

func (_u *PrincipalTokenUpdateOne) SetCapabilities(v map[string]bool) *PrincipalTokenUpdateOne

SetCapabilities sets the "capabilities" field.

func (*PrincipalTokenUpdateOne) SetClientIP added in v0.2.0

SetClientIP sets the "client_ip" field.

func (*PrincipalTokenUpdateOne) SetDelegationChain added in v0.2.0

func (_u *PrincipalTokenUpdateOne) SetDelegationChain(v []string) *PrincipalTokenUpdateOne

SetDelegationChain sets the "delegation_chain" field.

func (*PrincipalTokenUpdateOne) SetDpopJkt added in v0.2.0

SetDpopJkt sets the "dpop_jkt" field.

func (*PrincipalTokenUpdateOne) SetFamilyID added in v0.2.0

SetFamilyID sets the "family_id" field.

func (*PrincipalTokenUpdateOne) SetIssuedByApp added in v0.2.0

SetIssuedByApp sets the "issued_by_app" edge to the Application entity.

func (*PrincipalTokenUpdateOne) SetIssuedByAppID added in v0.2.0

func (_u *PrincipalTokenUpdateOne) SetIssuedByAppID(v uuid.UUID) *PrincipalTokenUpdateOne

SetIssuedByAppID sets the "issued_by_app_id" field.

func (*PrincipalTokenUpdateOne) SetLastUsedAt added in v0.2.0

SetLastUsedAt sets the "last_used_at" field.

func (*PrincipalTokenUpdateOne) SetNillableAccessExpiresAt added in v0.2.0

func (_u *PrincipalTokenUpdateOne) SetNillableAccessExpiresAt(v *time.Time) *PrincipalTokenUpdateOne

SetNillableAccessExpiresAt sets the "access_expires_at" field if the given value is not nil.

func (*PrincipalTokenUpdateOne) SetNillableAccessTokenSignature added in v0.2.0

func (_u *PrincipalTokenUpdateOne) SetNillableAccessTokenSignature(v *string) *PrincipalTokenUpdateOne

SetNillableAccessTokenSignature sets the "access_token_signature" field if the given value is not nil.

func (*PrincipalTokenUpdateOne) SetNillableClientIP added in v0.2.0

func (_u *PrincipalTokenUpdateOne) SetNillableClientIP(v *string) *PrincipalTokenUpdateOne

SetNillableClientIP sets the "client_ip" field if the given value is not nil.

func (*PrincipalTokenUpdateOne) SetNillableDpopJkt added in v0.2.0

func (_u *PrincipalTokenUpdateOne) SetNillableDpopJkt(v *string) *PrincipalTokenUpdateOne

SetNillableDpopJkt sets the "dpop_jkt" field if the given value is not nil.

func (*PrincipalTokenUpdateOne) SetNillableFamilyID added in v0.2.0

func (_u *PrincipalTokenUpdateOne) SetNillableFamilyID(v *uuid.UUID) *PrincipalTokenUpdateOne

SetNillableFamilyID sets the "family_id" field if the given value is not nil.

func (*PrincipalTokenUpdateOne) SetNillableIssuedByAppID added in v0.2.0

func (_u *PrincipalTokenUpdateOne) SetNillableIssuedByAppID(v *uuid.UUID) *PrincipalTokenUpdateOne

SetNillableIssuedByAppID sets the "issued_by_app_id" field if the given value is not nil.

func (*PrincipalTokenUpdateOne) SetNillableLastUsedAt added in v0.2.0

func (_u *PrincipalTokenUpdateOne) SetNillableLastUsedAt(v *time.Time) *PrincipalTokenUpdateOne

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*PrincipalTokenUpdateOne) SetNillableParentTokenID added in v0.2.0

func (_u *PrincipalTokenUpdateOne) SetNillableParentTokenID(v *uuid.UUID) *PrincipalTokenUpdateOne

SetNillableParentTokenID sets the "parent_token_id" field if the given value is not nil.

func (*PrincipalTokenUpdateOne) SetNillablePrincipalID added in v0.2.0

func (_u *PrincipalTokenUpdateOne) SetNillablePrincipalID(v *uuid.UUID) *PrincipalTokenUpdateOne

SetNillablePrincipalID sets the "principal_id" field if the given value is not nil.

func (*PrincipalTokenUpdateOne) SetNillablePrincipalType added in v0.2.0

SetNillablePrincipalType sets the "principal_type" field if the given value is not nil.

func (*PrincipalTokenUpdateOne) SetNillableRefreshExpiresAt added in v0.2.0

func (_u *PrincipalTokenUpdateOne) SetNillableRefreshExpiresAt(v *time.Time) *PrincipalTokenUpdateOne

SetNillableRefreshExpiresAt sets the "refresh_expires_at" field if the given value is not nil.

func (*PrincipalTokenUpdateOne) SetNillableRefreshTokenSignature added in v0.2.0

func (_u *PrincipalTokenUpdateOne) SetNillableRefreshTokenSignature(v *string) *PrincipalTokenUpdateOne

SetNillableRefreshTokenSignature sets the "refresh_token_signature" field if the given value is not nil.

func (*PrincipalTokenUpdateOne) SetNillableRequestData added in v0.2.0

func (_u *PrincipalTokenUpdateOne) SetNillableRequestData(v *string) *PrincipalTokenUpdateOne

SetNillableRequestData sets the "request_data" field if the given value is not nil.

func (*PrincipalTokenUpdateOne) SetNillableRevoked added in v0.2.0

func (_u *PrincipalTokenUpdateOne) SetNillableRevoked(v *bool) *PrincipalTokenUpdateOne

SetNillableRevoked sets the "revoked" field if the given value is not nil.

func (*PrincipalTokenUpdateOne) SetNillableRevokedAt added in v0.2.0

func (_u *PrincipalTokenUpdateOne) SetNillableRevokedAt(v *time.Time) *PrincipalTokenUpdateOne

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*PrincipalTokenUpdateOne) SetNillableRevokedReason added in v0.2.0

func (_u *PrincipalTokenUpdateOne) SetNillableRevokedReason(v *string) *PrincipalTokenUpdateOne

SetNillableRevokedReason sets the "revoked_reason" field if the given value is not nil.

func (*PrincipalTokenUpdateOne) SetNillableSessionID added in v0.2.0

func (_u *PrincipalTokenUpdateOne) SetNillableSessionID(v *string) *PrincipalTokenUpdateOne

SetNillableSessionID sets the "session_id" field if the given value is not nil.

func (*PrincipalTokenUpdateOne) SetNillableUserAgent added in v0.2.0

func (_u *PrincipalTokenUpdateOne) SetNillableUserAgent(v *string) *PrincipalTokenUpdateOne

SetNillableUserAgent sets the "user_agent" field if the given value is not nil.

func (*PrincipalTokenUpdateOne) SetParentToken added in v0.2.0

SetParentToken sets the "parent_token" edge to the PrincipalToken entity.

func (*PrincipalTokenUpdateOne) SetParentTokenID added in v0.2.0

func (_u *PrincipalTokenUpdateOne) SetParentTokenID(v uuid.UUID) *PrincipalTokenUpdateOne

SetParentTokenID sets the "parent_token_id" field.

func (*PrincipalTokenUpdateOne) SetPrincipal added in v0.2.0

SetPrincipal sets the "principal" edge to the Principal entity.

func (*PrincipalTokenUpdateOne) SetPrincipalID added in v0.2.0

SetPrincipalID sets the "principal_id" field.

func (*PrincipalTokenUpdateOne) SetPrincipalType added in v0.2.0

SetPrincipalType sets the "principal_type" field.

func (*PrincipalTokenUpdateOne) SetRefreshExpiresAt added in v0.2.0

func (_u *PrincipalTokenUpdateOne) SetRefreshExpiresAt(v time.Time) *PrincipalTokenUpdateOne

SetRefreshExpiresAt sets the "refresh_expires_at" field.

func (*PrincipalTokenUpdateOne) SetRefreshTokenSignature added in v0.2.0

func (_u *PrincipalTokenUpdateOne) SetRefreshTokenSignature(v string) *PrincipalTokenUpdateOne

SetRefreshTokenSignature sets the "refresh_token_signature" field.

func (*PrincipalTokenUpdateOne) SetRequestData added in v0.2.0

SetRequestData sets the "request_data" field.

func (*PrincipalTokenUpdateOne) SetRevoked added in v0.2.0

SetRevoked sets the "revoked" field.

func (*PrincipalTokenUpdateOne) SetRevokedAt added in v0.2.0

SetRevokedAt sets the "revoked_at" field.

func (*PrincipalTokenUpdateOne) SetRevokedReason added in v0.2.0

func (_u *PrincipalTokenUpdateOne) SetRevokedReason(v string) *PrincipalTokenUpdateOne

SetRevokedReason sets the "revoked_reason" field.

func (*PrincipalTokenUpdateOne) SetScopes added in v0.2.0

SetScopes sets the "scopes" field.

func (*PrincipalTokenUpdateOne) SetSessionID added in v0.2.0

SetSessionID sets the "session_id" field.

func (*PrincipalTokenUpdateOne) SetUserAgent added in v0.2.0

SetUserAgent sets the "user_agent" field.

func (*PrincipalTokenUpdateOne) Where added in v0.2.0

Where appends a list predicates to the PrincipalTokenUpdate builder.

type PrincipalTokenUpsert added in v0.2.0

type PrincipalTokenUpsert struct {
	*sql.UpdateSet
}

PrincipalTokenUpsert is the "OnConflict" setter.

func (*PrincipalTokenUpsert) ClearClientIP added in v0.2.0

func (u *PrincipalTokenUpsert) ClearClientIP() *PrincipalTokenUpsert

ClearClientIP clears the value of the "client_ip" field.

func (*PrincipalTokenUpsert) ClearDpopJkt added in v0.2.0

func (u *PrincipalTokenUpsert) ClearDpopJkt() *PrincipalTokenUpsert

ClearDpopJkt clears the value of the "dpop_jkt" field.

func (*PrincipalTokenUpsert) ClearIssuedByAppID added in v0.2.0

func (u *PrincipalTokenUpsert) ClearIssuedByAppID() *PrincipalTokenUpsert

ClearIssuedByAppID clears the value of the "issued_by_app_id" field.

func (*PrincipalTokenUpsert) ClearLastUsedAt added in v0.2.0

func (u *PrincipalTokenUpsert) ClearLastUsedAt() *PrincipalTokenUpsert

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*PrincipalTokenUpsert) ClearParentTokenID added in v0.2.0

func (u *PrincipalTokenUpsert) ClearParentTokenID() *PrincipalTokenUpsert

ClearParentTokenID clears the value of the "parent_token_id" field.

func (*PrincipalTokenUpsert) ClearRefreshExpiresAt added in v0.2.0

func (u *PrincipalTokenUpsert) ClearRefreshExpiresAt() *PrincipalTokenUpsert

ClearRefreshExpiresAt clears the value of the "refresh_expires_at" field.

func (*PrincipalTokenUpsert) ClearRefreshTokenSignature added in v0.2.0

func (u *PrincipalTokenUpsert) ClearRefreshTokenSignature() *PrincipalTokenUpsert

ClearRefreshTokenSignature clears the value of the "refresh_token_signature" field.

func (*PrincipalTokenUpsert) ClearRequestData added in v0.2.0

func (u *PrincipalTokenUpsert) ClearRequestData() *PrincipalTokenUpsert

ClearRequestData clears the value of the "request_data" field.

func (*PrincipalTokenUpsert) ClearRevokedAt added in v0.2.0

func (u *PrincipalTokenUpsert) ClearRevokedAt() *PrincipalTokenUpsert

ClearRevokedAt clears the value of the "revoked_at" field.

func (*PrincipalTokenUpsert) ClearRevokedReason added in v0.2.0

func (u *PrincipalTokenUpsert) ClearRevokedReason() *PrincipalTokenUpsert

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*PrincipalTokenUpsert) ClearSessionID added in v0.2.0

func (u *PrincipalTokenUpsert) ClearSessionID() *PrincipalTokenUpsert

ClearSessionID clears the value of the "session_id" field.

func (*PrincipalTokenUpsert) ClearUserAgent added in v0.2.0

func (u *PrincipalTokenUpsert) ClearUserAgent() *PrincipalTokenUpsert

ClearUserAgent clears the value of the "user_agent" field.

func (*PrincipalTokenUpsert) SetAccessExpiresAt added in v0.2.0

func (u *PrincipalTokenUpsert) SetAccessExpiresAt(v time.Time) *PrincipalTokenUpsert

SetAccessExpiresAt sets the "access_expires_at" field.

func (*PrincipalTokenUpsert) SetAccessTokenSignature added in v0.2.0

func (u *PrincipalTokenUpsert) SetAccessTokenSignature(v string) *PrincipalTokenUpsert

SetAccessTokenSignature sets the "access_token_signature" field.

func (*PrincipalTokenUpsert) SetAudience added in v0.2.0

func (u *PrincipalTokenUpsert) SetAudience(v []string) *PrincipalTokenUpsert

SetAudience sets the "audience" field.

func (*PrincipalTokenUpsert) SetCapabilities added in v0.2.0

func (u *PrincipalTokenUpsert) SetCapabilities(v map[string]bool) *PrincipalTokenUpsert

SetCapabilities sets the "capabilities" field.

func (*PrincipalTokenUpsert) SetClientIP added in v0.2.0

SetClientIP sets the "client_ip" field.

func (*PrincipalTokenUpsert) SetDelegationChain added in v0.2.0

func (u *PrincipalTokenUpsert) SetDelegationChain(v []string) *PrincipalTokenUpsert

SetDelegationChain sets the "delegation_chain" field.

func (*PrincipalTokenUpsert) SetDpopJkt added in v0.2.0

SetDpopJkt sets the "dpop_jkt" field.

func (*PrincipalTokenUpsert) SetFamilyID added in v0.2.0

SetFamilyID sets the "family_id" field.

func (*PrincipalTokenUpsert) SetIssuedByAppID added in v0.2.0

func (u *PrincipalTokenUpsert) SetIssuedByAppID(v uuid.UUID) *PrincipalTokenUpsert

SetIssuedByAppID sets the "issued_by_app_id" field.

func (*PrincipalTokenUpsert) SetLastUsedAt added in v0.2.0

func (u *PrincipalTokenUpsert) SetLastUsedAt(v time.Time) *PrincipalTokenUpsert

SetLastUsedAt sets the "last_used_at" field.

func (*PrincipalTokenUpsert) SetParentTokenID added in v0.2.0

func (u *PrincipalTokenUpsert) SetParentTokenID(v uuid.UUID) *PrincipalTokenUpsert

SetParentTokenID sets the "parent_token_id" field.

func (*PrincipalTokenUpsert) SetPrincipalID added in v0.2.0

func (u *PrincipalTokenUpsert) SetPrincipalID(v uuid.UUID) *PrincipalTokenUpsert

SetPrincipalID sets the "principal_id" field.

func (*PrincipalTokenUpsert) SetPrincipalType added in v0.2.0

SetPrincipalType sets the "principal_type" field.

func (*PrincipalTokenUpsert) SetRefreshExpiresAt added in v0.2.0

func (u *PrincipalTokenUpsert) SetRefreshExpiresAt(v time.Time) *PrincipalTokenUpsert

SetRefreshExpiresAt sets the "refresh_expires_at" field.

func (*PrincipalTokenUpsert) SetRefreshTokenSignature added in v0.2.0

func (u *PrincipalTokenUpsert) SetRefreshTokenSignature(v string) *PrincipalTokenUpsert

SetRefreshTokenSignature sets the "refresh_token_signature" field.

func (*PrincipalTokenUpsert) SetRequestData added in v0.2.0

func (u *PrincipalTokenUpsert) SetRequestData(v string) *PrincipalTokenUpsert

SetRequestData sets the "request_data" field.

func (*PrincipalTokenUpsert) SetRevoked added in v0.2.0

SetRevoked sets the "revoked" field.

func (*PrincipalTokenUpsert) SetRevokedAt added in v0.2.0

func (u *PrincipalTokenUpsert) SetRevokedAt(v time.Time) *PrincipalTokenUpsert

SetRevokedAt sets the "revoked_at" field.

func (*PrincipalTokenUpsert) SetRevokedReason added in v0.2.0

func (u *PrincipalTokenUpsert) SetRevokedReason(v string) *PrincipalTokenUpsert

SetRevokedReason sets the "revoked_reason" field.

func (*PrincipalTokenUpsert) SetScopes added in v0.2.0

SetScopes sets the "scopes" field.

func (*PrincipalTokenUpsert) SetSessionID added in v0.2.0

func (u *PrincipalTokenUpsert) SetSessionID(v string) *PrincipalTokenUpsert

SetSessionID sets the "session_id" field.

func (*PrincipalTokenUpsert) SetUserAgent added in v0.2.0

func (u *PrincipalTokenUpsert) SetUserAgent(v string) *PrincipalTokenUpsert

SetUserAgent sets the "user_agent" field.

func (*PrincipalTokenUpsert) UpdateAccessExpiresAt added in v0.2.0

func (u *PrincipalTokenUpsert) UpdateAccessExpiresAt() *PrincipalTokenUpsert

UpdateAccessExpiresAt sets the "access_expires_at" field to the value that was provided on create.

func (*PrincipalTokenUpsert) UpdateAccessTokenSignature added in v0.2.0

func (u *PrincipalTokenUpsert) UpdateAccessTokenSignature() *PrincipalTokenUpsert

UpdateAccessTokenSignature sets the "access_token_signature" field to the value that was provided on create.

func (*PrincipalTokenUpsert) UpdateAudience added in v0.2.0

func (u *PrincipalTokenUpsert) UpdateAudience() *PrincipalTokenUpsert

UpdateAudience sets the "audience" field to the value that was provided on create.

func (*PrincipalTokenUpsert) UpdateCapabilities added in v0.2.0

func (u *PrincipalTokenUpsert) UpdateCapabilities() *PrincipalTokenUpsert

UpdateCapabilities sets the "capabilities" field to the value that was provided on create.

func (*PrincipalTokenUpsert) UpdateClientIP added in v0.2.0

func (u *PrincipalTokenUpsert) UpdateClientIP() *PrincipalTokenUpsert

UpdateClientIP sets the "client_ip" field to the value that was provided on create.

func (*PrincipalTokenUpsert) UpdateDelegationChain added in v0.2.0

func (u *PrincipalTokenUpsert) UpdateDelegationChain() *PrincipalTokenUpsert

UpdateDelegationChain sets the "delegation_chain" field to the value that was provided on create.

func (*PrincipalTokenUpsert) UpdateDpopJkt added in v0.2.0

func (u *PrincipalTokenUpsert) UpdateDpopJkt() *PrincipalTokenUpsert

UpdateDpopJkt sets the "dpop_jkt" field to the value that was provided on create.

func (*PrincipalTokenUpsert) UpdateFamilyID added in v0.2.0

func (u *PrincipalTokenUpsert) UpdateFamilyID() *PrincipalTokenUpsert

UpdateFamilyID sets the "family_id" field to the value that was provided on create.

func (*PrincipalTokenUpsert) UpdateIssuedByAppID added in v0.2.0

func (u *PrincipalTokenUpsert) UpdateIssuedByAppID() *PrincipalTokenUpsert

UpdateIssuedByAppID sets the "issued_by_app_id" field to the value that was provided on create.

func (*PrincipalTokenUpsert) UpdateLastUsedAt added in v0.2.0

func (u *PrincipalTokenUpsert) UpdateLastUsedAt() *PrincipalTokenUpsert

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*PrincipalTokenUpsert) UpdateParentTokenID added in v0.2.0

func (u *PrincipalTokenUpsert) UpdateParentTokenID() *PrincipalTokenUpsert

UpdateParentTokenID sets the "parent_token_id" field to the value that was provided on create.

func (*PrincipalTokenUpsert) UpdatePrincipalID added in v0.2.0

func (u *PrincipalTokenUpsert) UpdatePrincipalID() *PrincipalTokenUpsert

UpdatePrincipalID sets the "principal_id" field to the value that was provided on create.

func (*PrincipalTokenUpsert) UpdatePrincipalType added in v0.2.0

func (u *PrincipalTokenUpsert) UpdatePrincipalType() *PrincipalTokenUpsert

UpdatePrincipalType sets the "principal_type" field to the value that was provided on create.

func (*PrincipalTokenUpsert) UpdateRefreshExpiresAt added in v0.2.0

func (u *PrincipalTokenUpsert) UpdateRefreshExpiresAt() *PrincipalTokenUpsert

UpdateRefreshExpiresAt sets the "refresh_expires_at" field to the value that was provided on create.

func (*PrincipalTokenUpsert) UpdateRefreshTokenSignature added in v0.2.0

func (u *PrincipalTokenUpsert) UpdateRefreshTokenSignature() *PrincipalTokenUpsert

UpdateRefreshTokenSignature sets the "refresh_token_signature" field to the value that was provided on create.

func (*PrincipalTokenUpsert) UpdateRequestData added in v0.2.0

func (u *PrincipalTokenUpsert) UpdateRequestData() *PrincipalTokenUpsert

UpdateRequestData sets the "request_data" field to the value that was provided on create.

func (*PrincipalTokenUpsert) UpdateRevoked added in v0.2.0

func (u *PrincipalTokenUpsert) UpdateRevoked() *PrincipalTokenUpsert

UpdateRevoked sets the "revoked" field to the value that was provided on create.

func (*PrincipalTokenUpsert) UpdateRevokedAt added in v0.2.0

func (u *PrincipalTokenUpsert) UpdateRevokedAt() *PrincipalTokenUpsert

UpdateRevokedAt sets the "revoked_at" field to the value that was provided on create.

func (*PrincipalTokenUpsert) UpdateRevokedReason added in v0.2.0

func (u *PrincipalTokenUpsert) UpdateRevokedReason() *PrincipalTokenUpsert

UpdateRevokedReason sets the "revoked_reason" field to the value that was provided on create.

func (*PrincipalTokenUpsert) UpdateScopes added in v0.2.0

func (u *PrincipalTokenUpsert) UpdateScopes() *PrincipalTokenUpsert

UpdateScopes sets the "scopes" field to the value that was provided on create.

func (*PrincipalTokenUpsert) UpdateSessionID added in v0.2.0

func (u *PrincipalTokenUpsert) UpdateSessionID() *PrincipalTokenUpsert

UpdateSessionID sets the "session_id" field to the value that was provided on create.

func (*PrincipalTokenUpsert) UpdateUserAgent added in v0.2.0

func (u *PrincipalTokenUpsert) UpdateUserAgent() *PrincipalTokenUpsert

UpdateUserAgent sets the "user_agent" field to the value that was provided on create.

type PrincipalTokenUpsertBulk added in v0.2.0

type PrincipalTokenUpsertBulk struct {
	// contains filtered or unexported fields
}

PrincipalTokenUpsertBulk is the builder for "upsert"-ing a bulk of PrincipalToken nodes.

func (*PrincipalTokenUpsertBulk) ClearClientIP added in v0.2.0

ClearClientIP clears the value of the "client_ip" field.

func (*PrincipalTokenUpsertBulk) ClearDpopJkt added in v0.2.0

ClearDpopJkt clears the value of the "dpop_jkt" field.

func (*PrincipalTokenUpsertBulk) ClearIssuedByAppID added in v0.2.0

func (u *PrincipalTokenUpsertBulk) ClearIssuedByAppID() *PrincipalTokenUpsertBulk

ClearIssuedByAppID clears the value of the "issued_by_app_id" field.

func (*PrincipalTokenUpsertBulk) ClearLastUsedAt added in v0.2.0

func (u *PrincipalTokenUpsertBulk) ClearLastUsedAt() *PrincipalTokenUpsertBulk

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*PrincipalTokenUpsertBulk) ClearParentTokenID added in v0.2.0

func (u *PrincipalTokenUpsertBulk) ClearParentTokenID() *PrincipalTokenUpsertBulk

ClearParentTokenID clears the value of the "parent_token_id" field.

func (*PrincipalTokenUpsertBulk) ClearRefreshExpiresAt added in v0.2.0

func (u *PrincipalTokenUpsertBulk) ClearRefreshExpiresAt() *PrincipalTokenUpsertBulk

ClearRefreshExpiresAt clears the value of the "refresh_expires_at" field.

func (*PrincipalTokenUpsertBulk) ClearRefreshTokenSignature added in v0.2.0

func (u *PrincipalTokenUpsertBulk) ClearRefreshTokenSignature() *PrincipalTokenUpsertBulk

ClearRefreshTokenSignature clears the value of the "refresh_token_signature" field.

func (*PrincipalTokenUpsertBulk) ClearRequestData added in v0.2.0

func (u *PrincipalTokenUpsertBulk) ClearRequestData() *PrincipalTokenUpsertBulk

ClearRequestData clears the value of the "request_data" field.

func (*PrincipalTokenUpsertBulk) ClearRevokedAt added in v0.2.0

ClearRevokedAt clears the value of the "revoked_at" field.

func (*PrincipalTokenUpsertBulk) ClearRevokedReason added in v0.2.0

func (u *PrincipalTokenUpsertBulk) ClearRevokedReason() *PrincipalTokenUpsertBulk

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*PrincipalTokenUpsertBulk) ClearSessionID added in v0.2.0

ClearSessionID clears the value of the "session_id" field.

func (*PrincipalTokenUpsertBulk) ClearUserAgent added in v0.2.0

ClearUserAgent clears the value of the "user_agent" field.

func (*PrincipalTokenUpsertBulk) DoNothing added in v0.2.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PrincipalTokenUpsertBulk) Exec added in v0.2.0

Exec executes the query.

func (*PrincipalTokenUpsertBulk) ExecX added in v0.2.0

ExecX is like Exec, but panics if an error occurs.

func (*PrincipalTokenUpsertBulk) Ignore added in v0.2.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.PrincipalToken.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*PrincipalTokenUpsertBulk) SetAccessExpiresAt added in v0.2.0

func (u *PrincipalTokenUpsertBulk) SetAccessExpiresAt(v time.Time) *PrincipalTokenUpsertBulk

SetAccessExpiresAt sets the "access_expires_at" field.

func (*PrincipalTokenUpsertBulk) SetAccessTokenSignature added in v0.2.0

func (u *PrincipalTokenUpsertBulk) SetAccessTokenSignature(v string) *PrincipalTokenUpsertBulk

SetAccessTokenSignature sets the "access_token_signature" field.

func (*PrincipalTokenUpsertBulk) SetAudience added in v0.2.0

SetAudience sets the "audience" field.

func (*PrincipalTokenUpsertBulk) SetCapabilities added in v0.2.0

func (u *PrincipalTokenUpsertBulk) SetCapabilities(v map[string]bool) *PrincipalTokenUpsertBulk

SetCapabilities sets the "capabilities" field.

func (*PrincipalTokenUpsertBulk) SetClientIP added in v0.2.0

SetClientIP sets the "client_ip" field.

func (*PrincipalTokenUpsertBulk) SetDelegationChain added in v0.2.0

func (u *PrincipalTokenUpsertBulk) SetDelegationChain(v []string) *PrincipalTokenUpsertBulk

SetDelegationChain sets the "delegation_chain" field.

func (*PrincipalTokenUpsertBulk) SetDpopJkt added in v0.2.0

SetDpopJkt sets the "dpop_jkt" field.

func (*PrincipalTokenUpsertBulk) SetFamilyID added in v0.2.0

SetFamilyID sets the "family_id" field.

func (*PrincipalTokenUpsertBulk) SetIssuedByAppID added in v0.2.0

SetIssuedByAppID sets the "issued_by_app_id" field.

func (*PrincipalTokenUpsertBulk) SetLastUsedAt added in v0.2.0

SetLastUsedAt sets the "last_used_at" field.

func (*PrincipalTokenUpsertBulk) SetParentTokenID added in v0.2.0

SetParentTokenID sets the "parent_token_id" field.

func (*PrincipalTokenUpsertBulk) SetPrincipalID added in v0.2.0

SetPrincipalID sets the "principal_id" field.

func (*PrincipalTokenUpsertBulk) SetPrincipalType added in v0.2.0

SetPrincipalType sets the "principal_type" field.

func (*PrincipalTokenUpsertBulk) SetRefreshExpiresAt added in v0.2.0

func (u *PrincipalTokenUpsertBulk) SetRefreshExpiresAt(v time.Time) *PrincipalTokenUpsertBulk

SetRefreshExpiresAt sets the "refresh_expires_at" field.

func (*PrincipalTokenUpsertBulk) SetRefreshTokenSignature added in v0.2.0

func (u *PrincipalTokenUpsertBulk) SetRefreshTokenSignature(v string) *PrincipalTokenUpsertBulk

SetRefreshTokenSignature sets the "refresh_token_signature" field.

func (*PrincipalTokenUpsertBulk) SetRequestData added in v0.2.0

SetRequestData sets the "request_data" field.

func (*PrincipalTokenUpsertBulk) SetRevoked added in v0.2.0

SetRevoked sets the "revoked" field.

func (*PrincipalTokenUpsertBulk) SetRevokedAt added in v0.2.0

SetRevokedAt sets the "revoked_at" field.

func (*PrincipalTokenUpsertBulk) SetRevokedReason added in v0.2.0

SetRevokedReason sets the "revoked_reason" field.

func (*PrincipalTokenUpsertBulk) SetScopes added in v0.2.0

SetScopes sets the "scopes" field.

func (*PrincipalTokenUpsertBulk) SetSessionID added in v0.2.0

SetSessionID sets the "session_id" field.

func (*PrincipalTokenUpsertBulk) SetUserAgent added in v0.2.0

SetUserAgent sets the "user_agent" field.

func (*PrincipalTokenUpsertBulk) Update added in v0.2.0

Update allows overriding fields `UPDATE` values. See the PrincipalTokenCreateBulk.OnConflict documentation for more info.

func (*PrincipalTokenUpsertBulk) UpdateAccessExpiresAt added in v0.2.0

func (u *PrincipalTokenUpsertBulk) UpdateAccessExpiresAt() *PrincipalTokenUpsertBulk

UpdateAccessExpiresAt sets the "access_expires_at" field to the value that was provided on create.

func (*PrincipalTokenUpsertBulk) UpdateAccessTokenSignature added in v0.2.0

func (u *PrincipalTokenUpsertBulk) UpdateAccessTokenSignature() *PrincipalTokenUpsertBulk

UpdateAccessTokenSignature sets the "access_token_signature" field to the value that was provided on create.

func (*PrincipalTokenUpsertBulk) UpdateAudience added in v0.2.0

UpdateAudience sets the "audience" field to the value that was provided on create.

func (*PrincipalTokenUpsertBulk) UpdateCapabilities added in v0.2.0

func (u *PrincipalTokenUpsertBulk) UpdateCapabilities() *PrincipalTokenUpsertBulk

UpdateCapabilities sets the "capabilities" field to the value that was provided on create.

func (*PrincipalTokenUpsertBulk) UpdateClientIP added in v0.2.0

UpdateClientIP sets the "client_ip" field to the value that was provided on create.

func (*PrincipalTokenUpsertBulk) UpdateDelegationChain added in v0.2.0

func (u *PrincipalTokenUpsertBulk) UpdateDelegationChain() *PrincipalTokenUpsertBulk

UpdateDelegationChain sets the "delegation_chain" field to the value that was provided on create.

func (*PrincipalTokenUpsertBulk) UpdateDpopJkt added in v0.2.0

UpdateDpopJkt sets the "dpop_jkt" field to the value that was provided on create.

func (*PrincipalTokenUpsertBulk) UpdateFamilyID added in v0.2.0

UpdateFamilyID sets the "family_id" field to the value that was provided on create.

func (*PrincipalTokenUpsertBulk) UpdateIssuedByAppID added in v0.2.0

func (u *PrincipalTokenUpsertBulk) UpdateIssuedByAppID() *PrincipalTokenUpsertBulk

UpdateIssuedByAppID sets the "issued_by_app_id" field to the value that was provided on create.

func (*PrincipalTokenUpsertBulk) UpdateLastUsedAt added in v0.2.0

func (u *PrincipalTokenUpsertBulk) UpdateLastUsedAt() *PrincipalTokenUpsertBulk

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*PrincipalTokenUpsertBulk) UpdateNewValues added in v0.2.0

func (u *PrincipalTokenUpsertBulk) UpdateNewValues() *PrincipalTokenUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.PrincipalToken.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(principaltoken.FieldID)
		}),
	).
	Exec(ctx)

func (*PrincipalTokenUpsertBulk) UpdateParentTokenID added in v0.2.0

func (u *PrincipalTokenUpsertBulk) UpdateParentTokenID() *PrincipalTokenUpsertBulk

UpdateParentTokenID sets the "parent_token_id" field to the value that was provided on create.

func (*PrincipalTokenUpsertBulk) UpdatePrincipalID added in v0.2.0

func (u *PrincipalTokenUpsertBulk) UpdatePrincipalID() *PrincipalTokenUpsertBulk

UpdatePrincipalID sets the "principal_id" field to the value that was provided on create.

func (*PrincipalTokenUpsertBulk) UpdatePrincipalType added in v0.2.0

func (u *PrincipalTokenUpsertBulk) UpdatePrincipalType() *PrincipalTokenUpsertBulk

UpdatePrincipalType sets the "principal_type" field to the value that was provided on create.

func (*PrincipalTokenUpsertBulk) UpdateRefreshExpiresAt added in v0.2.0

func (u *PrincipalTokenUpsertBulk) UpdateRefreshExpiresAt() *PrincipalTokenUpsertBulk

UpdateRefreshExpiresAt sets the "refresh_expires_at" field to the value that was provided on create.

func (*PrincipalTokenUpsertBulk) UpdateRefreshTokenSignature added in v0.2.0

func (u *PrincipalTokenUpsertBulk) UpdateRefreshTokenSignature() *PrincipalTokenUpsertBulk

UpdateRefreshTokenSignature sets the "refresh_token_signature" field to the value that was provided on create.

func (*PrincipalTokenUpsertBulk) UpdateRequestData added in v0.2.0

func (u *PrincipalTokenUpsertBulk) UpdateRequestData() *PrincipalTokenUpsertBulk

UpdateRequestData sets the "request_data" field to the value that was provided on create.

func (*PrincipalTokenUpsertBulk) UpdateRevoked added in v0.2.0

UpdateRevoked sets the "revoked" field to the value that was provided on create.

func (*PrincipalTokenUpsertBulk) UpdateRevokedAt added in v0.2.0

func (u *PrincipalTokenUpsertBulk) UpdateRevokedAt() *PrincipalTokenUpsertBulk

UpdateRevokedAt sets the "revoked_at" field to the value that was provided on create.

func (*PrincipalTokenUpsertBulk) UpdateRevokedReason added in v0.2.0

func (u *PrincipalTokenUpsertBulk) UpdateRevokedReason() *PrincipalTokenUpsertBulk

UpdateRevokedReason sets the "revoked_reason" field to the value that was provided on create.

func (*PrincipalTokenUpsertBulk) UpdateScopes added in v0.2.0

UpdateScopes sets the "scopes" field to the value that was provided on create.

func (*PrincipalTokenUpsertBulk) UpdateSessionID added in v0.2.0

func (u *PrincipalTokenUpsertBulk) UpdateSessionID() *PrincipalTokenUpsertBulk

UpdateSessionID sets the "session_id" field to the value that was provided on create.

func (*PrincipalTokenUpsertBulk) UpdateUserAgent added in v0.2.0

func (u *PrincipalTokenUpsertBulk) UpdateUserAgent() *PrincipalTokenUpsertBulk

UpdateUserAgent sets the "user_agent" field to the value that was provided on create.

type PrincipalTokenUpsertOne added in v0.2.0

type PrincipalTokenUpsertOne struct {
	// contains filtered or unexported fields
}

PrincipalTokenUpsertOne is the builder for "upsert"-ing

one PrincipalToken node.

func (*PrincipalTokenUpsertOne) ClearClientIP added in v0.2.0

ClearClientIP clears the value of the "client_ip" field.

func (*PrincipalTokenUpsertOne) ClearDpopJkt added in v0.2.0

ClearDpopJkt clears the value of the "dpop_jkt" field.

func (*PrincipalTokenUpsertOne) ClearIssuedByAppID added in v0.2.0

func (u *PrincipalTokenUpsertOne) ClearIssuedByAppID() *PrincipalTokenUpsertOne

ClearIssuedByAppID clears the value of the "issued_by_app_id" field.

func (*PrincipalTokenUpsertOne) ClearLastUsedAt added in v0.2.0

func (u *PrincipalTokenUpsertOne) ClearLastUsedAt() *PrincipalTokenUpsertOne

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*PrincipalTokenUpsertOne) ClearParentTokenID added in v0.2.0

func (u *PrincipalTokenUpsertOne) ClearParentTokenID() *PrincipalTokenUpsertOne

ClearParentTokenID clears the value of the "parent_token_id" field.

func (*PrincipalTokenUpsertOne) ClearRefreshExpiresAt added in v0.2.0

func (u *PrincipalTokenUpsertOne) ClearRefreshExpiresAt() *PrincipalTokenUpsertOne

ClearRefreshExpiresAt clears the value of the "refresh_expires_at" field.

func (*PrincipalTokenUpsertOne) ClearRefreshTokenSignature added in v0.2.0

func (u *PrincipalTokenUpsertOne) ClearRefreshTokenSignature() *PrincipalTokenUpsertOne

ClearRefreshTokenSignature clears the value of the "refresh_token_signature" field.

func (*PrincipalTokenUpsertOne) ClearRequestData added in v0.2.0

func (u *PrincipalTokenUpsertOne) ClearRequestData() *PrincipalTokenUpsertOne

ClearRequestData clears the value of the "request_data" field.

func (*PrincipalTokenUpsertOne) ClearRevokedAt added in v0.2.0

func (u *PrincipalTokenUpsertOne) ClearRevokedAt() *PrincipalTokenUpsertOne

ClearRevokedAt clears the value of the "revoked_at" field.

func (*PrincipalTokenUpsertOne) ClearRevokedReason added in v0.2.0

func (u *PrincipalTokenUpsertOne) ClearRevokedReason() *PrincipalTokenUpsertOne

ClearRevokedReason clears the value of the "revoked_reason" field.

func (*PrincipalTokenUpsertOne) ClearSessionID added in v0.2.0

func (u *PrincipalTokenUpsertOne) ClearSessionID() *PrincipalTokenUpsertOne

ClearSessionID clears the value of the "session_id" field.

func (*PrincipalTokenUpsertOne) ClearUserAgent added in v0.2.0

func (u *PrincipalTokenUpsertOne) ClearUserAgent() *PrincipalTokenUpsertOne

ClearUserAgent clears the value of the "user_agent" field.

func (*PrincipalTokenUpsertOne) DoNothing added in v0.2.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PrincipalTokenUpsertOne) Exec added in v0.2.0

Exec executes the query.

func (*PrincipalTokenUpsertOne) ExecX added in v0.2.0

func (u *PrincipalTokenUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PrincipalTokenUpsertOne) ID added in v0.2.0

func (u *PrincipalTokenUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*PrincipalTokenUpsertOne) IDX added in v0.2.0

IDX is like ID, but panics if an error occurs.

func (*PrincipalTokenUpsertOne) Ignore added in v0.2.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.PrincipalToken.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*PrincipalTokenUpsertOne) SetAccessExpiresAt added in v0.2.0

func (u *PrincipalTokenUpsertOne) SetAccessExpiresAt(v time.Time) *PrincipalTokenUpsertOne

SetAccessExpiresAt sets the "access_expires_at" field.

func (*PrincipalTokenUpsertOne) SetAccessTokenSignature added in v0.2.0

func (u *PrincipalTokenUpsertOne) SetAccessTokenSignature(v string) *PrincipalTokenUpsertOne

SetAccessTokenSignature sets the "access_token_signature" field.

func (*PrincipalTokenUpsertOne) SetAudience added in v0.2.0

SetAudience sets the "audience" field.

func (*PrincipalTokenUpsertOne) SetCapabilities added in v0.2.0

func (u *PrincipalTokenUpsertOne) SetCapabilities(v map[string]bool) *PrincipalTokenUpsertOne

SetCapabilities sets the "capabilities" field.

func (*PrincipalTokenUpsertOne) SetClientIP added in v0.2.0

SetClientIP sets the "client_ip" field.

func (*PrincipalTokenUpsertOne) SetDelegationChain added in v0.2.0

func (u *PrincipalTokenUpsertOne) SetDelegationChain(v []string) *PrincipalTokenUpsertOne

SetDelegationChain sets the "delegation_chain" field.

func (*PrincipalTokenUpsertOne) SetDpopJkt added in v0.2.0

SetDpopJkt sets the "dpop_jkt" field.

func (*PrincipalTokenUpsertOne) SetFamilyID added in v0.2.0

SetFamilyID sets the "family_id" field.

func (*PrincipalTokenUpsertOne) SetIssuedByAppID added in v0.2.0

func (u *PrincipalTokenUpsertOne) SetIssuedByAppID(v uuid.UUID) *PrincipalTokenUpsertOne

SetIssuedByAppID sets the "issued_by_app_id" field.

func (*PrincipalTokenUpsertOne) SetLastUsedAt added in v0.2.0

SetLastUsedAt sets the "last_used_at" field.

func (*PrincipalTokenUpsertOne) SetParentTokenID added in v0.2.0

func (u *PrincipalTokenUpsertOne) SetParentTokenID(v uuid.UUID) *PrincipalTokenUpsertOne

SetParentTokenID sets the "parent_token_id" field.

func (*PrincipalTokenUpsertOne) SetPrincipalID added in v0.2.0

SetPrincipalID sets the "principal_id" field.

func (*PrincipalTokenUpsertOne) SetPrincipalType added in v0.2.0

SetPrincipalType sets the "principal_type" field.

func (*PrincipalTokenUpsertOne) SetRefreshExpiresAt added in v0.2.0

func (u *PrincipalTokenUpsertOne) SetRefreshExpiresAt(v time.Time) *PrincipalTokenUpsertOne

SetRefreshExpiresAt sets the "refresh_expires_at" field.

func (*PrincipalTokenUpsertOne) SetRefreshTokenSignature added in v0.2.0

func (u *PrincipalTokenUpsertOne) SetRefreshTokenSignature(v string) *PrincipalTokenUpsertOne

SetRefreshTokenSignature sets the "refresh_token_signature" field.

func (*PrincipalTokenUpsertOne) SetRequestData added in v0.2.0

SetRequestData sets the "request_data" field.

func (*PrincipalTokenUpsertOne) SetRevoked added in v0.2.0

SetRevoked sets the "revoked" field.

func (*PrincipalTokenUpsertOne) SetRevokedAt added in v0.2.0

SetRevokedAt sets the "revoked_at" field.

func (*PrincipalTokenUpsertOne) SetRevokedReason added in v0.2.0

func (u *PrincipalTokenUpsertOne) SetRevokedReason(v string) *PrincipalTokenUpsertOne

SetRevokedReason sets the "revoked_reason" field.

func (*PrincipalTokenUpsertOne) SetScopes added in v0.2.0

SetScopes sets the "scopes" field.

func (*PrincipalTokenUpsertOne) SetSessionID added in v0.2.0

SetSessionID sets the "session_id" field.

func (*PrincipalTokenUpsertOne) SetUserAgent added in v0.2.0

SetUserAgent sets the "user_agent" field.

func (*PrincipalTokenUpsertOne) Update added in v0.2.0

Update allows overriding fields `UPDATE` values. See the PrincipalTokenCreate.OnConflict documentation for more info.

func (*PrincipalTokenUpsertOne) UpdateAccessExpiresAt added in v0.2.0

func (u *PrincipalTokenUpsertOne) UpdateAccessExpiresAt() *PrincipalTokenUpsertOne

UpdateAccessExpiresAt sets the "access_expires_at" field to the value that was provided on create.

func (*PrincipalTokenUpsertOne) UpdateAccessTokenSignature added in v0.2.0

func (u *PrincipalTokenUpsertOne) UpdateAccessTokenSignature() *PrincipalTokenUpsertOne

UpdateAccessTokenSignature sets the "access_token_signature" field to the value that was provided on create.

func (*PrincipalTokenUpsertOne) UpdateAudience added in v0.2.0

func (u *PrincipalTokenUpsertOne) UpdateAudience() *PrincipalTokenUpsertOne

UpdateAudience sets the "audience" field to the value that was provided on create.

func (*PrincipalTokenUpsertOne) UpdateCapabilities added in v0.2.0

func (u *PrincipalTokenUpsertOne) UpdateCapabilities() *PrincipalTokenUpsertOne

UpdateCapabilities sets the "capabilities" field to the value that was provided on create.

func (*PrincipalTokenUpsertOne) UpdateClientIP added in v0.2.0

func (u *PrincipalTokenUpsertOne) UpdateClientIP() *PrincipalTokenUpsertOne

UpdateClientIP sets the "client_ip" field to the value that was provided on create.

func (*PrincipalTokenUpsertOne) UpdateDelegationChain added in v0.2.0

func (u *PrincipalTokenUpsertOne) UpdateDelegationChain() *PrincipalTokenUpsertOne

UpdateDelegationChain sets the "delegation_chain" field to the value that was provided on create.

func (*PrincipalTokenUpsertOne) UpdateDpopJkt added in v0.2.0

UpdateDpopJkt sets the "dpop_jkt" field to the value that was provided on create.

func (*PrincipalTokenUpsertOne) UpdateFamilyID added in v0.2.0

func (u *PrincipalTokenUpsertOne) UpdateFamilyID() *PrincipalTokenUpsertOne

UpdateFamilyID sets the "family_id" field to the value that was provided on create.

func (*PrincipalTokenUpsertOne) UpdateIssuedByAppID added in v0.2.0

func (u *PrincipalTokenUpsertOne) UpdateIssuedByAppID() *PrincipalTokenUpsertOne

UpdateIssuedByAppID sets the "issued_by_app_id" field to the value that was provided on create.

func (*PrincipalTokenUpsertOne) UpdateLastUsedAt added in v0.2.0

func (u *PrincipalTokenUpsertOne) UpdateLastUsedAt() *PrincipalTokenUpsertOne

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*PrincipalTokenUpsertOne) UpdateNewValues added in v0.2.0

func (u *PrincipalTokenUpsertOne) UpdateNewValues() *PrincipalTokenUpsertOne

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.PrincipalToken.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(principaltoken.FieldID)
		}),
	).
	Exec(ctx)

func (*PrincipalTokenUpsertOne) UpdateParentTokenID added in v0.2.0

func (u *PrincipalTokenUpsertOne) UpdateParentTokenID() *PrincipalTokenUpsertOne

UpdateParentTokenID sets the "parent_token_id" field to the value that was provided on create.

func (*PrincipalTokenUpsertOne) UpdatePrincipalID added in v0.2.0

func (u *PrincipalTokenUpsertOne) UpdatePrincipalID() *PrincipalTokenUpsertOne

UpdatePrincipalID sets the "principal_id" field to the value that was provided on create.

func (*PrincipalTokenUpsertOne) UpdatePrincipalType added in v0.2.0

func (u *PrincipalTokenUpsertOne) UpdatePrincipalType() *PrincipalTokenUpsertOne

UpdatePrincipalType sets the "principal_type" field to the value that was provided on create.

func (*PrincipalTokenUpsertOne) UpdateRefreshExpiresAt added in v0.2.0

func (u *PrincipalTokenUpsertOne) UpdateRefreshExpiresAt() *PrincipalTokenUpsertOne

UpdateRefreshExpiresAt sets the "refresh_expires_at" field to the value that was provided on create.

func (*PrincipalTokenUpsertOne) UpdateRefreshTokenSignature added in v0.2.0

func (u *PrincipalTokenUpsertOne) UpdateRefreshTokenSignature() *PrincipalTokenUpsertOne

UpdateRefreshTokenSignature sets the "refresh_token_signature" field to the value that was provided on create.

func (*PrincipalTokenUpsertOne) UpdateRequestData added in v0.2.0

func (u *PrincipalTokenUpsertOne) UpdateRequestData() *PrincipalTokenUpsertOne

UpdateRequestData sets the "request_data" field to the value that was provided on create.

func (*PrincipalTokenUpsertOne) UpdateRevoked added in v0.2.0

UpdateRevoked sets the "revoked" field to the value that was provided on create.

func (*PrincipalTokenUpsertOne) UpdateRevokedAt added in v0.2.0

func (u *PrincipalTokenUpsertOne) UpdateRevokedAt() *PrincipalTokenUpsertOne

UpdateRevokedAt sets the "revoked_at" field to the value that was provided on create.

func (*PrincipalTokenUpsertOne) UpdateRevokedReason added in v0.2.0

func (u *PrincipalTokenUpsertOne) UpdateRevokedReason() *PrincipalTokenUpsertOne

UpdateRevokedReason sets the "revoked_reason" field to the value that was provided on create.

func (*PrincipalTokenUpsertOne) UpdateScopes added in v0.2.0

UpdateScopes sets the "scopes" field to the value that was provided on create.

func (*PrincipalTokenUpsertOne) UpdateSessionID added in v0.2.0

func (u *PrincipalTokenUpsertOne) UpdateSessionID() *PrincipalTokenUpsertOne

UpdateSessionID sets the "session_id" field to the value that was provided on create.

func (*PrincipalTokenUpsertOne) UpdateUserAgent added in v0.2.0

func (u *PrincipalTokenUpsertOne) UpdateUserAgent() *PrincipalTokenUpsertOne

UpdateUserAgent sets the "user_agent" field to the value that was provided on create.

type PrincipalTokens added in v0.2.0

type PrincipalTokens []*PrincipalToken

PrincipalTokens is a parsable slice of PrincipalToken.

type PrincipalUpdate added in v0.2.0

type PrincipalUpdate struct {
	// contains filtered or unexported fields
}

PrincipalUpdate is the builder for updating Principal entities.

func (*PrincipalUpdate) AddCredentialIDs added in v0.2.0

func (_u *PrincipalUpdate) AddCredentialIDs(ids ...uuid.UUID) *PrincipalUpdate

AddCredentialIDs adds the "credentials" edge to the Credential entity by IDs.

func (*PrincipalUpdate) AddCredentials added in v0.2.0

func (_u *PrincipalUpdate) AddCredentials(v ...*Credential) *PrincipalUpdate

AddCredentials adds the "credentials" edges to the Credential entity.

func (*PrincipalUpdate) AddOwnedOrganizationIDs added in v0.2.0

func (_u *PrincipalUpdate) AddOwnedOrganizationIDs(ids ...uuid.UUID) *PrincipalUpdate

AddOwnedOrganizationIDs adds the "owned_organizations" edge to the Organization entity by IDs.

func (*PrincipalUpdate) AddOwnedOrganizations added in v0.2.0

func (_u *PrincipalUpdate) AddOwnedOrganizations(v ...*Organization) *PrincipalUpdate

AddOwnedOrganizations adds the "owned_organizations" edges to the Organization entity.

func (*PrincipalUpdate) AddPrincipalMembershipIDs added in v0.2.0

func (_u *PrincipalUpdate) AddPrincipalMembershipIDs(ids ...uuid.UUID) *PrincipalUpdate

AddPrincipalMembershipIDs adds the "principal_memberships" edge to the PrincipalMembership entity by IDs.

func (*PrincipalUpdate) AddPrincipalMemberships added in v0.2.0

func (_u *PrincipalUpdate) AddPrincipalMemberships(v ...*PrincipalMembership) *PrincipalUpdate

AddPrincipalMemberships adds the "principal_memberships" edges to the PrincipalMembership entity.

func (*PrincipalUpdate) AddPrincipalTokenIDs added in v0.2.0

func (_u *PrincipalUpdate) AddPrincipalTokenIDs(ids ...uuid.UUID) *PrincipalUpdate

AddPrincipalTokenIDs adds the "principal_tokens" edge to the PrincipalToken entity by IDs.

func (*PrincipalUpdate) AddPrincipalTokens added in v0.2.0

func (_u *PrincipalUpdate) AddPrincipalTokens(v ...*PrincipalToken) *PrincipalUpdate

AddPrincipalTokens adds the "principal_tokens" edges to the PrincipalToken entity.

func (*PrincipalUpdate) AddSentInviteIDs added in v0.2.0

func (_u *PrincipalUpdate) AddSentInviteIDs(ids ...uuid.UUID) *PrincipalUpdate

AddSentInviteIDs adds the "sent_invites" edge to the Invite entity by IDs.

func (*PrincipalUpdate) AddSentInvites added in v0.2.0

func (_u *PrincipalUpdate) AddSentInvites(v ...*Invite) *PrincipalUpdate

AddSentInvites adds the "sent_invites" edges to the Invite entity.

func (*PrincipalUpdate) AppendAllowedScopes added in v0.2.0

func (_u *PrincipalUpdate) AppendAllowedScopes(v []string) *PrincipalUpdate

AppendAllowedScopes appends value to the "allowed_scopes" field.

func (*PrincipalUpdate) ClearAgent added in v0.2.0

func (_u *PrincipalUpdate) ClearAgent() *PrincipalUpdate

ClearAgent clears the "agent" edge to the Agent entity.

func (*PrincipalUpdate) ClearApplication added in v0.2.0

func (_u *PrincipalUpdate) ClearApplication() *PrincipalUpdate

ClearApplication clears the "application" edge to the Application entity.

func (*PrincipalUpdate) ClearCredentials added in v0.2.0

func (_u *PrincipalUpdate) ClearCredentials() *PrincipalUpdate

ClearCredentials clears all "credentials" edges to the Credential entity.

func (*PrincipalUpdate) ClearHuman added in v0.2.0

func (_u *PrincipalUpdate) ClearHuman() *PrincipalUpdate

ClearHuman clears the "human" edge to the Human entity.

func (*PrincipalUpdate) ClearMetadata added in v0.2.0

func (_u *PrincipalUpdate) ClearMetadata() *PrincipalUpdate

ClearMetadata clears the value of the "metadata" field.

func (*PrincipalUpdate) ClearOrganization added in v0.2.0

func (_u *PrincipalUpdate) ClearOrganization() *PrincipalUpdate

ClearOrganization clears the "organization" edge to the Organization entity.

func (*PrincipalUpdate) ClearOrganizationID added in v0.2.0

func (_u *PrincipalUpdate) ClearOrganizationID() *PrincipalUpdate

ClearOrganizationID clears the value of the "organization_id" field.

func (*PrincipalUpdate) ClearOwnedOrganizations added in v0.2.0

func (_u *PrincipalUpdate) ClearOwnedOrganizations() *PrincipalUpdate

ClearOwnedOrganizations clears all "owned_organizations" edges to the Organization entity.

func (*PrincipalUpdate) ClearPrincipalMemberships added in v0.2.0

func (_u *PrincipalUpdate) ClearPrincipalMemberships() *PrincipalUpdate

ClearPrincipalMemberships clears all "principal_memberships" edges to the PrincipalMembership entity.

func (*PrincipalUpdate) ClearPrincipalTokens added in v0.2.0

func (_u *PrincipalUpdate) ClearPrincipalTokens() *PrincipalUpdate

ClearPrincipalTokens clears all "principal_tokens" edges to the PrincipalToken entity.

func (*PrincipalUpdate) ClearSentInvites added in v0.2.0

func (_u *PrincipalUpdate) ClearSentInvites() *PrincipalUpdate

ClearSentInvites clears all "sent_invites" edges to the Invite entity.

func (*PrincipalUpdate) ClearServicePrincipal added in v0.2.0

func (_u *PrincipalUpdate) ClearServicePrincipal() *PrincipalUpdate

ClearServicePrincipal clears the "service_principal" edge to the ServicePrincipal entity.

func (*PrincipalUpdate) Exec added in v0.2.0

func (_u *PrincipalUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PrincipalUpdate) ExecX added in v0.2.0

func (_u *PrincipalUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PrincipalUpdate) Mutation added in v0.2.0

func (_u *PrincipalUpdate) Mutation() *PrincipalMutation

Mutation returns the PrincipalMutation object of the builder.

func (*PrincipalUpdate) RemoveCredentialIDs added in v0.2.0

func (_u *PrincipalUpdate) RemoveCredentialIDs(ids ...uuid.UUID) *PrincipalUpdate

RemoveCredentialIDs removes the "credentials" edge to Credential entities by IDs.

func (*PrincipalUpdate) RemoveCredentials added in v0.2.0

func (_u *PrincipalUpdate) RemoveCredentials(v ...*Credential) *PrincipalUpdate

RemoveCredentials removes "credentials" edges to Credential entities.

func (*PrincipalUpdate) RemoveOwnedOrganizationIDs added in v0.2.0

func (_u *PrincipalUpdate) RemoveOwnedOrganizationIDs(ids ...uuid.UUID) *PrincipalUpdate

RemoveOwnedOrganizationIDs removes the "owned_organizations" edge to Organization entities by IDs.

func (*PrincipalUpdate) RemoveOwnedOrganizations added in v0.2.0

func (_u *PrincipalUpdate) RemoveOwnedOrganizations(v ...*Organization) *PrincipalUpdate

RemoveOwnedOrganizations removes "owned_organizations" edges to Organization entities.

func (*PrincipalUpdate) RemovePrincipalMembershipIDs added in v0.2.0

func (_u *PrincipalUpdate) RemovePrincipalMembershipIDs(ids ...uuid.UUID) *PrincipalUpdate

RemovePrincipalMembershipIDs removes the "principal_memberships" edge to PrincipalMembership entities by IDs.

func (*PrincipalUpdate) RemovePrincipalMemberships added in v0.2.0

func (_u *PrincipalUpdate) RemovePrincipalMemberships(v ...*PrincipalMembership) *PrincipalUpdate

RemovePrincipalMemberships removes "principal_memberships" edges to PrincipalMembership entities.

func (*PrincipalUpdate) RemovePrincipalTokenIDs added in v0.2.0

func (_u *PrincipalUpdate) RemovePrincipalTokenIDs(ids ...uuid.UUID) *PrincipalUpdate

RemovePrincipalTokenIDs removes the "principal_tokens" edge to PrincipalToken entities by IDs.

func (*PrincipalUpdate) RemovePrincipalTokens added in v0.2.0

func (_u *PrincipalUpdate) RemovePrincipalTokens(v ...*PrincipalToken) *PrincipalUpdate

RemovePrincipalTokens removes "principal_tokens" edges to PrincipalToken entities.

func (*PrincipalUpdate) RemoveSentInviteIDs added in v0.2.0

func (_u *PrincipalUpdate) RemoveSentInviteIDs(ids ...uuid.UUID) *PrincipalUpdate

RemoveSentInviteIDs removes the "sent_invites" edge to Invite entities by IDs.

func (*PrincipalUpdate) RemoveSentInvites added in v0.2.0

func (_u *PrincipalUpdate) RemoveSentInvites(v ...*Invite) *PrincipalUpdate

RemoveSentInvites removes "sent_invites" edges to Invite entities.

func (*PrincipalUpdate) Save added in v0.2.0

func (_u *PrincipalUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PrincipalUpdate) SaveX added in v0.2.0

func (_u *PrincipalUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PrincipalUpdate) SetActive added in v0.2.0

func (_u *PrincipalUpdate) SetActive(v bool) *PrincipalUpdate

SetActive sets the "active" field.

func (*PrincipalUpdate) SetAgent added in v0.2.0

func (_u *PrincipalUpdate) SetAgent(v *Agent) *PrincipalUpdate

SetAgent sets the "agent" edge to the Agent entity.

func (*PrincipalUpdate) SetAgentID added in v0.2.0

func (_u *PrincipalUpdate) SetAgentID(id uuid.UUID) *PrincipalUpdate

SetAgentID sets the "agent" edge to the Agent entity by ID.

func (*PrincipalUpdate) SetAllowedScopes added in v0.2.0

func (_u *PrincipalUpdate) SetAllowedScopes(v []string) *PrincipalUpdate

SetAllowedScopes sets the "allowed_scopes" field.

func (*PrincipalUpdate) SetApplication added in v0.2.0

func (_u *PrincipalUpdate) SetApplication(v *Application) *PrincipalUpdate

SetApplication sets the "application" edge to the Application entity.

func (*PrincipalUpdate) SetApplicationID added in v0.2.0

func (_u *PrincipalUpdate) SetApplicationID(id uuid.UUID) *PrincipalUpdate

SetApplicationID sets the "application" edge to the Application entity by ID.

func (*PrincipalUpdate) SetCapabilities added in v0.2.0

func (_u *PrincipalUpdate) SetCapabilities(v map[string]bool) *PrincipalUpdate

SetCapabilities sets the "capabilities" field.

func (*PrincipalUpdate) SetDisplayName added in v0.2.0

func (_u *PrincipalUpdate) SetDisplayName(v string) *PrincipalUpdate

SetDisplayName sets the "display_name" field.

func (*PrincipalUpdate) SetHuman added in v0.2.0

func (_u *PrincipalUpdate) SetHuman(v *Human) *PrincipalUpdate

SetHuman sets the "human" edge to the Human entity.

func (*PrincipalUpdate) SetHumanID added in v0.2.0

func (_u *PrincipalUpdate) SetHumanID(id uuid.UUID) *PrincipalUpdate

SetHumanID sets the "human" edge to the Human entity by ID.

func (*PrincipalUpdate) SetIdentifier added in v0.2.0

func (_u *PrincipalUpdate) SetIdentifier(v string) *PrincipalUpdate

SetIdentifier sets the "identifier" field.

func (*PrincipalUpdate) SetMetadata added in v0.2.0

func (_u *PrincipalUpdate) SetMetadata(v map[string]interface{}) *PrincipalUpdate

SetMetadata sets the "metadata" field.

func (*PrincipalUpdate) SetNillableActive added in v0.2.0

func (_u *PrincipalUpdate) SetNillableActive(v *bool) *PrincipalUpdate

SetNillableActive sets the "active" field if the given value is not nil.

func (*PrincipalUpdate) SetNillableAgentID added in v0.2.0

func (_u *PrincipalUpdate) SetNillableAgentID(id *uuid.UUID) *PrincipalUpdate

SetNillableAgentID sets the "agent" edge to the Agent entity by ID if the given value is not nil.

func (*PrincipalUpdate) SetNillableApplicationID added in v0.2.0

func (_u *PrincipalUpdate) SetNillableApplicationID(id *uuid.UUID) *PrincipalUpdate

SetNillableApplicationID sets the "application" edge to the Application entity by ID if the given value is not nil.

func (*PrincipalUpdate) SetNillableDisplayName added in v0.2.0

func (_u *PrincipalUpdate) SetNillableDisplayName(v *string) *PrincipalUpdate

SetNillableDisplayName sets the "display_name" field if the given value is not nil.

func (*PrincipalUpdate) SetNillableHumanID added in v0.2.0

func (_u *PrincipalUpdate) SetNillableHumanID(id *uuid.UUID) *PrincipalUpdate

SetNillableHumanID sets the "human" edge to the Human entity by ID if the given value is not nil.

func (*PrincipalUpdate) SetNillableIdentifier added in v0.2.0

func (_u *PrincipalUpdate) SetNillableIdentifier(v *string) *PrincipalUpdate

SetNillableIdentifier sets the "identifier" field if the given value is not nil.

func (*PrincipalUpdate) SetNillableOrganizationID added in v0.2.0

func (_u *PrincipalUpdate) SetNillableOrganizationID(v *uuid.UUID) *PrincipalUpdate

SetNillableOrganizationID sets the "organization_id" field if the given value is not nil.

func (*PrincipalUpdate) SetNillableServicePrincipalID added in v0.2.0

func (_u *PrincipalUpdate) SetNillableServicePrincipalID(id *uuid.UUID) *PrincipalUpdate

SetNillableServicePrincipalID sets the "service_principal" edge to the ServicePrincipal entity by ID if the given value is not nil.

func (*PrincipalUpdate) SetOrganization added in v0.2.0

func (_u *PrincipalUpdate) SetOrganization(v *Organization) *PrincipalUpdate

SetOrganization sets the "organization" edge to the Organization entity.

func (*PrincipalUpdate) SetOrganizationID added in v0.2.0

func (_u *PrincipalUpdate) SetOrganizationID(v uuid.UUID) *PrincipalUpdate

SetOrganizationID sets the "organization_id" field.

func (*PrincipalUpdate) SetServicePrincipal added in v0.2.0

func (_u *PrincipalUpdate) SetServicePrincipal(v *ServicePrincipal) *PrincipalUpdate

SetServicePrincipal sets the "service_principal" edge to the ServicePrincipal entity.

func (*PrincipalUpdate) SetServicePrincipalID added in v0.2.0

func (_u *PrincipalUpdate) SetServicePrincipalID(id uuid.UUID) *PrincipalUpdate

SetServicePrincipalID sets the "service_principal" edge to the ServicePrincipal entity by ID.

func (*PrincipalUpdate) SetUpdatedAt added in v0.2.0

func (_u *PrincipalUpdate) SetUpdatedAt(v time.Time) *PrincipalUpdate

SetUpdatedAt sets the "updated_at" field.

func (*PrincipalUpdate) Where added in v0.2.0

Where appends a list predicates to the PrincipalUpdate builder.

type PrincipalUpdateOne added in v0.2.0

type PrincipalUpdateOne struct {
	// contains filtered or unexported fields
}

PrincipalUpdateOne is the builder for updating a single Principal entity.

func (*PrincipalUpdateOne) AddCredentialIDs added in v0.2.0

func (_u *PrincipalUpdateOne) AddCredentialIDs(ids ...uuid.UUID) *PrincipalUpdateOne

AddCredentialIDs adds the "credentials" edge to the Credential entity by IDs.

func (*PrincipalUpdateOne) AddCredentials added in v0.2.0

func (_u *PrincipalUpdateOne) AddCredentials(v ...*Credential) *PrincipalUpdateOne

AddCredentials adds the "credentials" edges to the Credential entity.

func (*PrincipalUpdateOne) AddOwnedOrganizationIDs added in v0.2.0

func (_u *PrincipalUpdateOne) AddOwnedOrganizationIDs(ids ...uuid.UUID) *PrincipalUpdateOne

AddOwnedOrganizationIDs adds the "owned_organizations" edge to the Organization entity by IDs.

func (*PrincipalUpdateOne) AddOwnedOrganizations added in v0.2.0

func (_u *PrincipalUpdateOne) AddOwnedOrganizations(v ...*Organization) *PrincipalUpdateOne

AddOwnedOrganizations adds the "owned_organizations" edges to the Organization entity.

func (*PrincipalUpdateOne) AddPrincipalMembershipIDs added in v0.2.0

func (_u *PrincipalUpdateOne) AddPrincipalMembershipIDs(ids ...uuid.UUID) *PrincipalUpdateOne

AddPrincipalMembershipIDs adds the "principal_memberships" edge to the PrincipalMembership entity by IDs.

func (*PrincipalUpdateOne) AddPrincipalMemberships added in v0.2.0

func (_u *PrincipalUpdateOne) AddPrincipalMemberships(v ...*PrincipalMembership) *PrincipalUpdateOne

AddPrincipalMemberships adds the "principal_memberships" edges to the PrincipalMembership entity.

func (*PrincipalUpdateOne) AddPrincipalTokenIDs added in v0.2.0

func (_u *PrincipalUpdateOne) AddPrincipalTokenIDs(ids ...uuid.UUID) *PrincipalUpdateOne

AddPrincipalTokenIDs adds the "principal_tokens" edge to the PrincipalToken entity by IDs.

func (*PrincipalUpdateOne) AddPrincipalTokens added in v0.2.0

func (_u *PrincipalUpdateOne) AddPrincipalTokens(v ...*PrincipalToken) *PrincipalUpdateOne

AddPrincipalTokens adds the "principal_tokens" edges to the PrincipalToken entity.

func (*PrincipalUpdateOne) AddSentInviteIDs added in v0.2.0

func (_u *PrincipalUpdateOne) AddSentInviteIDs(ids ...uuid.UUID) *PrincipalUpdateOne

AddSentInviteIDs adds the "sent_invites" edge to the Invite entity by IDs.

func (*PrincipalUpdateOne) AddSentInvites added in v0.2.0

func (_u *PrincipalUpdateOne) AddSentInvites(v ...*Invite) *PrincipalUpdateOne

AddSentInvites adds the "sent_invites" edges to the Invite entity.

func (*PrincipalUpdateOne) AppendAllowedScopes added in v0.2.0

func (_u *PrincipalUpdateOne) AppendAllowedScopes(v []string) *PrincipalUpdateOne

AppendAllowedScopes appends value to the "allowed_scopes" field.

func (*PrincipalUpdateOne) ClearAgent added in v0.2.0

func (_u *PrincipalUpdateOne) ClearAgent() *PrincipalUpdateOne

ClearAgent clears the "agent" edge to the Agent entity.

func (*PrincipalUpdateOne) ClearApplication added in v0.2.0

func (_u *PrincipalUpdateOne) ClearApplication() *PrincipalUpdateOne

ClearApplication clears the "application" edge to the Application entity.

func (*PrincipalUpdateOne) ClearCredentials added in v0.2.0

func (_u *PrincipalUpdateOne) ClearCredentials() *PrincipalUpdateOne

ClearCredentials clears all "credentials" edges to the Credential entity.

func (*PrincipalUpdateOne) ClearHuman added in v0.2.0

func (_u *PrincipalUpdateOne) ClearHuman() *PrincipalUpdateOne

ClearHuman clears the "human" edge to the Human entity.

func (*PrincipalUpdateOne) ClearMetadata added in v0.2.0

func (_u *PrincipalUpdateOne) ClearMetadata() *PrincipalUpdateOne

ClearMetadata clears the value of the "metadata" field.

func (*PrincipalUpdateOne) ClearOrganization added in v0.2.0

func (_u *PrincipalUpdateOne) ClearOrganization() *PrincipalUpdateOne

ClearOrganization clears the "organization" edge to the Organization entity.

func (*PrincipalUpdateOne) ClearOrganizationID added in v0.2.0

func (_u *PrincipalUpdateOne) ClearOrganizationID() *PrincipalUpdateOne

ClearOrganizationID clears the value of the "organization_id" field.

func (*PrincipalUpdateOne) ClearOwnedOrganizations added in v0.2.0

func (_u *PrincipalUpdateOne) ClearOwnedOrganizations() *PrincipalUpdateOne

ClearOwnedOrganizations clears all "owned_organizations" edges to the Organization entity.

func (*PrincipalUpdateOne) ClearPrincipalMemberships added in v0.2.0

func (_u *PrincipalUpdateOne) ClearPrincipalMemberships() *PrincipalUpdateOne

ClearPrincipalMemberships clears all "principal_memberships" edges to the PrincipalMembership entity.

func (*PrincipalUpdateOne) ClearPrincipalTokens added in v0.2.0

func (_u *PrincipalUpdateOne) ClearPrincipalTokens() *PrincipalUpdateOne

ClearPrincipalTokens clears all "principal_tokens" edges to the PrincipalToken entity.

func (*PrincipalUpdateOne) ClearSentInvites added in v0.2.0

func (_u *PrincipalUpdateOne) ClearSentInvites() *PrincipalUpdateOne

ClearSentInvites clears all "sent_invites" edges to the Invite entity.

func (*PrincipalUpdateOne) ClearServicePrincipal added in v0.2.0

func (_u *PrincipalUpdateOne) ClearServicePrincipal() *PrincipalUpdateOne

ClearServicePrincipal clears the "service_principal" edge to the ServicePrincipal entity.

func (*PrincipalUpdateOne) Exec added in v0.2.0

func (_u *PrincipalUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PrincipalUpdateOne) ExecX added in v0.2.0

func (_u *PrincipalUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PrincipalUpdateOne) Mutation added in v0.2.0

func (_u *PrincipalUpdateOne) Mutation() *PrincipalMutation

Mutation returns the PrincipalMutation object of the builder.

func (*PrincipalUpdateOne) RemoveCredentialIDs added in v0.2.0

func (_u *PrincipalUpdateOne) RemoveCredentialIDs(ids ...uuid.UUID) *PrincipalUpdateOne

RemoveCredentialIDs removes the "credentials" edge to Credential entities by IDs.

func (*PrincipalUpdateOne) RemoveCredentials added in v0.2.0

func (_u *PrincipalUpdateOne) RemoveCredentials(v ...*Credential) *PrincipalUpdateOne

RemoveCredentials removes "credentials" edges to Credential entities.

func (*PrincipalUpdateOne) RemoveOwnedOrganizationIDs added in v0.2.0

func (_u *PrincipalUpdateOne) RemoveOwnedOrganizationIDs(ids ...uuid.UUID) *PrincipalUpdateOne

RemoveOwnedOrganizationIDs removes the "owned_organizations" edge to Organization entities by IDs.

func (*PrincipalUpdateOne) RemoveOwnedOrganizations added in v0.2.0

func (_u *PrincipalUpdateOne) RemoveOwnedOrganizations(v ...*Organization) *PrincipalUpdateOne

RemoveOwnedOrganizations removes "owned_organizations" edges to Organization entities.

func (*PrincipalUpdateOne) RemovePrincipalMembershipIDs added in v0.2.0

func (_u *PrincipalUpdateOne) RemovePrincipalMembershipIDs(ids ...uuid.UUID) *PrincipalUpdateOne

RemovePrincipalMembershipIDs removes the "principal_memberships" edge to PrincipalMembership entities by IDs.

func (*PrincipalUpdateOne) RemovePrincipalMemberships added in v0.2.0

func (_u *PrincipalUpdateOne) RemovePrincipalMemberships(v ...*PrincipalMembership) *PrincipalUpdateOne

RemovePrincipalMemberships removes "principal_memberships" edges to PrincipalMembership entities.

func (*PrincipalUpdateOne) RemovePrincipalTokenIDs added in v0.2.0

func (_u *PrincipalUpdateOne) RemovePrincipalTokenIDs(ids ...uuid.UUID) *PrincipalUpdateOne

RemovePrincipalTokenIDs removes the "principal_tokens" edge to PrincipalToken entities by IDs.

func (*PrincipalUpdateOne) RemovePrincipalTokens added in v0.2.0

func (_u *PrincipalUpdateOne) RemovePrincipalTokens(v ...*PrincipalToken) *PrincipalUpdateOne

RemovePrincipalTokens removes "principal_tokens" edges to PrincipalToken entities.

func (*PrincipalUpdateOne) RemoveSentInviteIDs added in v0.2.0

func (_u *PrincipalUpdateOne) RemoveSentInviteIDs(ids ...uuid.UUID) *PrincipalUpdateOne

RemoveSentInviteIDs removes the "sent_invites" edge to Invite entities by IDs.

func (*PrincipalUpdateOne) RemoveSentInvites added in v0.2.0

func (_u *PrincipalUpdateOne) RemoveSentInvites(v ...*Invite) *PrincipalUpdateOne

RemoveSentInvites removes "sent_invites" edges to Invite entities.

func (*PrincipalUpdateOne) Save added in v0.2.0

func (_u *PrincipalUpdateOne) Save(ctx context.Context) (*Principal, error)

Save executes the query and returns the updated Principal entity.

func (*PrincipalUpdateOne) SaveX added in v0.2.0

func (_u *PrincipalUpdateOne) SaveX(ctx context.Context) *Principal

SaveX is like Save, but panics if an error occurs.

func (*PrincipalUpdateOne) Select added in v0.2.0

func (_u *PrincipalUpdateOne) Select(field string, fields ...string) *PrincipalUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PrincipalUpdateOne) SetActive added in v0.2.0

func (_u *PrincipalUpdateOne) SetActive(v bool) *PrincipalUpdateOne

SetActive sets the "active" field.

func (*PrincipalUpdateOne) SetAgent added in v0.2.0

func (_u *PrincipalUpdateOne) SetAgent(v *Agent) *PrincipalUpdateOne

SetAgent sets the "agent" edge to the Agent entity.

func (*PrincipalUpdateOne) SetAgentID added in v0.2.0

func (_u *PrincipalUpdateOne) SetAgentID(id uuid.UUID) *PrincipalUpdateOne

SetAgentID sets the "agent" edge to the Agent entity by ID.

func (*PrincipalUpdateOne) SetAllowedScopes added in v0.2.0

func (_u *PrincipalUpdateOne) SetAllowedScopes(v []string) *PrincipalUpdateOne

SetAllowedScopes sets the "allowed_scopes" field.

func (*PrincipalUpdateOne) SetApplication added in v0.2.0

func (_u *PrincipalUpdateOne) SetApplication(v *Application) *PrincipalUpdateOne

SetApplication sets the "application" edge to the Application entity.

func (*PrincipalUpdateOne) SetApplicationID added in v0.2.0

func (_u *PrincipalUpdateOne) SetApplicationID(id uuid.UUID) *PrincipalUpdateOne

SetApplicationID sets the "application" edge to the Application entity by ID.

func (*PrincipalUpdateOne) SetCapabilities added in v0.2.0

func (_u *PrincipalUpdateOne) SetCapabilities(v map[string]bool) *PrincipalUpdateOne

SetCapabilities sets the "capabilities" field.

func (*PrincipalUpdateOne) SetDisplayName added in v0.2.0

func (_u *PrincipalUpdateOne) SetDisplayName(v string) *PrincipalUpdateOne

SetDisplayName sets the "display_name" field.

func (*PrincipalUpdateOne) SetHuman added in v0.2.0

func (_u *PrincipalUpdateOne) SetHuman(v *Human) *PrincipalUpdateOne

SetHuman sets the "human" edge to the Human entity.

func (*PrincipalUpdateOne) SetHumanID added in v0.2.0

func (_u *PrincipalUpdateOne) SetHumanID(id uuid.UUID) *PrincipalUpdateOne

SetHumanID sets the "human" edge to the Human entity by ID.

func (*PrincipalUpdateOne) SetIdentifier added in v0.2.0

func (_u *PrincipalUpdateOne) SetIdentifier(v string) *PrincipalUpdateOne

SetIdentifier sets the "identifier" field.

func (*PrincipalUpdateOne) SetMetadata added in v0.2.0

func (_u *PrincipalUpdateOne) SetMetadata(v map[string]interface{}) *PrincipalUpdateOne

SetMetadata sets the "metadata" field.

func (*PrincipalUpdateOne) SetNillableActive added in v0.2.0

func (_u *PrincipalUpdateOne) SetNillableActive(v *bool) *PrincipalUpdateOne

SetNillableActive sets the "active" field if the given value is not nil.

func (*PrincipalUpdateOne) SetNillableAgentID added in v0.2.0

func (_u *PrincipalUpdateOne) SetNillableAgentID(id *uuid.UUID) *PrincipalUpdateOne

SetNillableAgentID sets the "agent" edge to the Agent entity by ID if the given value is not nil.

func (*PrincipalUpdateOne) SetNillableApplicationID added in v0.2.0

func (_u *PrincipalUpdateOne) SetNillableApplicationID(id *uuid.UUID) *PrincipalUpdateOne

SetNillableApplicationID sets the "application" edge to the Application entity by ID if the given value is not nil.

func (*PrincipalUpdateOne) SetNillableDisplayName added in v0.2.0

func (_u *PrincipalUpdateOne) SetNillableDisplayName(v *string) *PrincipalUpdateOne

SetNillableDisplayName sets the "display_name" field if the given value is not nil.

func (*PrincipalUpdateOne) SetNillableHumanID added in v0.2.0

func (_u *PrincipalUpdateOne) SetNillableHumanID(id *uuid.UUID) *PrincipalUpdateOne

SetNillableHumanID sets the "human" edge to the Human entity by ID if the given value is not nil.

func (*PrincipalUpdateOne) SetNillableIdentifier added in v0.2.0

func (_u *PrincipalUpdateOne) SetNillableIdentifier(v *string) *PrincipalUpdateOne

SetNillableIdentifier sets the "identifier" field if the given value is not nil.

func (*PrincipalUpdateOne) SetNillableOrganizationID added in v0.2.0

func (_u *PrincipalUpdateOne) SetNillableOrganizationID(v *uuid.UUID) *PrincipalUpdateOne

SetNillableOrganizationID sets the "organization_id" field if the given value is not nil.

func (*PrincipalUpdateOne) SetNillableServicePrincipalID added in v0.2.0

func (_u *PrincipalUpdateOne) SetNillableServicePrincipalID(id *uuid.UUID) *PrincipalUpdateOne

SetNillableServicePrincipalID sets the "service_principal" edge to the ServicePrincipal entity by ID if the given value is not nil.

func (*PrincipalUpdateOne) SetOrganization added in v0.2.0

func (_u *PrincipalUpdateOne) SetOrganization(v *Organization) *PrincipalUpdateOne

SetOrganization sets the "organization" edge to the Organization entity.

func (*PrincipalUpdateOne) SetOrganizationID added in v0.2.0

func (_u *PrincipalUpdateOne) SetOrganizationID(v uuid.UUID) *PrincipalUpdateOne

SetOrganizationID sets the "organization_id" field.

func (*PrincipalUpdateOne) SetServicePrincipal added in v0.2.0

func (_u *PrincipalUpdateOne) SetServicePrincipal(v *ServicePrincipal) *PrincipalUpdateOne

SetServicePrincipal sets the "service_principal" edge to the ServicePrincipal entity.

func (*PrincipalUpdateOne) SetServicePrincipalID added in v0.2.0

func (_u *PrincipalUpdateOne) SetServicePrincipalID(id uuid.UUID) *PrincipalUpdateOne

SetServicePrincipalID sets the "service_principal" edge to the ServicePrincipal entity by ID.

func (*PrincipalUpdateOne) SetUpdatedAt added in v0.2.0

func (_u *PrincipalUpdateOne) SetUpdatedAt(v time.Time) *PrincipalUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*PrincipalUpdateOne) Where added in v0.2.0

Where appends a list predicates to the PrincipalUpdate builder.

type PrincipalUpsert added in v0.2.0

type PrincipalUpsert struct {
	*sql.UpdateSet
}

PrincipalUpsert is the "OnConflict" setter.

func (*PrincipalUpsert) ClearMetadata added in v0.2.0

func (u *PrincipalUpsert) ClearMetadata() *PrincipalUpsert

ClearMetadata clears the value of the "metadata" field.

func (*PrincipalUpsert) ClearOrganizationID added in v0.2.0

func (u *PrincipalUpsert) ClearOrganizationID() *PrincipalUpsert

ClearOrganizationID clears the value of the "organization_id" field.

func (*PrincipalUpsert) SetActive added in v0.2.0

func (u *PrincipalUpsert) SetActive(v bool) *PrincipalUpsert

SetActive sets the "active" field.

func (*PrincipalUpsert) SetAllowedScopes added in v0.2.0

func (u *PrincipalUpsert) SetAllowedScopes(v []string) *PrincipalUpsert

SetAllowedScopes sets the "allowed_scopes" field.

func (*PrincipalUpsert) SetCapabilities added in v0.2.0

func (u *PrincipalUpsert) SetCapabilities(v map[string]bool) *PrincipalUpsert

SetCapabilities sets the "capabilities" field.

func (*PrincipalUpsert) SetDisplayName added in v0.2.0

func (u *PrincipalUpsert) SetDisplayName(v string) *PrincipalUpsert

SetDisplayName sets the "display_name" field.

func (*PrincipalUpsert) SetIdentifier added in v0.2.0

func (u *PrincipalUpsert) SetIdentifier(v string) *PrincipalUpsert

SetIdentifier sets the "identifier" field.

func (*PrincipalUpsert) SetMetadata added in v0.2.0

func (u *PrincipalUpsert) SetMetadata(v map[string]interface{}) *PrincipalUpsert

SetMetadata sets the "metadata" field.

func (*PrincipalUpsert) SetOrganizationID added in v0.2.0

func (u *PrincipalUpsert) SetOrganizationID(v uuid.UUID) *PrincipalUpsert

SetOrganizationID sets the "organization_id" field.

func (*PrincipalUpsert) SetUpdatedAt added in v0.2.0

func (u *PrincipalUpsert) SetUpdatedAt(v time.Time) *PrincipalUpsert

SetUpdatedAt sets the "updated_at" field.

func (*PrincipalUpsert) UpdateActive added in v0.2.0

func (u *PrincipalUpsert) UpdateActive() *PrincipalUpsert

UpdateActive sets the "active" field to the value that was provided on create.

func (*PrincipalUpsert) UpdateAllowedScopes added in v0.2.0

func (u *PrincipalUpsert) UpdateAllowedScopes() *PrincipalUpsert

UpdateAllowedScopes sets the "allowed_scopes" field to the value that was provided on create.

func (*PrincipalUpsert) UpdateCapabilities added in v0.2.0

func (u *PrincipalUpsert) UpdateCapabilities() *PrincipalUpsert

UpdateCapabilities sets the "capabilities" field to the value that was provided on create.

func (*PrincipalUpsert) UpdateDisplayName added in v0.2.0

func (u *PrincipalUpsert) UpdateDisplayName() *PrincipalUpsert

UpdateDisplayName sets the "display_name" field to the value that was provided on create.

func (*PrincipalUpsert) UpdateIdentifier added in v0.2.0

func (u *PrincipalUpsert) UpdateIdentifier() *PrincipalUpsert

UpdateIdentifier sets the "identifier" field to the value that was provided on create.

func (*PrincipalUpsert) UpdateMetadata added in v0.2.0

func (u *PrincipalUpsert) UpdateMetadata() *PrincipalUpsert

UpdateMetadata sets the "metadata" field to the value that was provided on create.

func (*PrincipalUpsert) UpdateOrganizationID added in v0.2.0

func (u *PrincipalUpsert) UpdateOrganizationID() *PrincipalUpsert

UpdateOrganizationID sets the "organization_id" field to the value that was provided on create.

func (*PrincipalUpsert) UpdateUpdatedAt added in v0.2.0

func (u *PrincipalUpsert) UpdateUpdatedAt() *PrincipalUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type PrincipalUpsertBulk added in v0.2.0

type PrincipalUpsertBulk struct {
	// contains filtered or unexported fields
}

PrincipalUpsertBulk is the builder for "upsert"-ing a bulk of Principal nodes.

func (*PrincipalUpsertBulk) ClearMetadata added in v0.2.0

func (u *PrincipalUpsertBulk) ClearMetadata() *PrincipalUpsertBulk

ClearMetadata clears the value of the "metadata" field.

func (*PrincipalUpsertBulk) ClearOrganizationID added in v0.2.0

func (u *PrincipalUpsertBulk) ClearOrganizationID() *PrincipalUpsertBulk

ClearOrganizationID clears the value of the "organization_id" field.

func (*PrincipalUpsertBulk) DoNothing added in v0.2.0

func (u *PrincipalUpsertBulk) DoNothing() *PrincipalUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PrincipalUpsertBulk) Exec added in v0.2.0

Exec executes the query.

func (*PrincipalUpsertBulk) ExecX added in v0.2.0

func (u *PrincipalUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PrincipalUpsertBulk) Ignore added in v0.2.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Principal.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*PrincipalUpsertBulk) SetActive added in v0.2.0

func (u *PrincipalUpsertBulk) SetActive(v bool) *PrincipalUpsertBulk

SetActive sets the "active" field.

func (*PrincipalUpsertBulk) SetAllowedScopes added in v0.2.0

func (u *PrincipalUpsertBulk) SetAllowedScopes(v []string) *PrincipalUpsertBulk

SetAllowedScopes sets the "allowed_scopes" field.

func (*PrincipalUpsertBulk) SetCapabilities added in v0.2.0

func (u *PrincipalUpsertBulk) SetCapabilities(v map[string]bool) *PrincipalUpsertBulk

SetCapabilities sets the "capabilities" field.

func (*PrincipalUpsertBulk) SetDisplayName added in v0.2.0

func (u *PrincipalUpsertBulk) SetDisplayName(v string) *PrincipalUpsertBulk

SetDisplayName sets the "display_name" field.

func (*PrincipalUpsertBulk) SetIdentifier added in v0.2.0

func (u *PrincipalUpsertBulk) SetIdentifier(v string) *PrincipalUpsertBulk

SetIdentifier sets the "identifier" field.

func (*PrincipalUpsertBulk) SetMetadata added in v0.2.0

func (u *PrincipalUpsertBulk) SetMetadata(v map[string]interface{}) *PrincipalUpsertBulk

SetMetadata sets the "metadata" field.

func (*PrincipalUpsertBulk) SetOrganizationID added in v0.2.0

func (u *PrincipalUpsertBulk) SetOrganizationID(v uuid.UUID) *PrincipalUpsertBulk

SetOrganizationID sets the "organization_id" field.

func (*PrincipalUpsertBulk) SetUpdatedAt added in v0.2.0

func (u *PrincipalUpsertBulk) SetUpdatedAt(v time.Time) *PrincipalUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*PrincipalUpsertBulk) Update added in v0.2.0

Update allows overriding fields `UPDATE` values. See the PrincipalCreateBulk.OnConflict documentation for more info.

func (*PrincipalUpsertBulk) UpdateActive added in v0.2.0

func (u *PrincipalUpsertBulk) UpdateActive() *PrincipalUpsertBulk

UpdateActive sets the "active" field to the value that was provided on create.

func (*PrincipalUpsertBulk) UpdateAllowedScopes added in v0.2.0

func (u *PrincipalUpsertBulk) UpdateAllowedScopes() *PrincipalUpsertBulk

UpdateAllowedScopes sets the "allowed_scopes" field to the value that was provided on create.

func (*PrincipalUpsertBulk) UpdateCapabilities added in v0.2.0

func (u *PrincipalUpsertBulk) UpdateCapabilities() *PrincipalUpsertBulk

UpdateCapabilities sets the "capabilities" field to the value that was provided on create.

func (*PrincipalUpsertBulk) UpdateDisplayName added in v0.2.0

func (u *PrincipalUpsertBulk) UpdateDisplayName() *PrincipalUpsertBulk

UpdateDisplayName sets the "display_name" field to the value that was provided on create.

func (*PrincipalUpsertBulk) UpdateIdentifier added in v0.2.0

func (u *PrincipalUpsertBulk) UpdateIdentifier() *PrincipalUpsertBulk

UpdateIdentifier sets the "identifier" field to the value that was provided on create.

func (*PrincipalUpsertBulk) UpdateMetadata added in v0.2.0

func (u *PrincipalUpsertBulk) UpdateMetadata() *PrincipalUpsertBulk

UpdateMetadata sets the "metadata" field to the value that was provided on create.

func (*PrincipalUpsertBulk) UpdateNewValues added in v0.2.0

func (u *PrincipalUpsertBulk) UpdateNewValues() *PrincipalUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Principal.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(principal.FieldID)
		}),
	).
	Exec(ctx)

func (*PrincipalUpsertBulk) UpdateOrganizationID added in v0.2.0

func (u *PrincipalUpsertBulk) UpdateOrganizationID() *PrincipalUpsertBulk

UpdateOrganizationID sets the "organization_id" field to the value that was provided on create.

func (*PrincipalUpsertBulk) UpdateUpdatedAt added in v0.2.0

func (u *PrincipalUpsertBulk) UpdateUpdatedAt() *PrincipalUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type PrincipalUpsertOne added in v0.2.0

type PrincipalUpsertOne struct {
	// contains filtered or unexported fields
}

PrincipalUpsertOne is the builder for "upsert"-ing

one Principal node.

func (*PrincipalUpsertOne) ClearMetadata added in v0.2.0

func (u *PrincipalUpsertOne) ClearMetadata() *PrincipalUpsertOne

ClearMetadata clears the value of the "metadata" field.

func (*PrincipalUpsertOne) ClearOrganizationID added in v0.2.0

func (u *PrincipalUpsertOne) ClearOrganizationID() *PrincipalUpsertOne

ClearOrganizationID clears the value of the "organization_id" field.

func (*PrincipalUpsertOne) DoNothing added in v0.2.0

func (u *PrincipalUpsertOne) DoNothing() *PrincipalUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PrincipalUpsertOne) Exec added in v0.2.0

func (u *PrincipalUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*PrincipalUpsertOne) ExecX added in v0.2.0

func (u *PrincipalUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PrincipalUpsertOne) ID added in v0.2.0

func (u *PrincipalUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*PrincipalUpsertOne) IDX added in v0.2.0

IDX is like ID, but panics if an error occurs.

func (*PrincipalUpsertOne) Ignore added in v0.2.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Principal.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*PrincipalUpsertOne) SetActive added in v0.2.0

func (u *PrincipalUpsertOne) SetActive(v bool) *PrincipalUpsertOne

SetActive sets the "active" field.

func (*PrincipalUpsertOne) SetAllowedScopes added in v0.2.0

func (u *PrincipalUpsertOne) SetAllowedScopes(v []string) *PrincipalUpsertOne

SetAllowedScopes sets the "allowed_scopes" field.

func (*PrincipalUpsertOne) SetCapabilities added in v0.2.0

func (u *PrincipalUpsertOne) SetCapabilities(v map[string]bool) *PrincipalUpsertOne

SetCapabilities sets the "capabilities" field.

func (*PrincipalUpsertOne) SetDisplayName added in v0.2.0

func (u *PrincipalUpsertOne) SetDisplayName(v string) *PrincipalUpsertOne

SetDisplayName sets the "display_name" field.

func (*PrincipalUpsertOne) SetIdentifier added in v0.2.0

func (u *PrincipalUpsertOne) SetIdentifier(v string) *PrincipalUpsertOne

SetIdentifier sets the "identifier" field.

func (*PrincipalUpsertOne) SetMetadata added in v0.2.0

func (u *PrincipalUpsertOne) SetMetadata(v map[string]interface{}) *PrincipalUpsertOne

SetMetadata sets the "metadata" field.

func (*PrincipalUpsertOne) SetOrganizationID added in v0.2.0

func (u *PrincipalUpsertOne) SetOrganizationID(v uuid.UUID) *PrincipalUpsertOne

SetOrganizationID sets the "organization_id" field.

func (*PrincipalUpsertOne) SetUpdatedAt added in v0.2.0

func (u *PrincipalUpsertOne) SetUpdatedAt(v time.Time) *PrincipalUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*PrincipalUpsertOne) Update added in v0.2.0

func (u *PrincipalUpsertOne) Update(set func(*PrincipalUpsert)) *PrincipalUpsertOne

Update allows overriding fields `UPDATE` values. See the PrincipalCreate.OnConflict documentation for more info.

func (*PrincipalUpsertOne) UpdateActive added in v0.2.0

func (u *PrincipalUpsertOne) UpdateActive() *PrincipalUpsertOne

UpdateActive sets the "active" field to the value that was provided on create.

func (*PrincipalUpsertOne) UpdateAllowedScopes added in v0.2.0

func (u *PrincipalUpsertOne) UpdateAllowedScopes() *PrincipalUpsertOne

UpdateAllowedScopes sets the "allowed_scopes" field to the value that was provided on create.

func (*PrincipalUpsertOne) UpdateCapabilities added in v0.2.0

func (u *PrincipalUpsertOne) UpdateCapabilities() *PrincipalUpsertOne

UpdateCapabilities sets the "capabilities" field to the value that was provided on create.

func (*PrincipalUpsertOne) UpdateDisplayName added in v0.2.0

func (u *PrincipalUpsertOne) UpdateDisplayName() *PrincipalUpsertOne

UpdateDisplayName sets the "display_name" field to the value that was provided on create.

func (*PrincipalUpsertOne) UpdateIdentifier added in v0.2.0

func (u *PrincipalUpsertOne) UpdateIdentifier() *PrincipalUpsertOne

UpdateIdentifier sets the "identifier" field to the value that was provided on create.

func (*PrincipalUpsertOne) UpdateMetadata added in v0.2.0

func (u *PrincipalUpsertOne) UpdateMetadata() *PrincipalUpsertOne

UpdateMetadata sets the "metadata" field to the value that was provided on create.

func (*PrincipalUpsertOne) UpdateNewValues added in v0.2.0

func (u *PrincipalUpsertOne) UpdateNewValues() *PrincipalUpsertOne

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.Principal.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(principal.FieldID)
		}),
	).
	Exec(ctx)

func (*PrincipalUpsertOne) UpdateOrganizationID added in v0.2.0

func (u *PrincipalUpsertOne) UpdateOrganizationID() *PrincipalUpsertOne

UpdateOrganizationID sets the "organization_id" field to the value that was provided on create.

func (*PrincipalUpsertOne) UpdateUpdatedAt added in v0.2.0

func (u *PrincipalUpsertOne) UpdateUpdatedAt() *PrincipalUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type Principals added in v0.2.0

type Principals []*Principal

Principals is a parsable slice of Principal.

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 ServicePrincipal added in v0.2.0

type ServicePrincipal 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"`
	// Reference to parent Principal
	PrincipalID uuid.UUID `json:"principal_id,omitempty"`
	// Type of service (e.g., backend, worker, gateway)
	ServiceType string `json:"service_type,omitempty"`
	// Service description
	Description string `json:"description,omitempty"`
	// Principal who created this service account
	CreatedBy *uuid.UUID `json:"created_by,omitempty"`
	// Last time this service account was used
	LastUsedAt *time.Time `json:"last_used_at,omitempty"`
	// IP addresses/CIDRs allowed to use this service account
	AllowedIps []string `json:"allowed_ips,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ServicePrincipalQuery when eager-loading is set.
	Edges ServicePrincipalEdges `json:"edges"`
	// contains filtered or unexported fields
}

ServicePrincipal is the model entity for the ServicePrincipal schema.

func (*ServicePrincipal) QueryCreator added in v0.2.0

func (_m *ServicePrincipal) QueryCreator() *PrincipalQuery

QueryCreator queries the "creator" edge of the ServicePrincipal entity.

func (*ServicePrincipal) QueryPrincipal added in v0.2.0

func (_m *ServicePrincipal) QueryPrincipal() *PrincipalQuery

QueryPrincipal queries the "principal" edge of the ServicePrincipal entity.

func (*ServicePrincipal) String added in v0.2.0

func (_m *ServicePrincipal) String() string

String implements the fmt.Stringer.

func (*ServicePrincipal) Unwrap added in v0.2.0

func (_m *ServicePrincipal) Unwrap() *ServicePrincipal

Unwrap unwraps the ServicePrincipal 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 (*ServicePrincipal) Update added in v0.2.0

Update returns a builder for updating this ServicePrincipal. Note that you need to call ServicePrincipal.Unwrap() before calling this method if this ServicePrincipal was returned from a transaction, and the transaction was committed or rolled back.

func (*ServicePrincipal) Value added in v0.2.0

func (_m *ServicePrincipal) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the ServicePrincipal. This includes values selected through modifiers, order, etc.

type ServicePrincipalClient added in v0.2.0

type ServicePrincipalClient struct {
	// contains filtered or unexported fields
}

ServicePrincipalClient is a client for the ServicePrincipal schema.

func NewServicePrincipalClient added in v0.2.0

func NewServicePrincipalClient(c config) *ServicePrincipalClient

NewServicePrincipalClient returns a client for the ServicePrincipal from the given config.

func (*ServicePrincipalClient) Create added in v0.2.0

Create returns a builder for creating a ServicePrincipal entity.

func (*ServicePrincipalClient) CreateBulk added in v0.2.0

CreateBulk returns a builder for creating a bulk of ServicePrincipal entities.

func (*ServicePrincipalClient) Delete added in v0.2.0

Delete returns a delete builder for ServicePrincipal.

func (*ServicePrincipalClient) DeleteOne added in v0.2.0

DeleteOne returns a builder for deleting the given entity.

func (*ServicePrincipalClient) DeleteOneID added in v0.2.0

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ServicePrincipalClient) Get added in v0.2.0

Get returns a ServicePrincipal entity by its id.

func (*ServicePrincipalClient) GetX added in v0.2.0

GetX is like Get, but panics if an error occurs.

func (*ServicePrincipalClient) Hooks added in v0.2.0

func (c *ServicePrincipalClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ServicePrincipalClient) Intercept added in v0.2.0

func (c *ServicePrincipalClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `serviceprincipal.Intercept(f(g(h())))`.

func (*ServicePrincipalClient) Interceptors added in v0.2.0

func (c *ServicePrincipalClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ServicePrincipalClient) MapCreateBulk added in v0.2.0

func (c *ServicePrincipalClient) MapCreateBulk(slice any, setFunc func(*ServicePrincipalCreate, int)) *ServicePrincipalCreateBulk

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 (*ServicePrincipalClient) Query added in v0.2.0

Query returns a query builder for ServicePrincipal.

func (*ServicePrincipalClient) QueryCreator added in v0.2.0

QueryCreator queries the creator edge of a ServicePrincipal.

func (*ServicePrincipalClient) QueryPrincipal added in v0.2.0

func (c *ServicePrincipalClient) QueryPrincipal(_m *ServicePrincipal) *PrincipalQuery

QueryPrincipal queries the principal edge of a ServicePrincipal.

func (*ServicePrincipalClient) Update added in v0.2.0

Update returns an update builder for ServicePrincipal.

func (*ServicePrincipalClient) UpdateOne added in v0.2.0

UpdateOne returns an update builder for the given entity.

func (*ServicePrincipalClient) UpdateOneID added in v0.2.0

UpdateOneID returns an update builder for the given id.

func (*ServicePrincipalClient) Use added in v0.2.0

func (c *ServicePrincipalClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `serviceprincipal.Hooks(f(g(h())))`.

type ServicePrincipalCreate added in v0.2.0

type ServicePrincipalCreate struct {
	// contains filtered or unexported fields
}

ServicePrincipalCreate is the builder for creating a ServicePrincipal entity.

func (*ServicePrincipalCreate) Exec added in v0.2.0

Exec executes the query.

func (*ServicePrincipalCreate) ExecX added in v0.2.0

func (_c *ServicePrincipalCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ServicePrincipalCreate) Mutation added in v0.2.0

Mutation returns the ServicePrincipalMutation object of the builder.

func (*ServicePrincipalCreate) OnConflict added in v0.2.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.ServicePrincipal.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.ServicePrincipalUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*ServicePrincipalCreate) OnConflictColumns added in v0.2.0

func (_c *ServicePrincipalCreate) OnConflictColumns(columns ...string) *ServicePrincipalUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.ServicePrincipal.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ServicePrincipalCreate) Save added in v0.2.0

Save creates the ServicePrincipal in the database.

func (*ServicePrincipalCreate) SaveX added in v0.2.0

SaveX calls Save and panics if Save returns an error.

func (*ServicePrincipalCreate) SetAllowedIps added in v0.2.0

func (_c *ServicePrincipalCreate) SetAllowedIps(v []string) *ServicePrincipalCreate

SetAllowedIps sets the "allowed_ips" field.

func (*ServicePrincipalCreate) SetCreatedAt added in v0.2.0

SetCreatedAt sets the "created_at" field.

func (*ServicePrincipalCreate) SetCreatedBy added in v0.2.0

SetCreatedBy sets the "created_by" field.

func (*ServicePrincipalCreate) SetCreator added in v0.2.0

SetCreator sets the "creator" edge to the Principal entity.

func (*ServicePrincipalCreate) SetCreatorID added in v0.2.0

SetCreatorID sets the "creator" edge to the Principal entity by ID.

func (*ServicePrincipalCreate) SetDescription added in v0.2.0

func (_c *ServicePrincipalCreate) SetDescription(v string) *ServicePrincipalCreate

SetDescription sets the "description" field.

func (*ServicePrincipalCreate) SetID added in v0.2.0

SetID sets the "id" field.

func (*ServicePrincipalCreate) SetLastUsedAt added in v0.2.0

SetLastUsedAt sets the "last_used_at" field.

func (*ServicePrincipalCreate) SetNillableCreatedAt added in v0.2.0

func (_c *ServicePrincipalCreate) SetNillableCreatedAt(v *time.Time) *ServicePrincipalCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ServicePrincipalCreate) SetNillableCreatedBy added in v0.2.0

func (_c *ServicePrincipalCreate) SetNillableCreatedBy(v *uuid.UUID) *ServicePrincipalCreate

SetNillableCreatedBy sets the "created_by" field if the given value is not nil.

func (*ServicePrincipalCreate) SetNillableCreatorID added in v0.2.0

func (_c *ServicePrincipalCreate) SetNillableCreatorID(id *uuid.UUID) *ServicePrincipalCreate

SetNillableCreatorID sets the "creator" edge to the Principal entity by ID if the given value is not nil.

func (*ServicePrincipalCreate) SetNillableDescription added in v0.2.0

func (_c *ServicePrincipalCreate) SetNillableDescription(v *string) *ServicePrincipalCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*ServicePrincipalCreate) SetNillableID added in v0.2.0

func (_c *ServicePrincipalCreate) SetNillableID(v *uuid.UUID) *ServicePrincipalCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*ServicePrincipalCreate) SetNillableLastUsedAt added in v0.2.0

func (_c *ServicePrincipalCreate) SetNillableLastUsedAt(v *time.Time) *ServicePrincipalCreate

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*ServicePrincipalCreate) SetNillableUpdatedAt added in v0.2.0

func (_c *ServicePrincipalCreate) SetNillableUpdatedAt(v *time.Time) *ServicePrincipalCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*ServicePrincipalCreate) SetPrincipal added in v0.2.0

SetPrincipal sets the "principal" edge to the Principal entity.

func (*ServicePrincipalCreate) SetPrincipalID added in v0.2.0

func (_c *ServicePrincipalCreate) SetPrincipalID(v uuid.UUID) *ServicePrincipalCreate

SetPrincipalID sets the "principal_id" field.

func (*ServicePrincipalCreate) SetServiceType added in v0.2.0

func (_c *ServicePrincipalCreate) SetServiceType(v string) *ServicePrincipalCreate

SetServiceType sets the "service_type" field.

func (*ServicePrincipalCreate) SetUpdatedAt added in v0.2.0

SetUpdatedAt sets the "updated_at" field.

type ServicePrincipalCreateBulk added in v0.2.0

type ServicePrincipalCreateBulk struct {
	// contains filtered or unexported fields
}

ServicePrincipalCreateBulk is the builder for creating many ServicePrincipal entities in bulk.

func (*ServicePrincipalCreateBulk) Exec added in v0.2.0

Exec executes the query.

func (*ServicePrincipalCreateBulk) ExecX added in v0.2.0

ExecX is like Exec, but panics if an error occurs.

func (*ServicePrincipalCreateBulk) OnConflict added in v0.2.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.ServicePrincipal.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.ServicePrincipalUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*ServicePrincipalCreateBulk) OnConflictColumns added in v0.2.0

func (_c *ServicePrincipalCreateBulk) OnConflictColumns(columns ...string) *ServicePrincipalUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.ServicePrincipal.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ServicePrincipalCreateBulk) Save added in v0.2.0

Save creates the ServicePrincipal entities in the database.

func (*ServicePrincipalCreateBulk) SaveX added in v0.2.0

SaveX is like Save, but panics if an error occurs.

type ServicePrincipalDelete added in v0.2.0

type ServicePrincipalDelete struct {
	// contains filtered or unexported fields
}

ServicePrincipalDelete is the builder for deleting a ServicePrincipal entity.

func (*ServicePrincipalDelete) Exec added in v0.2.0

func (_d *ServicePrincipalDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ServicePrincipalDelete) ExecX added in v0.2.0

func (_d *ServicePrincipalDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ServicePrincipalDelete) Where added in v0.2.0

Where appends a list predicates to the ServicePrincipalDelete builder.

type ServicePrincipalDeleteOne added in v0.2.0

type ServicePrincipalDeleteOne struct {
	// contains filtered or unexported fields
}

ServicePrincipalDeleteOne is the builder for deleting a single ServicePrincipal entity.

func (*ServicePrincipalDeleteOne) Exec added in v0.2.0

Exec executes the deletion query.

func (*ServicePrincipalDeleteOne) ExecX added in v0.2.0

func (_d *ServicePrincipalDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ServicePrincipalDeleteOne) Where added in v0.2.0

Where appends a list predicates to the ServicePrincipalDelete builder.

type ServicePrincipalEdges added in v0.2.0

type ServicePrincipalEdges struct {
	// Principal holds the value of the principal edge.
	Principal *Principal `json:"principal,omitempty"`
	// Principal who created this service account
	Creator *Principal `json:"creator,omitempty"`
	// contains filtered or unexported fields
}

ServicePrincipalEdges holds the relations/edges for other nodes in the graph.

func (ServicePrincipalEdges) CreatorOrErr added in v0.2.0

func (e ServicePrincipalEdges) CreatorOrErr() (*Principal, 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 (ServicePrincipalEdges) PrincipalOrErr added in v0.2.0

func (e ServicePrincipalEdges) PrincipalOrErr() (*Principal, error)

PrincipalOrErr returns the Principal value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type ServicePrincipalFilter added in v0.2.0

type ServicePrincipalFilter struct {
	// contains filtered or unexported fields
}

ServicePrincipalFilter provides a generic filtering capability at runtime for ServicePrincipalQuery.

func (*ServicePrincipalFilter) Where added in v0.2.0

func (f *ServicePrincipalFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*ServicePrincipalFilter) WhereAllowedIps added in v0.2.0

func (f *ServicePrincipalFilter) WhereAllowedIps(p entql.BytesP)

WhereAllowedIps applies the entql json.RawMessage predicate on the allowed_ips field.

func (*ServicePrincipalFilter) WhereCreatedAt added in v0.2.0

func (f *ServicePrincipalFilter) WhereCreatedAt(p entql.TimeP)

WhereCreatedAt applies the entql time.Time predicate on the created_at field.

func (*ServicePrincipalFilter) WhereCreatedBy added in v0.2.0

func (f *ServicePrincipalFilter) WhereCreatedBy(p entql.ValueP)

WhereCreatedBy applies the entql [16]byte predicate on the created_by field.

func (*ServicePrincipalFilter) WhereDescription added in v0.2.0

func (f *ServicePrincipalFilter) WhereDescription(p entql.StringP)

WhereDescription applies the entql string predicate on the description field.

func (*ServicePrincipalFilter) WhereHasCreator added in v0.2.0

func (f *ServicePrincipalFilter) WhereHasCreator()

WhereHasCreator applies a predicate to check if query has an edge creator.

func (*ServicePrincipalFilter) WhereHasCreatorWith added in v0.2.0

func (f *ServicePrincipalFilter) WhereHasCreatorWith(preds ...predicate.Principal)

WhereHasCreatorWith applies a predicate to check if query has an edge creator with a given conditions (other predicates).

func (*ServicePrincipalFilter) WhereHasPrincipal added in v0.2.0

func (f *ServicePrincipalFilter) WhereHasPrincipal()

WhereHasPrincipal applies a predicate to check if query has an edge principal.

func (*ServicePrincipalFilter) WhereHasPrincipalWith added in v0.2.0

func (f *ServicePrincipalFilter) WhereHasPrincipalWith(preds ...predicate.Principal)

WhereHasPrincipalWith applies a predicate to check if query has an edge principal with a given conditions (other predicates).

func (*ServicePrincipalFilter) WhereID added in v0.2.0

func (f *ServicePrincipalFilter) WhereID(p entql.ValueP)

WhereID applies the entql [16]byte predicate on the id field.

func (*ServicePrincipalFilter) WhereLastUsedAt added in v0.2.0

func (f *ServicePrincipalFilter) WhereLastUsedAt(p entql.TimeP)

WhereLastUsedAt applies the entql time.Time predicate on the last_used_at field.

func (*ServicePrincipalFilter) WherePrincipalID added in v0.2.0

func (f *ServicePrincipalFilter) WherePrincipalID(p entql.ValueP)

WherePrincipalID applies the entql [16]byte predicate on the principal_id field.

func (*ServicePrincipalFilter) WhereServiceType added in v0.2.0

func (f *ServicePrincipalFilter) WhereServiceType(p entql.StringP)

WhereServiceType applies the entql string predicate on the service_type field.

func (*ServicePrincipalFilter) WhereUpdatedAt added in v0.2.0

func (f *ServicePrincipalFilter) WhereUpdatedAt(p entql.TimeP)

WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.

type ServicePrincipalGroupBy added in v0.2.0

type ServicePrincipalGroupBy struct {
	// contains filtered or unexported fields
}

ServicePrincipalGroupBy is the group-by builder for ServicePrincipal entities.

func (*ServicePrincipalGroupBy) Aggregate added in v0.2.0

Aggregate adds the given aggregation functions to the group-by query.

func (*ServicePrincipalGroupBy) Bool added in v0.2.0

func (s *ServicePrincipalGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ServicePrincipalGroupBy) BoolX added in v0.2.0

func (s *ServicePrincipalGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ServicePrincipalGroupBy) Bools added in v0.2.0

func (s *ServicePrincipalGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ServicePrincipalGroupBy) BoolsX added in v0.2.0

func (s *ServicePrincipalGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ServicePrincipalGroupBy) Float64 added in v0.2.0

func (s *ServicePrincipalGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ServicePrincipalGroupBy) Float64X added in v0.2.0

func (s *ServicePrincipalGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ServicePrincipalGroupBy) Float64s added in v0.2.0

func (s *ServicePrincipalGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ServicePrincipalGroupBy) Float64sX added in v0.2.0

func (s *ServicePrincipalGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ServicePrincipalGroupBy) Int added in v0.2.0

func (s *ServicePrincipalGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ServicePrincipalGroupBy) IntX added in v0.2.0

func (s *ServicePrincipalGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ServicePrincipalGroupBy) Ints added in v0.2.0

func (s *ServicePrincipalGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ServicePrincipalGroupBy) IntsX added in v0.2.0

func (s *ServicePrincipalGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ServicePrincipalGroupBy) Scan added in v0.2.0

func (_g *ServicePrincipalGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ServicePrincipalGroupBy) ScanX added in v0.2.0

func (s *ServicePrincipalGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ServicePrincipalGroupBy) String added in v0.2.0

func (s *ServicePrincipalGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ServicePrincipalGroupBy) StringX added in v0.2.0

func (s *ServicePrincipalGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ServicePrincipalGroupBy) Strings added in v0.2.0

func (s *ServicePrincipalGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ServicePrincipalGroupBy) StringsX added in v0.2.0

func (s *ServicePrincipalGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ServicePrincipalMutation added in v0.2.0

type ServicePrincipalMutation struct {
	// contains filtered or unexported fields
}

ServicePrincipalMutation represents an operation that mutates the ServicePrincipal nodes in the graph.

func (*ServicePrincipalMutation) AddField added in v0.2.0

func (m *ServicePrincipalMutation) 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 (*ServicePrincipalMutation) AddedEdges added in v0.2.0

func (m *ServicePrincipalMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ServicePrincipalMutation) AddedField added in v0.2.0

func (m *ServicePrincipalMutation) 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 (*ServicePrincipalMutation) AddedFields added in v0.2.0

func (m *ServicePrincipalMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ServicePrincipalMutation) AddedIDs added in v0.2.0

func (m *ServicePrincipalMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ServicePrincipalMutation) AllowedIps added in v0.2.0

func (m *ServicePrincipalMutation) AllowedIps() (r []string, exists bool)

AllowedIps returns the value of the "allowed_ips" field in the mutation.

func (*ServicePrincipalMutation) AppendAllowedIps added in v0.2.0

func (m *ServicePrincipalMutation) AppendAllowedIps(s []string)

AppendAllowedIps adds s to the "allowed_ips" field.

func (*ServicePrincipalMutation) AppendedAllowedIps added in v0.2.0

func (m *ServicePrincipalMutation) AppendedAllowedIps() ([]string, bool)

AppendedAllowedIps returns the list of values that were appended to the "allowed_ips" field in this mutation.

func (*ServicePrincipalMutation) ClearCreatedBy added in v0.2.0

func (m *ServicePrincipalMutation) ClearCreatedBy()

ClearCreatedBy clears the value of the "created_by" field.

func (*ServicePrincipalMutation) ClearCreator added in v0.2.0

func (m *ServicePrincipalMutation) ClearCreator()

ClearCreator clears the "creator" edge to the Principal entity.

func (*ServicePrincipalMutation) ClearDescription added in v0.2.0

func (m *ServicePrincipalMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*ServicePrincipalMutation) ClearEdge added in v0.2.0

func (m *ServicePrincipalMutation) 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 (*ServicePrincipalMutation) ClearField added in v0.2.0

func (m *ServicePrincipalMutation) 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 (*ServicePrincipalMutation) ClearLastUsedAt added in v0.2.0

func (m *ServicePrincipalMutation) ClearLastUsedAt()

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*ServicePrincipalMutation) ClearPrincipal added in v0.2.0

func (m *ServicePrincipalMutation) ClearPrincipal()

ClearPrincipal clears the "principal" edge to the Principal entity.

func (*ServicePrincipalMutation) ClearedEdges added in v0.2.0

func (m *ServicePrincipalMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ServicePrincipalMutation) ClearedFields added in v0.2.0

func (m *ServicePrincipalMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ServicePrincipalMutation) Client added in v0.2.0

func (m ServicePrincipalMutation) 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 (*ServicePrincipalMutation) CreatedAt added in v0.2.0

func (m *ServicePrincipalMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*ServicePrincipalMutation) CreatedBy added in v0.2.0

func (m *ServicePrincipalMutation) CreatedBy() (r uuid.UUID, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*ServicePrincipalMutation) CreatedByCleared added in v0.2.0

func (m *ServicePrincipalMutation) CreatedByCleared() bool

CreatedByCleared returns if the "created_by" field was cleared in this mutation.

func (*ServicePrincipalMutation) CreatorCleared added in v0.2.0

func (m *ServicePrincipalMutation) CreatorCleared() bool

CreatorCleared reports if the "creator" edge to the Principal entity was cleared.

func (*ServicePrincipalMutation) CreatorID added in v0.2.0

func (m *ServicePrincipalMutation) CreatorID() (id uuid.UUID, exists bool)

CreatorID returns the "creator" edge ID in the mutation.

func (*ServicePrincipalMutation) CreatorIDs added in v0.2.0

func (m *ServicePrincipalMutation) 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 (*ServicePrincipalMutation) Description added in v0.2.0

func (m *ServicePrincipalMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*ServicePrincipalMutation) DescriptionCleared added in v0.2.0

func (m *ServicePrincipalMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*ServicePrincipalMutation) EdgeCleared added in v0.2.0

func (m *ServicePrincipalMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ServicePrincipalMutation) Field added in v0.2.0

func (m *ServicePrincipalMutation) 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 (*ServicePrincipalMutation) FieldCleared added in v0.2.0

func (m *ServicePrincipalMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ServicePrincipalMutation) Fields added in v0.2.0

func (m *ServicePrincipalMutation) 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 (*ServicePrincipalMutation) Filter added in v0.2.0

Filter returns an entql.Where implementation to apply filters on the ServicePrincipalMutation builder.

func (*ServicePrincipalMutation) ID added in v0.2.0

func (m *ServicePrincipalMutation) 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 (*ServicePrincipalMutation) IDs added in v0.2.0

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 (*ServicePrincipalMutation) LastUsedAt added in v0.2.0

func (m *ServicePrincipalMutation) LastUsedAt() (r time.Time, exists bool)

LastUsedAt returns the value of the "last_used_at" field in the mutation.

func (*ServicePrincipalMutation) LastUsedAtCleared added in v0.2.0

func (m *ServicePrincipalMutation) LastUsedAtCleared() bool

LastUsedAtCleared returns if the "last_used_at" field was cleared in this mutation.

func (*ServicePrincipalMutation) OldAllowedIps added in v0.2.0

func (m *ServicePrincipalMutation) OldAllowedIps(ctx context.Context) (v []string, err error)

OldAllowedIps returns the old "allowed_ips" field's value of the ServicePrincipal entity. If the ServicePrincipal 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 (*ServicePrincipalMutation) OldCreatedAt added in v0.2.0

func (m *ServicePrincipalMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the ServicePrincipal entity. If the ServicePrincipal 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 (*ServicePrincipalMutation) OldCreatedBy added in v0.2.0

func (m *ServicePrincipalMutation) OldCreatedBy(ctx context.Context) (v *uuid.UUID, err error)

OldCreatedBy returns the old "created_by" field's value of the ServicePrincipal entity. If the ServicePrincipal 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 (*ServicePrincipalMutation) OldDescription added in v0.2.0

func (m *ServicePrincipalMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the ServicePrincipal entity. If the ServicePrincipal 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 (*ServicePrincipalMutation) OldField added in v0.2.0

func (m *ServicePrincipalMutation) 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 (*ServicePrincipalMutation) OldLastUsedAt added in v0.2.0

func (m *ServicePrincipalMutation) OldLastUsedAt(ctx context.Context) (v *time.Time, err error)

OldLastUsedAt returns the old "last_used_at" field's value of the ServicePrincipal entity. If the ServicePrincipal 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 (*ServicePrincipalMutation) OldPrincipalID added in v0.2.0

func (m *ServicePrincipalMutation) OldPrincipalID(ctx context.Context) (v uuid.UUID, err error)

OldPrincipalID returns the old "principal_id" field's value of the ServicePrincipal entity. If the ServicePrincipal 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 (*ServicePrincipalMutation) OldServiceType added in v0.2.0

func (m *ServicePrincipalMutation) OldServiceType(ctx context.Context) (v string, err error)

OldServiceType returns the old "service_type" field's value of the ServicePrincipal entity. If the ServicePrincipal 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 (*ServicePrincipalMutation) OldUpdatedAt added in v0.2.0

func (m *ServicePrincipalMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the ServicePrincipal entity. If the ServicePrincipal 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 (*ServicePrincipalMutation) Op added in v0.2.0

func (m *ServicePrincipalMutation) Op() Op

Op returns the operation name.

func (*ServicePrincipalMutation) PrincipalCleared added in v0.2.0

func (m *ServicePrincipalMutation) PrincipalCleared() bool

PrincipalCleared reports if the "principal" edge to the Principal entity was cleared.

func (*ServicePrincipalMutation) PrincipalID added in v0.2.0

func (m *ServicePrincipalMutation) PrincipalID() (r uuid.UUID, exists bool)

PrincipalID returns the value of the "principal_id" field in the mutation.

func (*ServicePrincipalMutation) PrincipalIDs added in v0.2.0

func (m *ServicePrincipalMutation) PrincipalIDs() (ids []uuid.UUID)

PrincipalIDs returns the "principal" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PrincipalID instead. It exists only for internal usage by the builders.

func (*ServicePrincipalMutation) RemovedEdges added in v0.2.0

func (m *ServicePrincipalMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ServicePrincipalMutation) RemovedIDs added in v0.2.0

func (m *ServicePrincipalMutation) 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 (*ServicePrincipalMutation) ResetAllowedIps added in v0.2.0

func (m *ServicePrincipalMutation) ResetAllowedIps()

ResetAllowedIps resets all changes to the "allowed_ips" field.

func (*ServicePrincipalMutation) ResetCreatedAt added in v0.2.0

func (m *ServicePrincipalMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ServicePrincipalMutation) ResetCreatedBy added in v0.2.0

func (m *ServicePrincipalMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*ServicePrincipalMutation) ResetCreator added in v0.2.0

func (m *ServicePrincipalMutation) ResetCreator()

ResetCreator resets all changes to the "creator" edge.

func (*ServicePrincipalMutation) ResetDescription added in v0.2.0

func (m *ServicePrincipalMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*ServicePrincipalMutation) ResetEdge added in v0.2.0

func (m *ServicePrincipalMutation) 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 (*ServicePrincipalMutation) ResetField added in v0.2.0

func (m *ServicePrincipalMutation) 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 (*ServicePrincipalMutation) ResetLastUsedAt added in v0.2.0

func (m *ServicePrincipalMutation) ResetLastUsedAt()

ResetLastUsedAt resets all changes to the "last_used_at" field.

func (*ServicePrincipalMutation) ResetPrincipal added in v0.2.0

func (m *ServicePrincipalMutation) ResetPrincipal()

ResetPrincipal resets all changes to the "principal" edge.

func (*ServicePrincipalMutation) ResetPrincipalID added in v0.2.0

func (m *ServicePrincipalMutation) ResetPrincipalID()

ResetPrincipalID resets all changes to the "principal_id" field.

func (*ServicePrincipalMutation) ResetServiceType added in v0.2.0

func (m *ServicePrincipalMutation) ResetServiceType()

ResetServiceType resets all changes to the "service_type" field.

func (*ServicePrincipalMutation) ResetUpdatedAt added in v0.2.0

func (m *ServicePrincipalMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*ServicePrincipalMutation) ServiceType added in v0.2.0

func (m *ServicePrincipalMutation) ServiceType() (r string, exists bool)

ServiceType returns the value of the "service_type" field in the mutation.

func (*ServicePrincipalMutation) SetAllowedIps added in v0.2.0

func (m *ServicePrincipalMutation) SetAllowedIps(s []string)

SetAllowedIps sets the "allowed_ips" field.

func (*ServicePrincipalMutation) SetCreatedAt added in v0.2.0

func (m *ServicePrincipalMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*ServicePrincipalMutation) SetCreatedBy added in v0.2.0

func (m *ServicePrincipalMutation) SetCreatedBy(u uuid.UUID)

SetCreatedBy sets the "created_by" field.

func (*ServicePrincipalMutation) SetCreatorID added in v0.2.0

func (m *ServicePrincipalMutation) SetCreatorID(id uuid.UUID)

SetCreatorID sets the "creator" edge to the Principal entity by id.

func (*ServicePrincipalMutation) SetDescription added in v0.2.0

func (m *ServicePrincipalMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*ServicePrincipalMutation) SetField added in v0.2.0

func (m *ServicePrincipalMutation) 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 (*ServicePrincipalMutation) SetID added in v0.2.0

func (m *ServicePrincipalMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of ServicePrincipal entities.

func (*ServicePrincipalMutation) SetLastUsedAt added in v0.2.0

func (m *ServicePrincipalMutation) SetLastUsedAt(t time.Time)

SetLastUsedAt sets the "last_used_at" field.

func (*ServicePrincipalMutation) SetOp added in v0.2.0

func (m *ServicePrincipalMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ServicePrincipalMutation) SetPrincipalID added in v0.2.0

func (m *ServicePrincipalMutation) SetPrincipalID(u uuid.UUID)

SetPrincipalID sets the "principal_id" field.

func (*ServicePrincipalMutation) SetServiceType added in v0.2.0

func (m *ServicePrincipalMutation) SetServiceType(s string)

SetServiceType sets the "service_type" field.

func (*ServicePrincipalMutation) SetUpdatedAt added in v0.2.0

func (m *ServicePrincipalMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (ServicePrincipalMutation) Tx added in v0.2.0

func (m ServicePrincipalMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ServicePrincipalMutation) Type added in v0.2.0

func (m *ServicePrincipalMutation) Type() string

Type returns the node type of this mutation (ServicePrincipal).

func (*ServicePrincipalMutation) UpdatedAt added in v0.2.0

func (m *ServicePrincipalMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*ServicePrincipalMutation) Where added in v0.2.0

Where appends a list predicates to the ServicePrincipalMutation builder.

func (*ServicePrincipalMutation) WhereP added in v0.2.0

func (m *ServicePrincipalMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ServicePrincipalMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ServicePrincipalQuery added in v0.2.0

type ServicePrincipalQuery struct {
	// contains filtered or unexported fields
}

ServicePrincipalQuery is the builder for querying ServicePrincipal entities.

func (*ServicePrincipalQuery) Aggregate added in v0.2.0

Aggregate returns a ServicePrincipalSelect configured with the given aggregations.

func (*ServicePrincipalQuery) All added in v0.2.0

All executes the query and returns a list of ServicePrincipals.

func (*ServicePrincipalQuery) AllX added in v0.2.0

AllX is like All, but panics if an error occurs.

func (*ServicePrincipalQuery) Clone added in v0.2.0

Clone returns a duplicate of the ServicePrincipalQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ServicePrincipalQuery) Count added in v0.2.0

func (_q *ServicePrincipalQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ServicePrincipalQuery) CountX added in v0.2.0

func (_q *ServicePrincipalQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ServicePrincipalQuery) Exist added in v0.2.0

func (_q *ServicePrincipalQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ServicePrincipalQuery) ExistX added in v0.2.0

func (_q *ServicePrincipalQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ServicePrincipalQuery) Filter added in v0.2.0

Filter returns a Filter implementation to apply filters on the ServicePrincipalQuery builder.

func (*ServicePrincipalQuery) First added in v0.2.0

First returns the first ServicePrincipal entity from the query. Returns a *NotFoundError when no ServicePrincipal was found.

func (*ServicePrincipalQuery) FirstID added in v0.2.0

func (_q *ServicePrincipalQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first ServicePrincipal ID from the query. Returns a *NotFoundError when no ServicePrincipal ID was found.

func (*ServicePrincipalQuery) FirstIDX added in v0.2.0

func (_q *ServicePrincipalQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*ServicePrincipalQuery) FirstX added in v0.2.0

FirstX is like First, but panics if an error occurs.

func (*ServicePrincipalQuery) GroupBy added in v0.2.0

func (_q *ServicePrincipalQuery) GroupBy(field string, fields ...string) *ServicePrincipalGroupBy

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.ServicePrincipal.Query().
	GroupBy(serviceprincipal.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ServicePrincipalQuery) IDs added in v0.2.0

func (_q *ServicePrincipalQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of ServicePrincipal IDs.

func (*ServicePrincipalQuery) IDsX added in v0.2.0

func (_q *ServicePrincipalQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*ServicePrincipalQuery) Limit added in v0.2.0

Limit the number of records to be returned by this query.

func (*ServicePrincipalQuery) Offset added in v0.2.0

func (_q *ServicePrincipalQuery) Offset(offset int) *ServicePrincipalQuery

Offset to start from.

func (*ServicePrincipalQuery) Only added in v0.2.0

Only returns a single ServicePrincipal entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ServicePrincipal entity is found. Returns a *NotFoundError when no ServicePrincipal entities are found.

func (*ServicePrincipalQuery) OnlyID added in v0.2.0

func (_q *ServicePrincipalQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only ServicePrincipal ID in the query. Returns a *NotSingularError when more than one ServicePrincipal ID is found. Returns a *NotFoundError when no entities are found.

func (*ServicePrincipalQuery) OnlyIDX added in v0.2.0

func (_q *ServicePrincipalQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ServicePrincipalQuery) OnlyX added in v0.2.0

OnlyX is like Only, but panics if an error occurs.

func (*ServicePrincipalQuery) Order added in v0.2.0

Order specifies how the records should be ordered.

func (*ServicePrincipalQuery) QueryCreator added in v0.2.0

func (_q *ServicePrincipalQuery) QueryCreator() *PrincipalQuery

QueryCreator chains the current query on the "creator" edge.

func (*ServicePrincipalQuery) QueryPrincipal added in v0.2.0

func (_q *ServicePrincipalQuery) QueryPrincipal() *PrincipalQuery

QueryPrincipal chains the current query on the "principal" edge.

func (*ServicePrincipalQuery) Select added in v0.2.0

func (_q *ServicePrincipalQuery) Select(fields ...string) *ServicePrincipalSelect

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.ServicePrincipal.Query().
	Select(serviceprincipal.FieldCreatedAt).
	Scan(ctx, &v)

func (*ServicePrincipalQuery) Unique added in v0.2.0

func (_q *ServicePrincipalQuery) Unique(unique bool) *ServicePrincipalQuery

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 (*ServicePrincipalQuery) Where added in v0.2.0

Where adds a new predicate for the ServicePrincipalQuery builder.

func (*ServicePrincipalQuery) WithCreator added in v0.2.0

func (_q *ServicePrincipalQuery) WithCreator(opts ...func(*PrincipalQuery)) *ServicePrincipalQuery

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 (*ServicePrincipalQuery) WithPrincipal added in v0.2.0

func (_q *ServicePrincipalQuery) WithPrincipal(opts ...func(*PrincipalQuery)) *ServicePrincipalQuery

WithPrincipal tells the query-builder to eager-load the nodes that are connected to the "principal" edge. The optional arguments are used to configure the query builder of the edge.

type ServicePrincipalSelect added in v0.2.0

type ServicePrincipalSelect struct {
	*ServicePrincipalQuery
	// contains filtered or unexported fields
}

ServicePrincipalSelect is the builder for selecting fields of ServicePrincipal entities.

func (*ServicePrincipalSelect) Aggregate added in v0.2.0

Aggregate adds the given aggregation functions to the selector query.

func (*ServicePrincipalSelect) Bool added in v0.2.0

func (s *ServicePrincipalSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ServicePrincipalSelect) BoolX added in v0.2.0

func (s *ServicePrincipalSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ServicePrincipalSelect) Bools added in v0.2.0

func (s *ServicePrincipalSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ServicePrincipalSelect) BoolsX added in v0.2.0

func (s *ServicePrincipalSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ServicePrincipalSelect) Float64 added in v0.2.0

func (s *ServicePrincipalSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ServicePrincipalSelect) Float64X added in v0.2.0

func (s *ServicePrincipalSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ServicePrincipalSelect) Float64s added in v0.2.0

func (s *ServicePrincipalSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ServicePrincipalSelect) Float64sX added in v0.2.0

func (s *ServicePrincipalSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ServicePrincipalSelect) Int added in v0.2.0

func (s *ServicePrincipalSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ServicePrincipalSelect) IntX added in v0.2.0

func (s *ServicePrincipalSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ServicePrincipalSelect) Ints added in v0.2.0

func (s *ServicePrincipalSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ServicePrincipalSelect) IntsX added in v0.2.0

func (s *ServicePrincipalSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ServicePrincipalSelect) Scan added in v0.2.0

func (_s *ServicePrincipalSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ServicePrincipalSelect) ScanX added in v0.2.0

func (s *ServicePrincipalSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ServicePrincipalSelect) String added in v0.2.0

func (s *ServicePrincipalSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ServicePrincipalSelect) StringX added in v0.2.0

func (s *ServicePrincipalSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ServicePrincipalSelect) Strings added in v0.2.0

func (s *ServicePrincipalSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ServicePrincipalSelect) StringsX added in v0.2.0

func (s *ServicePrincipalSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ServicePrincipalUpdate added in v0.2.0

type ServicePrincipalUpdate struct {
	// contains filtered or unexported fields
}

ServicePrincipalUpdate is the builder for updating ServicePrincipal entities.

func (*ServicePrincipalUpdate) AppendAllowedIps added in v0.2.0

func (_u *ServicePrincipalUpdate) AppendAllowedIps(v []string) *ServicePrincipalUpdate

AppendAllowedIps appends value to the "allowed_ips" field.

func (*ServicePrincipalUpdate) ClearCreatedBy added in v0.2.0

func (_u *ServicePrincipalUpdate) ClearCreatedBy() *ServicePrincipalUpdate

ClearCreatedBy clears the value of the "created_by" field.

func (*ServicePrincipalUpdate) ClearCreator added in v0.2.0

func (_u *ServicePrincipalUpdate) ClearCreator() *ServicePrincipalUpdate

ClearCreator clears the "creator" edge to the Principal entity.

func (*ServicePrincipalUpdate) ClearDescription added in v0.2.0

func (_u *ServicePrincipalUpdate) ClearDescription() *ServicePrincipalUpdate

ClearDescription clears the value of the "description" field.

func (*ServicePrincipalUpdate) ClearLastUsedAt added in v0.2.0

func (_u *ServicePrincipalUpdate) ClearLastUsedAt() *ServicePrincipalUpdate

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*ServicePrincipalUpdate) Exec added in v0.2.0

Exec executes the query.

func (*ServicePrincipalUpdate) ExecX added in v0.2.0

func (_u *ServicePrincipalUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ServicePrincipalUpdate) Mutation added in v0.2.0

Mutation returns the ServicePrincipalMutation object of the builder.

func (*ServicePrincipalUpdate) Save added in v0.2.0

func (_u *ServicePrincipalUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ServicePrincipalUpdate) SaveX added in v0.2.0

func (_u *ServicePrincipalUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ServicePrincipalUpdate) SetAllowedIps added in v0.2.0

func (_u *ServicePrincipalUpdate) SetAllowedIps(v []string) *ServicePrincipalUpdate

SetAllowedIps sets the "allowed_ips" field.

func (*ServicePrincipalUpdate) SetCreatedBy added in v0.2.0

SetCreatedBy sets the "created_by" field.

func (*ServicePrincipalUpdate) SetCreator added in v0.2.0

SetCreator sets the "creator" edge to the Principal entity.

func (*ServicePrincipalUpdate) SetCreatorID added in v0.2.0

SetCreatorID sets the "creator" edge to the Principal entity by ID.

func (*ServicePrincipalUpdate) SetDescription added in v0.2.0

func (_u *ServicePrincipalUpdate) SetDescription(v string) *ServicePrincipalUpdate

SetDescription sets the "description" field.

func (*ServicePrincipalUpdate) SetLastUsedAt added in v0.2.0

SetLastUsedAt sets the "last_used_at" field.

func (*ServicePrincipalUpdate) SetNillableCreatedBy added in v0.2.0

func (_u *ServicePrincipalUpdate) SetNillableCreatedBy(v *uuid.UUID) *ServicePrincipalUpdate

SetNillableCreatedBy sets the "created_by" field if the given value is not nil.

func (*ServicePrincipalUpdate) SetNillableCreatorID added in v0.2.0

func (_u *ServicePrincipalUpdate) SetNillableCreatorID(id *uuid.UUID) *ServicePrincipalUpdate

SetNillableCreatorID sets the "creator" edge to the Principal entity by ID if the given value is not nil.

func (*ServicePrincipalUpdate) SetNillableDescription added in v0.2.0

func (_u *ServicePrincipalUpdate) SetNillableDescription(v *string) *ServicePrincipalUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*ServicePrincipalUpdate) SetNillableLastUsedAt added in v0.2.0

func (_u *ServicePrincipalUpdate) SetNillableLastUsedAt(v *time.Time) *ServicePrincipalUpdate

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*ServicePrincipalUpdate) SetNillableServiceType added in v0.2.0

func (_u *ServicePrincipalUpdate) SetNillableServiceType(v *string) *ServicePrincipalUpdate

SetNillableServiceType sets the "service_type" field if the given value is not nil.

func (*ServicePrincipalUpdate) SetServiceType added in v0.2.0

func (_u *ServicePrincipalUpdate) SetServiceType(v string) *ServicePrincipalUpdate

SetServiceType sets the "service_type" field.

func (*ServicePrincipalUpdate) SetUpdatedAt added in v0.2.0

SetUpdatedAt sets the "updated_at" field.

func (*ServicePrincipalUpdate) Where added in v0.2.0

Where appends a list predicates to the ServicePrincipalUpdate builder.

type ServicePrincipalUpdateOne added in v0.2.0

type ServicePrincipalUpdateOne struct {
	// contains filtered or unexported fields
}

ServicePrincipalUpdateOne is the builder for updating a single ServicePrincipal entity.

func (*ServicePrincipalUpdateOne) AppendAllowedIps added in v0.2.0

func (_u *ServicePrincipalUpdateOne) AppendAllowedIps(v []string) *ServicePrincipalUpdateOne

AppendAllowedIps appends value to the "allowed_ips" field.

func (*ServicePrincipalUpdateOne) ClearCreatedBy added in v0.2.0

ClearCreatedBy clears the value of the "created_by" field.

func (*ServicePrincipalUpdateOne) ClearCreator added in v0.2.0

ClearCreator clears the "creator" edge to the Principal entity.

func (*ServicePrincipalUpdateOne) ClearDescription added in v0.2.0

func (_u *ServicePrincipalUpdateOne) ClearDescription() *ServicePrincipalUpdateOne

ClearDescription clears the value of the "description" field.

func (*ServicePrincipalUpdateOne) ClearLastUsedAt added in v0.2.0

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*ServicePrincipalUpdateOne) Exec added in v0.2.0

Exec executes the query on the entity.

func (*ServicePrincipalUpdateOne) ExecX added in v0.2.0

func (_u *ServicePrincipalUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ServicePrincipalUpdateOne) Mutation added in v0.2.0

Mutation returns the ServicePrincipalMutation object of the builder.

func (*ServicePrincipalUpdateOne) Save added in v0.2.0

Save executes the query and returns the updated ServicePrincipal entity.

func (*ServicePrincipalUpdateOne) SaveX added in v0.2.0

SaveX is like Save, but panics if an error occurs.

func (*ServicePrincipalUpdateOne) Select added in v0.2.0

func (_u *ServicePrincipalUpdateOne) Select(field string, fields ...string) *ServicePrincipalUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ServicePrincipalUpdateOne) SetAllowedIps added in v0.2.0

SetAllowedIps sets the "allowed_ips" field.

func (*ServicePrincipalUpdateOne) SetCreatedBy added in v0.2.0

SetCreatedBy sets the "created_by" field.

func (*ServicePrincipalUpdateOne) SetCreator added in v0.2.0

SetCreator sets the "creator" edge to the Principal entity.

func (*ServicePrincipalUpdateOne) SetCreatorID added in v0.2.0

SetCreatorID sets the "creator" edge to the Principal entity by ID.

func (*ServicePrincipalUpdateOne) SetDescription added in v0.2.0

SetDescription sets the "description" field.

func (*ServicePrincipalUpdateOne) SetLastUsedAt added in v0.2.0

SetLastUsedAt sets the "last_used_at" field.

func (*ServicePrincipalUpdateOne) SetNillableCreatedBy added in v0.2.0

func (_u *ServicePrincipalUpdateOne) SetNillableCreatedBy(v *uuid.UUID) *ServicePrincipalUpdateOne

SetNillableCreatedBy sets the "created_by" field if the given value is not nil.

func (*ServicePrincipalUpdateOne) SetNillableCreatorID added in v0.2.0

func (_u *ServicePrincipalUpdateOne) SetNillableCreatorID(id *uuid.UUID) *ServicePrincipalUpdateOne

SetNillableCreatorID sets the "creator" edge to the Principal entity by ID if the given value is not nil.

func (*ServicePrincipalUpdateOne) SetNillableDescription added in v0.2.0

func (_u *ServicePrincipalUpdateOne) SetNillableDescription(v *string) *ServicePrincipalUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*ServicePrincipalUpdateOne) SetNillableLastUsedAt added in v0.2.0

func (_u *ServicePrincipalUpdateOne) SetNillableLastUsedAt(v *time.Time) *ServicePrincipalUpdateOne

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*ServicePrincipalUpdateOne) SetNillableServiceType added in v0.2.0

func (_u *ServicePrincipalUpdateOne) SetNillableServiceType(v *string) *ServicePrincipalUpdateOne

SetNillableServiceType sets the "service_type" field if the given value is not nil.

func (*ServicePrincipalUpdateOne) SetServiceType added in v0.2.0

SetServiceType sets the "service_type" field.

func (*ServicePrincipalUpdateOne) SetUpdatedAt added in v0.2.0

SetUpdatedAt sets the "updated_at" field.

func (*ServicePrincipalUpdateOne) Where added in v0.2.0

Where appends a list predicates to the ServicePrincipalUpdate builder.

type ServicePrincipalUpsert added in v0.2.0

type ServicePrincipalUpsert struct {
	*sql.UpdateSet
}

ServicePrincipalUpsert is the "OnConflict" setter.

func (*ServicePrincipalUpsert) ClearCreatedBy added in v0.2.0

func (u *ServicePrincipalUpsert) ClearCreatedBy() *ServicePrincipalUpsert

ClearCreatedBy clears the value of the "created_by" field.

func (*ServicePrincipalUpsert) ClearDescription added in v0.2.0

func (u *ServicePrincipalUpsert) ClearDescription() *ServicePrincipalUpsert

ClearDescription clears the value of the "description" field.

func (*ServicePrincipalUpsert) ClearLastUsedAt added in v0.2.0

func (u *ServicePrincipalUpsert) ClearLastUsedAt() *ServicePrincipalUpsert

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*ServicePrincipalUpsert) SetAllowedIps added in v0.2.0

func (u *ServicePrincipalUpsert) SetAllowedIps(v []string) *ServicePrincipalUpsert

SetAllowedIps sets the "allowed_ips" field.

func (*ServicePrincipalUpsert) SetCreatedBy added in v0.2.0

SetCreatedBy sets the "created_by" field.

func (*ServicePrincipalUpsert) SetDescription added in v0.2.0

SetDescription sets the "description" field.

func (*ServicePrincipalUpsert) SetLastUsedAt added in v0.2.0

SetLastUsedAt sets the "last_used_at" field.

func (*ServicePrincipalUpsert) SetServiceType added in v0.2.0

SetServiceType sets the "service_type" field.

func (*ServicePrincipalUpsert) SetUpdatedAt added in v0.2.0

SetUpdatedAt sets the "updated_at" field.

func (*ServicePrincipalUpsert) UpdateAllowedIps added in v0.2.0

func (u *ServicePrincipalUpsert) UpdateAllowedIps() *ServicePrincipalUpsert

UpdateAllowedIps sets the "allowed_ips" field to the value that was provided on create.

func (*ServicePrincipalUpsert) UpdateCreatedBy added in v0.2.0

func (u *ServicePrincipalUpsert) UpdateCreatedBy() *ServicePrincipalUpsert

UpdateCreatedBy sets the "created_by" field to the value that was provided on create.

func (*ServicePrincipalUpsert) UpdateDescription added in v0.2.0

func (u *ServicePrincipalUpsert) UpdateDescription() *ServicePrincipalUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*ServicePrincipalUpsert) UpdateLastUsedAt added in v0.2.0

func (u *ServicePrincipalUpsert) UpdateLastUsedAt() *ServicePrincipalUpsert

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*ServicePrincipalUpsert) UpdateServiceType added in v0.2.0

func (u *ServicePrincipalUpsert) UpdateServiceType() *ServicePrincipalUpsert

UpdateServiceType sets the "service_type" field to the value that was provided on create.

func (*ServicePrincipalUpsert) UpdateUpdatedAt added in v0.2.0

func (u *ServicePrincipalUpsert) UpdateUpdatedAt() *ServicePrincipalUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type ServicePrincipalUpsertBulk added in v0.2.0

type ServicePrincipalUpsertBulk struct {
	// contains filtered or unexported fields
}

ServicePrincipalUpsertBulk is the builder for "upsert"-ing a bulk of ServicePrincipal nodes.

func (*ServicePrincipalUpsertBulk) ClearCreatedBy added in v0.2.0

ClearCreatedBy clears the value of the "created_by" field.

func (*ServicePrincipalUpsertBulk) ClearDescription added in v0.2.0

ClearDescription clears the value of the "description" field.

func (*ServicePrincipalUpsertBulk) ClearLastUsedAt added in v0.2.0

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*ServicePrincipalUpsertBulk) DoNothing added in v0.2.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ServicePrincipalUpsertBulk) Exec added in v0.2.0

Exec executes the query.

func (*ServicePrincipalUpsertBulk) ExecX added in v0.2.0

ExecX is like Exec, but panics if an error occurs.

func (*ServicePrincipalUpsertBulk) Ignore added in v0.2.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.ServicePrincipal.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*ServicePrincipalUpsertBulk) SetAllowedIps added in v0.2.0

SetAllowedIps sets the "allowed_ips" field.

func (*ServicePrincipalUpsertBulk) SetCreatedBy added in v0.2.0

SetCreatedBy sets the "created_by" field.

func (*ServicePrincipalUpsertBulk) SetDescription added in v0.2.0

SetDescription sets the "description" field.

func (*ServicePrincipalUpsertBulk) SetLastUsedAt added in v0.2.0

SetLastUsedAt sets the "last_used_at" field.

func (*ServicePrincipalUpsertBulk) SetServiceType added in v0.2.0

SetServiceType sets the "service_type" field.

func (*ServicePrincipalUpsertBulk) SetUpdatedAt added in v0.2.0

SetUpdatedAt sets the "updated_at" field.

func (*ServicePrincipalUpsertBulk) Update added in v0.2.0

Update allows overriding fields `UPDATE` values. See the ServicePrincipalCreateBulk.OnConflict documentation for more info.

func (*ServicePrincipalUpsertBulk) UpdateAllowedIps added in v0.2.0

UpdateAllowedIps sets the "allowed_ips" field to the value that was provided on create.

func (*ServicePrincipalUpsertBulk) UpdateCreatedBy added in v0.2.0

UpdateCreatedBy sets the "created_by" field to the value that was provided on create.

func (*ServicePrincipalUpsertBulk) UpdateDescription added in v0.2.0

UpdateDescription sets the "description" field to the value that was provided on create.

func (*ServicePrincipalUpsertBulk) UpdateLastUsedAt added in v0.2.0

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*ServicePrincipalUpsertBulk) UpdateNewValues added in v0.2.0

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.ServicePrincipal.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(serviceprincipal.FieldID)
		}),
	).
	Exec(ctx)

func (*ServicePrincipalUpsertBulk) UpdateServiceType added in v0.2.0

UpdateServiceType sets the "service_type" field to the value that was provided on create.

func (*ServicePrincipalUpsertBulk) UpdateUpdatedAt added in v0.2.0

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type ServicePrincipalUpsertOne added in v0.2.0

type ServicePrincipalUpsertOne struct {
	// contains filtered or unexported fields
}

ServicePrincipalUpsertOne is the builder for "upsert"-ing

one ServicePrincipal node.

func (*ServicePrincipalUpsertOne) ClearCreatedBy added in v0.2.0

ClearCreatedBy clears the value of the "created_by" field.

func (*ServicePrincipalUpsertOne) ClearDescription added in v0.2.0

ClearDescription clears the value of the "description" field.

func (*ServicePrincipalUpsertOne) ClearLastUsedAt added in v0.2.0

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*ServicePrincipalUpsertOne) DoNothing added in v0.2.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ServicePrincipalUpsertOne) Exec added in v0.2.0

Exec executes the query.

func (*ServicePrincipalUpsertOne) ExecX added in v0.2.0

ExecX is like Exec, but panics if an error occurs.

func (*ServicePrincipalUpsertOne) ID added in v0.2.0

func (u *ServicePrincipalUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*ServicePrincipalUpsertOne) IDX added in v0.2.0

IDX is like ID, but panics if an error occurs.

func (*ServicePrincipalUpsertOne) Ignore added in v0.2.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.ServicePrincipal.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*ServicePrincipalUpsertOne) SetAllowedIps added in v0.2.0

SetAllowedIps sets the "allowed_ips" field.

func (*ServicePrincipalUpsertOne) SetCreatedBy added in v0.2.0

SetCreatedBy sets the "created_by" field.

func (*ServicePrincipalUpsertOne) SetDescription added in v0.2.0

SetDescription sets the "description" field.

func (*ServicePrincipalUpsertOne) SetLastUsedAt added in v0.2.0

SetLastUsedAt sets the "last_used_at" field.

func (*ServicePrincipalUpsertOne) SetServiceType added in v0.2.0

SetServiceType sets the "service_type" field.

func (*ServicePrincipalUpsertOne) SetUpdatedAt added in v0.2.0

SetUpdatedAt sets the "updated_at" field.

func (*ServicePrincipalUpsertOne) Update added in v0.2.0

Update allows overriding fields `UPDATE` values. See the ServicePrincipalCreate.OnConflict documentation for more info.

func (*ServicePrincipalUpsertOne) UpdateAllowedIps added in v0.2.0

UpdateAllowedIps sets the "allowed_ips" field to the value that was provided on create.

func (*ServicePrincipalUpsertOne) UpdateCreatedBy added in v0.2.0

UpdateCreatedBy sets the "created_by" field to the value that was provided on create.

func (*ServicePrincipalUpsertOne) UpdateDescription added in v0.2.0

func (u *ServicePrincipalUpsertOne) UpdateDescription() *ServicePrincipalUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*ServicePrincipalUpsertOne) UpdateLastUsedAt added in v0.2.0

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*ServicePrincipalUpsertOne) UpdateNewValues added in v0.2.0

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.ServicePrincipal.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(serviceprincipal.FieldID)
		}),
	).
	Exec(ctx)

func (*ServicePrincipalUpsertOne) UpdateServiceType added in v0.2.0

func (u *ServicePrincipalUpsertOne) UpdateServiceType() *ServicePrincipalUpsertOne

UpdateServiceType sets the "service_type" field to the value that was provided on create.

func (*ServicePrincipalUpsertOne) UpdateUpdatedAt added in v0.2.0

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type ServicePrincipals added in v0.2.0

type ServicePrincipals []*ServicePrincipal

ServicePrincipals is a parsable slice of ServicePrincipal.

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
	// Agent is the client for interacting with the Agent builders.
	Agent *AgentClient
	// Application is the client for interacting with the Application builders.
	Application *ApplicationClient
	// Credential is the client for interacting with the Credential builders.
	Credential *CredentialClient
	// Human is the client for interacting with the Human builders.
	Human *HumanClient
	// Invite is the client for interacting with the Invite builders.
	Invite *InviteClient
	// 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
	// Principal is the client for interacting with the Principal builders.
	Principal *PrincipalClient
	// PrincipalMembership is the client for interacting with the PrincipalMembership builders.
	PrincipalMembership *PrincipalMembershipClient
	// PrincipalToken is the client for interacting with the PrincipalToken builders.
	PrincipalToken *PrincipalTokenClient
	// 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
	// ServicePrincipal is the client for interacting with the ServicePrincipal builders.
	ServicePrincipal *ServicePrincipalClient
	// 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"`
	// CoreControl global identity ID for federated users
	FederationID *uuid.UUID `json:"federation_id,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) SetFederationID added in v0.2.0

func (_c *UserCreate) SetFederationID(v uuid.UUID) *UserCreate

SetFederationID sets the "federation_id" 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) SetNillableFederationID added in v0.2.0

func (_c *UserCreate) SetNillableFederationID(v *uuid.UUID) *UserCreate

SetNillableFederationID sets the "federation_id" 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) WhereFederationID added in v0.2.0

func (f *UserFilter) WhereFederationID(p entql.ValueP)

WhereFederationID applies the entql [16]byte predicate on the federation_id 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) ClearFederationID added in v0.2.0

func (m *UserMutation) ClearFederationID()

ClearFederationID clears the value of the "federation_id" field.

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) FederationID added in v0.2.0

func (m *UserMutation) FederationID() (r uuid.UUID, exists bool)

FederationID returns the value of the "federation_id" field in the mutation.

func (*UserMutation) FederationIDCleared added in v0.2.0

func (m *UserMutation) FederationIDCleared() bool

FederationIDCleared returns if the "federation_id" field was cleared in this 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) OldFederationID added in v0.2.0

func (m *UserMutation) OldFederationID(ctx context.Context) (v *uuid.UUID, err error)

OldFederationID returns the old "federation_id" 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) ResetFederationID added in v0.2.0

func (m *UserMutation) ResetFederationID()

ResetFederationID resets all changes to the "federation_id" 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) SetFederationID added in v0.2.0

func (m *UserMutation) SetFederationID(u uuid.UUID)

SetFederationID sets the "federation_id" 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) ClearFederationID added in v0.2.0

func (_u *UserUpdate) ClearFederationID() *UserUpdate

ClearFederationID clears the value of the "federation_id" field.

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) SetFederationID added in v0.2.0

func (_u *UserUpdate) SetFederationID(v uuid.UUID) *UserUpdate

SetFederationID sets the "federation_id" 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) SetNillableFederationID added in v0.2.0

func (_u *UserUpdate) SetNillableFederationID(v *uuid.UUID) *UserUpdate

SetNillableFederationID sets the "federation_id" 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) ClearFederationID added in v0.2.0

func (_u *UserUpdateOne) ClearFederationID() *UserUpdateOne

ClearFederationID clears the value of the "federation_id" field.

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) SetFederationID added in v0.2.0

func (_u *UserUpdateOne) SetFederationID(v uuid.UUID) *UserUpdateOne

SetFederationID sets the "federation_id" 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) SetNillableFederationID added in v0.2.0

func (_u *UserUpdateOne) SetNillableFederationID(v *uuid.UUID) *UserUpdateOne

SetNillableFederationID sets the "federation_id" 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) ClearFederationID added in v0.2.0

func (u *UserUpsert) ClearFederationID() *UserUpsert

ClearFederationID clears the value of the "federation_id" 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) SetFederationID added in v0.2.0

func (u *UserUpsert) SetFederationID(v uuid.UUID) *UserUpsert

SetFederationID sets the "federation_id" 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) UpdateFederationID added in v0.2.0

func (u *UserUpsert) UpdateFederationID() *UserUpsert

UpdateFederationID sets the "federation_id" 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) ClearFederationID added in v0.2.0

func (u *UserUpsertBulk) ClearFederationID() *UserUpsertBulk

ClearFederationID clears the value of the "federation_id" 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) SetFederationID added in v0.2.0

func (u *UserUpsertBulk) SetFederationID(v uuid.UUID) *UserUpsertBulk

SetFederationID sets the "federation_id" 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) UpdateFederationID added in v0.2.0

func (u *UserUpsertBulk) UpdateFederationID() *UserUpsertBulk

UpdateFederationID sets the "federation_id" 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) ClearFederationID added in v0.2.0

func (u *UserUpsertOne) ClearFederationID() *UserUpsertOne

ClearFederationID clears the value of the "federation_id" 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) SetFederationID added in v0.2.0

func (u *UserUpsertOne) SetFederationID(v uuid.UUID) *UserUpsertOne

SetFederationID sets the "federation_id" 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) UpdateFederationID added in v0.2.0

func (u *UserUpsertOne) UpdateFederationID() *UserUpsertOne

UpdateFederationID sets the "federation_id" 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.

Source Files

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