Documentation
¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type OAuthAccessToken
- type OAuthAccessTokenClient
- func (c *OAuthAccessTokenClient) Create() *OAuthAccessTokenCreate
- func (c *OAuthAccessTokenClient) CreateBulk(builders ...*OAuthAccessTokenCreate) *OAuthAccessTokenCreateBulk
- func (c *OAuthAccessTokenClient) Delete() *OAuthAccessTokenDelete
- func (c *OAuthAccessTokenClient) DeleteOne(_m *OAuthAccessToken) *OAuthAccessTokenDeleteOne
- func (c *OAuthAccessTokenClient) DeleteOneID(id int) *OAuthAccessTokenDeleteOne
- func (c *OAuthAccessTokenClient) Get(ctx context.Context, id int) (*OAuthAccessToken, error)
- func (c *OAuthAccessTokenClient) GetX(ctx context.Context, id int) *OAuthAccessToken
- func (c *OAuthAccessTokenClient) Hooks() []Hook
- func (c *OAuthAccessTokenClient) Intercept(interceptors ...Interceptor)
- func (c *OAuthAccessTokenClient) Interceptors() []Interceptor
- func (c *OAuthAccessTokenClient) MapCreateBulk(slice any, setFunc func(*OAuthAccessTokenCreate, int)) *OAuthAccessTokenCreateBulk
- func (c *OAuthAccessTokenClient) Query() *OAuthAccessTokenQuery
- func (c *OAuthAccessTokenClient) Update() *OAuthAccessTokenUpdate
- func (c *OAuthAccessTokenClient) UpdateOne(_m *OAuthAccessToken) *OAuthAccessTokenUpdateOne
- func (c *OAuthAccessTokenClient) UpdateOneID(id int) *OAuthAccessTokenUpdateOne
- func (c *OAuthAccessTokenClient) Use(hooks ...Hook)
- type OAuthAccessTokenCreate
- func (_c *OAuthAccessTokenCreate) Exec(ctx context.Context) error
- func (_c *OAuthAccessTokenCreate) ExecX(ctx context.Context)
- func (_c *OAuthAccessTokenCreate) Mutation() *OAuthAccessTokenMutation
- func (_c *OAuthAccessTokenCreate) Save(ctx context.Context) (*OAuthAccessToken, error)
- func (_c *OAuthAccessTokenCreate) SaveX(ctx context.Context) *OAuthAccessToken
- func (_c *OAuthAccessTokenCreate) SetActive(v bool) *OAuthAccessTokenCreate
- func (_c *OAuthAccessTokenCreate) SetClientID(v string) *OAuthAccessTokenCreate
- func (_c *OAuthAccessTokenCreate) SetExpiresAt(v time.Time) *OAuthAccessTokenCreate
- func (_c *OAuthAccessTokenCreate) SetNillableActive(v *bool) *OAuthAccessTokenCreate
- func (_c *OAuthAccessTokenCreate) SetNillableExpiresAt(v *time.Time) *OAuthAccessTokenCreate
- func (_c *OAuthAccessTokenCreate) SetNillableRequestID(v *string) *OAuthAccessTokenCreate
- func (_c *OAuthAccessTokenCreate) SetNillableRequestedAt(v *time.Time) *OAuthAccessTokenCreate
- func (_c *OAuthAccessTokenCreate) SetNillableScopes(v *string) *OAuthAccessTokenCreate
- func (_c *OAuthAccessTokenCreate) SetNillableUserID(v *int) *OAuthAccessTokenCreate
- func (_c *OAuthAccessTokenCreate) SetRequestID(v string) *OAuthAccessTokenCreate
- func (_c *OAuthAccessTokenCreate) SetRequestedAt(v time.Time) *OAuthAccessTokenCreate
- func (_c *OAuthAccessTokenCreate) SetScopes(v string) *OAuthAccessTokenCreate
- func (_c *OAuthAccessTokenCreate) SetSessionData(v map[string]interface{}) *OAuthAccessTokenCreate
- func (_c *OAuthAccessTokenCreate) SetSessionType(v string) *OAuthAccessTokenCreate
- func (_c *OAuthAccessTokenCreate) SetSignature(v string) *OAuthAccessTokenCreate
- func (_c *OAuthAccessTokenCreate) SetUserID(v int) *OAuthAccessTokenCreate
- type OAuthAccessTokenCreateBulk
- func (_c *OAuthAccessTokenCreateBulk) Exec(ctx context.Context) error
- func (_c *OAuthAccessTokenCreateBulk) ExecX(ctx context.Context)
- func (_c *OAuthAccessTokenCreateBulk) Save(ctx context.Context) ([]*OAuthAccessToken, error)
- func (_c *OAuthAccessTokenCreateBulk) SaveX(ctx context.Context) []*OAuthAccessToken
- type OAuthAccessTokenDelete
- type OAuthAccessTokenDeleteOne
- type OAuthAccessTokenGroupBy
- func (_g *OAuthAccessTokenGroupBy) Aggregate(fns ...AggregateFunc) *OAuthAccessTokenGroupBy
- func (s *OAuthAccessTokenGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *OAuthAccessTokenGroupBy) BoolX(ctx context.Context) bool
- func (s *OAuthAccessTokenGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *OAuthAccessTokenGroupBy) BoolsX(ctx context.Context) []bool
- func (s *OAuthAccessTokenGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *OAuthAccessTokenGroupBy) Float64X(ctx context.Context) float64
- func (s *OAuthAccessTokenGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *OAuthAccessTokenGroupBy) Float64sX(ctx context.Context) []float64
- func (s *OAuthAccessTokenGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *OAuthAccessTokenGroupBy) IntX(ctx context.Context) int
- func (s *OAuthAccessTokenGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *OAuthAccessTokenGroupBy) IntsX(ctx context.Context) []int
- func (_g *OAuthAccessTokenGroupBy) Scan(ctx context.Context, v any) error
- func (s *OAuthAccessTokenGroupBy) ScanX(ctx context.Context, v any)
- func (s *OAuthAccessTokenGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *OAuthAccessTokenGroupBy) StringX(ctx context.Context) string
- func (s *OAuthAccessTokenGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *OAuthAccessTokenGroupBy) StringsX(ctx context.Context) []string
- type OAuthAccessTokenMutation
- func (m *OAuthAccessTokenMutation) Active() (r bool, exists bool)
- func (m *OAuthAccessTokenMutation) AddField(name string, value ent.Value) error
- func (m *OAuthAccessTokenMutation) AddUserID(i int)
- func (m *OAuthAccessTokenMutation) AddedEdges() []string
- func (m *OAuthAccessTokenMutation) AddedField(name string) (ent.Value, bool)
- func (m *OAuthAccessTokenMutation) AddedFields() []string
- func (m *OAuthAccessTokenMutation) AddedIDs(name string) []ent.Value
- func (m *OAuthAccessTokenMutation) AddedUserID() (r int, exists bool)
- func (m *OAuthAccessTokenMutation) ClearEdge(name string) error
- func (m *OAuthAccessTokenMutation) ClearExpiresAt()
- func (m *OAuthAccessTokenMutation) ClearField(name string) error
- func (m *OAuthAccessTokenMutation) ClearRequestedAt()
- func (m *OAuthAccessTokenMutation) ClearUserID()
- func (m *OAuthAccessTokenMutation) ClearedEdges() []string
- func (m *OAuthAccessTokenMutation) ClearedFields() []string
- func (m OAuthAccessTokenMutation) Client() *Client
- func (m *OAuthAccessTokenMutation) ClientID() (r string, exists bool)
- func (m *OAuthAccessTokenMutation) EdgeCleared(name string) bool
- func (m *OAuthAccessTokenMutation) ExpiresAt() (r time.Time, exists bool)
- func (m *OAuthAccessTokenMutation) ExpiresAtCleared() bool
- func (m *OAuthAccessTokenMutation) Field(name string) (ent.Value, bool)
- func (m *OAuthAccessTokenMutation) FieldCleared(name string) bool
- func (m *OAuthAccessTokenMutation) Fields() []string
- func (m *OAuthAccessTokenMutation) ID() (id int, exists bool)
- func (m *OAuthAccessTokenMutation) IDs(ctx context.Context) ([]int, error)
- func (m *OAuthAccessTokenMutation) OldActive(ctx context.Context) (v bool, err error)
- func (m *OAuthAccessTokenMutation) OldClientID(ctx context.Context) (v string, err error)
- func (m *OAuthAccessTokenMutation) OldExpiresAt(ctx context.Context) (v *time.Time, err error)
- func (m *OAuthAccessTokenMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OAuthAccessTokenMutation) OldRequestID(ctx context.Context) (v string, err error)
- func (m *OAuthAccessTokenMutation) OldRequestedAt(ctx context.Context) (v *time.Time, err error)
- func (m *OAuthAccessTokenMutation) OldScopes(ctx context.Context) (v string, err error)
- func (m *OAuthAccessTokenMutation) OldSessionData(ctx context.Context) (v map[string]interface{}, err error)
- func (m *OAuthAccessTokenMutation) OldSessionType(ctx context.Context) (v string, err error)
- func (m *OAuthAccessTokenMutation) OldSignature(ctx context.Context) (v string, err error)
- func (m *OAuthAccessTokenMutation) OldUserID(ctx context.Context) (v *int, err error)
- func (m *OAuthAccessTokenMutation) Op() Op
- func (m *OAuthAccessTokenMutation) RemovedEdges() []string
- func (m *OAuthAccessTokenMutation) RemovedIDs(name string) []ent.Value
- func (m *OAuthAccessTokenMutation) RequestID() (r string, exists bool)
- func (m *OAuthAccessTokenMutation) RequestedAt() (r time.Time, exists bool)
- func (m *OAuthAccessTokenMutation) RequestedAtCleared() bool
- func (m *OAuthAccessTokenMutation) ResetActive()
- func (m *OAuthAccessTokenMutation) ResetClientID()
- func (m *OAuthAccessTokenMutation) ResetEdge(name string) error
- func (m *OAuthAccessTokenMutation) ResetExpiresAt()
- func (m *OAuthAccessTokenMutation) ResetField(name string) error
- func (m *OAuthAccessTokenMutation) ResetRequestID()
- func (m *OAuthAccessTokenMutation) ResetRequestedAt()
- func (m *OAuthAccessTokenMutation) ResetScopes()
- func (m *OAuthAccessTokenMutation) ResetSessionData()
- func (m *OAuthAccessTokenMutation) ResetSessionType()
- func (m *OAuthAccessTokenMutation) ResetSignature()
- func (m *OAuthAccessTokenMutation) ResetUserID()
- func (m *OAuthAccessTokenMutation) Scopes() (r string, exists bool)
- func (m *OAuthAccessTokenMutation) SessionData() (r map[string]interface{}, exists bool)
- func (m *OAuthAccessTokenMutation) SessionType() (r string, exists bool)
- func (m *OAuthAccessTokenMutation) SetActive(b bool)
- func (m *OAuthAccessTokenMutation) SetClientID(s string)
- func (m *OAuthAccessTokenMutation) SetExpiresAt(t time.Time)
- func (m *OAuthAccessTokenMutation) SetField(name string, value ent.Value) error
- func (m *OAuthAccessTokenMutation) SetOp(op Op)
- func (m *OAuthAccessTokenMutation) SetRequestID(s string)
- func (m *OAuthAccessTokenMutation) SetRequestedAt(t time.Time)
- func (m *OAuthAccessTokenMutation) SetScopes(s string)
- func (m *OAuthAccessTokenMutation) SetSessionData(value map[string]interface{})
- func (m *OAuthAccessTokenMutation) SetSessionType(s string)
- func (m *OAuthAccessTokenMutation) SetSignature(s string)
- func (m *OAuthAccessTokenMutation) SetUserID(i int)
- func (m *OAuthAccessTokenMutation) Signature() (r string, exists bool)
- func (m OAuthAccessTokenMutation) Tx() (*Tx, error)
- func (m *OAuthAccessTokenMutation) Type() string
- func (m *OAuthAccessTokenMutation) UserID() (r int, exists bool)
- func (m *OAuthAccessTokenMutation) UserIDCleared() bool
- func (m *OAuthAccessTokenMutation) Where(ps ...predicate.OAuthAccessToken)
- func (m *OAuthAccessTokenMutation) WhereP(ps ...func(*sql.Selector))
- type OAuthAccessTokenQuery
- func (_q *OAuthAccessTokenQuery) Aggregate(fns ...AggregateFunc) *OAuthAccessTokenSelect
- func (_q *OAuthAccessTokenQuery) All(ctx context.Context) ([]*OAuthAccessToken, error)
- func (_q *OAuthAccessTokenQuery) AllX(ctx context.Context) []*OAuthAccessToken
- func (_q *OAuthAccessTokenQuery) Clone() *OAuthAccessTokenQuery
- func (_q *OAuthAccessTokenQuery) Count(ctx context.Context) (int, error)
- func (_q *OAuthAccessTokenQuery) CountX(ctx context.Context) int
- func (_q *OAuthAccessTokenQuery) Exist(ctx context.Context) (bool, error)
- func (_q *OAuthAccessTokenQuery) ExistX(ctx context.Context) bool
- func (_q *OAuthAccessTokenQuery) First(ctx context.Context) (*OAuthAccessToken, error)
- func (_q *OAuthAccessTokenQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *OAuthAccessTokenQuery) FirstIDX(ctx context.Context) int
- func (_q *OAuthAccessTokenQuery) FirstX(ctx context.Context) *OAuthAccessToken
- func (_q *OAuthAccessTokenQuery) GroupBy(field string, fields ...string) *OAuthAccessTokenGroupBy
- func (_q *OAuthAccessTokenQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *OAuthAccessTokenQuery) IDsX(ctx context.Context) []int
- func (_q *OAuthAccessTokenQuery) Limit(limit int) *OAuthAccessTokenQuery
- func (_q *OAuthAccessTokenQuery) Offset(offset int) *OAuthAccessTokenQuery
- func (_q *OAuthAccessTokenQuery) Only(ctx context.Context) (*OAuthAccessToken, error)
- func (_q *OAuthAccessTokenQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *OAuthAccessTokenQuery) OnlyIDX(ctx context.Context) int
- func (_q *OAuthAccessTokenQuery) OnlyX(ctx context.Context) *OAuthAccessToken
- func (_q *OAuthAccessTokenQuery) Order(o ...oauthaccesstoken.OrderOption) *OAuthAccessTokenQuery
- func (_q *OAuthAccessTokenQuery) Select(fields ...string) *OAuthAccessTokenSelect
- func (_q *OAuthAccessTokenQuery) Unique(unique bool) *OAuthAccessTokenQuery
- func (_q *OAuthAccessTokenQuery) Where(ps ...predicate.OAuthAccessToken) *OAuthAccessTokenQuery
- type OAuthAccessTokenSelect
- func (_s *OAuthAccessTokenSelect) Aggregate(fns ...AggregateFunc) *OAuthAccessTokenSelect
- func (s *OAuthAccessTokenSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *OAuthAccessTokenSelect) BoolX(ctx context.Context) bool
- func (s *OAuthAccessTokenSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *OAuthAccessTokenSelect) BoolsX(ctx context.Context) []bool
- func (s *OAuthAccessTokenSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *OAuthAccessTokenSelect) Float64X(ctx context.Context) float64
- func (s *OAuthAccessTokenSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *OAuthAccessTokenSelect) Float64sX(ctx context.Context) []float64
- func (s *OAuthAccessTokenSelect) Int(ctx context.Context) (_ int, err error)
- func (s *OAuthAccessTokenSelect) IntX(ctx context.Context) int
- func (s *OAuthAccessTokenSelect) Ints(ctx context.Context) ([]int, error)
- func (s *OAuthAccessTokenSelect) IntsX(ctx context.Context) []int
- func (_s *OAuthAccessTokenSelect) Scan(ctx context.Context, v any) error
- func (s *OAuthAccessTokenSelect) ScanX(ctx context.Context, v any)
- func (s *OAuthAccessTokenSelect) String(ctx context.Context) (_ string, err error)
- func (s *OAuthAccessTokenSelect) StringX(ctx context.Context) string
- func (s *OAuthAccessTokenSelect) Strings(ctx context.Context) ([]string, error)
- func (s *OAuthAccessTokenSelect) StringsX(ctx context.Context) []string
- type OAuthAccessTokenUpdate
- func (_u *OAuthAccessTokenUpdate) AddUserID(v int) *OAuthAccessTokenUpdate
- func (_u *OAuthAccessTokenUpdate) ClearExpiresAt() *OAuthAccessTokenUpdate
- func (_u *OAuthAccessTokenUpdate) ClearRequestedAt() *OAuthAccessTokenUpdate
- func (_u *OAuthAccessTokenUpdate) ClearUserID() *OAuthAccessTokenUpdate
- func (_u *OAuthAccessTokenUpdate) Exec(ctx context.Context) error
- func (_u *OAuthAccessTokenUpdate) ExecX(ctx context.Context)
- func (_u *OAuthAccessTokenUpdate) Mutation() *OAuthAccessTokenMutation
- func (_u *OAuthAccessTokenUpdate) Save(ctx context.Context) (int, error)
- func (_u *OAuthAccessTokenUpdate) SaveX(ctx context.Context) int
- func (_u *OAuthAccessTokenUpdate) SetActive(v bool) *OAuthAccessTokenUpdate
- func (_u *OAuthAccessTokenUpdate) SetClientID(v string) *OAuthAccessTokenUpdate
- func (_u *OAuthAccessTokenUpdate) SetExpiresAt(v time.Time) *OAuthAccessTokenUpdate
- func (_u *OAuthAccessTokenUpdate) SetNillableActive(v *bool) *OAuthAccessTokenUpdate
- func (_u *OAuthAccessTokenUpdate) SetNillableClientID(v *string) *OAuthAccessTokenUpdate
- func (_u *OAuthAccessTokenUpdate) SetNillableExpiresAt(v *time.Time) *OAuthAccessTokenUpdate
- func (_u *OAuthAccessTokenUpdate) SetNillableRequestID(v *string) *OAuthAccessTokenUpdate
- func (_u *OAuthAccessTokenUpdate) SetNillableRequestedAt(v *time.Time) *OAuthAccessTokenUpdate
- func (_u *OAuthAccessTokenUpdate) SetNillableScopes(v *string) *OAuthAccessTokenUpdate
- func (_u *OAuthAccessTokenUpdate) SetNillableSessionType(v *string) *OAuthAccessTokenUpdate
- func (_u *OAuthAccessTokenUpdate) SetNillableSignature(v *string) *OAuthAccessTokenUpdate
- func (_u *OAuthAccessTokenUpdate) SetNillableUserID(v *int) *OAuthAccessTokenUpdate
- func (_u *OAuthAccessTokenUpdate) SetRequestID(v string) *OAuthAccessTokenUpdate
- func (_u *OAuthAccessTokenUpdate) SetRequestedAt(v time.Time) *OAuthAccessTokenUpdate
- func (_u *OAuthAccessTokenUpdate) SetScopes(v string) *OAuthAccessTokenUpdate
- func (_u *OAuthAccessTokenUpdate) SetSessionData(v map[string]interface{}) *OAuthAccessTokenUpdate
- func (_u *OAuthAccessTokenUpdate) SetSessionType(v string) *OAuthAccessTokenUpdate
- func (_u *OAuthAccessTokenUpdate) SetSignature(v string) *OAuthAccessTokenUpdate
- func (_u *OAuthAccessTokenUpdate) SetUserID(v int) *OAuthAccessTokenUpdate
- func (_u *OAuthAccessTokenUpdate) Where(ps ...predicate.OAuthAccessToken) *OAuthAccessTokenUpdate
- type OAuthAccessTokenUpdateOne
- func (_u *OAuthAccessTokenUpdateOne) AddUserID(v int) *OAuthAccessTokenUpdateOne
- func (_u *OAuthAccessTokenUpdateOne) ClearExpiresAt() *OAuthAccessTokenUpdateOne
- func (_u *OAuthAccessTokenUpdateOne) ClearRequestedAt() *OAuthAccessTokenUpdateOne
- func (_u *OAuthAccessTokenUpdateOne) ClearUserID() *OAuthAccessTokenUpdateOne
- func (_u *OAuthAccessTokenUpdateOne) Exec(ctx context.Context) error
- func (_u *OAuthAccessTokenUpdateOne) ExecX(ctx context.Context)
- func (_u *OAuthAccessTokenUpdateOne) Mutation() *OAuthAccessTokenMutation
- func (_u *OAuthAccessTokenUpdateOne) Save(ctx context.Context) (*OAuthAccessToken, error)
- func (_u *OAuthAccessTokenUpdateOne) SaveX(ctx context.Context) *OAuthAccessToken
- func (_u *OAuthAccessTokenUpdateOne) Select(field string, fields ...string) *OAuthAccessTokenUpdateOne
- func (_u *OAuthAccessTokenUpdateOne) SetActive(v bool) *OAuthAccessTokenUpdateOne
- func (_u *OAuthAccessTokenUpdateOne) SetClientID(v string) *OAuthAccessTokenUpdateOne
- func (_u *OAuthAccessTokenUpdateOne) SetExpiresAt(v time.Time) *OAuthAccessTokenUpdateOne
- func (_u *OAuthAccessTokenUpdateOne) SetNillableActive(v *bool) *OAuthAccessTokenUpdateOne
- func (_u *OAuthAccessTokenUpdateOne) SetNillableClientID(v *string) *OAuthAccessTokenUpdateOne
- func (_u *OAuthAccessTokenUpdateOne) SetNillableExpiresAt(v *time.Time) *OAuthAccessTokenUpdateOne
- func (_u *OAuthAccessTokenUpdateOne) SetNillableRequestID(v *string) *OAuthAccessTokenUpdateOne
- func (_u *OAuthAccessTokenUpdateOne) SetNillableRequestedAt(v *time.Time) *OAuthAccessTokenUpdateOne
- func (_u *OAuthAccessTokenUpdateOne) SetNillableScopes(v *string) *OAuthAccessTokenUpdateOne
- func (_u *OAuthAccessTokenUpdateOne) SetNillableSessionType(v *string) *OAuthAccessTokenUpdateOne
- func (_u *OAuthAccessTokenUpdateOne) SetNillableSignature(v *string) *OAuthAccessTokenUpdateOne
- func (_u *OAuthAccessTokenUpdateOne) SetNillableUserID(v *int) *OAuthAccessTokenUpdateOne
- func (_u *OAuthAccessTokenUpdateOne) SetRequestID(v string) *OAuthAccessTokenUpdateOne
- func (_u *OAuthAccessTokenUpdateOne) SetRequestedAt(v time.Time) *OAuthAccessTokenUpdateOne
- func (_u *OAuthAccessTokenUpdateOne) SetScopes(v string) *OAuthAccessTokenUpdateOne
- func (_u *OAuthAccessTokenUpdateOne) SetSessionData(v map[string]interface{}) *OAuthAccessTokenUpdateOne
- func (_u *OAuthAccessTokenUpdateOne) SetSessionType(v string) *OAuthAccessTokenUpdateOne
- func (_u *OAuthAccessTokenUpdateOne) SetSignature(v string) *OAuthAccessTokenUpdateOne
- func (_u *OAuthAccessTokenUpdateOne) SetUserID(v int) *OAuthAccessTokenUpdateOne
- func (_u *OAuthAccessTokenUpdateOne) Where(ps ...predicate.OAuthAccessToken) *OAuthAccessTokenUpdateOne
- type OAuthAccessTokens
- type OAuthAuthorizationCode
- type OAuthAuthorizationCodeClient
- func (c *OAuthAuthorizationCodeClient) Create() *OAuthAuthorizationCodeCreate
- func (c *OAuthAuthorizationCodeClient) CreateBulk(builders ...*OAuthAuthorizationCodeCreate) *OAuthAuthorizationCodeCreateBulk
- func (c *OAuthAuthorizationCodeClient) Delete() *OAuthAuthorizationCodeDelete
- func (c *OAuthAuthorizationCodeClient) DeleteOne(_m *OAuthAuthorizationCode) *OAuthAuthorizationCodeDeleteOne
- func (c *OAuthAuthorizationCodeClient) DeleteOneID(id int) *OAuthAuthorizationCodeDeleteOne
- func (c *OAuthAuthorizationCodeClient) Get(ctx context.Context, id int) (*OAuthAuthorizationCode, error)
- func (c *OAuthAuthorizationCodeClient) GetX(ctx context.Context, id int) *OAuthAuthorizationCode
- func (c *OAuthAuthorizationCodeClient) Hooks() []Hook
- func (c *OAuthAuthorizationCodeClient) Intercept(interceptors ...Interceptor)
- func (c *OAuthAuthorizationCodeClient) Interceptors() []Interceptor
- func (c *OAuthAuthorizationCodeClient) MapCreateBulk(slice any, setFunc func(*OAuthAuthorizationCodeCreate, int)) *OAuthAuthorizationCodeCreateBulk
- func (c *OAuthAuthorizationCodeClient) Query() *OAuthAuthorizationCodeQuery
- func (c *OAuthAuthorizationCodeClient) Update() *OAuthAuthorizationCodeUpdate
- func (c *OAuthAuthorizationCodeClient) UpdateOne(_m *OAuthAuthorizationCode) *OAuthAuthorizationCodeUpdateOne
- func (c *OAuthAuthorizationCodeClient) UpdateOneID(id int) *OAuthAuthorizationCodeUpdateOne
- func (c *OAuthAuthorizationCodeClient) Use(hooks ...Hook)
- type OAuthAuthorizationCodeCreate
- func (_c *OAuthAuthorizationCodeCreate) Exec(ctx context.Context) error
- func (_c *OAuthAuthorizationCodeCreate) ExecX(ctx context.Context)
- func (_c *OAuthAuthorizationCodeCreate) Mutation() *OAuthAuthorizationCodeMutation
- func (_c *OAuthAuthorizationCodeCreate) Save(ctx context.Context) (*OAuthAuthorizationCode, error)
- func (_c *OAuthAuthorizationCodeCreate) SaveX(ctx context.Context) *OAuthAuthorizationCode
- func (_c *OAuthAuthorizationCodeCreate) SetActive(v bool) *OAuthAuthorizationCodeCreate
- func (_c *OAuthAuthorizationCodeCreate) SetClientID(v string) *OAuthAuthorizationCodeCreate
- func (_c *OAuthAuthorizationCodeCreate) SetExpiresAt(v time.Time) *OAuthAuthorizationCodeCreate
- func (_c *OAuthAuthorizationCodeCreate) SetNillableActive(v *bool) *OAuthAuthorizationCodeCreate
- func (_c *OAuthAuthorizationCodeCreate) SetNillableExpiresAt(v *time.Time) *OAuthAuthorizationCodeCreate
- func (_c *OAuthAuthorizationCodeCreate) SetNillableRequestID(v *string) *OAuthAuthorizationCodeCreate
- func (_c *OAuthAuthorizationCodeCreate) SetNillableRequestedAt(v *time.Time) *OAuthAuthorizationCodeCreate
- func (_c *OAuthAuthorizationCodeCreate) SetNillableScopes(v *string) *OAuthAuthorizationCodeCreate
- func (_c *OAuthAuthorizationCodeCreate) SetNillableUserID(v *int) *OAuthAuthorizationCodeCreate
- func (_c *OAuthAuthorizationCodeCreate) SetRequestID(v string) *OAuthAuthorizationCodeCreate
- func (_c *OAuthAuthorizationCodeCreate) SetRequestedAt(v time.Time) *OAuthAuthorizationCodeCreate
- func (_c *OAuthAuthorizationCodeCreate) SetScopes(v string) *OAuthAuthorizationCodeCreate
- func (_c *OAuthAuthorizationCodeCreate) SetSessionData(v map[string]interface{}) *OAuthAuthorizationCodeCreate
- func (_c *OAuthAuthorizationCodeCreate) SetSessionType(v string) *OAuthAuthorizationCodeCreate
- func (_c *OAuthAuthorizationCodeCreate) SetSignature(v string) *OAuthAuthorizationCodeCreate
- func (_c *OAuthAuthorizationCodeCreate) SetUserID(v int) *OAuthAuthorizationCodeCreate
- type OAuthAuthorizationCodeCreateBulk
- func (_c *OAuthAuthorizationCodeCreateBulk) Exec(ctx context.Context) error
- func (_c *OAuthAuthorizationCodeCreateBulk) ExecX(ctx context.Context)
- func (_c *OAuthAuthorizationCodeCreateBulk) Save(ctx context.Context) ([]*OAuthAuthorizationCode, error)
- func (_c *OAuthAuthorizationCodeCreateBulk) SaveX(ctx context.Context) []*OAuthAuthorizationCode
- type OAuthAuthorizationCodeDelete
- type OAuthAuthorizationCodeDeleteOne
- type OAuthAuthorizationCodeGroupBy
- func (_g *OAuthAuthorizationCodeGroupBy) Aggregate(fns ...AggregateFunc) *OAuthAuthorizationCodeGroupBy
- func (s *OAuthAuthorizationCodeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *OAuthAuthorizationCodeGroupBy) BoolX(ctx context.Context) bool
- func (s *OAuthAuthorizationCodeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *OAuthAuthorizationCodeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *OAuthAuthorizationCodeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *OAuthAuthorizationCodeGroupBy) Float64X(ctx context.Context) float64
- func (s *OAuthAuthorizationCodeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *OAuthAuthorizationCodeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *OAuthAuthorizationCodeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *OAuthAuthorizationCodeGroupBy) IntX(ctx context.Context) int
- func (s *OAuthAuthorizationCodeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *OAuthAuthorizationCodeGroupBy) IntsX(ctx context.Context) []int
- func (_g *OAuthAuthorizationCodeGroupBy) Scan(ctx context.Context, v any) error
- func (s *OAuthAuthorizationCodeGroupBy) ScanX(ctx context.Context, v any)
- func (s *OAuthAuthorizationCodeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *OAuthAuthorizationCodeGroupBy) StringX(ctx context.Context) string
- func (s *OAuthAuthorizationCodeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *OAuthAuthorizationCodeGroupBy) StringsX(ctx context.Context) []string
- type OAuthAuthorizationCodeMutation
- func (m *OAuthAuthorizationCodeMutation) Active() (r bool, exists bool)
- func (m *OAuthAuthorizationCodeMutation) AddField(name string, value ent.Value) error
- func (m *OAuthAuthorizationCodeMutation) AddUserID(i int)
- func (m *OAuthAuthorizationCodeMutation) AddedEdges() []string
- func (m *OAuthAuthorizationCodeMutation) AddedField(name string) (ent.Value, bool)
- func (m *OAuthAuthorizationCodeMutation) AddedFields() []string
- func (m *OAuthAuthorizationCodeMutation) AddedIDs(name string) []ent.Value
- func (m *OAuthAuthorizationCodeMutation) AddedUserID() (r int, exists bool)
- func (m *OAuthAuthorizationCodeMutation) ClearEdge(name string) error
- func (m *OAuthAuthorizationCodeMutation) ClearExpiresAt()
- func (m *OAuthAuthorizationCodeMutation) ClearField(name string) error
- func (m *OAuthAuthorizationCodeMutation) ClearRequestedAt()
- func (m *OAuthAuthorizationCodeMutation) ClearUserID()
- func (m *OAuthAuthorizationCodeMutation) ClearedEdges() []string
- func (m *OAuthAuthorizationCodeMutation) ClearedFields() []string
- func (m OAuthAuthorizationCodeMutation) Client() *Client
- func (m *OAuthAuthorizationCodeMutation) ClientID() (r string, exists bool)
- func (m *OAuthAuthorizationCodeMutation) EdgeCleared(name string) bool
- func (m *OAuthAuthorizationCodeMutation) ExpiresAt() (r time.Time, exists bool)
- func (m *OAuthAuthorizationCodeMutation) ExpiresAtCleared() bool
- func (m *OAuthAuthorizationCodeMutation) Field(name string) (ent.Value, bool)
- func (m *OAuthAuthorizationCodeMutation) FieldCleared(name string) bool
- func (m *OAuthAuthorizationCodeMutation) Fields() []string
- func (m *OAuthAuthorizationCodeMutation) ID() (id int, exists bool)
- func (m *OAuthAuthorizationCodeMutation) IDs(ctx context.Context) ([]int, error)
- func (m *OAuthAuthorizationCodeMutation) OldActive(ctx context.Context) (v bool, err error)
- func (m *OAuthAuthorizationCodeMutation) OldClientID(ctx context.Context) (v string, err error)
- func (m *OAuthAuthorizationCodeMutation) OldExpiresAt(ctx context.Context) (v *time.Time, err error)
- func (m *OAuthAuthorizationCodeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OAuthAuthorizationCodeMutation) OldRequestID(ctx context.Context) (v string, err error)
- func (m *OAuthAuthorizationCodeMutation) OldRequestedAt(ctx context.Context) (v *time.Time, err error)
- func (m *OAuthAuthorizationCodeMutation) OldScopes(ctx context.Context) (v string, err error)
- func (m *OAuthAuthorizationCodeMutation) OldSessionData(ctx context.Context) (v map[string]interface{}, err error)
- func (m *OAuthAuthorizationCodeMutation) OldSessionType(ctx context.Context) (v string, err error)
- func (m *OAuthAuthorizationCodeMutation) OldSignature(ctx context.Context) (v string, err error)
- func (m *OAuthAuthorizationCodeMutation) OldUserID(ctx context.Context) (v *int, err error)
- func (m *OAuthAuthorizationCodeMutation) Op() Op
- func (m *OAuthAuthorizationCodeMutation) RemovedEdges() []string
- func (m *OAuthAuthorizationCodeMutation) RemovedIDs(name string) []ent.Value
- func (m *OAuthAuthorizationCodeMutation) RequestID() (r string, exists bool)
- func (m *OAuthAuthorizationCodeMutation) RequestedAt() (r time.Time, exists bool)
- func (m *OAuthAuthorizationCodeMutation) RequestedAtCleared() bool
- func (m *OAuthAuthorizationCodeMutation) ResetActive()
- func (m *OAuthAuthorizationCodeMutation) ResetClientID()
- func (m *OAuthAuthorizationCodeMutation) ResetEdge(name string) error
- func (m *OAuthAuthorizationCodeMutation) ResetExpiresAt()
- func (m *OAuthAuthorizationCodeMutation) ResetField(name string) error
- func (m *OAuthAuthorizationCodeMutation) ResetRequestID()
- func (m *OAuthAuthorizationCodeMutation) ResetRequestedAt()
- func (m *OAuthAuthorizationCodeMutation) ResetScopes()
- func (m *OAuthAuthorizationCodeMutation) ResetSessionData()
- func (m *OAuthAuthorizationCodeMutation) ResetSessionType()
- func (m *OAuthAuthorizationCodeMutation) ResetSignature()
- func (m *OAuthAuthorizationCodeMutation) ResetUserID()
- func (m *OAuthAuthorizationCodeMutation) Scopes() (r string, exists bool)
- func (m *OAuthAuthorizationCodeMutation) SessionData() (r map[string]interface{}, exists bool)
- func (m *OAuthAuthorizationCodeMutation) SessionType() (r string, exists bool)
- func (m *OAuthAuthorizationCodeMutation) SetActive(b bool)
- func (m *OAuthAuthorizationCodeMutation) SetClientID(s string)
- func (m *OAuthAuthorizationCodeMutation) SetExpiresAt(t time.Time)
- func (m *OAuthAuthorizationCodeMutation) SetField(name string, value ent.Value) error
- func (m *OAuthAuthorizationCodeMutation) SetOp(op Op)
- func (m *OAuthAuthorizationCodeMutation) SetRequestID(s string)
- func (m *OAuthAuthorizationCodeMutation) SetRequestedAt(t time.Time)
- func (m *OAuthAuthorizationCodeMutation) SetScopes(s string)
- func (m *OAuthAuthorizationCodeMutation) SetSessionData(value map[string]interface{})
- func (m *OAuthAuthorizationCodeMutation) SetSessionType(s string)
- func (m *OAuthAuthorizationCodeMutation) SetSignature(s string)
- func (m *OAuthAuthorizationCodeMutation) SetUserID(i int)
- func (m *OAuthAuthorizationCodeMutation) Signature() (r string, exists bool)
- func (m OAuthAuthorizationCodeMutation) Tx() (*Tx, error)
- func (m *OAuthAuthorizationCodeMutation) Type() string
- func (m *OAuthAuthorizationCodeMutation) UserID() (r int, exists bool)
- func (m *OAuthAuthorizationCodeMutation) UserIDCleared() bool
- func (m *OAuthAuthorizationCodeMutation) Where(ps ...predicate.OAuthAuthorizationCode)
- func (m *OAuthAuthorizationCodeMutation) WhereP(ps ...func(*sql.Selector))
- type OAuthAuthorizationCodeQuery
- func (_q *OAuthAuthorizationCodeQuery) Aggregate(fns ...AggregateFunc) *OAuthAuthorizationCodeSelect
- func (_q *OAuthAuthorizationCodeQuery) All(ctx context.Context) ([]*OAuthAuthorizationCode, error)
- func (_q *OAuthAuthorizationCodeQuery) AllX(ctx context.Context) []*OAuthAuthorizationCode
- func (_q *OAuthAuthorizationCodeQuery) Clone() *OAuthAuthorizationCodeQuery
- func (_q *OAuthAuthorizationCodeQuery) Count(ctx context.Context) (int, error)
- func (_q *OAuthAuthorizationCodeQuery) CountX(ctx context.Context) int
- func (_q *OAuthAuthorizationCodeQuery) Exist(ctx context.Context) (bool, error)
- func (_q *OAuthAuthorizationCodeQuery) ExistX(ctx context.Context) bool
- func (_q *OAuthAuthorizationCodeQuery) First(ctx context.Context) (*OAuthAuthorizationCode, error)
- func (_q *OAuthAuthorizationCodeQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *OAuthAuthorizationCodeQuery) FirstIDX(ctx context.Context) int
- func (_q *OAuthAuthorizationCodeQuery) FirstX(ctx context.Context) *OAuthAuthorizationCode
- func (_q *OAuthAuthorizationCodeQuery) GroupBy(field string, fields ...string) *OAuthAuthorizationCodeGroupBy
- func (_q *OAuthAuthorizationCodeQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *OAuthAuthorizationCodeQuery) IDsX(ctx context.Context) []int
- func (_q *OAuthAuthorizationCodeQuery) Limit(limit int) *OAuthAuthorizationCodeQuery
- func (_q *OAuthAuthorizationCodeQuery) Offset(offset int) *OAuthAuthorizationCodeQuery
- func (_q *OAuthAuthorizationCodeQuery) Only(ctx context.Context) (*OAuthAuthorizationCode, error)
- func (_q *OAuthAuthorizationCodeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *OAuthAuthorizationCodeQuery) OnlyIDX(ctx context.Context) int
- func (_q *OAuthAuthorizationCodeQuery) OnlyX(ctx context.Context) *OAuthAuthorizationCode
- func (_q *OAuthAuthorizationCodeQuery) Order(o ...oauthauthorizationcode.OrderOption) *OAuthAuthorizationCodeQuery
- func (_q *OAuthAuthorizationCodeQuery) Select(fields ...string) *OAuthAuthorizationCodeSelect
- func (_q *OAuthAuthorizationCodeQuery) Unique(unique bool) *OAuthAuthorizationCodeQuery
- func (_q *OAuthAuthorizationCodeQuery) Where(ps ...predicate.OAuthAuthorizationCode) *OAuthAuthorizationCodeQuery
- type OAuthAuthorizationCodeSelect
- func (_s *OAuthAuthorizationCodeSelect) Aggregate(fns ...AggregateFunc) *OAuthAuthorizationCodeSelect
- func (s *OAuthAuthorizationCodeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *OAuthAuthorizationCodeSelect) BoolX(ctx context.Context) bool
- func (s *OAuthAuthorizationCodeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *OAuthAuthorizationCodeSelect) BoolsX(ctx context.Context) []bool
- func (s *OAuthAuthorizationCodeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *OAuthAuthorizationCodeSelect) Float64X(ctx context.Context) float64
- func (s *OAuthAuthorizationCodeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *OAuthAuthorizationCodeSelect) Float64sX(ctx context.Context) []float64
- func (s *OAuthAuthorizationCodeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *OAuthAuthorizationCodeSelect) IntX(ctx context.Context) int
- func (s *OAuthAuthorizationCodeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *OAuthAuthorizationCodeSelect) IntsX(ctx context.Context) []int
- func (_s *OAuthAuthorizationCodeSelect) Scan(ctx context.Context, v any) error
- func (s *OAuthAuthorizationCodeSelect) ScanX(ctx context.Context, v any)
- func (s *OAuthAuthorizationCodeSelect) String(ctx context.Context) (_ string, err error)
- func (s *OAuthAuthorizationCodeSelect) StringX(ctx context.Context) string
- func (s *OAuthAuthorizationCodeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *OAuthAuthorizationCodeSelect) StringsX(ctx context.Context) []string
- type OAuthAuthorizationCodeUpdate
- func (_u *OAuthAuthorizationCodeUpdate) AddUserID(v int) *OAuthAuthorizationCodeUpdate
- func (_u *OAuthAuthorizationCodeUpdate) ClearExpiresAt() *OAuthAuthorizationCodeUpdate
- func (_u *OAuthAuthorizationCodeUpdate) ClearRequestedAt() *OAuthAuthorizationCodeUpdate
- func (_u *OAuthAuthorizationCodeUpdate) ClearUserID() *OAuthAuthorizationCodeUpdate
- func (_u *OAuthAuthorizationCodeUpdate) Exec(ctx context.Context) error
- func (_u *OAuthAuthorizationCodeUpdate) ExecX(ctx context.Context)
- func (_u *OAuthAuthorizationCodeUpdate) Mutation() *OAuthAuthorizationCodeMutation
- func (_u *OAuthAuthorizationCodeUpdate) Save(ctx context.Context) (int, error)
- func (_u *OAuthAuthorizationCodeUpdate) SaveX(ctx context.Context) int
- func (_u *OAuthAuthorizationCodeUpdate) SetActive(v bool) *OAuthAuthorizationCodeUpdate
- func (_u *OAuthAuthorizationCodeUpdate) SetClientID(v string) *OAuthAuthorizationCodeUpdate
- func (_u *OAuthAuthorizationCodeUpdate) SetExpiresAt(v time.Time) *OAuthAuthorizationCodeUpdate
- func (_u *OAuthAuthorizationCodeUpdate) SetNillableActive(v *bool) *OAuthAuthorizationCodeUpdate
- func (_u *OAuthAuthorizationCodeUpdate) SetNillableClientID(v *string) *OAuthAuthorizationCodeUpdate
- func (_u *OAuthAuthorizationCodeUpdate) SetNillableExpiresAt(v *time.Time) *OAuthAuthorizationCodeUpdate
- func (_u *OAuthAuthorizationCodeUpdate) SetNillableRequestID(v *string) *OAuthAuthorizationCodeUpdate
- func (_u *OAuthAuthorizationCodeUpdate) SetNillableRequestedAt(v *time.Time) *OAuthAuthorizationCodeUpdate
- func (_u *OAuthAuthorizationCodeUpdate) SetNillableScopes(v *string) *OAuthAuthorizationCodeUpdate
- func (_u *OAuthAuthorizationCodeUpdate) SetNillableSessionType(v *string) *OAuthAuthorizationCodeUpdate
- func (_u *OAuthAuthorizationCodeUpdate) SetNillableSignature(v *string) *OAuthAuthorizationCodeUpdate
- func (_u *OAuthAuthorizationCodeUpdate) SetNillableUserID(v *int) *OAuthAuthorizationCodeUpdate
- func (_u *OAuthAuthorizationCodeUpdate) SetRequestID(v string) *OAuthAuthorizationCodeUpdate
- func (_u *OAuthAuthorizationCodeUpdate) SetRequestedAt(v time.Time) *OAuthAuthorizationCodeUpdate
- func (_u *OAuthAuthorizationCodeUpdate) SetScopes(v string) *OAuthAuthorizationCodeUpdate
- func (_u *OAuthAuthorizationCodeUpdate) SetSessionData(v map[string]interface{}) *OAuthAuthorizationCodeUpdate
- func (_u *OAuthAuthorizationCodeUpdate) SetSessionType(v string) *OAuthAuthorizationCodeUpdate
- func (_u *OAuthAuthorizationCodeUpdate) SetSignature(v string) *OAuthAuthorizationCodeUpdate
- func (_u *OAuthAuthorizationCodeUpdate) SetUserID(v int) *OAuthAuthorizationCodeUpdate
- func (_u *OAuthAuthorizationCodeUpdate) Where(ps ...predicate.OAuthAuthorizationCode) *OAuthAuthorizationCodeUpdate
- type OAuthAuthorizationCodeUpdateOne
- func (_u *OAuthAuthorizationCodeUpdateOne) AddUserID(v int) *OAuthAuthorizationCodeUpdateOne
- func (_u *OAuthAuthorizationCodeUpdateOne) ClearExpiresAt() *OAuthAuthorizationCodeUpdateOne
- func (_u *OAuthAuthorizationCodeUpdateOne) ClearRequestedAt() *OAuthAuthorizationCodeUpdateOne
- func (_u *OAuthAuthorizationCodeUpdateOne) ClearUserID() *OAuthAuthorizationCodeUpdateOne
- func (_u *OAuthAuthorizationCodeUpdateOne) Exec(ctx context.Context) error
- func (_u *OAuthAuthorizationCodeUpdateOne) ExecX(ctx context.Context)
- func (_u *OAuthAuthorizationCodeUpdateOne) Mutation() *OAuthAuthorizationCodeMutation
- func (_u *OAuthAuthorizationCodeUpdateOne) Save(ctx context.Context) (*OAuthAuthorizationCode, error)
- func (_u *OAuthAuthorizationCodeUpdateOne) SaveX(ctx context.Context) *OAuthAuthorizationCode
- func (_u *OAuthAuthorizationCodeUpdateOne) Select(field string, fields ...string) *OAuthAuthorizationCodeUpdateOne
- func (_u *OAuthAuthorizationCodeUpdateOne) SetActive(v bool) *OAuthAuthorizationCodeUpdateOne
- func (_u *OAuthAuthorizationCodeUpdateOne) SetClientID(v string) *OAuthAuthorizationCodeUpdateOne
- func (_u *OAuthAuthorizationCodeUpdateOne) SetExpiresAt(v time.Time) *OAuthAuthorizationCodeUpdateOne
- func (_u *OAuthAuthorizationCodeUpdateOne) SetNillableActive(v *bool) *OAuthAuthorizationCodeUpdateOne
- func (_u *OAuthAuthorizationCodeUpdateOne) SetNillableClientID(v *string) *OAuthAuthorizationCodeUpdateOne
- func (_u *OAuthAuthorizationCodeUpdateOne) SetNillableExpiresAt(v *time.Time) *OAuthAuthorizationCodeUpdateOne
- func (_u *OAuthAuthorizationCodeUpdateOne) SetNillableRequestID(v *string) *OAuthAuthorizationCodeUpdateOne
- func (_u *OAuthAuthorizationCodeUpdateOne) SetNillableRequestedAt(v *time.Time) *OAuthAuthorizationCodeUpdateOne
- func (_u *OAuthAuthorizationCodeUpdateOne) SetNillableScopes(v *string) *OAuthAuthorizationCodeUpdateOne
- func (_u *OAuthAuthorizationCodeUpdateOne) SetNillableSessionType(v *string) *OAuthAuthorizationCodeUpdateOne
- func (_u *OAuthAuthorizationCodeUpdateOne) SetNillableSignature(v *string) *OAuthAuthorizationCodeUpdateOne
- func (_u *OAuthAuthorizationCodeUpdateOne) SetNillableUserID(v *int) *OAuthAuthorizationCodeUpdateOne
- func (_u *OAuthAuthorizationCodeUpdateOne) SetRequestID(v string) *OAuthAuthorizationCodeUpdateOne
- func (_u *OAuthAuthorizationCodeUpdateOne) SetRequestedAt(v time.Time) *OAuthAuthorizationCodeUpdateOne
- func (_u *OAuthAuthorizationCodeUpdateOne) SetScopes(v string) *OAuthAuthorizationCodeUpdateOne
- func (_u *OAuthAuthorizationCodeUpdateOne) SetSessionData(v map[string]interface{}) *OAuthAuthorizationCodeUpdateOne
- func (_u *OAuthAuthorizationCodeUpdateOne) SetSessionType(v string) *OAuthAuthorizationCodeUpdateOne
- func (_u *OAuthAuthorizationCodeUpdateOne) SetSignature(v string) *OAuthAuthorizationCodeUpdateOne
- func (_u *OAuthAuthorizationCodeUpdateOne) SetUserID(v int) *OAuthAuthorizationCodeUpdateOne
- func (_u *OAuthAuthorizationCodeUpdateOne) Where(ps ...predicate.OAuthAuthorizationCode) *OAuthAuthorizationCodeUpdateOne
- type OAuthAuthorizationCodes
- type OAuthClient
- type OAuthClientClient
- func (c *OAuthClientClient) Create() *OAuthClientCreate
- func (c *OAuthClientClient) CreateBulk(builders ...*OAuthClientCreate) *OAuthClientCreateBulk
- func (c *OAuthClientClient) Delete() *OAuthClientDelete
- func (c *OAuthClientClient) DeleteOne(_m *OAuthClient) *OAuthClientDeleteOne
- func (c *OAuthClientClient) DeleteOneID(id int) *OAuthClientDeleteOne
- func (c *OAuthClientClient) Get(ctx context.Context, id int) (*OAuthClient, error)
- func (c *OAuthClientClient) GetX(ctx context.Context, id int) *OAuthClient
- func (c *OAuthClientClient) Hooks() []Hook
- func (c *OAuthClientClient) Intercept(interceptors ...Interceptor)
- func (c *OAuthClientClient) Interceptors() []Interceptor
- func (c *OAuthClientClient) MapCreateBulk(slice any, setFunc func(*OAuthClientCreate, int)) *OAuthClientCreateBulk
- func (c *OAuthClientClient) Query() *OAuthClientQuery
- func (c *OAuthClientClient) Update() *OAuthClientUpdate
- func (c *OAuthClientClient) UpdateOne(_m *OAuthClient) *OAuthClientUpdateOne
- func (c *OAuthClientClient) UpdateOneID(id int) *OAuthClientUpdateOne
- func (c *OAuthClientClient) Use(hooks ...Hook)
- type OAuthClientCreate
- func (_c *OAuthClientCreate) Exec(ctx context.Context) error
- func (_c *OAuthClientCreate) ExecX(ctx context.Context)
- func (_c *OAuthClientCreate) Mutation() *OAuthClientMutation
- func (_c *OAuthClientCreate) Save(ctx context.Context) (*OAuthClient, error)
- func (_c *OAuthClientCreate) SaveX(ctx context.Context) *OAuthClient
- func (_c *OAuthClientCreate) SetClientID(v string) *OAuthClientCreate
- func (_c *OAuthClientCreate) SetClientSecretHash(v string) *OAuthClientCreate
- func (_c *OAuthClientCreate) SetGrantTypes(v []string) *OAuthClientCreate
- func (_c *OAuthClientCreate) SetIsPublic(v bool) *OAuthClientCreate
- func (_c *OAuthClientCreate) SetName(v string) *OAuthClientCreate
- func (_c *OAuthClientCreate) SetNillableClientSecretHash(v *string) *OAuthClientCreate
- func (_c *OAuthClientCreate) SetNillableIsPublic(v *bool) *OAuthClientCreate
- func (_c *OAuthClientCreate) SetNillableScopes(v *string) *OAuthClientCreate
- func (_c *OAuthClientCreate) SetNillableWorkspaceID(v *int) *OAuthClientCreate
- func (_c *OAuthClientCreate) SetRedirectUris(v []string) *OAuthClientCreate
- func (_c *OAuthClientCreate) SetResponseTypes(v []string) *OAuthClientCreate
- func (_c *OAuthClientCreate) SetScopes(v string) *OAuthClientCreate
- func (_c *OAuthClientCreate) SetWorkspaceID(v int) *OAuthClientCreate
- type OAuthClientCreateBulk
- type OAuthClientDelete
- type OAuthClientDeleteOne
- type OAuthClientGroupBy
- func (_g *OAuthClientGroupBy) Aggregate(fns ...AggregateFunc) *OAuthClientGroupBy
- func (s *OAuthClientGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *OAuthClientGroupBy) BoolX(ctx context.Context) bool
- func (s *OAuthClientGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *OAuthClientGroupBy) BoolsX(ctx context.Context) []bool
- func (s *OAuthClientGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *OAuthClientGroupBy) Float64X(ctx context.Context) float64
- func (s *OAuthClientGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *OAuthClientGroupBy) Float64sX(ctx context.Context) []float64
- func (s *OAuthClientGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *OAuthClientGroupBy) IntX(ctx context.Context) int
- func (s *OAuthClientGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *OAuthClientGroupBy) IntsX(ctx context.Context) []int
- func (_g *OAuthClientGroupBy) Scan(ctx context.Context, v any) error
- func (s *OAuthClientGroupBy) ScanX(ctx context.Context, v any)
- func (s *OAuthClientGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *OAuthClientGroupBy) StringX(ctx context.Context) string
- func (s *OAuthClientGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *OAuthClientGroupBy) StringsX(ctx context.Context) []string
- type OAuthClientMutation
- func (m *OAuthClientMutation) AddField(name string, value ent.Value) error
- func (m *OAuthClientMutation) AddWorkspaceID(i int)
- func (m *OAuthClientMutation) AddedEdges() []string
- func (m *OAuthClientMutation) AddedField(name string) (ent.Value, bool)
- func (m *OAuthClientMutation) AddedFields() []string
- func (m *OAuthClientMutation) AddedIDs(name string) []ent.Value
- func (m *OAuthClientMutation) AddedWorkspaceID() (r int, exists bool)
- func (m *OAuthClientMutation) AppendGrantTypes(s []string)
- func (m *OAuthClientMutation) AppendRedirectUris(s []string)
- func (m *OAuthClientMutation) AppendResponseTypes(s []string)
- func (m *OAuthClientMutation) AppendedGrantTypes() ([]string, bool)
- func (m *OAuthClientMutation) AppendedRedirectUris() ([]string, bool)
- func (m *OAuthClientMutation) AppendedResponseTypes() ([]string, bool)
- func (m *OAuthClientMutation) ClearEdge(name string) error
- func (m *OAuthClientMutation) ClearField(name string) error
- func (m *OAuthClientMutation) ClearWorkspaceID()
- func (m *OAuthClientMutation) ClearedEdges() []string
- func (m *OAuthClientMutation) ClearedFields() []string
- func (m OAuthClientMutation) Client() *Client
- func (m *OAuthClientMutation) ClientID() (r string, exists bool)
- func (m *OAuthClientMutation) ClientSecretHash() (r string, exists bool)
- func (m *OAuthClientMutation) EdgeCleared(name string) bool
- func (m *OAuthClientMutation) Field(name string) (ent.Value, bool)
- func (m *OAuthClientMutation) FieldCleared(name string) bool
- func (m *OAuthClientMutation) Fields() []string
- func (m *OAuthClientMutation) GrantTypes() (r []string, exists bool)
- func (m *OAuthClientMutation) ID() (id int, exists bool)
- func (m *OAuthClientMutation) IDs(ctx context.Context) ([]int, error)
- func (m *OAuthClientMutation) IsPublic() (r bool, exists bool)
- func (m *OAuthClientMutation) Name() (r string, exists bool)
- func (m *OAuthClientMutation) OldClientID(ctx context.Context) (v string, err error)
- func (m *OAuthClientMutation) OldClientSecretHash(ctx context.Context) (v string, err error)
- func (m *OAuthClientMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OAuthClientMutation) OldGrantTypes(ctx context.Context) (v []string, err error)
- func (m *OAuthClientMutation) OldIsPublic(ctx context.Context) (v bool, err error)
- func (m *OAuthClientMutation) OldName(ctx context.Context) (v string, err error)
- func (m *OAuthClientMutation) OldRedirectUris(ctx context.Context) (v []string, err error)
- func (m *OAuthClientMutation) OldResponseTypes(ctx context.Context) (v []string, err error)
- func (m *OAuthClientMutation) OldScopes(ctx context.Context) (v string, err error)
- func (m *OAuthClientMutation) OldWorkspaceID(ctx context.Context) (v *int, err error)
- func (m *OAuthClientMutation) Op() Op
- func (m *OAuthClientMutation) RedirectUris() (r []string, exists bool)
- func (m *OAuthClientMutation) RemovedEdges() []string
- func (m *OAuthClientMutation) RemovedIDs(name string) []ent.Value
- func (m *OAuthClientMutation) ResetClientID()
- func (m *OAuthClientMutation) ResetClientSecretHash()
- func (m *OAuthClientMutation) ResetEdge(name string) error
- func (m *OAuthClientMutation) ResetField(name string) error
- func (m *OAuthClientMutation) ResetGrantTypes()
- func (m *OAuthClientMutation) ResetIsPublic()
- func (m *OAuthClientMutation) ResetName()
- func (m *OAuthClientMutation) ResetRedirectUris()
- func (m *OAuthClientMutation) ResetResponseTypes()
- func (m *OAuthClientMutation) ResetScopes()
- func (m *OAuthClientMutation) ResetWorkspaceID()
- func (m *OAuthClientMutation) ResponseTypes() (r []string, exists bool)
- func (m *OAuthClientMutation) Scopes() (r string, exists bool)
- func (m *OAuthClientMutation) SetClientID(s string)
- func (m *OAuthClientMutation) SetClientSecretHash(s string)
- func (m *OAuthClientMutation) SetField(name string, value ent.Value) error
- func (m *OAuthClientMutation) SetGrantTypes(s []string)
- func (m *OAuthClientMutation) SetIsPublic(b bool)
- func (m *OAuthClientMutation) SetName(s string)
- func (m *OAuthClientMutation) SetOp(op Op)
- func (m *OAuthClientMutation) SetRedirectUris(s []string)
- func (m *OAuthClientMutation) SetResponseTypes(s []string)
- func (m *OAuthClientMutation) SetScopes(s string)
- func (m *OAuthClientMutation) SetWorkspaceID(i int)
- func (m OAuthClientMutation) Tx() (*Tx, error)
- func (m *OAuthClientMutation) Type() string
- func (m *OAuthClientMutation) Where(ps ...predicate.OAuthClient)
- func (m *OAuthClientMutation) WhereP(ps ...func(*sql.Selector))
- func (m *OAuthClientMutation) WorkspaceID() (r int, exists bool)
- func (m *OAuthClientMutation) WorkspaceIDCleared() bool
- type OAuthClientQuery
- func (_q *OAuthClientQuery) Aggregate(fns ...AggregateFunc) *OAuthClientSelect
- func (_q *OAuthClientQuery) All(ctx context.Context) ([]*OAuthClient, error)
- func (_q *OAuthClientQuery) AllX(ctx context.Context) []*OAuthClient
- func (_q *OAuthClientQuery) Clone() *OAuthClientQuery
- func (_q *OAuthClientQuery) Count(ctx context.Context) (int, error)
- func (_q *OAuthClientQuery) CountX(ctx context.Context) int
- func (_q *OAuthClientQuery) Exist(ctx context.Context) (bool, error)
- func (_q *OAuthClientQuery) ExistX(ctx context.Context) bool
- func (_q *OAuthClientQuery) First(ctx context.Context) (*OAuthClient, error)
- func (_q *OAuthClientQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *OAuthClientQuery) FirstIDX(ctx context.Context) int
- func (_q *OAuthClientQuery) FirstX(ctx context.Context) *OAuthClient
- func (_q *OAuthClientQuery) GroupBy(field string, fields ...string) *OAuthClientGroupBy
- func (_q *OAuthClientQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *OAuthClientQuery) IDsX(ctx context.Context) []int
- func (_q *OAuthClientQuery) Limit(limit int) *OAuthClientQuery
- func (_q *OAuthClientQuery) Offset(offset int) *OAuthClientQuery
- func (_q *OAuthClientQuery) Only(ctx context.Context) (*OAuthClient, error)
- func (_q *OAuthClientQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *OAuthClientQuery) OnlyIDX(ctx context.Context) int
- func (_q *OAuthClientQuery) OnlyX(ctx context.Context) *OAuthClient
- func (_q *OAuthClientQuery) Order(o ...oauthclient.OrderOption) *OAuthClientQuery
- func (_q *OAuthClientQuery) Select(fields ...string) *OAuthClientSelect
- func (_q *OAuthClientQuery) Unique(unique bool) *OAuthClientQuery
- func (_q *OAuthClientQuery) Where(ps ...predicate.OAuthClient) *OAuthClientQuery
- type OAuthClientSelect
- func (_s *OAuthClientSelect) Aggregate(fns ...AggregateFunc) *OAuthClientSelect
- func (s *OAuthClientSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *OAuthClientSelect) BoolX(ctx context.Context) bool
- func (s *OAuthClientSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *OAuthClientSelect) BoolsX(ctx context.Context) []bool
- func (s *OAuthClientSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *OAuthClientSelect) Float64X(ctx context.Context) float64
- func (s *OAuthClientSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *OAuthClientSelect) Float64sX(ctx context.Context) []float64
- func (s *OAuthClientSelect) Int(ctx context.Context) (_ int, err error)
- func (s *OAuthClientSelect) IntX(ctx context.Context) int
- func (s *OAuthClientSelect) Ints(ctx context.Context) ([]int, error)
- func (s *OAuthClientSelect) IntsX(ctx context.Context) []int
- func (_s *OAuthClientSelect) Scan(ctx context.Context, v any) error
- func (s *OAuthClientSelect) ScanX(ctx context.Context, v any)
- func (s *OAuthClientSelect) String(ctx context.Context) (_ string, err error)
- func (s *OAuthClientSelect) StringX(ctx context.Context) string
- func (s *OAuthClientSelect) Strings(ctx context.Context) ([]string, error)
- func (s *OAuthClientSelect) StringsX(ctx context.Context) []string
- type OAuthClientUpdate
- func (_u *OAuthClientUpdate) AddWorkspaceID(v int) *OAuthClientUpdate
- func (_u *OAuthClientUpdate) AppendGrantTypes(v []string) *OAuthClientUpdate
- func (_u *OAuthClientUpdate) AppendRedirectUris(v []string) *OAuthClientUpdate
- func (_u *OAuthClientUpdate) AppendResponseTypes(v []string) *OAuthClientUpdate
- func (_u *OAuthClientUpdate) ClearWorkspaceID() *OAuthClientUpdate
- func (_u *OAuthClientUpdate) Exec(ctx context.Context) error
- func (_u *OAuthClientUpdate) ExecX(ctx context.Context)
- func (_u *OAuthClientUpdate) Mutation() *OAuthClientMutation
- func (_u *OAuthClientUpdate) Save(ctx context.Context) (int, error)
- func (_u *OAuthClientUpdate) SaveX(ctx context.Context) int
- func (_u *OAuthClientUpdate) SetClientID(v string) *OAuthClientUpdate
- func (_u *OAuthClientUpdate) SetClientSecretHash(v string) *OAuthClientUpdate
- func (_u *OAuthClientUpdate) SetGrantTypes(v []string) *OAuthClientUpdate
- func (_u *OAuthClientUpdate) SetIsPublic(v bool) *OAuthClientUpdate
- func (_u *OAuthClientUpdate) SetName(v string) *OAuthClientUpdate
- func (_u *OAuthClientUpdate) SetNillableClientID(v *string) *OAuthClientUpdate
- func (_u *OAuthClientUpdate) SetNillableClientSecretHash(v *string) *OAuthClientUpdate
- func (_u *OAuthClientUpdate) SetNillableIsPublic(v *bool) *OAuthClientUpdate
- func (_u *OAuthClientUpdate) SetNillableName(v *string) *OAuthClientUpdate
- func (_u *OAuthClientUpdate) SetNillableScopes(v *string) *OAuthClientUpdate
- func (_u *OAuthClientUpdate) SetNillableWorkspaceID(v *int) *OAuthClientUpdate
- func (_u *OAuthClientUpdate) SetRedirectUris(v []string) *OAuthClientUpdate
- func (_u *OAuthClientUpdate) SetResponseTypes(v []string) *OAuthClientUpdate
- func (_u *OAuthClientUpdate) SetScopes(v string) *OAuthClientUpdate
- func (_u *OAuthClientUpdate) SetWorkspaceID(v int) *OAuthClientUpdate
- func (_u *OAuthClientUpdate) Where(ps ...predicate.OAuthClient) *OAuthClientUpdate
- type OAuthClientUpdateOne
- func (_u *OAuthClientUpdateOne) AddWorkspaceID(v int) *OAuthClientUpdateOne
- func (_u *OAuthClientUpdateOne) AppendGrantTypes(v []string) *OAuthClientUpdateOne
- func (_u *OAuthClientUpdateOne) AppendRedirectUris(v []string) *OAuthClientUpdateOne
- func (_u *OAuthClientUpdateOne) AppendResponseTypes(v []string) *OAuthClientUpdateOne
- func (_u *OAuthClientUpdateOne) ClearWorkspaceID() *OAuthClientUpdateOne
- func (_u *OAuthClientUpdateOne) Exec(ctx context.Context) error
- func (_u *OAuthClientUpdateOne) ExecX(ctx context.Context)
- func (_u *OAuthClientUpdateOne) Mutation() *OAuthClientMutation
- func (_u *OAuthClientUpdateOne) Save(ctx context.Context) (*OAuthClient, error)
- func (_u *OAuthClientUpdateOne) SaveX(ctx context.Context) *OAuthClient
- func (_u *OAuthClientUpdateOne) Select(field string, fields ...string) *OAuthClientUpdateOne
- func (_u *OAuthClientUpdateOne) SetClientID(v string) *OAuthClientUpdateOne
- func (_u *OAuthClientUpdateOne) SetClientSecretHash(v string) *OAuthClientUpdateOne
- func (_u *OAuthClientUpdateOne) SetGrantTypes(v []string) *OAuthClientUpdateOne
- func (_u *OAuthClientUpdateOne) SetIsPublic(v bool) *OAuthClientUpdateOne
- func (_u *OAuthClientUpdateOne) SetName(v string) *OAuthClientUpdateOne
- func (_u *OAuthClientUpdateOne) SetNillableClientID(v *string) *OAuthClientUpdateOne
- func (_u *OAuthClientUpdateOne) SetNillableClientSecretHash(v *string) *OAuthClientUpdateOne
- func (_u *OAuthClientUpdateOne) SetNillableIsPublic(v *bool) *OAuthClientUpdateOne
- func (_u *OAuthClientUpdateOne) SetNillableName(v *string) *OAuthClientUpdateOne
- func (_u *OAuthClientUpdateOne) SetNillableScopes(v *string) *OAuthClientUpdateOne
- func (_u *OAuthClientUpdateOne) SetNillableWorkspaceID(v *int) *OAuthClientUpdateOne
- func (_u *OAuthClientUpdateOne) SetRedirectUris(v []string) *OAuthClientUpdateOne
- func (_u *OAuthClientUpdateOne) SetResponseTypes(v []string) *OAuthClientUpdateOne
- func (_u *OAuthClientUpdateOne) SetScopes(v string) *OAuthClientUpdateOne
- func (_u *OAuthClientUpdateOne) SetWorkspaceID(v int) *OAuthClientUpdateOne
- func (_u *OAuthClientUpdateOne) Where(ps ...predicate.OAuthClient) *OAuthClientUpdateOne
- type OAuthClients
- type OAuthRefreshToken
- type OAuthRefreshTokenClient
- func (c *OAuthRefreshTokenClient) Create() *OAuthRefreshTokenCreate
- func (c *OAuthRefreshTokenClient) CreateBulk(builders ...*OAuthRefreshTokenCreate) *OAuthRefreshTokenCreateBulk
- func (c *OAuthRefreshTokenClient) Delete() *OAuthRefreshTokenDelete
- func (c *OAuthRefreshTokenClient) DeleteOne(_m *OAuthRefreshToken) *OAuthRefreshTokenDeleteOne
- func (c *OAuthRefreshTokenClient) DeleteOneID(id int) *OAuthRefreshTokenDeleteOne
- func (c *OAuthRefreshTokenClient) Get(ctx context.Context, id int) (*OAuthRefreshToken, error)
- func (c *OAuthRefreshTokenClient) GetX(ctx context.Context, id int) *OAuthRefreshToken
- func (c *OAuthRefreshTokenClient) Hooks() []Hook
- func (c *OAuthRefreshTokenClient) Intercept(interceptors ...Interceptor)
- func (c *OAuthRefreshTokenClient) Interceptors() []Interceptor
- func (c *OAuthRefreshTokenClient) MapCreateBulk(slice any, setFunc func(*OAuthRefreshTokenCreate, int)) *OAuthRefreshTokenCreateBulk
- func (c *OAuthRefreshTokenClient) Query() *OAuthRefreshTokenQuery
- func (c *OAuthRefreshTokenClient) Update() *OAuthRefreshTokenUpdate
- func (c *OAuthRefreshTokenClient) UpdateOne(_m *OAuthRefreshToken) *OAuthRefreshTokenUpdateOne
- func (c *OAuthRefreshTokenClient) UpdateOneID(id int) *OAuthRefreshTokenUpdateOne
- func (c *OAuthRefreshTokenClient) Use(hooks ...Hook)
- type OAuthRefreshTokenCreate
- func (_c *OAuthRefreshTokenCreate) Exec(ctx context.Context) error
- func (_c *OAuthRefreshTokenCreate) ExecX(ctx context.Context)
- func (_c *OAuthRefreshTokenCreate) Mutation() *OAuthRefreshTokenMutation
- func (_c *OAuthRefreshTokenCreate) Save(ctx context.Context) (*OAuthRefreshToken, error)
- func (_c *OAuthRefreshTokenCreate) SaveX(ctx context.Context) *OAuthRefreshToken
- func (_c *OAuthRefreshTokenCreate) SetActive(v bool) *OAuthRefreshTokenCreate
- func (_c *OAuthRefreshTokenCreate) SetClientID(v string) *OAuthRefreshTokenCreate
- func (_c *OAuthRefreshTokenCreate) SetExpiresAt(v time.Time) *OAuthRefreshTokenCreate
- func (_c *OAuthRefreshTokenCreate) SetNillableActive(v *bool) *OAuthRefreshTokenCreate
- func (_c *OAuthRefreshTokenCreate) SetNillableExpiresAt(v *time.Time) *OAuthRefreshTokenCreate
- func (_c *OAuthRefreshTokenCreate) SetNillableRequestID(v *string) *OAuthRefreshTokenCreate
- func (_c *OAuthRefreshTokenCreate) SetNillableRequestedAt(v *time.Time) *OAuthRefreshTokenCreate
- func (_c *OAuthRefreshTokenCreate) SetNillableScopes(v *string) *OAuthRefreshTokenCreate
- func (_c *OAuthRefreshTokenCreate) SetNillableUserID(v *int) *OAuthRefreshTokenCreate
- func (_c *OAuthRefreshTokenCreate) SetRequestID(v string) *OAuthRefreshTokenCreate
- func (_c *OAuthRefreshTokenCreate) SetRequestedAt(v time.Time) *OAuthRefreshTokenCreate
- func (_c *OAuthRefreshTokenCreate) SetScopes(v string) *OAuthRefreshTokenCreate
- func (_c *OAuthRefreshTokenCreate) SetSessionData(v map[string]interface{}) *OAuthRefreshTokenCreate
- func (_c *OAuthRefreshTokenCreate) SetSessionType(v string) *OAuthRefreshTokenCreate
- func (_c *OAuthRefreshTokenCreate) SetSignature(v string) *OAuthRefreshTokenCreate
- func (_c *OAuthRefreshTokenCreate) SetUserID(v int) *OAuthRefreshTokenCreate
- type OAuthRefreshTokenCreateBulk
- func (_c *OAuthRefreshTokenCreateBulk) Exec(ctx context.Context) error
- func (_c *OAuthRefreshTokenCreateBulk) ExecX(ctx context.Context)
- func (_c *OAuthRefreshTokenCreateBulk) Save(ctx context.Context) ([]*OAuthRefreshToken, error)
- func (_c *OAuthRefreshTokenCreateBulk) SaveX(ctx context.Context) []*OAuthRefreshToken
- type OAuthRefreshTokenDelete
- type OAuthRefreshTokenDeleteOne
- type OAuthRefreshTokenGroupBy
- func (_g *OAuthRefreshTokenGroupBy) Aggregate(fns ...AggregateFunc) *OAuthRefreshTokenGroupBy
- func (s *OAuthRefreshTokenGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *OAuthRefreshTokenGroupBy) BoolX(ctx context.Context) bool
- func (s *OAuthRefreshTokenGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *OAuthRefreshTokenGroupBy) BoolsX(ctx context.Context) []bool
- func (s *OAuthRefreshTokenGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *OAuthRefreshTokenGroupBy) Float64X(ctx context.Context) float64
- func (s *OAuthRefreshTokenGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *OAuthRefreshTokenGroupBy) Float64sX(ctx context.Context) []float64
- func (s *OAuthRefreshTokenGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *OAuthRefreshTokenGroupBy) IntX(ctx context.Context) int
- func (s *OAuthRefreshTokenGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *OAuthRefreshTokenGroupBy) IntsX(ctx context.Context) []int
- func (_g *OAuthRefreshTokenGroupBy) Scan(ctx context.Context, v any) error
- func (s *OAuthRefreshTokenGroupBy) ScanX(ctx context.Context, v any)
- func (s *OAuthRefreshTokenGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *OAuthRefreshTokenGroupBy) StringX(ctx context.Context) string
- func (s *OAuthRefreshTokenGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *OAuthRefreshTokenGroupBy) StringsX(ctx context.Context) []string
- type OAuthRefreshTokenMutation
- func (m *OAuthRefreshTokenMutation) Active() (r bool, exists bool)
- func (m *OAuthRefreshTokenMutation) AddField(name string, value ent.Value) error
- func (m *OAuthRefreshTokenMutation) AddUserID(i int)
- func (m *OAuthRefreshTokenMutation) AddedEdges() []string
- func (m *OAuthRefreshTokenMutation) AddedField(name string) (ent.Value, bool)
- func (m *OAuthRefreshTokenMutation) AddedFields() []string
- func (m *OAuthRefreshTokenMutation) AddedIDs(name string) []ent.Value
- func (m *OAuthRefreshTokenMutation) AddedUserID() (r int, exists bool)
- func (m *OAuthRefreshTokenMutation) ClearEdge(name string) error
- func (m *OAuthRefreshTokenMutation) ClearExpiresAt()
- func (m *OAuthRefreshTokenMutation) ClearField(name string) error
- func (m *OAuthRefreshTokenMutation) ClearRequestedAt()
- func (m *OAuthRefreshTokenMutation) ClearUserID()
- func (m *OAuthRefreshTokenMutation) ClearedEdges() []string
- func (m *OAuthRefreshTokenMutation) ClearedFields() []string
- func (m OAuthRefreshTokenMutation) Client() *Client
- func (m *OAuthRefreshTokenMutation) ClientID() (r string, exists bool)
- func (m *OAuthRefreshTokenMutation) EdgeCleared(name string) bool
- func (m *OAuthRefreshTokenMutation) ExpiresAt() (r time.Time, exists bool)
- func (m *OAuthRefreshTokenMutation) ExpiresAtCleared() bool
- func (m *OAuthRefreshTokenMutation) Field(name string) (ent.Value, bool)
- func (m *OAuthRefreshTokenMutation) FieldCleared(name string) bool
- func (m *OAuthRefreshTokenMutation) Fields() []string
- func (m *OAuthRefreshTokenMutation) ID() (id int, exists bool)
- func (m *OAuthRefreshTokenMutation) IDs(ctx context.Context) ([]int, error)
- func (m *OAuthRefreshTokenMutation) OldActive(ctx context.Context) (v bool, err error)
- func (m *OAuthRefreshTokenMutation) OldClientID(ctx context.Context) (v string, err error)
- func (m *OAuthRefreshTokenMutation) OldExpiresAt(ctx context.Context) (v *time.Time, err error)
- func (m *OAuthRefreshTokenMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OAuthRefreshTokenMutation) OldRequestID(ctx context.Context) (v string, err error)
- func (m *OAuthRefreshTokenMutation) OldRequestedAt(ctx context.Context) (v *time.Time, err error)
- func (m *OAuthRefreshTokenMutation) OldScopes(ctx context.Context) (v string, err error)
- func (m *OAuthRefreshTokenMutation) OldSessionData(ctx context.Context) (v map[string]interface{}, err error)
- func (m *OAuthRefreshTokenMutation) OldSessionType(ctx context.Context) (v string, err error)
- func (m *OAuthRefreshTokenMutation) OldSignature(ctx context.Context) (v string, err error)
- func (m *OAuthRefreshTokenMutation) OldUserID(ctx context.Context) (v *int, err error)
- func (m *OAuthRefreshTokenMutation) Op() Op
- func (m *OAuthRefreshTokenMutation) RemovedEdges() []string
- func (m *OAuthRefreshTokenMutation) RemovedIDs(name string) []ent.Value
- func (m *OAuthRefreshTokenMutation) RequestID() (r string, exists bool)
- func (m *OAuthRefreshTokenMutation) RequestedAt() (r time.Time, exists bool)
- func (m *OAuthRefreshTokenMutation) RequestedAtCleared() bool
- func (m *OAuthRefreshTokenMutation) ResetActive()
- func (m *OAuthRefreshTokenMutation) ResetClientID()
- func (m *OAuthRefreshTokenMutation) ResetEdge(name string) error
- func (m *OAuthRefreshTokenMutation) ResetExpiresAt()
- func (m *OAuthRefreshTokenMutation) ResetField(name string) error
- func (m *OAuthRefreshTokenMutation) ResetRequestID()
- func (m *OAuthRefreshTokenMutation) ResetRequestedAt()
- func (m *OAuthRefreshTokenMutation) ResetScopes()
- func (m *OAuthRefreshTokenMutation) ResetSessionData()
- func (m *OAuthRefreshTokenMutation) ResetSessionType()
- func (m *OAuthRefreshTokenMutation) ResetSignature()
- func (m *OAuthRefreshTokenMutation) ResetUserID()
- func (m *OAuthRefreshTokenMutation) Scopes() (r string, exists bool)
- func (m *OAuthRefreshTokenMutation) SessionData() (r map[string]interface{}, exists bool)
- func (m *OAuthRefreshTokenMutation) SessionType() (r string, exists bool)
- func (m *OAuthRefreshTokenMutation) SetActive(b bool)
- func (m *OAuthRefreshTokenMutation) SetClientID(s string)
- func (m *OAuthRefreshTokenMutation) SetExpiresAt(t time.Time)
- func (m *OAuthRefreshTokenMutation) SetField(name string, value ent.Value) error
- func (m *OAuthRefreshTokenMutation) SetOp(op Op)
- func (m *OAuthRefreshTokenMutation) SetRequestID(s string)
- func (m *OAuthRefreshTokenMutation) SetRequestedAt(t time.Time)
- func (m *OAuthRefreshTokenMutation) SetScopes(s string)
- func (m *OAuthRefreshTokenMutation) SetSessionData(value map[string]interface{})
- func (m *OAuthRefreshTokenMutation) SetSessionType(s string)
- func (m *OAuthRefreshTokenMutation) SetSignature(s string)
- func (m *OAuthRefreshTokenMutation) SetUserID(i int)
- func (m *OAuthRefreshTokenMutation) Signature() (r string, exists bool)
- func (m OAuthRefreshTokenMutation) Tx() (*Tx, error)
- func (m *OAuthRefreshTokenMutation) Type() string
- func (m *OAuthRefreshTokenMutation) UserID() (r int, exists bool)
- func (m *OAuthRefreshTokenMutation) UserIDCleared() bool
- func (m *OAuthRefreshTokenMutation) Where(ps ...predicate.OAuthRefreshToken)
- func (m *OAuthRefreshTokenMutation) WhereP(ps ...func(*sql.Selector))
- type OAuthRefreshTokenQuery
- func (_q *OAuthRefreshTokenQuery) Aggregate(fns ...AggregateFunc) *OAuthRefreshTokenSelect
- func (_q *OAuthRefreshTokenQuery) All(ctx context.Context) ([]*OAuthRefreshToken, error)
- func (_q *OAuthRefreshTokenQuery) AllX(ctx context.Context) []*OAuthRefreshToken
- func (_q *OAuthRefreshTokenQuery) Clone() *OAuthRefreshTokenQuery
- func (_q *OAuthRefreshTokenQuery) Count(ctx context.Context) (int, error)
- func (_q *OAuthRefreshTokenQuery) CountX(ctx context.Context) int
- func (_q *OAuthRefreshTokenQuery) Exist(ctx context.Context) (bool, error)
- func (_q *OAuthRefreshTokenQuery) ExistX(ctx context.Context) bool
- func (_q *OAuthRefreshTokenQuery) First(ctx context.Context) (*OAuthRefreshToken, error)
- func (_q *OAuthRefreshTokenQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *OAuthRefreshTokenQuery) FirstIDX(ctx context.Context) int
- func (_q *OAuthRefreshTokenQuery) FirstX(ctx context.Context) *OAuthRefreshToken
- func (_q *OAuthRefreshTokenQuery) GroupBy(field string, fields ...string) *OAuthRefreshTokenGroupBy
- func (_q *OAuthRefreshTokenQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *OAuthRefreshTokenQuery) IDsX(ctx context.Context) []int
- func (_q *OAuthRefreshTokenQuery) Limit(limit int) *OAuthRefreshTokenQuery
- func (_q *OAuthRefreshTokenQuery) Offset(offset int) *OAuthRefreshTokenQuery
- func (_q *OAuthRefreshTokenQuery) Only(ctx context.Context) (*OAuthRefreshToken, error)
- func (_q *OAuthRefreshTokenQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *OAuthRefreshTokenQuery) OnlyIDX(ctx context.Context) int
- func (_q *OAuthRefreshTokenQuery) OnlyX(ctx context.Context) *OAuthRefreshToken
- func (_q *OAuthRefreshTokenQuery) Order(o ...oauthrefreshtoken.OrderOption) *OAuthRefreshTokenQuery
- func (_q *OAuthRefreshTokenQuery) Select(fields ...string) *OAuthRefreshTokenSelect
- func (_q *OAuthRefreshTokenQuery) Unique(unique bool) *OAuthRefreshTokenQuery
- func (_q *OAuthRefreshTokenQuery) Where(ps ...predicate.OAuthRefreshToken) *OAuthRefreshTokenQuery
- type OAuthRefreshTokenSelect
- func (_s *OAuthRefreshTokenSelect) Aggregate(fns ...AggregateFunc) *OAuthRefreshTokenSelect
- func (s *OAuthRefreshTokenSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *OAuthRefreshTokenSelect) BoolX(ctx context.Context) bool
- func (s *OAuthRefreshTokenSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *OAuthRefreshTokenSelect) BoolsX(ctx context.Context) []bool
- func (s *OAuthRefreshTokenSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *OAuthRefreshTokenSelect) Float64X(ctx context.Context) float64
- func (s *OAuthRefreshTokenSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *OAuthRefreshTokenSelect) Float64sX(ctx context.Context) []float64
- func (s *OAuthRefreshTokenSelect) Int(ctx context.Context) (_ int, err error)
- func (s *OAuthRefreshTokenSelect) IntX(ctx context.Context) int
- func (s *OAuthRefreshTokenSelect) Ints(ctx context.Context) ([]int, error)
- func (s *OAuthRefreshTokenSelect) IntsX(ctx context.Context) []int
- func (_s *OAuthRefreshTokenSelect) Scan(ctx context.Context, v any) error
- func (s *OAuthRefreshTokenSelect) ScanX(ctx context.Context, v any)
- func (s *OAuthRefreshTokenSelect) String(ctx context.Context) (_ string, err error)
- func (s *OAuthRefreshTokenSelect) StringX(ctx context.Context) string
- func (s *OAuthRefreshTokenSelect) Strings(ctx context.Context) ([]string, error)
- func (s *OAuthRefreshTokenSelect) StringsX(ctx context.Context) []string
- type OAuthRefreshTokenUpdate
- func (_u *OAuthRefreshTokenUpdate) AddUserID(v int) *OAuthRefreshTokenUpdate
- func (_u *OAuthRefreshTokenUpdate) ClearExpiresAt() *OAuthRefreshTokenUpdate
- func (_u *OAuthRefreshTokenUpdate) ClearRequestedAt() *OAuthRefreshTokenUpdate
- func (_u *OAuthRefreshTokenUpdate) ClearUserID() *OAuthRefreshTokenUpdate
- func (_u *OAuthRefreshTokenUpdate) Exec(ctx context.Context) error
- func (_u *OAuthRefreshTokenUpdate) ExecX(ctx context.Context)
- func (_u *OAuthRefreshTokenUpdate) Mutation() *OAuthRefreshTokenMutation
- func (_u *OAuthRefreshTokenUpdate) Save(ctx context.Context) (int, error)
- func (_u *OAuthRefreshTokenUpdate) SaveX(ctx context.Context) int
- func (_u *OAuthRefreshTokenUpdate) SetActive(v bool) *OAuthRefreshTokenUpdate
- func (_u *OAuthRefreshTokenUpdate) SetClientID(v string) *OAuthRefreshTokenUpdate
- func (_u *OAuthRefreshTokenUpdate) SetExpiresAt(v time.Time) *OAuthRefreshTokenUpdate
- func (_u *OAuthRefreshTokenUpdate) SetNillableActive(v *bool) *OAuthRefreshTokenUpdate
- func (_u *OAuthRefreshTokenUpdate) SetNillableClientID(v *string) *OAuthRefreshTokenUpdate
- func (_u *OAuthRefreshTokenUpdate) SetNillableExpiresAt(v *time.Time) *OAuthRefreshTokenUpdate
- func (_u *OAuthRefreshTokenUpdate) SetNillableRequestID(v *string) *OAuthRefreshTokenUpdate
- func (_u *OAuthRefreshTokenUpdate) SetNillableRequestedAt(v *time.Time) *OAuthRefreshTokenUpdate
- func (_u *OAuthRefreshTokenUpdate) SetNillableScopes(v *string) *OAuthRefreshTokenUpdate
- func (_u *OAuthRefreshTokenUpdate) SetNillableSessionType(v *string) *OAuthRefreshTokenUpdate
- func (_u *OAuthRefreshTokenUpdate) SetNillableSignature(v *string) *OAuthRefreshTokenUpdate
- func (_u *OAuthRefreshTokenUpdate) SetNillableUserID(v *int) *OAuthRefreshTokenUpdate
- func (_u *OAuthRefreshTokenUpdate) SetRequestID(v string) *OAuthRefreshTokenUpdate
- func (_u *OAuthRefreshTokenUpdate) SetRequestedAt(v time.Time) *OAuthRefreshTokenUpdate
- func (_u *OAuthRefreshTokenUpdate) SetScopes(v string) *OAuthRefreshTokenUpdate
- func (_u *OAuthRefreshTokenUpdate) SetSessionData(v map[string]interface{}) *OAuthRefreshTokenUpdate
- func (_u *OAuthRefreshTokenUpdate) SetSessionType(v string) *OAuthRefreshTokenUpdate
- func (_u *OAuthRefreshTokenUpdate) SetSignature(v string) *OAuthRefreshTokenUpdate
- func (_u *OAuthRefreshTokenUpdate) SetUserID(v int) *OAuthRefreshTokenUpdate
- func (_u *OAuthRefreshTokenUpdate) Where(ps ...predicate.OAuthRefreshToken) *OAuthRefreshTokenUpdate
- type OAuthRefreshTokenUpdateOne
- func (_u *OAuthRefreshTokenUpdateOne) AddUserID(v int) *OAuthRefreshTokenUpdateOne
- func (_u *OAuthRefreshTokenUpdateOne) ClearExpiresAt() *OAuthRefreshTokenUpdateOne
- func (_u *OAuthRefreshTokenUpdateOne) ClearRequestedAt() *OAuthRefreshTokenUpdateOne
- func (_u *OAuthRefreshTokenUpdateOne) ClearUserID() *OAuthRefreshTokenUpdateOne
- func (_u *OAuthRefreshTokenUpdateOne) Exec(ctx context.Context) error
- func (_u *OAuthRefreshTokenUpdateOne) ExecX(ctx context.Context)
- func (_u *OAuthRefreshTokenUpdateOne) Mutation() *OAuthRefreshTokenMutation
- func (_u *OAuthRefreshTokenUpdateOne) Save(ctx context.Context) (*OAuthRefreshToken, error)
- func (_u *OAuthRefreshTokenUpdateOne) SaveX(ctx context.Context) *OAuthRefreshToken
- func (_u *OAuthRefreshTokenUpdateOne) Select(field string, fields ...string) *OAuthRefreshTokenUpdateOne
- func (_u *OAuthRefreshTokenUpdateOne) SetActive(v bool) *OAuthRefreshTokenUpdateOne
- func (_u *OAuthRefreshTokenUpdateOne) SetClientID(v string) *OAuthRefreshTokenUpdateOne
- func (_u *OAuthRefreshTokenUpdateOne) SetExpiresAt(v time.Time) *OAuthRefreshTokenUpdateOne
- func (_u *OAuthRefreshTokenUpdateOne) SetNillableActive(v *bool) *OAuthRefreshTokenUpdateOne
- func (_u *OAuthRefreshTokenUpdateOne) SetNillableClientID(v *string) *OAuthRefreshTokenUpdateOne
- func (_u *OAuthRefreshTokenUpdateOne) SetNillableExpiresAt(v *time.Time) *OAuthRefreshTokenUpdateOne
- func (_u *OAuthRefreshTokenUpdateOne) SetNillableRequestID(v *string) *OAuthRefreshTokenUpdateOne
- func (_u *OAuthRefreshTokenUpdateOne) SetNillableRequestedAt(v *time.Time) *OAuthRefreshTokenUpdateOne
- func (_u *OAuthRefreshTokenUpdateOne) SetNillableScopes(v *string) *OAuthRefreshTokenUpdateOne
- func (_u *OAuthRefreshTokenUpdateOne) SetNillableSessionType(v *string) *OAuthRefreshTokenUpdateOne
- func (_u *OAuthRefreshTokenUpdateOne) SetNillableSignature(v *string) *OAuthRefreshTokenUpdateOne
- func (_u *OAuthRefreshTokenUpdateOne) SetNillableUserID(v *int) *OAuthRefreshTokenUpdateOne
- func (_u *OAuthRefreshTokenUpdateOne) SetRequestID(v string) *OAuthRefreshTokenUpdateOne
- func (_u *OAuthRefreshTokenUpdateOne) SetRequestedAt(v time.Time) *OAuthRefreshTokenUpdateOne
- func (_u *OAuthRefreshTokenUpdateOne) SetScopes(v string) *OAuthRefreshTokenUpdateOne
- func (_u *OAuthRefreshTokenUpdateOne) SetSessionData(v map[string]interface{}) *OAuthRefreshTokenUpdateOne
- func (_u *OAuthRefreshTokenUpdateOne) SetSessionType(v string) *OAuthRefreshTokenUpdateOne
- func (_u *OAuthRefreshTokenUpdateOne) SetSignature(v string) *OAuthRefreshTokenUpdateOne
- func (_u *OAuthRefreshTokenUpdateOne) SetUserID(v int) *OAuthRefreshTokenUpdateOne
- func (_u *OAuthRefreshTokenUpdateOne) Where(ps ...predicate.OAuthRefreshToken) *OAuthRefreshTokenUpdateOne
- type OAuthRefreshTokens
- type OAuthSigningKey
- type OAuthSigningKeyClient
- func (c *OAuthSigningKeyClient) Create() *OAuthSigningKeyCreate
- func (c *OAuthSigningKeyClient) CreateBulk(builders ...*OAuthSigningKeyCreate) *OAuthSigningKeyCreateBulk
- func (c *OAuthSigningKeyClient) Delete() *OAuthSigningKeyDelete
- func (c *OAuthSigningKeyClient) DeleteOne(_m *OAuthSigningKey) *OAuthSigningKeyDeleteOne
- func (c *OAuthSigningKeyClient) DeleteOneID(id int) *OAuthSigningKeyDeleteOne
- func (c *OAuthSigningKeyClient) Get(ctx context.Context, id int) (*OAuthSigningKey, error)
- func (c *OAuthSigningKeyClient) GetX(ctx context.Context, id int) *OAuthSigningKey
- func (c *OAuthSigningKeyClient) Hooks() []Hook
- func (c *OAuthSigningKeyClient) Intercept(interceptors ...Interceptor)
- func (c *OAuthSigningKeyClient) Interceptors() []Interceptor
- func (c *OAuthSigningKeyClient) MapCreateBulk(slice any, setFunc func(*OAuthSigningKeyCreate, int)) *OAuthSigningKeyCreateBulk
- func (c *OAuthSigningKeyClient) Query() *OAuthSigningKeyQuery
- func (c *OAuthSigningKeyClient) Update() *OAuthSigningKeyUpdate
- func (c *OAuthSigningKeyClient) UpdateOne(_m *OAuthSigningKey) *OAuthSigningKeyUpdateOne
- func (c *OAuthSigningKeyClient) UpdateOneID(id int) *OAuthSigningKeyUpdateOne
- func (c *OAuthSigningKeyClient) Use(hooks ...Hook)
- type OAuthSigningKeyCreate
- func (_c *OAuthSigningKeyCreate) Exec(ctx context.Context) error
- func (_c *OAuthSigningKeyCreate) ExecX(ctx context.Context)
- func (_c *OAuthSigningKeyCreate) Mutation() *OAuthSigningKeyMutation
- func (_c *OAuthSigningKeyCreate) Save(ctx context.Context) (*OAuthSigningKey, error)
- func (_c *OAuthSigningKeyCreate) SaveX(ctx context.Context) *OAuthSigningKey
- func (_c *OAuthSigningKeyCreate) SetAlgorithm(v string) *OAuthSigningKeyCreate
- func (_c *OAuthSigningKeyCreate) SetExpiresAt(v time.Time) *OAuthSigningKeyCreate
- func (_c *OAuthSigningKeyCreate) SetIsActive(v bool) *OAuthSigningKeyCreate
- func (_c *OAuthSigningKeyCreate) SetKid(v string) *OAuthSigningKeyCreate
- func (_c *OAuthSigningKeyCreate) SetNillableAlgorithm(v *string) *OAuthSigningKeyCreate
- func (_c *OAuthSigningKeyCreate) SetNillableExpiresAt(v *time.Time) *OAuthSigningKeyCreate
- func (_c *OAuthSigningKeyCreate) SetNillableIsActive(v *bool) *OAuthSigningKeyCreate
- func (_c *OAuthSigningKeyCreate) SetNillableRetiredAt(v *time.Time) *OAuthSigningKeyCreate
- func (_c *OAuthSigningKeyCreate) SetPrivateKeyPem(v string) *OAuthSigningKeyCreate
- func (_c *OAuthSigningKeyCreate) SetPublicKeyPem(v string) *OAuthSigningKeyCreate
- func (_c *OAuthSigningKeyCreate) SetRetiredAt(v time.Time) *OAuthSigningKeyCreate
- type OAuthSigningKeyCreateBulk
- func (_c *OAuthSigningKeyCreateBulk) Exec(ctx context.Context) error
- func (_c *OAuthSigningKeyCreateBulk) ExecX(ctx context.Context)
- func (_c *OAuthSigningKeyCreateBulk) Save(ctx context.Context) ([]*OAuthSigningKey, error)
- func (_c *OAuthSigningKeyCreateBulk) SaveX(ctx context.Context) []*OAuthSigningKey
- type OAuthSigningKeyDelete
- type OAuthSigningKeyDeleteOne
- type OAuthSigningKeyGroupBy
- func (_g *OAuthSigningKeyGroupBy) Aggregate(fns ...AggregateFunc) *OAuthSigningKeyGroupBy
- func (s *OAuthSigningKeyGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *OAuthSigningKeyGroupBy) BoolX(ctx context.Context) bool
- func (s *OAuthSigningKeyGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *OAuthSigningKeyGroupBy) BoolsX(ctx context.Context) []bool
- func (s *OAuthSigningKeyGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *OAuthSigningKeyGroupBy) Float64X(ctx context.Context) float64
- func (s *OAuthSigningKeyGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *OAuthSigningKeyGroupBy) Float64sX(ctx context.Context) []float64
- func (s *OAuthSigningKeyGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *OAuthSigningKeyGroupBy) IntX(ctx context.Context) int
- func (s *OAuthSigningKeyGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *OAuthSigningKeyGroupBy) IntsX(ctx context.Context) []int
- func (_g *OAuthSigningKeyGroupBy) Scan(ctx context.Context, v any) error
- func (s *OAuthSigningKeyGroupBy) ScanX(ctx context.Context, v any)
- func (s *OAuthSigningKeyGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *OAuthSigningKeyGroupBy) StringX(ctx context.Context) string
- func (s *OAuthSigningKeyGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *OAuthSigningKeyGroupBy) StringsX(ctx context.Context) []string
- type OAuthSigningKeyMutation
- func (m *OAuthSigningKeyMutation) AddField(name string, value ent.Value) error
- func (m *OAuthSigningKeyMutation) AddedEdges() []string
- func (m *OAuthSigningKeyMutation) AddedField(name string) (ent.Value, bool)
- func (m *OAuthSigningKeyMutation) AddedFields() []string
- func (m *OAuthSigningKeyMutation) AddedIDs(name string) []ent.Value
- func (m *OAuthSigningKeyMutation) Algorithm() (r string, exists bool)
- func (m *OAuthSigningKeyMutation) ClearEdge(name string) error
- func (m *OAuthSigningKeyMutation) ClearExpiresAt()
- func (m *OAuthSigningKeyMutation) ClearField(name string) error
- func (m *OAuthSigningKeyMutation) ClearRetiredAt()
- func (m *OAuthSigningKeyMutation) ClearedEdges() []string
- func (m *OAuthSigningKeyMutation) ClearedFields() []string
- func (m OAuthSigningKeyMutation) Client() *Client
- func (m *OAuthSigningKeyMutation) EdgeCleared(name string) bool
- func (m *OAuthSigningKeyMutation) ExpiresAt() (r time.Time, exists bool)
- func (m *OAuthSigningKeyMutation) ExpiresAtCleared() bool
- func (m *OAuthSigningKeyMutation) Field(name string) (ent.Value, bool)
- func (m *OAuthSigningKeyMutation) FieldCleared(name string) bool
- func (m *OAuthSigningKeyMutation) Fields() []string
- func (m *OAuthSigningKeyMutation) ID() (id int, exists bool)
- func (m *OAuthSigningKeyMutation) IDs(ctx context.Context) ([]int, error)
- func (m *OAuthSigningKeyMutation) IsActive() (r bool, exists bool)
- func (m *OAuthSigningKeyMutation) Kid() (r string, exists bool)
- func (m *OAuthSigningKeyMutation) OldAlgorithm(ctx context.Context) (v string, err error)
- func (m *OAuthSigningKeyMutation) OldExpiresAt(ctx context.Context) (v *time.Time, err error)
- func (m *OAuthSigningKeyMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OAuthSigningKeyMutation) OldIsActive(ctx context.Context) (v bool, err error)
- func (m *OAuthSigningKeyMutation) OldKid(ctx context.Context) (v string, err error)
- func (m *OAuthSigningKeyMutation) OldPrivateKeyPem(ctx context.Context) (v string, err error)
- func (m *OAuthSigningKeyMutation) OldPublicKeyPem(ctx context.Context) (v string, err error)
- func (m *OAuthSigningKeyMutation) OldRetiredAt(ctx context.Context) (v *time.Time, err error)
- func (m *OAuthSigningKeyMutation) Op() Op
- func (m *OAuthSigningKeyMutation) PrivateKeyPem() (r string, exists bool)
- func (m *OAuthSigningKeyMutation) PublicKeyPem() (r string, exists bool)
- func (m *OAuthSigningKeyMutation) RemovedEdges() []string
- func (m *OAuthSigningKeyMutation) RemovedIDs(name string) []ent.Value
- func (m *OAuthSigningKeyMutation) ResetAlgorithm()
- func (m *OAuthSigningKeyMutation) ResetEdge(name string) error
- func (m *OAuthSigningKeyMutation) ResetExpiresAt()
- func (m *OAuthSigningKeyMutation) ResetField(name string) error
- func (m *OAuthSigningKeyMutation) ResetIsActive()
- func (m *OAuthSigningKeyMutation) ResetKid()
- func (m *OAuthSigningKeyMutation) ResetPrivateKeyPem()
- func (m *OAuthSigningKeyMutation) ResetPublicKeyPem()
- func (m *OAuthSigningKeyMutation) ResetRetiredAt()
- func (m *OAuthSigningKeyMutation) RetiredAt() (r time.Time, exists bool)
- func (m *OAuthSigningKeyMutation) RetiredAtCleared() bool
- func (m *OAuthSigningKeyMutation) SetAlgorithm(s string)
- func (m *OAuthSigningKeyMutation) SetExpiresAt(t time.Time)
- func (m *OAuthSigningKeyMutation) SetField(name string, value ent.Value) error
- func (m *OAuthSigningKeyMutation) SetIsActive(b bool)
- func (m *OAuthSigningKeyMutation) SetKid(s string)
- func (m *OAuthSigningKeyMutation) SetOp(op Op)
- func (m *OAuthSigningKeyMutation) SetPrivateKeyPem(s string)
- func (m *OAuthSigningKeyMutation) SetPublicKeyPem(s string)
- func (m *OAuthSigningKeyMutation) SetRetiredAt(t time.Time)
- func (m OAuthSigningKeyMutation) Tx() (*Tx, error)
- func (m *OAuthSigningKeyMutation) Type() string
- func (m *OAuthSigningKeyMutation) Where(ps ...predicate.OAuthSigningKey)
- func (m *OAuthSigningKeyMutation) WhereP(ps ...func(*sql.Selector))
- type OAuthSigningKeyQuery
- func (_q *OAuthSigningKeyQuery) Aggregate(fns ...AggregateFunc) *OAuthSigningKeySelect
- func (_q *OAuthSigningKeyQuery) All(ctx context.Context) ([]*OAuthSigningKey, error)
- func (_q *OAuthSigningKeyQuery) AllX(ctx context.Context) []*OAuthSigningKey
- func (_q *OAuthSigningKeyQuery) Clone() *OAuthSigningKeyQuery
- func (_q *OAuthSigningKeyQuery) Count(ctx context.Context) (int, error)
- func (_q *OAuthSigningKeyQuery) CountX(ctx context.Context) int
- func (_q *OAuthSigningKeyQuery) Exist(ctx context.Context) (bool, error)
- func (_q *OAuthSigningKeyQuery) ExistX(ctx context.Context) bool
- func (_q *OAuthSigningKeyQuery) First(ctx context.Context) (*OAuthSigningKey, error)
- func (_q *OAuthSigningKeyQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *OAuthSigningKeyQuery) FirstIDX(ctx context.Context) int
- func (_q *OAuthSigningKeyQuery) FirstX(ctx context.Context) *OAuthSigningKey
- func (_q *OAuthSigningKeyQuery) GroupBy(field string, fields ...string) *OAuthSigningKeyGroupBy
- func (_q *OAuthSigningKeyQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *OAuthSigningKeyQuery) IDsX(ctx context.Context) []int
- func (_q *OAuthSigningKeyQuery) Limit(limit int) *OAuthSigningKeyQuery
- func (_q *OAuthSigningKeyQuery) Offset(offset int) *OAuthSigningKeyQuery
- func (_q *OAuthSigningKeyQuery) Only(ctx context.Context) (*OAuthSigningKey, error)
- func (_q *OAuthSigningKeyQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *OAuthSigningKeyQuery) OnlyIDX(ctx context.Context) int
- func (_q *OAuthSigningKeyQuery) OnlyX(ctx context.Context) *OAuthSigningKey
- func (_q *OAuthSigningKeyQuery) Order(o ...oauthsigningkey.OrderOption) *OAuthSigningKeyQuery
- func (_q *OAuthSigningKeyQuery) Select(fields ...string) *OAuthSigningKeySelect
- func (_q *OAuthSigningKeyQuery) Unique(unique bool) *OAuthSigningKeyQuery
- func (_q *OAuthSigningKeyQuery) Where(ps ...predicate.OAuthSigningKey) *OAuthSigningKeyQuery
- type OAuthSigningKeySelect
- func (_s *OAuthSigningKeySelect) Aggregate(fns ...AggregateFunc) *OAuthSigningKeySelect
- func (s *OAuthSigningKeySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *OAuthSigningKeySelect) BoolX(ctx context.Context) bool
- func (s *OAuthSigningKeySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *OAuthSigningKeySelect) BoolsX(ctx context.Context) []bool
- func (s *OAuthSigningKeySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *OAuthSigningKeySelect) Float64X(ctx context.Context) float64
- func (s *OAuthSigningKeySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *OAuthSigningKeySelect) Float64sX(ctx context.Context) []float64
- func (s *OAuthSigningKeySelect) Int(ctx context.Context) (_ int, err error)
- func (s *OAuthSigningKeySelect) IntX(ctx context.Context) int
- func (s *OAuthSigningKeySelect) Ints(ctx context.Context) ([]int, error)
- func (s *OAuthSigningKeySelect) IntsX(ctx context.Context) []int
- func (_s *OAuthSigningKeySelect) Scan(ctx context.Context, v any) error
- func (s *OAuthSigningKeySelect) ScanX(ctx context.Context, v any)
- func (s *OAuthSigningKeySelect) String(ctx context.Context) (_ string, err error)
- func (s *OAuthSigningKeySelect) StringX(ctx context.Context) string
- func (s *OAuthSigningKeySelect) Strings(ctx context.Context) ([]string, error)
- func (s *OAuthSigningKeySelect) StringsX(ctx context.Context) []string
- type OAuthSigningKeyUpdate
- func (_u *OAuthSigningKeyUpdate) ClearExpiresAt() *OAuthSigningKeyUpdate
- func (_u *OAuthSigningKeyUpdate) ClearRetiredAt() *OAuthSigningKeyUpdate
- func (_u *OAuthSigningKeyUpdate) Exec(ctx context.Context) error
- func (_u *OAuthSigningKeyUpdate) ExecX(ctx context.Context)
- func (_u *OAuthSigningKeyUpdate) Mutation() *OAuthSigningKeyMutation
- func (_u *OAuthSigningKeyUpdate) Save(ctx context.Context) (int, error)
- func (_u *OAuthSigningKeyUpdate) SaveX(ctx context.Context) int
- func (_u *OAuthSigningKeyUpdate) SetAlgorithm(v string) *OAuthSigningKeyUpdate
- func (_u *OAuthSigningKeyUpdate) SetExpiresAt(v time.Time) *OAuthSigningKeyUpdate
- func (_u *OAuthSigningKeyUpdate) SetIsActive(v bool) *OAuthSigningKeyUpdate
- func (_u *OAuthSigningKeyUpdate) SetKid(v string) *OAuthSigningKeyUpdate
- func (_u *OAuthSigningKeyUpdate) SetNillableAlgorithm(v *string) *OAuthSigningKeyUpdate
- func (_u *OAuthSigningKeyUpdate) SetNillableExpiresAt(v *time.Time) *OAuthSigningKeyUpdate
- func (_u *OAuthSigningKeyUpdate) SetNillableIsActive(v *bool) *OAuthSigningKeyUpdate
- func (_u *OAuthSigningKeyUpdate) SetNillableKid(v *string) *OAuthSigningKeyUpdate
- func (_u *OAuthSigningKeyUpdate) SetNillablePrivateKeyPem(v *string) *OAuthSigningKeyUpdate
- func (_u *OAuthSigningKeyUpdate) SetNillablePublicKeyPem(v *string) *OAuthSigningKeyUpdate
- func (_u *OAuthSigningKeyUpdate) SetNillableRetiredAt(v *time.Time) *OAuthSigningKeyUpdate
- func (_u *OAuthSigningKeyUpdate) SetPrivateKeyPem(v string) *OAuthSigningKeyUpdate
- func (_u *OAuthSigningKeyUpdate) SetPublicKeyPem(v string) *OAuthSigningKeyUpdate
- func (_u *OAuthSigningKeyUpdate) SetRetiredAt(v time.Time) *OAuthSigningKeyUpdate
- func (_u *OAuthSigningKeyUpdate) Where(ps ...predicate.OAuthSigningKey) *OAuthSigningKeyUpdate
- type OAuthSigningKeyUpdateOne
- func (_u *OAuthSigningKeyUpdateOne) ClearExpiresAt() *OAuthSigningKeyUpdateOne
- func (_u *OAuthSigningKeyUpdateOne) ClearRetiredAt() *OAuthSigningKeyUpdateOne
- func (_u *OAuthSigningKeyUpdateOne) Exec(ctx context.Context) error
- func (_u *OAuthSigningKeyUpdateOne) ExecX(ctx context.Context)
- func (_u *OAuthSigningKeyUpdateOne) Mutation() *OAuthSigningKeyMutation
- func (_u *OAuthSigningKeyUpdateOne) Save(ctx context.Context) (*OAuthSigningKey, error)
- func (_u *OAuthSigningKeyUpdateOne) SaveX(ctx context.Context) *OAuthSigningKey
- func (_u *OAuthSigningKeyUpdateOne) Select(field string, fields ...string) *OAuthSigningKeyUpdateOne
- func (_u *OAuthSigningKeyUpdateOne) SetAlgorithm(v string) *OAuthSigningKeyUpdateOne
- func (_u *OAuthSigningKeyUpdateOne) SetExpiresAt(v time.Time) *OAuthSigningKeyUpdateOne
- func (_u *OAuthSigningKeyUpdateOne) SetIsActive(v bool) *OAuthSigningKeyUpdateOne
- func (_u *OAuthSigningKeyUpdateOne) SetKid(v string) *OAuthSigningKeyUpdateOne
- func (_u *OAuthSigningKeyUpdateOne) SetNillableAlgorithm(v *string) *OAuthSigningKeyUpdateOne
- func (_u *OAuthSigningKeyUpdateOne) SetNillableExpiresAt(v *time.Time) *OAuthSigningKeyUpdateOne
- func (_u *OAuthSigningKeyUpdateOne) SetNillableIsActive(v *bool) *OAuthSigningKeyUpdateOne
- func (_u *OAuthSigningKeyUpdateOne) SetNillableKid(v *string) *OAuthSigningKeyUpdateOne
- func (_u *OAuthSigningKeyUpdateOne) SetNillablePrivateKeyPem(v *string) *OAuthSigningKeyUpdateOne
- func (_u *OAuthSigningKeyUpdateOne) SetNillablePublicKeyPem(v *string) *OAuthSigningKeyUpdateOne
- func (_u *OAuthSigningKeyUpdateOne) SetNillableRetiredAt(v *time.Time) *OAuthSigningKeyUpdateOne
- func (_u *OAuthSigningKeyUpdateOne) SetPrivateKeyPem(v string) *OAuthSigningKeyUpdateOne
- func (_u *OAuthSigningKeyUpdateOne) SetPublicKeyPem(v string) *OAuthSigningKeyUpdateOne
- func (_u *OAuthSigningKeyUpdateOne) SetRetiredAt(v time.Time) *OAuthSigningKeyUpdateOne
- func (_u *OAuthSigningKeyUpdateOne) Where(ps ...predicate.OAuthSigningKey) *OAuthSigningKeyUpdateOne
- type OAuthSigningKeys
- type Op
- type Option
- type OrderFunc
- type PersonalAccessToken
- type PersonalAccessTokenClient
- func (c *PersonalAccessTokenClient) Create() *PersonalAccessTokenCreate
- func (c *PersonalAccessTokenClient) CreateBulk(builders ...*PersonalAccessTokenCreate) *PersonalAccessTokenCreateBulk
- func (c *PersonalAccessTokenClient) Delete() *PersonalAccessTokenDelete
- func (c *PersonalAccessTokenClient) DeleteOne(_m *PersonalAccessToken) *PersonalAccessTokenDeleteOne
- func (c *PersonalAccessTokenClient) DeleteOneID(id int) *PersonalAccessTokenDeleteOne
- func (c *PersonalAccessTokenClient) Get(ctx context.Context, id int) (*PersonalAccessToken, error)
- func (c *PersonalAccessTokenClient) GetX(ctx context.Context, id int) *PersonalAccessToken
- func (c *PersonalAccessTokenClient) Hooks() []Hook
- func (c *PersonalAccessTokenClient) Intercept(interceptors ...Interceptor)
- func (c *PersonalAccessTokenClient) Interceptors() []Interceptor
- func (c *PersonalAccessTokenClient) MapCreateBulk(slice any, setFunc func(*PersonalAccessTokenCreate, int)) *PersonalAccessTokenCreateBulk
- func (c *PersonalAccessTokenClient) Query() *PersonalAccessTokenQuery
- func (c *PersonalAccessTokenClient) Update() *PersonalAccessTokenUpdate
- func (c *PersonalAccessTokenClient) UpdateOne(_m *PersonalAccessToken) *PersonalAccessTokenUpdateOne
- func (c *PersonalAccessTokenClient) UpdateOneID(id int) *PersonalAccessTokenUpdateOne
- func (c *PersonalAccessTokenClient) Use(hooks ...Hook)
- type PersonalAccessTokenCreate
- func (_c *PersonalAccessTokenCreate) Exec(ctx context.Context) error
- func (_c *PersonalAccessTokenCreate) ExecX(ctx context.Context)
- func (_c *PersonalAccessTokenCreate) Mutation() *PersonalAccessTokenMutation
- func (_c *PersonalAccessTokenCreate) Save(ctx context.Context) (*PersonalAccessToken, error)
- func (_c *PersonalAccessTokenCreate) SaveX(ctx context.Context) *PersonalAccessToken
- func (_c *PersonalAccessTokenCreate) SetExpiresAt(v time.Time) *PersonalAccessTokenCreate
- func (_c *PersonalAccessTokenCreate) SetLastUsedAt(v time.Time) *PersonalAccessTokenCreate
- func (_c *PersonalAccessTokenCreate) SetName(v string) *PersonalAccessTokenCreate
- func (_c *PersonalAccessTokenCreate) SetNillableExpiresAt(v *time.Time) *PersonalAccessTokenCreate
- func (_c *PersonalAccessTokenCreate) SetNillableLastUsedAt(v *time.Time) *PersonalAccessTokenCreate
- func (_c *PersonalAccessTokenCreate) SetTokenHash(v string) *PersonalAccessTokenCreate
- func (_c *PersonalAccessTokenCreate) SetTokenPrefix(v string) *PersonalAccessTokenCreate
- func (_c *PersonalAccessTokenCreate) SetUserID(v int) *PersonalAccessTokenCreate
- type PersonalAccessTokenCreateBulk
- func (_c *PersonalAccessTokenCreateBulk) Exec(ctx context.Context) error
- func (_c *PersonalAccessTokenCreateBulk) ExecX(ctx context.Context)
- func (_c *PersonalAccessTokenCreateBulk) Save(ctx context.Context) ([]*PersonalAccessToken, error)
- func (_c *PersonalAccessTokenCreateBulk) SaveX(ctx context.Context) []*PersonalAccessToken
- type PersonalAccessTokenDelete
- type PersonalAccessTokenDeleteOne
- type PersonalAccessTokenGroupBy
- func (_g *PersonalAccessTokenGroupBy) Aggregate(fns ...AggregateFunc) *PersonalAccessTokenGroupBy
- func (s *PersonalAccessTokenGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PersonalAccessTokenGroupBy) BoolX(ctx context.Context) bool
- func (s *PersonalAccessTokenGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PersonalAccessTokenGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PersonalAccessTokenGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PersonalAccessTokenGroupBy) Float64X(ctx context.Context) float64
- func (s *PersonalAccessTokenGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PersonalAccessTokenGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PersonalAccessTokenGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PersonalAccessTokenGroupBy) IntX(ctx context.Context) int
- func (s *PersonalAccessTokenGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PersonalAccessTokenGroupBy) IntsX(ctx context.Context) []int
- func (_g *PersonalAccessTokenGroupBy) Scan(ctx context.Context, v any) error
- func (s *PersonalAccessTokenGroupBy) ScanX(ctx context.Context, v any)
- func (s *PersonalAccessTokenGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PersonalAccessTokenGroupBy) StringX(ctx context.Context) string
- func (s *PersonalAccessTokenGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PersonalAccessTokenGroupBy) StringsX(ctx context.Context) []string
- type PersonalAccessTokenMutation
- func (m *PersonalAccessTokenMutation) AddField(name string, value ent.Value) error
- func (m *PersonalAccessTokenMutation) AddUserID(i int)
- func (m *PersonalAccessTokenMutation) AddedEdges() []string
- func (m *PersonalAccessTokenMutation) AddedField(name string) (ent.Value, bool)
- func (m *PersonalAccessTokenMutation) AddedFields() []string
- func (m *PersonalAccessTokenMutation) AddedIDs(name string) []ent.Value
- func (m *PersonalAccessTokenMutation) AddedUserID() (r int, exists bool)
- func (m *PersonalAccessTokenMutation) ClearEdge(name string) error
- func (m *PersonalAccessTokenMutation) ClearExpiresAt()
- func (m *PersonalAccessTokenMutation) ClearField(name string) error
- func (m *PersonalAccessTokenMutation) ClearLastUsedAt()
- func (m *PersonalAccessTokenMutation) ClearedEdges() []string
- func (m *PersonalAccessTokenMutation) ClearedFields() []string
- func (m PersonalAccessTokenMutation) Client() *Client
- func (m *PersonalAccessTokenMutation) EdgeCleared(name string) bool
- func (m *PersonalAccessTokenMutation) ExpiresAt() (r time.Time, exists bool)
- func (m *PersonalAccessTokenMutation) ExpiresAtCleared() bool
- func (m *PersonalAccessTokenMutation) Field(name string) (ent.Value, bool)
- func (m *PersonalAccessTokenMutation) FieldCleared(name string) bool
- func (m *PersonalAccessTokenMutation) Fields() []string
- func (m *PersonalAccessTokenMutation) ID() (id int, exists bool)
- func (m *PersonalAccessTokenMutation) IDs(ctx context.Context) ([]int, error)
- func (m *PersonalAccessTokenMutation) LastUsedAt() (r time.Time, exists bool)
- func (m *PersonalAccessTokenMutation) LastUsedAtCleared() bool
- func (m *PersonalAccessTokenMutation) Name() (r string, exists bool)
- func (m *PersonalAccessTokenMutation) OldExpiresAt(ctx context.Context) (v *time.Time, err error)
- func (m *PersonalAccessTokenMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PersonalAccessTokenMutation) OldLastUsedAt(ctx context.Context) (v *time.Time, err error)
- func (m *PersonalAccessTokenMutation) OldName(ctx context.Context) (v string, err error)
- func (m *PersonalAccessTokenMutation) OldTokenHash(ctx context.Context) (v string, err error)
- func (m *PersonalAccessTokenMutation) OldTokenPrefix(ctx context.Context) (v string, err error)
- func (m *PersonalAccessTokenMutation) OldUserID(ctx context.Context) (v int, err error)
- func (m *PersonalAccessTokenMutation) Op() Op
- func (m *PersonalAccessTokenMutation) RemovedEdges() []string
- func (m *PersonalAccessTokenMutation) RemovedIDs(name string) []ent.Value
- func (m *PersonalAccessTokenMutation) ResetEdge(name string) error
- func (m *PersonalAccessTokenMutation) ResetExpiresAt()
- func (m *PersonalAccessTokenMutation) ResetField(name string) error
- func (m *PersonalAccessTokenMutation) ResetLastUsedAt()
- func (m *PersonalAccessTokenMutation) ResetName()
- func (m *PersonalAccessTokenMutation) ResetTokenHash()
- func (m *PersonalAccessTokenMutation) ResetTokenPrefix()
- func (m *PersonalAccessTokenMutation) ResetUserID()
- func (m *PersonalAccessTokenMutation) SetExpiresAt(t time.Time)
- func (m *PersonalAccessTokenMutation) SetField(name string, value ent.Value) error
- func (m *PersonalAccessTokenMutation) SetLastUsedAt(t time.Time)
- func (m *PersonalAccessTokenMutation) SetName(s string)
- func (m *PersonalAccessTokenMutation) SetOp(op Op)
- func (m *PersonalAccessTokenMutation) SetTokenHash(s string)
- func (m *PersonalAccessTokenMutation) SetTokenPrefix(s string)
- func (m *PersonalAccessTokenMutation) SetUserID(i int)
- func (m *PersonalAccessTokenMutation) TokenHash() (r string, exists bool)
- func (m *PersonalAccessTokenMutation) TokenPrefix() (r string, exists bool)
- func (m PersonalAccessTokenMutation) Tx() (*Tx, error)
- func (m *PersonalAccessTokenMutation) Type() string
- func (m *PersonalAccessTokenMutation) UserID() (r int, exists bool)
- func (m *PersonalAccessTokenMutation) Where(ps ...predicate.PersonalAccessToken)
- func (m *PersonalAccessTokenMutation) WhereP(ps ...func(*sql.Selector))
- type PersonalAccessTokenQuery
- func (_q *PersonalAccessTokenQuery) Aggregate(fns ...AggregateFunc) *PersonalAccessTokenSelect
- func (_q *PersonalAccessTokenQuery) All(ctx context.Context) ([]*PersonalAccessToken, error)
- func (_q *PersonalAccessTokenQuery) AllX(ctx context.Context) []*PersonalAccessToken
- func (_q *PersonalAccessTokenQuery) Clone() *PersonalAccessTokenQuery
- func (_q *PersonalAccessTokenQuery) Count(ctx context.Context) (int, error)
- func (_q *PersonalAccessTokenQuery) CountX(ctx context.Context) int
- func (_q *PersonalAccessTokenQuery) Exist(ctx context.Context) (bool, error)
- func (_q *PersonalAccessTokenQuery) ExistX(ctx context.Context) bool
- func (_q *PersonalAccessTokenQuery) First(ctx context.Context) (*PersonalAccessToken, error)
- func (_q *PersonalAccessTokenQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *PersonalAccessTokenQuery) FirstIDX(ctx context.Context) int
- func (_q *PersonalAccessTokenQuery) FirstX(ctx context.Context) *PersonalAccessToken
- func (_q *PersonalAccessTokenQuery) GroupBy(field string, fields ...string) *PersonalAccessTokenGroupBy
- func (_q *PersonalAccessTokenQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *PersonalAccessTokenQuery) IDsX(ctx context.Context) []int
- func (_q *PersonalAccessTokenQuery) Limit(limit int) *PersonalAccessTokenQuery
- func (_q *PersonalAccessTokenQuery) Offset(offset int) *PersonalAccessTokenQuery
- func (_q *PersonalAccessTokenQuery) Only(ctx context.Context) (*PersonalAccessToken, error)
- func (_q *PersonalAccessTokenQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *PersonalAccessTokenQuery) OnlyIDX(ctx context.Context) int
- func (_q *PersonalAccessTokenQuery) OnlyX(ctx context.Context) *PersonalAccessToken
- func (_q *PersonalAccessTokenQuery) Order(o ...personalaccesstoken.OrderOption) *PersonalAccessTokenQuery
- func (_q *PersonalAccessTokenQuery) Select(fields ...string) *PersonalAccessTokenSelect
- func (_q *PersonalAccessTokenQuery) Unique(unique bool) *PersonalAccessTokenQuery
- func (_q *PersonalAccessTokenQuery) Where(ps ...predicate.PersonalAccessToken) *PersonalAccessTokenQuery
- type PersonalAccessTokenSelect
- func (_s *PersonalAccessTokenSelect) Aggregate(fns ...AggregateFunc) *PersonalAccessTokenSelect
- func (s *PersonalAccessTokenSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PersonalAccessTokenSelect) BoolX(ctx context.Context) bool
- func (s *PersonalAccessTokenSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PersonalAccessTokenSelect) BoolsX(ctx context.Context) []bool
- func (s *PersonalAccessTokenSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PersonalAccessTokenSelect) Float64X(ctx context.Context) float64
- func (s *PersonalAccessTokenSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PersonalAccessTokenSelect) Float64sX(ctx context.Context) []float64
- func (s *PersonalAccessTokenSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PersonalAccessTokenSelect) IntX(ctx context.Context) int
- func (s *PersonalAccessTokenSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PersonalAccessTokenSelect) IntsX(ctx context.Context) []int
- func (_s *PersonalAccessTokenSelect) Scan(ctx context.Context, v any) error
- func (s *PersonalAccessTokenSelect) ScanX(ctx context.Context, v any)
- func (s *PersonalAccessTokenSelect) String(ctx context.Context) (_ string, err error)
- func (s *PersonalAccessTokenSelect) StringX(ctx context.Context) string
- func (s *PersonalAccessTokenSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PersonalAccessTokenSelect) StringsX(ctx context.Context) []string
- type PersonalAccessTokenUpdate
- func (_u *PersonalAccessTokenUpdate) AddUserID(v int) *PersonalAccessTokenUpdate
- func (_u *PersonalAccessTokenUpdate) ClearExpiresAt() *PersonalAccessTokenUpdate
- func (_u *PersonalAccessTokenUpdate) ClearLastUsedAt() *PersonalAccessTokenUpdate
- func (_u *PersonalAccessTokenUpdate) Exec(ctx context.Context) error
- func (_u *PersonalAccessTokenUpdate) ExecX(ctx context.Context)
- func (_u *PersonalAccessTokenUpdate) Mutation() *PersonalAccessTokenMutation
- func (_u *PersonalAccessTokenUpdate) Save(ctx context.Context) (int, error)
- func (_u *PersonalAccessTokenUpdate) SaveX(ctx context.Context) int
- func (_u *PersonalAccessTokenUpdate) SetExpiresAt(v time.Time) *PersonalAccessTokenUpdate
- func (_u *PersonalAccessTokenUpdate) SetLastUsedAt(v time.Time) *PersonalAccessTokenUpdate
- func (_u *PersonalAccessTokenUpdate) SetName(v string) *PersonalAccessTokenUpdate
- func (_u *PersonalAccessTokenUpdate) SetNillableExpiresAt(v *time.Time) *PersonalAccessTokenUpdate
- func (_u *PersonalAccessTokenUpdate) SetNillableLastUsedAt(v *time.Time) *PersonalAccessTokenUpdate
- func (_u *PersonalAccessTokenUpdate) SetNillableName(v *string) *PersonalAccessTokenUpdate
- func (_u *PersonalAccessTokenUpdate) SetNillableTokenHash(v *string) *PersonalAccessTokenUpdate
- func (_u *PersonalAccessTokenUpdate) SetNillableTokenPrefix(v *string) *PersonalAccessTokenUpdate
- func (_u *PersonalAccessTokenUpdate) SetNillableUserID(v *int) *PersonalAccessTokenUpdate
- func (_u *PersonalAccessTokenUpdate) SetTokenHash(v string) *PersonalAccessTokenUpdate
- func (_u *PersonalAccessTokenUpdate) SetTokenPrefix(v string) *PersonalAccessTokenUpdate
- func (_u *PersonalAccessTokenUpdate) SetUserID(v int) *PersonalAccessTokenUpdate
- func (_u *PersonalAccessTokenUpdate) Where(ps ...predicate.PersonalAccessToken) *PersonalAccessTokenUpdate
- type PersonalAccessTokenUpdateOne
- func (_u *PersonalAccessTokenUpdateOne) AddUserID(v int) *PersonalAccessTokenUpdateOne
- func (_u *PersonalAccessTokenUpdateOne) ClearExpiresAt() *PersonalAccessTokenUpdateOne
- func (_u *PersonalAccessTokenUpdateOne) ClearLastUsedAt() *PersonalAccessTokenUpdateOne
- func (_u *PersonalAccessTokenUpdateOne) Exec(ctx context.Context) error
- func (_u *PersonalAccessTokenUpdateOne) ExecX(ctx context.Context)
- func (_u *PersonalAccessTokenUpdateOne) Mutation() *PersonalAccessTokenMutation
- func (_u *PersonalAccessTokenUpdateOne) Save(ctx context.Context) (*PersonalAccessToken, error)
- func (_u *PersonalAccessTokenUpdateOne) SaveX(ctx context.Context) *PersonalAccessToken
- func (_u *PersonalAccessTokenUpdateOne) Select(field string, fields ...string) *PersonalAccessTokenUpdateOne
- func (_u *PersonalAccessTokenUpdateOne) SetExpiresAt(v time.Time) *PersonalAccessTokenUpdateOne
- func (_u *PersonalAccessTokenUpdateOne) SetLastUsedAt(v time.Time) *PersonalAccessTokenUpdateOne
- func (_u *PersonalAccessTokenUpdateOne) SetName(v string) *PersonalAccessTokenUpdateOne
- func (_u *PersonalAccessTokenUpdateOne) SetNillableExpiresAt(v *time.Time) *PersonalAccessTokenUpdateOne
- func (_u *PersonalAccessTokenUpdateOne) SetNillableLastUsedAt(v *time.Time) *PersonalAccessTokenUpdateOne
- func (_u *PersonalAccessTokenUpdateOne) SetNillableName(v *string) *PersonalAccessTokenUpdateOne
- func (_u *PersonalAccessTokenUpdateOne) SetNillableTokenHash(v *string) *PersonalAccessTokenUpdateOne
- func (_u *PersonalAccessTokenUpdateOne) SetNillableTokenPrefix(v *string) *PersonalAccessTokenUpdateOne
- func (_u *PersonalAccessTokenUpdateOne) SetNillableUserID(v *int) *PersonalAccessTokenUpdateOne
- func (_u *PersonalAccessTokenUpdateOne) SetTokenHash(v string) *PersonalAccessTokenUpdateOne
- func (_u *PersonalAccessTokenUpdateOne) SetTokenPrefix(v string) *PersonalAccessTokenUpdateOne
- func (_u *PersonalAccessTokenUpdateOne) SetUserID(v int) *PersonalAccessTokenUpdateOne
- func (_u *PersonalAccessTokenUpdateOne) Where(ps ...predicate.PersonalAccessToken) *PersonalAccessTokenUpdateOne
- type PersonalAccessTokens
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeOAuthAccessToken = "OAuthAccessToken" TypeOAuthAuthorizationCode = "OAuthAuthorizationCode" TypeOAuthClient = "OAuthClient" TypeOAuthRefreshToken = "OAuthRefreshToken" TypeOAuthSigningKey = "OAuthSigningKey" TypePersonalAccessToken = "PersonalAccessToken" )
Variables ¶
var ErrTxStarted = errors.New("_test: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(_test.As(_test.Sum(field1), "sum_field1"), (_test.As(_test.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct {
// Schema is the client for creating, migrating and dropping schema.
Schema *migrate.Schema
// OAuthAccessToken is the client for interacting with the OAuthAccessToken builders.
OAuthAccessToken *OAuthAccessTokenClient
// OAuthAuthorizationCode is the client for interacting with the OAuthAuthorizationCode builders.
OAuthAuthorizationCode *OAuthAuthorizationCodeClient
// OAuthClient is the client for interacting with the OAuthClient builders.
OAuthClient *OAuthClientClient
// OAuthRefreshToken is the client for interacting with the OAuthRefreshToken builders.
OAuthRefreshToken *OAuthRefreshTokenClient
// OAuthSigningKey is the client for interacting with the OAuthSigningKey builders.
OAuthSigningKey *OAuthSigningKeyClient
// PersonalAccessToken is the client for interacting with the PersonalAccessToken builders.
PersonalAccessToken *PersonalAccessTokenClient
// contains filtered or unexported fields
}
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
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) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). OAuthAccessToken. 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(...)`.
type CommitFunc ¶
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.
type CommitHook ¶
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 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 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 MutateFunc ¶
type MutateFunc = ent.MutateFunc
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 OAuthAccessToken ¶
type OAuthAccessToken struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Type: authorization_code, access_token, refresh_token, pkce, oidc
SessionType string `json:"session_type,omitempty"`
// Unique token/code signature for lookup
Signature string `json:"signature,omitempty"`
// OAuth client ID that owns this session
ClientID string `json:"client_id,omitempty"`
// Optional consumer user ID
UserID *int `json:"user_id,omitempty"`
// Fosite request ID for token revocation
RequestID string `json:"request_id,omitempty"`
// Space-separated granted scopes
Scopes string `json:"scopes,omitempty"`
// Serialized Fosite session data
SessionData map[string]interface{} `json:"session_data,omitempty"`
// Whether this session is still valid
Active bool `json:"active,omitempty"`
// When this session expires
ExpiresAt *time.Time `json:"expires_at,omitempty"`
// When Fosite created the original request
RequestedAt *time.Time `json:"requested_at,omitempty"`
// contains filtered or unexported fields
}
OAuthAccessToken is the model entity for the OAuthAccessToken schema.
func (*OAuthAccessToken) String ¶
func (_m *OAuthAccessToken) String() string
String implements the fmt.Stringer.
func (*OAuthAccessToken) Unwrap ¶
func (_m *OAuthAccessToken) Unwrap() *OAuthAccessToken
Unwrap unwraps the OAuthAccessToken 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 (*OAuthAccessToken) Update ¶
func (_m *OAuthAccessToken) Update() *OAuthAccessTokenUpdateOne
Update returns a builder for updating this OAuthAccessToken. Note that you need to call OAuthAccessToken.Unwrap() before calling this method if this OAuthAccessToken was returned from a transaction, and the transaction was committed or rolled back.
type OAuthAccessTokenClient ¶
type OAuthAccessTokenClient struct {
// contains filtered or unexported fields
}
OAuthAccessTokenClient is a client for the OAuthAccessToken schema.
func NewOAuthAccessTokenClient ¶
func NewOAuthAccessTokenClient(c config) *OAuthAccessTokenClient
NewOAuthAccessTokenClient returns a client for the OAuthAccessToken from the given config.
func (*OAuthAccessTokenClient) Create ¶
func (c *OAuthAccessTokenClient) Create() *OAuthAccessTokenCreate
Create returns a builder for creating a OAuthAccessToken entity.
func (*OAuthAccessTokenClient) CreateBulk ¶
func (c *OAuthAccessTokenClient) CreateBulk(builders ...*OAuthAccessTokenCreate) *OAuthAccessTokenCreateBulk
CreateBulk returns a builder for creating a bulk of OAuthAccessToken entities.
func (*OAuthAccessTokenClient) Delete ¶
func (c *OAuthAccessTokenClient) Delete() *OAuthAccessTokenDelete
Delete returns a delete builder for OAuthAccessToken.
func (*OAuthAccessTokenClient) DeleteOne ¶
func (c *OAuthAccessTokenClient) DeleteOne(_m *OAuthAccessToken) *OAuthAccessTokenDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*OAuthAccessTokenClient) DeleteOneID ¶
func (c *OAuthAccessTokenClient) DeleteOneID(id int) *OAuthAccessTokenDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*OAuthAccessTokenClient) Get ¶
func (c *OAuthAccessTokenClient) Get(ctx context.Context, id int) (*OAuthAccessToken, error)
Get returns a OAuthAccessToken entity by its id.
func (*OAuthAccessTokenClient) GetX ¶
func (c *OAuthAccessTokenClient) GetX(ctx context.Context, id int) *OAuthAccessToken
GetX is like Get, but panics if an error occurs.
func (*OAuthAccessTokenClient) Hooks ¶
func (c *OAuthAccessTokenClient) Hooks() []Hook
Hooks returns the client hooks.
func (*OAuthAccessTokenClient) Intercept ¶
func (c *OAuthAccessTokenClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `oauthaccesstoken.Intercept(f(g(h())))`.
func (*OAuthAccessTokenClient) Interceptors ¶
func (c *OAuthAccessTokenClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*OAuthAccessTokenClient) MapCreateBulk ¶
func (c *OAuthAccessTokenClient) MapCreateBulk(slice any, setFunc func(*OAuthAccessTokenCreate, int)) *OAuthAccessTokenCreateBulk
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 (*OAuthAccessTokenClient) Query ¶
func (c *OAuthAccessTokenClient) Query() *OAuthAccessTokenQuery
Query returns a query builder for OAuthAccessToken.
func (*OAuthAccessTokenClient) Update ¶
func (c *OAuthAccessTokenClient) Update() *OAuthAccessTokenUpdate
Update returns an update builder for OAuthAccessToken.
func (*OAuthAccessTokenClient) UpdateOne ¶
func (c *OAuthAccessTokenClient) UpdateOne(_m *OAuthAccessToken) *OAuthAccessTokenUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OAuthAccessTokenClient) UpdateOneID ¶
func (c *OAuthAccessTokenClient) UpdateOneID(id int) *OAuthAccessTokenUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OAuthAccessTokenClient) Use ¶
func (c *OAuthAccessTokenClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `oauthaccesstoken.Hooks(f(g(h())))`.
type OAuthAccessTokenCreate ¶
type OAuthAccessTokenCreate struct {
// contains filtered or unexported fields
}
OAuthAccessTokenCreate is the builder for creating a OAuthAccessToken entity.
func (*OAuthAccessTokenCreate) Exec ¶
func (_c *OAuthAccessTokenCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*OAuthAccessTokenCreate) ExecX ¶
func (_c *OAuthAccessTokenCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthAccessTokenCreate) Mutation ¶
func (_c *OAuthAccessTokenCreate) Mutation() *OAuthAccessTokenMutation
Mutation returns the OAuthAccessTokenMutation object of the builder.
func (*OAuthAccessTokenCreate) Save ¶
func (_c *OAuthAccessTokenCreate) Save(ctx context.Context) (*OAuthAccessToken, error)
Save creates the OAuthAccessToken in the database.
func (*OAuthAccessTokenCreate) SaveX ¶
func (_c *OAuthAccessTokenCreate) SaveX(ctx context.Context) *OAuthAccessToken
SaveX calls Save and panics if Save returns an error.
func (*OAuthAccessTokenCreate) SetActive ¶
func (_c *OAuthAccessTokenCreate) SetActive(v bool) *OAuthAccessTokenCreate
SetActive sets the "active" field.
func (*OAuthAccessTokenCreate) SetClientID ¶
func (_c *OAuthAccessTokenCreate) SetClientID(v string) *OAuthAccessTokenCreate
SetClientID sets the "client_id" field.
func (*OAuthAccessTokenCreate) SetExpiresAt ¶
func (_c *OAuthAccessTokenCreate) SetExpiresAt(v time.Time) *OAuthAccessTokenCreate
SetExpiresAt sets the "expires_at" field.
func (*OAuthAccessTokenCreate) SetNillableActive ¶
func (_c *OAuthAccessTokenCreate) SetNillableActive(v *bool) *OAuthAccessTokenCreate
SetNillableActive sets the "active" field if the given value is not nil.
func (*OAuthAccessTokenCreate) SetNillableExpiresAt ¶
func (_c *OAuthAccessTokenCreate) SetNillableExpiresAt(v *time.Time) *OAuthAccessTokenCreate
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*OAuthAccessTokenCreate) SetNillableRequestID ¶
func (_c *OAuthAccessTokenCreate) SetNillableRequestID(v *string) *OAuthAccessTokenCreate
SetNillableRequestID sets the "request_id" field if the given value is not nil.
func (*OAuthAccessTokenCreate) SetNillableRequestedAt ¶
func (_c *OAuthAccessTokenCreate) SetNillableRequestedAt(v *time.Time) *OAuthAccessTokenCreate
SetNillableRequestedAt sets the "requested_at" field if the given value is not nil.
func (*OAuthAccessTokenCreate) SetNillableScopes ¶
func (_c *OAuthAccessTokenCreate) SetNillableScopes(v *string) *OAuthAccessTokenCreate
SetNillableScopes sets the "scopes" field if the given value is not nil.
func (*OAuthAccessTokenCreate) SetNillableUserID ¶
func (_c *OAuthAccessTokenCreate) SetNillableUserID(v *int) *OAuthAccessTokenCreate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*OAuthAccessTokenCreate) SetRequestID ¶
func (_c *OAuthAccessTokenCreate) SetRequestID(v string) *OAuthAccessTokenCreate
SetRequestID sets the "request_id" field.
func (*OAuthAccessTokenCreate) SetRequestedAt ¶
func (_c *OAuthAccessTokenCreate) SetRequestedAt(v time.Time) *OAuthAccessTokenCreate
SetRequestedAt sets the "requested_at" field.
func (*OAuthAccessTokenCreate) SetScopes ¶
func (_c *OAuthAccessTokenCreate) SetScopes(v string) *OAuthAccessTokenCreate
SetScopes sets the "scopes" field.
func (*OAuthAccessTokenCreate) SetSessionData ¶
func (_c *OAuthAccessTokenCreate) SetSessionData(v map[string]interface{}) *OAuthAccessTokenCreate
SetSessionData sets the "session_data" field.
func (*OAuthAccessTokenCreate) SetSessionType ¶
func (_c *OAuthAccessTokenCreate) SetSessionType(v string) *OAuthAccessTokenCreate
SetSessionType sets the "session_type" field.
func (*OAuthAccessTokenCreate) SetSignature ¶
func (_c *OAuthAccessTokenCreate) SetSignature(v string) *OAuthAccessTokenCreate
SetSignature sets the "signature" field.
func (*OAuthAccessTokenCreate) SetUserID ¶
func (_c *OAuthAccessTokenCreate) SetUserID(v int) *OAuthAccessTokenCreate
SetUserID sets the "user_id" field.
type OAuthAccessTokenCreateBulk ¶
type OAuthAccessTokenCreateBulk struct {
// contains filtered or unexported fields
}
OAuthAccessTokenCreateBulk is the builder for creating many OAuthAccessToken entities in bulk.
func (*OAuthAccessTokenCreateBulk) Exec ¶
func (_c *OAuthAccessTokenCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OAuthAccessTokenCreateBulk) ExecX ¶
func (_c *OAuthAccessTokenCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthAccessTokenCreateBulk) Save ¶
func (_c *OAuthAccessTokenCreateBulk) Save(ctx context.Context) ([]*OAuthAccessToken, error)
Save creates the OAuthAccessToken entities in the database.
func (*OAuthAccessTokenCreateBulk) SaveX ¶
func (_c *OAuthAccessTokenCreateBulk) SaveX(ctx context.Context) []*OAuthAccessToken
SaveX is like Save, but panics if an error occurs.
type OAuthAccessTokenDelete ¶
type OAuthAccessTokenDelete struct {
// contains filtered or unexported fields
}
OAuthAccessTokenDelete is the builder for deleting a OAuthAccessToken entity.
func (*OAuthAccessTokenDelete) Exec ¶
func (_d *OAuthAccessTokenDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OAuthAccessTokenDelete) ExecX ¶
func (_d *OAuthAccessTokenDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OAuthAccessTokenDelete) Where ¶
func (_d *OAuthAccessTokenDelete) Where(ps ...predicate.OAuthAccessToken) *OAuthAccessTokenDelete
Where appends a list predicates to the OAuthAccessTokenDelete builder.
type OAuthAccessTokenDeleteOne ¶
type OAuthAccessTokenDeleteOne struct {
// contains filtered or unexported fields
}
OAuthAccessTokenDeleteOne is the builder for deleting a single OAuthAccessToken entity.
func (*OAuthAccessTokenDeleteOne) Exec ¶
func (_d *OAuthAccessTokenDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OAuthAccessTokenDeleteOne) ExecX ¶
func (_d *OAuthAccessTokenDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthAccessTokenDeleteOne) Where ¶
func (_d *OAuthAccessTokenDeleteOne) Where(ps ...predicate.OAuthAccessToken) *OAuthAccessTokenDeleteOne
Where appends a list predicates to the OAuthAccessTokenDelete builder.
type OAuthAccessTokenGroupBy ¶
type OAuthAccessTokenGroupBy struct {
// contains filtered or unexported fields
}
OAuthAccessTokenGroupBy is the group-by builder for OAuthAccessToken entities.
func (*OAuthAccessTokenGroupBy) Aggregate ¶
func (_g *OAuthAccessTokenGroupBy) Aggregate(fns ...AggregateFunc) *OAuthAccessTokenGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OAuthAccessTokenGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OAuthAccessTokenGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OAuthAccessTokenGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OAuthAccessTokenGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OAuthAccessTokenGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*OAuthAccessTokenGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OAuthAccessTokenGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OAuthAccessTokenGroupBy) Scan ¶
func (_g *OAuthAccessTokenGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OAuthAccessTokenGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OAuthAccessTokenMutation ¶
type OAuthAccessTokenMutation struct {
// contains filtered or unexported fields
}
OAuthAccessTokenMutation represents an operation that mutates the OAuthAccessToken nodes in the graph.
func (*OAuthAccessTokenMutation) Active ¶
func (m *OAuthAccessTokenMutation) Active() (r bool, exists bool)
Active returns the value of the "active" field in the mutation.
func (*OAuthAccessTokenMutation) AddField ¶
func (m *OAuthAccessTokenMutation) 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 (*OAuthAccessTokenMutation) AddUserID ¶
func (m *OAuthAccessTokenMutation) AddUserID(i int)
AddUserID adds i to the "user_id" field.
func (*OAuthAccessTokenMutation) AddedEdges ¶
func (m *OAuthAccessTokenMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OAuthAccessTokenMutation) AddedField ¶
func (m *OAuthAccessTokenMutation) 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 (*OAuthAccessTokenMutation) AddedFields ¶
func (m *OAuthAccessTokenMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OAuthAccessTokenMutation) AddedIDs ¶
func (m *OAuthAccessTokenMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OAuthAccessTokenMutation) AddedUserID ¶
func (m *OAuthAccessTokenMutation) AddedUserID() (r int, exists bool)
AddedUserID returns the value that was added to the "user_id" field in this mutation.
func (*OAuthAccessTokenMutation) ClearEdge ¶
func (m *OAuthAccessTokenMutation) 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 (*OAuthAccessTokenMutation) ClearExpiresAt ¶
func (m *OAuthAccessTokenMutation) ClearExpiresAt()
ClearExpiresAt clears the value of the "expires_at" field.
func (*OAuthAccessTokenMutation) ClearField ¶
func (m *OAuthAccessTokenMutation) 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 (*OAuthAccessTokenMutation) ClearRequestedAt ¶
func (m *OAuthAccessTokenMutation) ClearRequestedAt()
ClearRequestedAt clears the value of the "requested_at" field.
func (*OAuthAccessTokenMutation) ClearUserID ¶
func (m *OAuthAccessTokenMutation) ClearUserID()
ClearUserID clears the value of the "user_id" field.
func (*OAuthAccessTokenMutation) ClearedEdges ¶
func (m *OAuthAccessTokenMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OAuthAccessTokenMutation) ClearedFields ¶
func (m *OAuthAccessTokenMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OAuthAccessTokenMutation) Client ¶
func (m OAuthAccessTokenMutation) 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 (*OAuthAccessTokenMutation) ClientID ¶
func (m *OAuthAccessTokenMutation) ClientID() (r string, exists bool)
ClientID returns the value of the "client_id" field in the mutation.
func (*OAuthAccessTokenMutation) EdgeCleared ¶
func (m *OAuthAccessTokenMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OAuthAccessTokenMutation) ExpiresAt ¶
func (m *OAuthAccessTokenMutation) ExpiresAt() (r time.Time, exists bool)
ExpiresAt returns the value of the "expires_at" field in the mutation.
func (*OAuthAccessTokenMutation) ExpiresAtCleared ¶
func (m *OAuthAccessTokenMutation) ExpiresAtCleared() bool
ExpiresAtCleared returns if the "expires_at" field was cleared in this mutation.
func (*OAuthAccessTokenMutation) Field ¶
func (m *OAuthAccessTokenMutation) 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 (*OAuthAccessTokenMutation) FieldCleared ¶
func (m *OAuthAccessTokenMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OAuthAccessTokenMutation) Fields ¶
func (m *OAuthAccessTokenMutation) 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 (*OAuthAccessTokenMutation) ID ¶
func (m *OAuthAccessTokenMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*OAuthAccessTokenMutation) IDs ¶
func (m *OAuthAccessTokenMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*OAuthAccessTokenMutation) OldActive ¶
func (m *OAuthAccessTokenMutation) OldActive(ctx context.Context) (v bool, err error)
OldActive returns the old "active" field's value of the OAuthAccessToken entity. If the OAuthAccessToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthAccessTokenMutation) OldClientID ¶
func (m *OAuthAccessTokenMutation) OldClientID(ctx context.Context) (v string, err error)
OldClientID returns the old "client_id" field's value of the OAuthAccessToken entity. If the OAuthAccessToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthAccessTokenMutation) OldExpiresAt ¶
OldExpiresAt returns the old "expires_at" field's value of the OAuthAccessToken entity. If the OAuthAccessToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthAccessTokenMutation) 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 (*OAuthAccessTokenMutation) OldRequestID ¶
func (m *OAuthAccessTokenMutation) OldRequestID(ctx context.Context) (v string, err error)
OldRequestID returns the old "request_id" field's value of the OAuthAccessToken entity. If the OAuthAccessToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthAccessTokenMutation) OldRequestedAt ¶
OldRequestedAt returns the old "requested_at" field's value of the OAuthAccessToken entity. If the OAuthAccessToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthAccessTokenMutation) OldScopes ¶
func (m *OAuthAccessTokenMutation) OldScopes(ctx context.Context) (v string, err error)
OldScopes returns the old "scopes" field's value of the OAuthAccessToken entity. If the OAuthAccessToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthAccessTokenMutation) OldSessionData ¶
func (m *OAuthAccessTokenMutation) OldSessionData(ctx context.Context) (v map[string]interface{}, err error)
OldSessionData returns the old "session_data" field's value of the OAuthAccessToken entity. If the OAuthAccessToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthAccessTokenMutation) OldSessionType ¶
func (m *OAuthAccessTokenMutation) OldSessionType(ctx context.Context) (v string, err error)
OldSessionType returns the old "session_type" field's value of the OAuthAccessToken entity. If the OAuthAccessToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthAccessTokenMutation) OldSignature ¶
func (m *OAuthAccessTokenMutation) OldSignature(ctx context.Context) (v string, err error)
OldSignature returns the old "signature" field's value of the OAuthAccessToken entity. If the OAuthAccessToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthAccessTokenMutation) OldUserID ¶
func (m *OAuthAccessTokenMutation) OldUserID(ctx context.Context) (v *int, err error)
OldUserID returns the old "user_id" field's value of the OAuthAccessToken entity. If the OAuthAccessToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthAccessTokenMutation) Op ¶
func (m *OAuthAccessTokenMutation) Op() Op
Op returns the operation name.
func (*OAuthAccessTokenMutation) RemovedEdges ¶
func (m *OAuthAccessTokenMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OAuthAccessTokenMutation) RemovedIDs ¶
func (m *OAuthAccessTokenMutation) 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 (*OAuthAccessTokenMutation) RequestID ¶
func (m *OAuthAccessTokenMutation) RequestID() (r string, exists bool)
RequestID returns the value of the "request_id" field in the mutation.
func (*OAuthAccessTokenMutation) RequestedAt ¶
func (m *OAuthAccessTokenMutation) RequestedAt() (r time.Time, exists bool)
RequestedAt returns the value of the "requested_at" field in the mutation.
func (*OAuthAccessTokenMutation) RequestedAtCleared ¶
func (m *OAuthAccessTokenMutation) RequestedAtCleared() bool
RequestedAtCleared returns if the "requested_at" field was cleared in this mutation.
func (*OAuthAccessTokenMutation) ResetActive ¶
func (m *OAuthAccessTokenMutation) ResetActive()
ResetActive resets all changes to the "active" field.
func (*OAuthAccessTokenMutation) ResetClientID ¶
func (m *OAuthAccessTokenMutation) ResetClientID()
ResetClientID resets all changes to the "client_id" field.
func (*OAuthAccessTokenMutation) ResetEdge ¶
func (m *OAuthAccessTokenMutation) 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 (*OAuthAccessTokenMutation) ResetExpiresAt ¶
func (m *OAuthAccessTokenMutation) ResetExpiresAt()
ResetExpiresAt resets all changes to the "expires_at" field.
func (*OAuthAccessTokenMutation) ResetField ¶
func (m *OAuthAccessTokenMutation) 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 (*OAuthAccessTokenMutation) ResetRequestID ¶
func (m *OAuthAccessTokenMutation) ResetRequestID()
ResetRequestID resets all changes to the "request_id" field.
func (*OAuthAccessTokenMutation) ResetRequestedAt ¶
func (m *OAuthAccessTokenMutation) ResetRequestedAt()
ResetRequestedAt resets all changes to the "requested_at" field.
func (*OAuthAccessTokenMutation) ResetScopes ¶
func (m *OAuthAccessTokenMutation) ResetScopes()
ResetScopes resets all changes to the "scopes" field.
func (*OAuthAccessTokenMutation) ResetSessionData ¶
func (m *OAuthAccessTokenMutation) ResetSessionData()
ResetSessionData resets all changes to the "session_data" field.
func (*OAuthAccessTokenMutation) ResetSessionType ¶
func (m *OAuthAccessTokenMutation) ResetSessionType()
ResetSessionType resets all changes to the "session_type" field.
func (*OAuthAccessTokenMutation) ResetSignature ¶
func (m *OAuthAccessTokenMutation) ResetSignature()
ResetSignature resets all changes to the "signature" field.
func (*OAuthAccessTokenMutation) ResetUserID ¶
func (m *OAuthAccessTokenMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*OAuthAccessTokenMutation) Scopes ¶
func (m *OAuthAccessTokenMutation) Scopes() (r string, exists bool)
Scopes returns the value of the "scopes" field in the mutation.
func (*OAuthAccessTokenMutation) SessionData ¶
func (m *OAuthAccessTokenMutation) SessionData() (r map[string]interface{}, exists bool)
SessionData returns the value of the "session_data" field in the mutation.
func (*OAuthAccessTokenMutation) SessionType ¶
func (m *OAuthAccessTokenMutation) SessionType() (r string, exists bool)
SessionType returns the value of the "session_type" field in the mutation.
func (*OAuthAccessTokenMutation) SetActive ¶
func (m *OAuthAccessTokenMutation) SetActive(b bool)
SetActive sets the "active" field.
func (*OAuthAccessTokenMutation) SetClientID ¶
func (m *OAuthAccessTokenMutation) SetClientID(s string)
SetClientID sets the "client_id" field.
func (*OAuthAccessTokenMutation) SetExpiresAt ¶
func (m *OAuthAccessTokenMutation) SetExpiresAt(t time.Time)
SetExpiresAt sets the "expires_at" field.
func (*OAuthAccessTokenMutation) SetField ¶
func (m *OAuthAccessTokenMutation) 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 (*OAuthAccessTokenMutation) SetOp ¶
func (m *OAuthAccessTokenMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*OAuthAccessTokenMutation) SetRequestID ¶
func (m *OAuthAccessTokenMutation) SetRequestID(s string)
SetRequestID sets the "request_id" field.
func (*OAuthAccessTokenMutation) SetRequestedAt ¶
func (m *OAuthAccessTokenMutation) SetRequestedAt(t time.Time)
SetRequestedAt sets the "requested_at" field.
func (*OAuthAccessTokenMutation) SetScopes ¶
func (m *OAuthAccessTokenMutation) SetScopes(s string)
SetScopes sets the "scopes" field.
func (*OAuthAccessTokenMutation) SetSessionData ¶
func (m *OAuthAccessTokenMutation) SetSessionData(value map[string]interface{})
SetSessionData sets the "session_data" field.
func (*OAuthAccessTokenMutation) SetSessionType ¶
func (m *OAuthAccessTokenMutation) SetSessionType(s string)
SetSessionType sets the "session_type" field.
func (*OAuthAccessTokenMutation) SetSignature ¶
func (m *OAuthAccessTokenMutation) SetSignature(s string)
SetSignature sets the "signature" field.
func (*OAuthAccessTokenMutation) SetUserID ¶
func (m *OAuthAccessTokenMutation) SetUserID(i int)
SetUserID sets the "user_id" field.
func (*OAuthAccessTokenMutation) Signature ¶
func (m *OAuthAccessTokenMutation) Signature() (r string, exists bool)
Signature returns the value of the "signature" field in the mutation.
func (OAuthAccessTokenMutation) Tx ¶
func (m OAuthAccessTokenMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OAuthAccessTokenMutation) Type ¶
func (m *OAuthAccessTokenMutation) Type() string
Type returns the node type of this mutation (OAuthAccessToken).
func (*OAuthAccessTokenMutation) UserID ¶
func (m *OAuthAccessTokenMutation) UserID() (r int, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*OAuthAccessTokenMutation) UserIDCleared ¶
func (m *OAuthAccessTokenMutation) UserIDCleared() bool
UserIDCleared returns if the "user_id" field was cleared in this mutation.
func (*OAuthAccessTokenMutation) Where ¶
func (m *OAuthAccessTokenMutation) Where(ps ...predicate.OAuthAccessToken)
Where appends a list predicates to the OAuthAccessTokenMutation builder.
func (*OAuthAccessTokenMutation) WhereP ¶
func (m *OAuthAccessTokenMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the OAuthAccessTokenMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type OAuthAccessTokenQuery ¶
type OAuthAccessTokenQuery struct {
// contains filtered or unexported fields
}
OAuthAccessTokenQuery is the builder for querying OAuthAccessToken entities.
func (*OAuthAccessTokenQuery) Aggregate ¶
func (_q *OAuthAccessTokenQuery) Aggregate(fns ...AggregateFunc) *OAuthAccessTokenSelect
Aggregate returns a OAuthAccessTokenSelect configured with the given aggregations.
func (*OAuthAccessTokenQuery) All ¶
func (_q *OAuthAccessTokenQuery) All(ctx context.Context) ([]*OAuthAccessToken, error)
All executes the query and returns a list of OAuthAccessTokens.
func (*OAuthAccessTokenQuery) AllX ¶
func (_q *OAuthAccessTokenQuery) AllX(ctx context.Context) []*OAuthAccessToken
AllX is like All, but panics if an error occurs.
func (*OAuthAccessTokenQuery) Clone ¶
func (_q *OAuthAccessTokenQuery) Clone() *OAuthAccessTokenQuery
Clone returns a duplicate of the OAuthAccessTokenQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OAuthAccessTokenQuery) Count ¶
func (_q *OAuthAccessTokenQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*OAuthAccessTokenQuery) CountX ¶
func (_q *OAuthAccessTokenQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*OAuthAccessTokenQuery) Exist ¶
func (_q *OAuthAccessTokenQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*OAuthAccessTokenQuery) ExistX ¶
func (_q *OAuthAccessTokenQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*OAuthAccessTokenQuery) First ¶
func (_q *OAuthAccessTokenQuery) First(ctx context.Context) (*OAuthAccessToken, error)
First returns the first OAuthAccessToken entity from the query. Returns a *NotFoundError when no OAuthAccessToken was found.
func (*OAuthAccessTokenQuery) FirstID ¶
func (_q *OAuthAccessTokenQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first OAuthAccessToken ID from the query. Returns a *NotFoundError when no OAuthAccessToken ID was found.
func (*OAuthAccessTokenQuery) FirstIDX ¶
func (_q *OAuthAccessTokenQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*OAuthAccessTokenQuery) FirstX ¶
func (_q *OAuthAccessTokenQuery) FirstX(ctx context.Context) *OAuthAccessToken
FirstX is like First, but panics if an error occurs.
func (*OAuthAccessTokenQuery) GroupBy ¶
func (_q *OAuthAccessTokenQuery) GroupBy(field string, fields ...string) *OAuthAccessTokenGroupBy
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 {
SessionType string `json:"session_type,omitempty"`
Count int `json:"count,omitempty"`
}
client.OAuthAccessToken.Query().
GroupBy(oauthaccesstoken.FieldSessionType).
Aggregate(_test.Count()).
Scan(ctx, &v)
func (*OAuthAccessTokenQuery) IDs ¶
func (_q *OAuthAccessTokenQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of OAuthAccessToken IDs.
func (*OAuthAccessTokenQuery) IDsX ¶
func (_q *OAuthAccessTokenQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*OAuthAccessTokenQuery) Limit ¶
func (_q *OAuthAccessTokenQuery) Limit(limit int) *OAuthAccessTokenQuery
Limit the number of records to be returned by this query.
func (*OAuthAccessTokenQuery) Offset ¶
func (_q *OAuthAccessTokenQuery) Offset(offset int) *OAuthAccessTokenQuery
Offset to start from.
func (*OAuthAccessTokenQuery) Only ¶
func (_q *OAuthAccessTokenQuery) Only(ctx context.Context) (*OAuthAccessToken, error)
Only returns a single OAuthAccessToken entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OAuthAccessToken entity is found. Returns a *NotFoundError when no OAuthAccessToken entities are found.
func (*OAuthAccessTokenQuery) OnlyID ¶
func (_q *OAuthAccessTokenQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only OAuthAccessToken ID in the query. Returns a *NotSingularError when more than one OAuthAccessToken ID is found. Returns a *NotFoundError when no entities are found.
func (*OAuthAccessTokenQuery) OnlyIDX ¶
func (_q *OAuthAccessTokenQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*OAuthAccessTokenQuery) OnlyX ¶
func (_q *OAuthAccessTokenQuery) OnlyX(ctx context.Context) *OAuthAccessToken
OnlyX is like Only, but panics if an error occurs.
func (*OAuthAccessTokenQuery) Order ¶
func (_q *OAuthAccessTokenQuery) Order(o ...oauthaccesstoken.OrderOption) *OAuthAccessTokenQuery
Order specifies how the records should be ordered.
func (*OAuthAccessTokenQuery) Select ¶
func (_q *OAuthAccessTokenQuery) Select(fields ...string) *OAuthAccessTokenSelect
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 {
SessionType string `json:"session_type,omitempty"`
}
client.OAuthAccessToken.Query().
Select(oauthaccesstoken.FieldSessionType).
Scan(ctx, &v)
func (*OAuthAccessTokenQuery) Unique ¶
func (_q *OAuthAccessTokenQuery) Unique(unique bool) *OAuthAccessTokenQuery
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 (*OAuthAccessTokenQuery) Where ¶
func (_q *OAuthAccessTokenQuery) Where(ps ...predicate.OAuthAccessToken) *OAuthAccessTokenQuery
Where adds a new predicate for the OAuthAccessTokenQuery builder.
type OAuthAccessTokenSelect ¶
type OAuthAccessTokenSelect struct {
*OAuthAccessTokenQuery
// contains filtered or unexported fields
}
OAuthAccessTokenSelect is the builder for selecting fields of OAuthAccessToken entities.
func (*OAuthAccessTokenSelect) Aggregate ¶
func (_s *OAuthAccessTokenSelect) Aggregate(fns ...AggregateFunc) *OAuthAccessTokenSelect
Aggregate adds the given aggregation functions to the selector query.
func (*OAuthAccessTokenSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OAuthAccessTokenSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OAuthAccessTokenSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OAuthAccessTokenSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OAuthAccessTokenSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*OAuthAccessTokenSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OAuthAccessTokenSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OAuthAccessTokenSelect) Scan ¶
func (_s *OAuthAccessTokenSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OAuthAccessTokenSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OAuthAccessTokenUpdate ¶
type OAuthAccessTokenUpdate struct {
// contains filtered or unexported fields
}
OAuthAccessTokenUpdate is the builder for updating OAuthAccessToken entities.
func (*OAuthAccessTokenUpdate) AddUserID ¶
func (_u *OAuthAccessTokenUpdate) AddUserID(v int) *OAuthAccessTokenUpdate
AddUserID adds value to the "user_id" field.
func (*OAuthAccessTokenUpdate) ClearExpiresAt ¶
func (_u *OAuthAccessTokenUpdate) ClearExpiresAt() *OAuthAccessTokenUpdate
ClearExpiresAt clears the value of the "expires_at" field.
func (*OAuthAccessTokenUpdate) ClearRequestedAt ¶
func (_u *OAuthAccessTokenUpdate) ClearRequestedAt() *OAuthAccessTokenUpdate
ClearRequestedAt clears the value of the "requested_at" field.
func (*OAuthAccessTokenUpdate) ClearUserID ¶
func (_u *OAuthAccessTokenUpdate) ClearUserID() *OAuthAccessTokenUpdate
ClearUserID clears the value of the "user_id" field.
func (*OAuthAccessTokenUpdate) Exec ¶
func (_u *OAuthAccessTokenUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OAuthAccessTokenUpdate) ExecX ¶
func (_u *OAuthAccessTokenUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthAccessTokenUpdate) Mutation ¶
func (_u *OAuthAccessTokenUpdate) Mutation() *OAuthAccessTokenMutation
Mutation returns the OAuthAccessTokenMutation object of the builder.
func (*OAuthAccessTokenUpdate) Save ¶
func (_u *OAuthAccessTokenUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OAuthAccessTokenUpdate) SaveX ¶
func (_u *OAuthAccessTokenUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OAuthAccessTokenUpdate) SetActive ¶
func (_u *OAuthAccessTokenUpdate) SetActive(v bool) *OAuthAccessTokenUpdate
SetActive sets the "active" field.
func (*OAuthAccessTokenUpdate) SetClientID ¶
func (_u *OAuthAccessTokenUpdate) SetClientID(v string) *OAuthAccessTokenUpdate
SetClientID sets the "client_id" field.
func (*OAuthAccessTokenUpdate) SetExpiresAt ¶
func (_u *OAuthAccessTokenUpdate) SetExpiresAt(v time.Time) *OAuthAccessTokenUpdate
SetExpiresAt sets the "expires_at" field.
func (*OAuthAccessTokenUpdate) SetNillableActive ¶
func (_u *OAuthAccessTokenUpdate) SetNillableActive(v *bool) *OAuthAccessTokenUpdate
SetNillableActive sets the "active" field if the given value is not nil.
func (*OAuthAccessTokenUpdate) SetNillableClientID ¶
func (_u *OAuthAccessTokenUpdate) SetNillableClientID(v *string) *OAuthAccessTokenUpdate
SetNillableClientID sets the "client_id" field if the given value is not nil.
func (*OAuthAccessTokenUpdate) SetNillableExpiresAt ¶
func (_u *OAuthAccessTokenUpdate) SetNillableExpiresAt(v *time.Time) *OAuthAccessTokenUpdate
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*OAuthAccessTokenUpdate) SetNillableRequestID ¶
func (_u *OAuthAccessTokenUpdate) SetNillableRequestID(v *string) *OAuthAccessTokenUpdate
SetNillableRequestID sets the "request_id" field if the given value is not nil.
func (*OAuthAccessTokenUpdate) SetNillableRequestedAt ¶
func (_u *OAuthAccessTokenUpdate) SetNillableRequestedAt(v *time.Time) *OAuthAccessTokenUpdate
SetNillableRequestedAt sets the "requested_at" field if the given value is not nil.
func (*OAuthAccessTokenUpdate) SetNillableScopes ¶
func (_u *OAuthAccessTokenUpdate) SetNillableScopes(v *string) *OAuthAccessTokenUpdate
SetNillableScopes sets the "scopes" field if the given value is not nil.
func (*OAuthAccessTokenUpdate) SetNillableSessionType ¶
func (_u *OAuthAccessTokenUpdate) SetNillableSessionType(v *string) *OAuthAccessTokenUpdate
SetNillableSessionType sets the "session_type" field if the given value is not nil.
func (*OAuthAccessTokenUpdate) SetNillableSignature ¶
func (_u *OAuthAccessTokenUpdate) SetNillableSignature(v *string) *OAuthAccessTokenUpdate
SetNillableSignature sets the "signature" field if the given value is not nil.
func (*OAuthAccessTokenUpdate) SetNillableUserID ¶
func (_u *OAuthAccessTokenUpdate) SetNillableUserID(v *int) *OAuthAccessTokenUpdate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*OAuthAccessTokenUpdate) SetRequestID ¶
func (_u *OAuthAccessTokenUpdate) SetRequestID(v string) *OAuthAccessTokenUpdate
SetRequestID sets the "request_id" field.
func (*OAuthAccessTokenUpdate) SetRequestedAt ¶
func (_u *OAuthAccessTokenUpdate) SetRequestedAt(v time.Time) *OAuthAccessTokenUpdate
SetRequestedAt sets the "requested_at" field.
func (*OAuthAccessTokenUpdate) SetScopes ¶
func (_u *OAuthAccessTokenUpdate) SetScopes(v string) *OAuthAccessTokenUpdate
SetScopes sets the "scopes" field.
func (*OAuthAccessTokenUpdate) SetSessionData ¶
func (_u *OAuthAccessTokenUpdate) SetSessionData(v map[string]interface{}) *OAuthAccessTokenUpdate
SetSessionData sets the "session_data" field.
func (*OAuthAccessTokenUpdate) SetSessionType ¶
func (_u *OAuthAccessTokenUpdate) SetSessionType(v string) *OAuthAccessTokenUpdate
SetSessionType sets the "session_type" field.
func (*OAuthAccessTokenUpdate) SetSignature ¶
func (_u *OAuthAccessTokenUpdate) SetSignature(v string) *OAuthAccessTokenUpdate
SetSignature sets the "signature" field.
func (*OAuthAccessTokenUpdate) SetUserID ¶
func (_u *OAuthAccessTokenUpdate) SetUserID(v int) *OAuthAccessTokenUpdate
SetUserID sets the "user_id" field.
func (*OAuthAccessTokenUpdate) Where ¶
func (_u *OAuthAccessTokenUpdate) Where(ps ...predicate.OAuthAccessToken) *OAuthAccessTokenUpdate
Where appends a list predicates to the OAuthAccessTokenUpdate builder.
type OAuthAccessTokenUpdateOne ¶
type OAuthAccessTokenUpdateOne struct {
// contains filtered or unexported fields
}
OAuthAccessTokenUpdateOne is the builder for updating a single OAuthAccessToken entity.
func (*OAuthAccessTokenUpdateOne) AddUserID ¶
func (_u *OAuthAccessTokenUpdateOne) AddUserID(v int) *OAuthAccessTokenUpdateOne
AddUserID adds value to the "user_id" field.
func (*OAuthAccessTokenUpdateOne) ClearExpiresAt ¶
func (_u *OAuthAccessTokenUpdateOne) ClearExpiresAt() *OAuthAccessTokenUpdateOne
ClearExpiresAt clears the value of the "expires_at" field.
func (*OAuthAccessTokenUpdateOne) ClearRequestedAt ¶
func (_u *OAuthAccessTokenUpdateOne) ClearRequestedAt() *OAuthAccessTokenUpdateOne
ClearRequestedAt clears the value of the "requested_at" field.
func (*OAuthAccessTokenUpdateOne) ClearUserID ¶
func (_u *OAuthAccessTokenUpdateOne) ClearUserID() *OAuthAccessTokenUpdateOne
ClearUserID clears the value of the "user_id" field.
func (*OAuthAccessTokenUpdateOne) Exec ¶
func (_u *OAuthAccessTokenUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OAuthAccessTokenUpdateOne) ExecX ¶
func (_u *OAuthAccessTokenUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthAccessTokenUpdateOne) Mutation ¶
func (_u *OAuthAccessTokenUpdateOne) Mutation() *OAuthAccessTokenMutation
Mutation returns the OAuthAccessTokenMutation object of the builder.
func (*OAuthAccessTokenUpdateOne) Save ¶
func (_u *OAuthAccessTokenUpdateOne) Save(ctx context.Context) (*OAuthAccessToken, error)
Save executes the query and returns the updated OAuthAccessToken entity.
func (*OAuthAccessTokenUpdateOne) SaveX ¶
func (_u *OAuthAccessTokenUpdateOne) SaveX(ctx context.Context) *OAuthAccessToken
SaveX is like Save, but panics if an error occurs.
func (*OAuthAccessTokenUpdateOne) Select ¶
func (_u *OAuthAccessTokenUpdateOne) Select(field string, fields ...string) *OAuthAccessTokenUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OAuthAccessTokenUpdateOne) SetActive ¶
func (_u *OAuthAccessTokenUpdateOne) SetActive(v bool) *OAuthAccessTokenUpdateOne
SetActive sets the "active" field.
func (*OAuthAccessTokenUpdateOne) SetClientID ¶
func (_u *OAuthAccessTokenUpdateOne) SetClientID(v string) *OAuthAccessTokenUpdateOne
SetClientID sets the "client_id" field.
func (*OAuthAccessTokenUpdateOne) SetExpiresAt ¶
func (_u *OAuthAccessTokenUpdateOne) SetExpiresAt(v time.Time) *OAuthAccessTokenUpdateOne
SetExpiresAt sets the "expires_at" field.
func (*OAuthAccessTokenUpdateOne) SetNillableActive ¶
func (_u *OAuthAccessTokenUpdateOne) SetNillableActive(v *bool) *OAuthAccessTokenUpdateOne
SetNillableActive sets the "active" field if the given value is not nil.
func (*OAuthAccessTokenUpdateOne) SetNillableClientID ¶
func (_u *OAuthAccessTokenUpdateOne) SetNillableClientID(v *string) *OAuthAccessTokenUpdateOne
SetNillableClientID sets the "client_id" field if the given value is not nil.
func (*OAuthAccessTokenUpdateOne) SetNillableExpiresAt ¶
func (_u *OAuthAccessTokenUpdateOne) SetNillableExpiresAt(v *time.Time) *OAuthAccessTokenUpdateOne
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*OAuthAccessTokenUpdateOne) SetNillableRequestID ¶
func (_u *OAuthAccessTokenUpdateOne) SetNillableRequestID(v *string) *OAuthAccessTokenUpdateOne
SetNillableRequestID sets the "request_id" field if the given value is not nil.
func (*OAuthAccessTokenUpdateOne) SetNillableRequestedAt ¶
func (_u *OAuthAccessTokenUpdateOne) SetNillableRequestedAt(v *time.Time) *OAuthAccessTokenUpdateOne
SetNillableRequestedAt sets the "requested_at" field if the given value is not nil.
func (*OAuthAccessTokenUpdateOne) SetNillableScopes ¶
func (_u *OAuthAccessTokenUpdateOne) SetNillableScopes(v *string) *OAuthAccessTokenUpdateOne
SetNillableScopes sets the "scopes" field if the given value is not nil.
func (*OAuthAccessTokenUpdateOne) SetNillableSessionType ¶
func (_u *OAuthAccessTokenUpdateOne) SetNillableSessionType(v *string) *OAuthAccessTokenUpdateOne
SetNillableSessionType sets the "session_type" field if the given value is not nil.
func (*OAuthAccessTokenUpdateOne) SetNillableSignature ¶
func (_u *OAuthAccessTokenUpdateOne) SetNillableSignature(v *string) *OAuthAccessTokenUpdateOne
SetNillableSignature sets the "signature" field if the given value is not nil.
func (*OAuthAccessTokenUpdateOne) SetNillableUserID ¶
func (_u *OAuthAccessTokenUpdateOne) SetNillableUserID(v *int) *OAuthAccessTokenUpdateOne
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*OAuthAccessTokenUpdateOne) SetRequestID ¶
func (_u *OAuthAccessTokenUpdateOne) SetRequestID(v string) *OAuthAccessTokenUpdateOne
SetRequestID sets the "request_id" field.
func (*OAuthAccessTokenUpdateOne) SetRequestedAt ¶
func (_u *OAuthAccessTokenUpdateOne) SetRequestedAt(v time.Time) *OAuthAccessTokenUpdateOne
SetRequestedAt sets the "requested_at" field.
func (*OAuthAccessTokenUpdateOne) SetScopes ¶
func (_u *OAuthAccessTokenUpdateOne) SetScopes(v string) *OAuthAccessTokenUpdateOne
SetScopes sets the "scopes" field.
func (*OAuthAccessTokenUpdateOne) SetSessionData ¶
func (_u *OAuthAccessTokenUpdateOne) SetSessionData(v map[string]interface{}) *OAuthAccessTokenUpdateOne
SetSessionData sets the "session_data" field.
func (*OAuthAccessTokenUpdateOne) SetSessionType ¶
func (_u *OAuthAccessTokenUpdateOne) SetSessionType(v string) *OAuthAccessTokenUpdateOne
SetSessionType sets the "session_type" field.
func (*OAuthAccessTokenUpdateOne) SetSignature ¶
func (_u *OAuthAccessTokenUpdateOne) SetSignature(v string) *OAuthAccessTokenUpdateOne
SetSignature sets the "signature" field.
func (*OAuthAccessTokenUpdateOne) SetUserID ¶
func (_u *OAuthAccessTokenUpdateOne) SetUserID(v int) *OAuthAccessTokenUpdateOne
SetUserID sets the "user_id" field.
func (*OAuthAccessTokenUpdateOne) Where ¶
func (_u *OAuthAccessTokenUpdateOne) Where(ps ...predicate.OAuthAccessToken) *OAuthAccessTokenUpdateOne
Where appends a list predicates to the OAuthAccessTokenUpdate builder.
type OAuthAccessTokens ¶
type OAuthAccessTokens []*OAuthAccessToken
OAuthAccessTokens is a parsable slice of OAuthAccessToken.
type OAuthAuthorizationCode ¶
type OAuthAuthorizationCode struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Type: authorization_code, access_token, refresh_token, pkce, oidc
SessionType string `json:"session_type,omitempty"`
// Unique token/code signature for lookup
Signature string `json:"signature,omitempty"`
// OAuth client ID that owns this session
ClientID string `json:"client_id,omitempty"`
// Optional consumer user ID
UserID *int `json:"user_id,omitempty"`
// Fosite request ID for token revocation
RequestID string `json:"request_id,omitempty"`
// Space-separated granted scopes
Scopes string `json:"scopes,omitempty"`
// Serialized Fosite session data
SessionData map[string]interface{} `json:"session_data,omitempty"`
// Whether this session is still valid
Active bool `json:"active,omitempty"`
// When this session expires
ExpiresAt *time.Time `json:"expires_at,omitempty"`
// When Fosite created the original request
RequestedAt *time.Time `json:"requested_at,omitempty"`
// contains filtered or unexported fields
}
OAuthAuthorizationCode is the model entity for the OAuthAuthorizationCode schema.
func (*OAuthAuthorizationCode) String ¶
func (_m *OAuthAuthorizationCode) String() string
String implements the fmt.Stringer.
func (*OAuthAuthorizationCode) Unwrap ¶
func (_m *OAuthAuthorizationCode) Unwrap() *OAuthAuthorizationCode
Unwrap unwraps the OAuthAuthorizationCode 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 (*OAuthAuthorizationCode) Update ¶
func (_m *OAuthAuthorizationCode) Update() *OAuthAuthorizationCodeUpdateOne
Update returns a builder for updating this OAuthAuthorizationCode. Note that you need to call OAuthAuthorizationCode.Unwrap() before calling this method if this OAuthAuthorizationCode was returned from a transaction, and the transaction was committed or rolled back.
type OAuthAuthorizationCodeClient ¶
type OAuthAuthorizationCodeClient struct {
// contains filtered or unexported fields
}
OAuthAuthorizationCodeClient is a client for the OAuthAuthorizationCode schema.
func NewOAuthAuthorizationCodeClient ¶
func NewOAuthAuthorizationCodeClient(c config) *OAuthAuthorizationCodeClient
NewOAuthAuthorizationCodeClient returns a client for the OAuthAuthorizationCode from the given config.
func (*OAuthAuthorizationCodeClient) Create ¶
func (c *OAuthAuthorizationCodeClient) Create() *OAuthAuthorizationCodeCreate
Create returns a builder for creating a OAuthAuthorizationCode entity.
func (*OAuthAuthorizationCodeClient) CreateBulk ¶
func (c *OAuthAuthorizationCodeClient) CreateBulk(builders ...*OAuthAuthorizationCodeCreate) *OAuthAuthorizationCodeCreateBulk
CreateBulk returns a builder for creating a bulk of OAuthAuthorizationCode entities.
func (*OAuthAuthorizationCodeClient) Delete ¶
func (c *OAuthAuthorizationCodeClient) Delete() *OAuthAuthorizationCodeDelete
Delete returns a delete builder for OAuthAuthorizationCode.
func (*OAuthAuthorizationCodeClient) DeleteOne ¶
func (c *OAuthAuthorizationCodeClient) DeleteOne(_m *OAuthAuthorizationCode) *OAuthAuthorizationCodeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*OAuthAuthorizationCodeClient) DeleteOneID ¶
func (c *OAuthAuthorizationCodeClient) DeleteOneID(id int) *OAuthAuthorizationCodeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*OAuthAuthorizationCodeClient) Get ¶
func (c *OAuthAuthorizationCodeClient) Get(ctx context.Context, id int) (*OAuthAuthorizationCode, error)
Get returns a OAuthAuthorizationCode entity by its id.
func (*OAuthAuthorizationCodeClient) GetX ¶
func (c *OAuthAuthorizationCodeClient) GetX(ctx context.Context, id int) *OAuthAuthorizationCode
GetX is like Get, but panics if an error occurs.
func (*OAuthAuthorizationCodeClient) Hooks ¶
func (c *OAuthAuthorizationCodeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*OAuthAuthorizationCodeClient) Intercept ¶
func (c *OAuthAuthorizationCodeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `oauthauthorizationcode.Intercept(f(g(h())))`.
func (*OAuthAuthorizationCodeClient) Interceptors ¶
func (c *OAuthAuthorizationCodeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*OAuthAuthorizationCodeClient) MapCreateBulk ¶
func (c *OAuthAuthorizationCodeClient) MapCreateBulk(slice any, setFunc func(*OAuthAuthorizationCodeCreate, int)) *OAuthAuthorizationCodeCreateBulk
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 (*OAuthAuthorizationCodeClient) Query ¶
func (c *OAuthAuthorizationCodeClient) Query() *OAuthAuthorizationCodeQuery
Query returns a query builder for OAuthAuthorizationCode.
func (*OAuthAuthorizationCodeClient) Update ¶
func (c *OAuthAuthorizationCodeClient) Update() *OAuthAuthorizationCodeUpdate
Update returns an update builder for OAuthAuthorizationCode.
func (*OAuthAuthorizationCodeClient) UpdateOne ¶
func (c *OAuthAuthorizationCodeClient) UpdateOne(_m *OAuthAuthorizationCode) *OAuthAuthorizationCodeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OAuthAuthorizationCodeClient) UpdateOneID ¶
func (c *OAuthAuthorizationCodeClient) UpdateOneID(id int) *OAuthAuthorizationCodeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OAuthAuthorizationCodeClient) Use ¶
func (c *OAuthAuthorizationCodeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `oauthauthorizationcode.Hooks(f(g(h())))`.
type OAuthAuthorizationCodeCreate ¶
type OAuthAuthorizationCodeCreate struct {
// contains filtered or unexported fields
}
OAuthAuthorizationCodeCreate is the builder for creating a OAuthAuthorizationCode entity.
func (*OAuthAuthorizationCodeCreate) Exec ¶
func (_c *OAuthAuthorizationCodeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*OAuthAuthorizationCodeCreate) ExecX ¶
func (_c *OAuthAuthorizationCodeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthAuthorizationCodeCreate) Mutation ¶
func (_c *OAuthAuthorizationCodeCreate) Mutation() *OAuthAuthorizationCodeMutation
Mutation returns the OAuthAuthorizationCodeMutation object of the builder.
func (*OAuthAuthorizationCodeCreate) Save ¶
func (_c *OAuthAuthorizationCodeCreate) Save(ctx context.Context) (*OAuthAuthorizationCode, error)
Save creates the OAuthAuthorizationCode in the database.
func (*OAuthAuthorizationCodeCreate) SaveX ¶
func (_c *OAuthAuthorizationCodeCreate) SaveX(ctx context.Context) *OAuthAuthorizationCode
SaveX calls Save and panics if Save returns an error.
func (*OAuthAuthorizationCodeCreate) SetActive ¶
func (_c *OAuthAuthorizationCodeCreate) SetActive(v bool) *OAuthAuthorizationCodeCreate
SetActive sets the "active" field.
func (*OAuthAuthorizationCodeCreate) SetClientID ¶
func (_c *OAuthAuthorizationCodeCreate) SetClientID(v string) *OAuthAuthorizationCodeCreate
SetClientID sets the "client_id" field.
func (*OAuthAuthorizationCodeCreate) SetExpiresAt ¶
func (_c *OAuthAuthorizationCodeCreate) SetExpiresAt(v time.Time) *OAuthAuthorizationCodeCreate
SetExpiresAt sets the "expires_at" field.
func (*OAuthAuthorizationCodeCreate) SetNillableActive ¶
func (_c *OAuthAuthorizationCodeCreate) SetNillableActive(v *bool) *OAuthAuthorizationCodeCreate
SetNillableActive sets the "active" field if the given value is not nil.
func (*OAuthAuthorizationCodeCreate) SetNillableExpiresAt ¶
func (_c *OAuthAuthorizationCodeCreate) SetNillableExpiresAt(v *time.Time) *OAuthAuthorizationCodeCreate
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*OAuthAuthorizationCodeCreate) SetNillableRequestID ¶
func (_c *OAuthAuthorizationCodeCreate) SetNillableRequestID(v *string) *OAuthAuthorizationCodeCreate
SetNillableRequestID sets the "request_id" field if the given value is not nil.
func (*OAuthAuthorizationCodeCreate) SetNillableRequestedAt ¶
func (_c *OAuthAuthorizationCodeCreate) SetNillableRequestedAt(v *time.Time) *OAuthAuthorizationCodeCreate
SetNillableRequestedAt sets the "requested_at" field if the given value is not nil.
func (*OAuthAuthorizationCodeCreate) SetNillableScopes ¶
func (_c *OAuthAuthorizationCodeCreate) SetNillableScopes(v *string) *OAuthAuthorizationCodeCreate
SetNillableScopes sets the "scopes" field if the given value is not nil.
func (*OAuthAuthorizationCodeCreate) SetNillableUserID ¶
func (_c *OAuthAuthorizationCodeCreate) SetNillableUserID(v *int) *OAuthAuthorizationCodeCreate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*OAuthAuthorizationCodeCreate) SetRequestID ¶
func (_c *OAuthAuthorizationCodeCreate) SetRequestID(v string) *OAuthAuthorizationCodeCreate
SetRequestID sets the "request_id" field.
func (*OAuthAuthorizationCodeCreate) SetRequestedAt ¶
func (_c *OAuthAuthorizationCodeCreate) SetRequestedAt(v time.Time) *OAuthAuthorizationCodeCreate
SetRequestedAt sets the "requested_at" field.
func (*OAuthAuthorizationCodeCreate) SetScopes ¶
func (_c *OAuthAuthorizationCodeCreate) SetScopes(v string) *OAuthAuthorizationCodeCreate
SetScopes sets the "scopes" field.
func (*OAuthAuthorizationCodeCreate) SetSessionData ¶
func (_c *OAuthAuthorizationCodeCreate) SetSessionData(v map[string]interface{}) *OAuthAuthorizationCodeCreate
SetSessionData sets the "session_data" field.
func (*OAuthAuthorizationCodeCreate) SetSessionType ¶
func (_c *OAuthAuthorizationCodeCreate) SetSessionType(v string) *OAuthAuthorizationCodeCreate
SetSessionType sets the "session_type" field.
func (*OAuthAuthorizationCodeCreate) SetSignature ¶
func (_c *OAuthAuthorizationCodeCreate) SetSignature(v string) *OAuthAuthorizationCodeCreate
SetSignature sets the "signature" field.
func (*OAuthAuthorizationCodeCreate) SetUserID ¶
func (_c *OAuthAuthorizationCodeCreate) SetUserID(v int) *OAuthAuthorizationCodeCreate
SetUserID sets the "user_id" field.
type OAuthAuthorizationCodeCreateBulk ¶
type OAuthAuthorizationCodeCreateBulk struct {
// contains filtered or unexported fields
}
OAuthAuthorizationCodeCreateBulk is the builder for creating many OAuthAuthorizationCode entities in bulk.
func (*OAuthAuthorizationCodeCreateBulk) Exec ¶
func (_c *OAuthAuthorizationCodeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OAuthAuthorizationCodeCreateBulk) ExecX ¶
func (_c *OAuthAuthorizationCodeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthAuthorizationCodeCreateBulk) Save ¶
func (_c *OAuthAuthorizationCodeCreateBulk) Save(ctx context.Context) ([]*OAuthAuthorizationCode, error)
Save creates the OAuthAuthorizationCode entities in the database.
func (*OAuthAuthorizationCodeCreateBulk) SaveX ¶
func (_c *OAuthAuthorizationCodeCreateBulk) SaveX(ctx context.Context) []*OAuthAuthorizationCode
SaveX is like Save, but panics if an error occurs.
type OAuthAuthorizationCodeDelete ¶
type OAuthAuthorizationCodeDelete struct {
// contains filtered or unexported fields
}
OAuthAuthorizationCodeDelete is the builder for deleting a OAuthAuthorizationCode entity.
func (*OAuthAuthorizationCodeDelete) Exec ¶
func (_d *OAuthAuthorizationCodeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OAuthAuthorizationCodeDelete) ExecX ¶
func (_d *OAuthAuthorizationCodeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OAuthAuthorizationCodeDelete) Where ¶
func (_d *OAuthAuthorizationCodeDelete) Where(ps ...predicate.OAuthAuthorizationCode) *OAuthAuthorizationCodeDelete
Where appends a list predicates to the OAuthAuthorizationCodeDelete builder.
type OAuthAuthorizationCodeDeleteOne ¶
type OAuthAuthorizationCodeDeleteOne struct {
// contains filtered or unexported fields
}
OAuthAuthorizationCodeDeleteOne is the builder for deleting a single OAuthAuthorizationCode entity.
func (*OAuthAuthorizationCodeDeleteOne) Exec ¶
func (_d *OAuthAuthorizationCodeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OAuthAuthorizationCodeDeleteOne) ExecX ¶
func (_d *OAuthAuthorizationCodeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthAuthorizationCodeDeleteOne) Where ¶
func (_d *OAuthAuthorizationCodeDeleteOne) Where(ps ...predicate.OAuthAuthorizationCode) *OAuthAuthorizationCodeDeleteOne
Where appends a list predicates to the OAuthAuthorizationCodeDelete builder.
type OAuthAuthorizationCodeGroupBy ¶
type OAuthAuthorizationCodeGroupBy struct {
// contains filtered or unexported fields
}
OAuthAuthorizationCodeGroupBy is the group-by builder for OAuthAuthorizationCode entities.
func (*OAuthAuthorizationCodeGroupBy) Aggregate ¶
func (_g *OAuthAuthorizationCodeGroupBy) Aggregate(fns ...AggregateFunc) *OAuthAuthorizationCodeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OAuthAuthorizationCodeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OAuthAuthorizationCodeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OAuthAuthorizationCodeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OAuthAuthorizationCodeGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*OAuthAuthorizationCodeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OAuthAuthorizationCodeGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*OAuthAuthorizationCodeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OAuthAuthorizationCodeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OAuthAuthorizationCodeGroupBy) Scan ¶
func (_g *OAuthAuthorizationCodeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OAuthAuthorizationCodeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
func (*OAuthAuthorizationCodeGroupBy) StringX ¶
StringX is like String, but panics if an error occurs.
type OAuthAuthorizationCodeMutation ¶
type OAuthAuthorizationCodeMutation struct {
// contains filtered or unexported fields
}
OAuthAuthorizationCodeMutation represents an operation that mutates the OAuthAuthorizationCode nodes in the graph.
func (*OAuthAuthorizationCodeMutation) Active ¶
func (m *OAuthAuthorizationCodeMutation) Active() (r bool, exists bool)
Active returns the value of the "active" field in the mutation.
func (*OAuthAuthorizationCodeMutation) AddField ¶
func (m *OAuthAuthorizationCodeMutation) 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 (*OAuthAuthorizationCodeMutation) AddUserID ¶
func (m *OAuthAuthorizationCodeMutation) AddUserID(i int)
AddUserID adds i to the "user_id" field.
func (*OAuthAuthorizationCodeMutation) AddedEdges ¶
func (m *OAuthAuthorizationCodeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OAuthAuthorizationCodeMutation) AddedField ¶
func (m *OAuthAuthorizationCodeMutation) 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 (*OAuthAuthorizationCodeMutation) AddedFields ¶
func (m *OAuthAuthorizationCodeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OAuthAuthorizationCodeMutation) AddedIDs ¶
func (m *OAuthAuthorizationCodeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OAuthAuthorizationCodeMutation) AddedUserID ¶
func (m *OAuthAuthorizationCodeMutation) AddedUserID() (r int, exists bool)
AddedUserID returns the value that was added to the "user_id" field in this mutation.
func (*OAuthAuthorizationCodeMutation) ClearEdge ¶
func (m *OAuthAuthorizationCodeMutation) 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 (*OAuthAuthorizationCodeMutation) ClearExpiresAt ¶
func (m *OAuthAuthorizationCodeMutation) ClearExpiresAt()
ClearExpiresAt clears the value of the "expires_at" field.
func (*OAuthAuthorizationCodeMutation) ClearField ¶
func (m *OAuthAuthorizationCodeMutation) 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 (*OAuthAuthorizationCodeMutation) ClearRequestedAt ¶
func (m *OAuthAuthorizationCodeMutation) ClearRequestedAt()
ClearRequestedAt clears the value of the "requested_at" field.
func (*OAuthAuthorizationCodeMutation) ClearUserID ¶
func (m *OAuthAuthorizationCodeMutation) ClearUserID()
ClearUserID clears the value of the "user_id" field.
func (*OAuthAuthorizationCodeMutation) ClearedEdges ¶
func (m *OAuthAuthorizationCodeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OAuthAuthorizationCodeMutation) ClearedFields ¶
func (m *OAuthAuthorizationCodeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OAuthAuthorizationCodeMutation) Client ¶
func (m OAuthAuthorizationCodeMutation) 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 (*OAuthAuthorizationCodeMutation) ClientID ¶
func (m *OAuthAuthorizationCodeMutation) ClientID() (r string, exists bool)
ClientID returns the value of the "client_id" field in the mutation.
func (*OAuthAuthorizationCodeMutation) EdgeCleared ¶
func (m *OAuthAuthorizationCodeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OAuthAuthorizationCodeMutation) ExpiresAt ¶
func (m *OAuthAuthorizationCodeMutation) ExpiresAt() (r time.Time, exists bool)
ExpiresAt returns the value of the "expires_at" field in the mutation.
func (*OAuthAuthorizationCodeMutation) ExpiresAtCleared ¶
func (m *OAuthAuthorizationCodeMutation) ExpiresAtCleared() bool
ExpiresAtCleared returns if the "expires_at" field was cleared in this mutation.
func (*OAuthAuthorizationCodeMutation) Field ¶
func (m *OAuthAuthorizationCodeMutation) 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 (*OAuthAuthorizationCodeMutation) FieldCleared ¶
func (m *OAuthAuthorizationCodeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OAuthAuthorizationCodeMutation) Fields ¶
func (m *OAuthAuthorizationCodeMutation) 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 (*OAuthAuthorizationCodeMutation) ID ¶
func (m *OAuthAuthorizationCodeMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*OAuthAuthorizationCodeMutation) IDs ¶
func (m *OAuthAuthorizationCodeMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*OAuthAuthorizationCodeMutation) OldActive ¶
func (m *OAuthAuthorizationCodeMutation) OldActive(ctx context.Context) (v bool, err error)
OldActive returns the old "active" field's value of the OAuthAuthorizationCode entity. If the OAuthAuthorizationCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthAuthorizationCodeMutation) OldClientID ¶
func (m *OAuthAuthorizationCodeMutation) OldClientID(ctx context.Context) (v string, err error)
OldClientID returns the old "client_id" field's value of the OAuthAuthorizationCode entity. If the OAuthAuthorizationCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthAuthorizationCodeMutation) OldExpiresAt ¶
func (m *OAuthAuthorizationCodeMutation) OldExpiresAt(ctx context.Context) (v *time.Time, err error)
OldExpiresAt returns the old "expires_at" field's value of the OAuthAuthorizationCode entity. If the OAuthAuthorizationCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthAuthorizationCodeMutation) OldField ¶
func (m *OAuthAuthorizationCodeMutation) 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 (*OAuthAuthorizationCodeMutation) OldRequestID ¶
func (m *OAuthAuthorizationCodeMutation) OldRequestID(ctx context.Context) (v string, err error)
OldRequestID returns the old "request_id" field's value of the OAuthAuthorizationCode entity. If the OAuthAuthorizationCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthAuthorizationCodeMutation) OldRequestedAt ¶
func (m *OAuthAuthorizationCodeMutation) OldRequestedAt(ctx context.Context) (v *time.Time, err error)
OldRequestedAt returns the old "requested_at" field's value of the OAuthAuthorizationCode entity. If the OAuthAuthorizationCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthAuthorizationCodeMutation) OldScopes ¶
func (m *OAuthAuthorizationCodeMutation) OldScopes(ctx context.Context) (v string, err error)
OldScopes returns the old "scopes" field's value of the OAuthAuthorizationCode entity. If the OAuthAuthorizationCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthAuthorizationCodeMutation) OldSessionData ¶
func (m *OAuthAuthorizationCodeMutation) OldSessionData(ctx context.Context) (v map[string]interface{}, err error)
OldSessionData returns the old "session_data" field's value of the OAuthAuthorizationCode entity. If the OAuthAuthorizationCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthAuthorizationCodeMutation) OldSessionType ¶
func (m *OAuthAuthorizationCodeMutation) OldSessionType(ctx context.Context) (v string, err error)
OldSessionType returns the old "session_type" field's value of the OAuthAuthorizationCode entity. If the OAuthAuthorizationCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthAuthorizationCodeMutation) OldSignature ¶
func (m *OAuthAuthorizationCodeMutation) OldSignature(ctx context.Context) (v string, err error)
OldSignature returns the old "signature" field's value of the OAuthAuthorizationCode entity. If the OAuthAuthorizationCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthAuthorizationCodeMutation) OldUserID ¶
func (m *OAuthAuthorizationCodeMutation) OldUserID(ctx context.Context) (v *int, err error)
OldUserID returns the old "user_id" field's value of the OAuthAuthorizationCode entity. If the OAuthAuthorizationCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthAuthorizationCodeMutation) Op ¶
func (m *OAuthAuthorizationCodeMutation) Op() Op
Op returns the operation name.
func (*OAuthAuthorizationCodeMutation) RemovedEdges ¶
func (m *OAuthAuthorizationCodeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OAuthAuthorizationCodeMutation) RemovedIDs ¶
func (m *OAuthAuthorizationCodeMutation) 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 (*OAuthAuthorizationCodeMutation) RequestID ¶
func (m *OAuthAuthorizationCodeMutation) RequestID() (r string, exists bool)
RequestID returns the value of the "request_id" field in the mutation.
func (*OAuthAuthorizationCodeMutation) RequestedAt ¶
func (m *OAuthAuthorizationCodeMutation) RequestedAt() (r time.Time, exists bool)
RequestedAt returns the value of the "requested_at" field in the mutation.
func (*OAuthAuthorizationCodeMutation) RequestedAtCleared ¶
func (m *OAuthAuthorizationCodeMutation) RequestedAtCleared() bool
RequestedAtCleared returns if the "requested_at" field was cleared in this mutation.
func (*OAuthAuthorizationCodeMutation) ResetActive ¶
func (m *OAuthAuthorizationCodeMutation) ResetActive()
ResetActive resets all changes to the "active" field.
func (*OAuthAuthorizationCodeMutation) ResetClientID ¶
func (m *OAuthAuthorizationCodeMutation) ResetClientID()
ResetClientID resets all changes to the "client_id" field.
func (*OAuthAuthorizationCodeMutation) ResetEdge ¶
func (m *OAuthAuthorizationCodeMutation) 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 (*OAuthAuthorizationCodeMutation) ResetExpiresAt ¶
func (m *OAuthAuthorizationCodeMutation) ResetExpiresAt()
ResetExpiresAt resets all changes to the "expires_at" field.
func (*OAuthAuthorizationCodeMutation) ResetField ¶
func (m *OAuthAuthorizationCodeMutation) 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 (*OAuthAuthorizationCodeMutation) ResetRequestID ¶
func (m *OAuthAuthorizationCodeMutation) ResetRequestID()
ResetRequestID resets all changes to the "request_id" field.
func (*OAuthAuthorizationCodeMutation) ResetRequestedAt ¶
func (m *OAuthAuthorizationCodeMutation) ResetRequestedAt()
ResetRequestedAt resets all changes to the "requested_at" field.
func (*OAuthAuthorizationCodeMutation) ResetScopes ¶
func (m *OAuthAuthorizationCodeMutation) ResetScopes()
ResetScopes resets all changes to the "scopes" field.
func (*OAuthAuthorizationCodeMutation) ResetSessionData ¶
func (m *OAuthAuthorizationCodeMutation) ResetSessionData()
ResetSessionData resets all changes to the "session_data" field.
func (*OAuthAuthorizationCodeMutation) ResetSessionType ¶
func (m *OAuthAuthorizationCodeMutation) ResetSessionType()
ResetSessionType resets all changes to the "session_type" field.
func (*OAuthAuthorizationCodeMutation) ResetSignature ¶
func (m *OAuthAuthorizationCodeMutation) ResetSignature()
ResetSignature resets all changes to the "signature" field.
func (*OAuthAuthorizationCodeMutation) ResetUserID ¶
func (m *OAuthAuthorizationCodeMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*OAuthAuthorizationCodeMutation) Scopes ¶
func (m *OAuthAuthorizationCodeMutation) Scopes() (r string, exists bool)
Scopes returns the value of the "scopes" field in the mutation.
func (*OAuthAuthorizationCodeMutation) SessionData ¶
func (m *OAuthAuthorizationCodeMutation) SessionData() (r map[string]interface{}, exists bool)
SessionData returns the value of the "session_data" field in the mutation.
func (*OAuthAuthorizationCodeMutation) SessionType ¶
func (m *OAuthAuthorizationCodeMutation) SessionType() (r string, exists bool)
SessionType returns the value of the "session_type" field in the mutation.
func (*OAuthAuthorizationCodeMutation) SetActive ¶
func (m *OAuthAuthorizationCodeMutation) SetActive(b bool)
SetActive sets the "active" field.
func (*OAuthAuthorizationCodeMutation) SetClientID ¶
func (m *OAuthAuthorizationCodeMutation) SetClientID(s string)
SetClientID sets the "client_id" field.
func (*OAuthAuthorizationCodeMutation) SetExpiresAt ¶
func (m *OAuthAuthorizationCodeMutation) SetExpiresAt(t time.Time)
SetExpiresAt sets the "expires_at" field.
func (*OAuthAuthorizationCodeMutation) SetField ¶
func (m *OAuthAuthorizationCodeMutation) 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 (*OAuthAuthorizationCodeMutation) SetOp ¶
func (m *OAuthAuthorizationCodeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*OAuthAuthorizationCodeMutation) SetRequestID ¶
func (m *OAuthAuthorizationCodeMutation) SetRequestID(s string)
SetRequestID sets the "request_id" field.
func (*OAuthAuthorizationCodeMutation) SetRequestedAt ¶
func (m *OAuthAuthorizationCodeMutation) SetRequestedAt(t time.Time)
SetRequestedAt sets the "requested_at" field.
func (*OAuthAuthorizationCodeMutation) SetScopes ¶
func (m *OAuthAuthorizationCodeMutation) SetScopes(s string)
SetScopes sets the "scopes" field.
func (*OAuthAuthorizationCodeMutation) SetSessionData ¶
func (m *OAuthAuthorizationCodeMutation) SetSessionData(value map[string]interface{})
SetSessionData sets the "session_data" field.
func (*OAuthAuthorizationCodeMutation) SetSessionType ¶
func (m *OAuthAuthorizationCodeMutation) SetSessionType(s string)
SetSessionType sets the "session_type" field.
func (*OAuthAuthorizationCodeMutation) SetSignature ¶
func (m *OAuthAuthorizationCodeMutation) SetSignature(s string)
SetSignature sets the "signature" field.
func (*OAuthAuthorizationCodeMutation) SetUserID ¶
func (m *OAuthAuthorizationCodeMutation) SetUserID(i int)
SetUserID sets the "user_id" field.
func (*OAuthAuthorizationCodeMutation) Signature ¶
func (m *OAuthAuthorizationCodeMutation) Signature() (r string, exists bool)
Signature returns the value of the "signature" field in the mutation.
func (OAuthAuthorizationCodeMutation) Tx ¶
func (m OAuthAuthorizationCodeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OAuthAuthorizationCodeMutation) Type ¶
func (m *OAuthAuthorizationCodeMutation) Type() string
Type returns the node type of this mutation (OAuthAuthorizationCode).
func (*OAuthAuthorizationCodeMutation) UserID ¶
func (m *OAuthAuthorizationCodeMutation) UserID() (r int, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*OAuthAuthorizationCodeMutation) UserIDCleared ¶
func (m *OAuthAuthorizationCodeMutation) UserIDCleared() bool
UserIDCleared returns if the "user_id" field was cleared in this mutation.
func (*OAuthAuthorizationCodeMutation) Where ¶
func (m *OAuthAuthorizationCodeMutation) Where(ps ...predicate.OAuthAuthorizationCode)
Where appends a list predicates to the OAuthAuthorizationCodeMutation builder.
func (*OAuthAuthorizationCodeMutation) WhereP ¶
func (m *OAuthAuthorizationCodeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the OAuthAuthorizationCodeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type OAuthAuthorizationCodeQuery ¶
type OAuthAuthorizationCodeQuery struct {
// contains filtered or unexported fields
}
OAuthAuthorizationCodeQuery is the builder for querying OAuthAuthorizationCode entities.
func (*OAuthAuthorizationCodeQuery) Aggregate ¶
func (_q *OAuthAuthorizationCodeQuery) Aggregate(fns ...AggregateFunc) *OAuthAuthorizationCodeSelect
Aggregate returns a OAuthAuthorizationCodeSelect configured with the given aggregations.
func (*OAuthAuthorizationCodeQuery) All ¶
func (_q *OAuthAuthorizationCodeQuery) All(ctx context.Context) ([]*OAuthAuthorizationCode, error)
All executes the query and returns a list of OAuthAuthorizationCodes.
func (*OAuthAuthorizationCodeQuery) AllX ¶
func (_q *OAuthAuthorizationCodeQuery) AllX(ctx context.Context) []*OAuthAuthorizationCode
AllX is like All, but panics if an error occurs.
func (*OAuthAuthorizationCodeQuery) Clone ¶
func (_q *OAuthAuthorizationCodeQuery) Clone() *OAuthAuthorizationCodeQuery
Clone returns a duplicate of the OAuthAuthorizationCodeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OAuthAuthorizationCodeQuery) Count ¶
func (_q *OAuthAuthorizationCodeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*OAuthAuthorizationCodeQuery) CountX ¶
func (_q *OAuthAuthorizationCodeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*OAuthAuthorizationCodeQuery) Exist ¶
func (_q *OAuthAuthorizationCodeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*OAuthAuthorizationCodeQuery) ExistX ¶
func (_q *OAuthAuthorizationCodeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*OAuthAuthorizationCodeQuery) First ¶
func (_q *OAuthAuthorizationCodeQuery) First(ctx context.Context) (*OAuthAuthorizationCode, error)
First returns the first OAuthAuthorizationCode entity from the query. Returns a *NotFoundError when no OAuthAuthorizationCode was found.
func (*OAuthAuthorizationCodeQuery) FirstID ¶
func (_q *OAuthAuthorizationCodeQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first OAuthAuthorizationCode ID from the query. Returns a *NotFoundError when no OAuthAuthorizationCode ID was found.
func (*OAuthAuthorizationCodeQuery) FirstIDX ¶
func (_q *OAuthAuthorizationCodeQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*OAuthAuthorizationCodeQuery) FirstX ¶
func (_q *OAuthAuthorizationCodeQuery) FirstX(ctx context.Context) *OAuthAuthorizationCode
FirstX is like First, but panics if an error occurs.
func (*OAuthAuthorizationCodeQuery) GroupBy ¶
func (_q *OAuthAuthorizationCodeQuery) GroupBy(field string, fields ...string) *OAuthAuthorizationCodeGroupBy
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 {
SessionType string `json:"session_type,omitempty"`
Count int `json:"count,omitempty"`
}
client.OAuthAuthorizationCode.Query().
GroupBy(oauthauthorizationcode.FieldSessionType).
Aggregate(_test.Count()).
Scan(ctx, &v)
func (*OAuthAuthorizationCodeQuery) IDs ¶
func (_q *OAuthAuthorizationCodeQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of OAuthAuthorizationCode IDs.
func (*OAuthAuthorizationCodeQuery) IDsX ¶
func (_q *OAuthAuthorizationCodeQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*OAuthAuthorizationCodeQuery) Limit ¶
func (_q *OAuthAuthorizationCodeQuery) Limit(limit int) *OAuthAuthorizationCodeQuery
Limit the number of records to be returned by this query.
func (*OAuthAuthorizationCodeQuery) Offset ¶
func (_q *OAuthAuthorizationCodeQuery) Offset(offset int) *OAuthAuthorizationCodeQuery
Offset to start from.
func (*OAuthAuthorizationCodeQuery) Only ¶
func (_q *OAuthAuthorizationCodeQuery) Only(ctx context.Context) (*OAuthAuthorizationCode, error)
Only returns a single OAuthAuthorizationCode entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OAuthAuthorizationCode entity is found. Returns a *NotFoundError when no OAuthAuthorizationCode entities are found.
func (*OAuthAuthorizationCodeQuery) OnlyID ¶
func (_q *OAuthAuthorizationCodeQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only OAuthAuthorizationCode ID in the query. Returns a *NotSingularError when more than one OAuthAuthorizationCode ID is found. Returns a *NotFoundError when no entities are found.
func (*OAuthAuthorizationCodeQuery) OnlyIDX ¶
func (_q *OAuthAuthorizationCodeQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*OAuthAuthorizationCodeQuery) OnlyX ¶
func (_q *OAuthAuthorizationCodeQuery) OnlyX(ctx context.Context) *OAuthAuthorizationCode
OnlyX is like Only, but panics if an error occurs.
func (*OAuthAuthorizationCodeQuery) Order ¶
func (_q *OAuthAuthorizationCodeQuery) Order(o ...oauthauthorizationcode.OrderOption) *OAuthAuthorizationCodeQuery
Order specifies how the records should be ordered.
func (*OAuthAuthorizationCodeQuery) Select ¶
func (_q *OAuthAuthorizationCodeQuery) Select(fields ...string) *OAuthAuthorizationCodeSelect
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 {
SessionType string `json:"session_type,omitempty"`
}
client.OAuthAuthorizationCode.Query().
Select(oauthauthorizationcode.FieldSessionType).
Scan(ctx, &v)
func (*OAuthAuthorizationCodeQuery) Unique ¶
func (_q *OAuthAuthorizationCodeQuery) Unique(unique bool) *OAuthAuthorizationCodeQuery
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 (*OAuthAuthorizationCodeQuery) Where ¶
func (_q *OAuthAuthorizationCodeQuery) Where(ps ...predicate.OAuthAuthorizationCode) *OAuthAuthorizationCodeQuery
Where adds a new predicate for the OAuthAuthorizationCodeQuery builder.
type OAuthAuthorizationCodeSelect ¶
type OAuthAuthorizationCodeSelect struct {
*OAuthAuthorizationCodeQuery
// contains filtered or unexported fields
}
OAuthAuthorizationCodeSelect is the builder for selecting fields of OAuthAuthorizationCode entities.
func (*OAuthAuthorizationCodeSelect) Aggregate ¶
func (_s *OAuthAuthorizationCodeSelect) Aggregate(fns ...AggregateFunc) *OAuthAuthorizationCodeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*OAuthAuthorizationCodeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OAuthAuthorizationCodeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OAuthAuthorizationCodeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OAuthAuthorizationCodeSelect) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*OAuthAuthorizationCodeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OAuthAuthorizationCodeSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*OAuthAuthorizationCodeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OAuthAuthorizationCodeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OAuthAuthorizationCodeSelect) Scan ¶
func (_s *OAuthAuthorizationCodeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OAuthAuthorizationCodeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
func (*OAuthAuthorizationCodeSelect) StringX ¶
StringX is like String, but panics if an error occurs.
type OAuthAuthorizationCodeUpdate ¶
type OAuthAuthorizationCodeUpdate struct {
// contains filtered or unexported fields
}
OAuthAuthorizationCodeUpdate is the builder for updating OAuthAuthorizationCode entities.
func (*OAuthAuthorizationCodeUpdate) AddUserID ¶
func (_u *OAuthAuthorizationCodeUpdate) AddUserID(v int) *OAuthAuthorizationCodeUpdate
AddUserID adds value to the "user_id" field.
func (*OAuthAuthorizationCodeUpdate) ClearExpiresAt ¶
func (_u *OAuthAuthorizationCodeUpdate) ClearExpiresAt() *OAuthAuthorizationCodeUpdate
ClearExpiresAt clears the value of the "expires_at" field.
func (*OAuthAuthorizationCodeUpdate) ClearRequestedAt ¶
func (_u *OAuthAuthorizationCodeUpdate) ClearRequestedAt() *OAuthAuthorizationCodeUpdate
ClearRequestedAt clears the value of the "requested_at" field.
func (*OAuthAuthorizationCodeUpdate) ClearUserID ¶
func (_u *OAuthAuthorizationCodeUpdate) ClearUserID() *OAuthAuthorizationCodeUpdate
ClearUserID clears the value of the "user_id" field.
func (*OAuthAuthorizationCodeUpdate) Exec ¶
func (_u *OAuthAuthorizationCodeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OAuthAuthorizationCodeUpdate) ExecX ¶
func (_u *OAuthAuthorizationCodeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthAuthorizationCodeUpdate) Mutation ¶
func (_u *OAuthAuthorizationCodeUpdate) Mutation() *OAuthAuthorizationCodeMutation
Mutation returns the OAuthAuthorizationCodeMutation object of the builder.
func (*OAuthAuthorizationCodeUpdate) Save ¶
func (_u *OAuthAuthorizationCodeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OAuthAuthorizationCodeUpdate) SaveX ¶
func (_u *OAuthAuthorizationCodeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OAuthAuthorizationCodeUpdate) SetActive ¶
func (_u *OAuthAuthorizationCodeUpdate) SetActive(v bool) *OAuthAuthorizationCodeUpdate
SetActive sets the "active" field.
func (*OAuthAuthorizationCodeUpdate) SetClientID ¶
func (_u *OAuthAuthorizationCodeUpdate) SetClientID(v string) *OAuthAuthorizationCodeUpdate
SetClientID sets the "client_id" field.
func (*OAuthAuthorizationCodeUpdate) SetExpiresAt ¶
func (_u *OAuthAuthorizationCodeUpdate) SetExpiresAt(v time.Time) *OAuthAuthorizationCodeUpdate
SetExpiresAt sets the "expires_at" field.
func (*OAuthAuthorizationCodeUpdate) SetNillableActive ¶
func (_u *OAuthAuthorizationCodeUpdate) SetNillableActive(v *bool) *OAuthAuthorizationCodeUpdate
SetNillableActive sets the "active" field if the given value is not nil.
func (*OAuthAuthorizationCodeUpdate) SetNillableClientID ¶
func (_u *OAuthAuthorizationCodeUpdate) SetNillableClientID(v *string) *OAuthAuthorizationCodeUpdate
SetNillableClientID sets the "client_id" field if the given value is not nil.
func (*OAuthAuthorizationCodeUpdate) SetNillableExpiresAt ¶
func (_u *OAuthAuthorizationCodeUpdate) SetNillableExpiresAt(v *time.Time) *OAuthAuthorizationCodeUpdate
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*OAuthAuthorizationCodeUpdate) SetNillableRequestID ¶
func (_u *OAuthAuthorizationCodeUpdate) SetNillableRequestID(v *string) *OAuthAuthorizationCodeUpdate
SetNillableRequestID sets the "request_id" field if the given value is not nil.
func (*OAuthAuthorizationCodeUpdate) SetNillableRequestedAt ¶
func (_u *OAuthAuthorizationCodeUpdate) SetNillableRequestedAt(v *time.Time) *OAuthAuthorizationCodeUpdate
SetNillableRequestedAt sets the "requested_at" field if the given value is not nil.
func (*OAuthAuthorizationCodeUpdate) SetNillableScopes ¶
func (_u *OAuthAuthorizationCodeUpdate) SetNillableScopes(v *string) *OAuthAuthorizationCodeUpdate
SetNillableScopes sets the "scopes" field if the given value is not nil.
func (*OAuthAuthorizationCodeUpdate) SetNillableSessionType ¶
func (_u *OAuthAuthorizationCodeUpdate) SetNillableSessionType(v *string) *OAuthAuthorizationCodeUpdate
SetNillableSessionType sets the "session_type" field if the given value is not nil.
func (*OAuthAuthorizationCodeUpdate) SetNillableSignature ¶
func (_u *OAuthAuthorizationCodeUpdate) SetNillableSignature(v *string) *OAuthAuthorizationCodeUpdate
SetNillableSignature sets the "signature" field if the given value is not nil.
func (*OAuthAuthorizationCodeUpdate) SetNillableUserID ¶
func (_u *OAuthAuthorizationCodeUpdate) SetNillableUserID(v *int) *OAuthAuthorizationCodeUpdate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*OAuthAuthorizationCodeUpdate) SetRequestID ¶
func (_u *OAuthAuthorizationCodeUpdate) SetRequestID(v string) *OAuthAuthorizationCodeUpdate
SetRequestID sets the "request_id" field.
func (*OAuthAuthorizationCodeUpdate) SetRequestedAt ¶
func (_u *OAuthAuthorizationCodeUpdate) SetRequestedAt(v time.Time) *OAuthAuthorizationCodeUpdate
SetRequestedAt sets the "requested_at" field.
func (*OAuthAuthorizationCodeUpdate) SetScopes ¶
func (_u *OAuthAuthorizationCodeUpdate) SetScopes(v string) *OAuthAuthorizationCodeUpdate
SetScopes sets the "scopes" field.
func (*OAuthAuthorizationCodeUpdate) SetSessionData ¶
func (_u *OAuthAuthorizationCodeUpdate) SetSessionData(v map[string]interface{}) *OAuthAuthorizationCodeUpdate
SetSessionData sets the "session_data" field.
func (*OAuthAuthorizationCodeUpdate) SetSessionType ¶
func (_u *OAuthAuthorizationCodeUpdate) SetSessionType(v string) *OAuthAuthorizationCodeUpdate
SetSessionType sets the "session_type" field.
func (*OAuthAuthorizationCodeUpdate) SetSignature ¶
func (_u *OAuthAuthorizationCodeUpdate) SetSignature(v string) *OAuthAuthorizationCodeUpdate
SetSignature sets the "signature" field.
func (*OAuthAuthorizationCodeUpdate) SetUserID ¶
func (_u *OAuthAuthorizationCodeUpdate) SetUserID(v int) *OAuthAuthorizationCodeUpdate
SetUserID sets the "user_id" field.
func (*OAuthAuthorizationCodeUpdate) Where ¶
func (_u *OAuthAuthorizationCodeUpdate) Where(ps ...predicate.OAuthAuthorizationCode) *OAuthAuthorizationCodeUpdate
Where appends a list predicates to the OAuthAuthorizationCodeUpdate builder.
type OAuthAuthorizationCodeUpdateOne ¶
type OAuthAuthorizationCodeUpdateOne struct {
// contains filtered or unexported fields
}
OAuthAuthorizationCodeUpdateOne is the builder for updating a single OAuthAuthorizationCode entity.
func (*OAuthAuthorizationCodeUpdateOne) AddUserID ¶
func (_u *OAuthAuthorizationCodeUpdateOne) AddUserID(v int) *OAuthAuthorizationCodeUpdateOne
AddUserID adds value to the "user_id" field.
func (*OAuthAuthorizationCodeUpdateOne) ClearExpiresAt ¶
func (_u *OAuthAuthorizationCodeUpdateOne) ClearExpiresAt() *OAuthAuthorizationCodeUpdateOne
ClearExpiresAt clears the value of the "expires_at" field.
func (*OAuthAuthorizationCodeUpdateOne) ClearRequestedAt ¶
func (_u *OAuthAuthorizationCodeUpdateOne) ClearRequestedAt() *OAuthAuthorizationCodeUpdateOne
ClearRequestedAt clears the value of the "requested_at" field.
func (*OAuthAuthorizationCodeUpdateOne) ClearUserID ¶
func (_u *OAuthAuthorizationCodeUpdateOne) ClearUserID() *OAuthAuthorizationCodeUpdateOne
ClearUserID clears the value of the "user_id" field.
func (*OAuthAuthorizationCodeUpdateOne) Exec ¶
func (_u *OAuthAuthorizationCodeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OAuthAuthorizationCodeUpdateOne) ExecX ¶
func (_u *OAuthAuthorizationCodeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthAuthorizationCodeUpdateOne) Mutation ¶
func (_u *OAuthAuthorizationCodeUpdateOne) Mutation() *OAuthAuthorizationCodeMutation
Mutation returns the OAuthAuthorizationCodeMutation object of the builder.
func (*OAuthAuthorizationCodeUpdateOne) Save ¶
func (_u *OAuthAuthorizationCodeUpdateOne) Save(ctx context.Context) (*OAuthAuthorizationCode, error)
Save executes the query and returns the updated OAuthAuthorizationCode entity.
func (*OAuthAuthorizationCodeUpdateOne) SaveX ¶
func (_u *OAuthAuthorizationCodeUpdateOne) SaveX(ctx context.Context) *OAuthAuthorizationCode
SaveX is like Save, but panics if an error occurs.
func (*OAuthAuthorizationCodeUpdateOne) Select ¶
func (_u *OAuthAuthorizationCodeUpdateOne) Select(field string, fields ...string) *OAuthAuthorizationCodeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OAuthAuthorizationCodeUpdateOne) SetActive ¶
func (_u *OAuthAuthorizationCodeUpdateOne) SetActive(v bool) *OAuthAuthorizationCodeUpdateOne
SetActive sets the "active" field.
func (*OAuthAuthorizationCodeUpdateOne) SetClientID ¶
func (_u *OAuthAuthorizationCodeUpdateOne) SetClientID(v string) *OAuthAuthorizationCodeUpdateOne
SetClientID sets the "client_id" field.
func (*OAuthAuthorizationCodeUpdateOne) SetExpiresAt ¶
func (_u *OAuthAuthorizationCodeUpdateOne) SetExpiresAt(v time.Time) *OAuthAuthorizationCodeUpdateOne
SetExpiresAt sets the "expires_at" field.
func (*OAuthAuthorizationCodeUpdateOne) SetNillableActive ¶
func (_u *OAuthAuthorizationCodeUpdateOne) SetNillableActive(v *bool) *OAuthAuthorizationCodeUpdateOne
SetNillableActive sets the "active" field if the given value is not nil.
func (*OAuthAuthorizationCodeUpdateOne) SetNillableClientID ¶
func (_u *OAuthAuthorizationCodeUpdateOne) SetNillableClientID(v *string) *OAuthAuthorizationCodeUpdateOne
SetNillableClientID sets the "client_id" field if the given value is not nil.
func (*OAuthAuthorizationCodeUpdateOne) SetNillableExpiresAt ¶
func (_u *OAuthAuthorizationCodeUpdateOne) SetNillableExpiresAt(v *time.Time) *OAuthAuthorizationCodeUpdateOne
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*OAuthAuthorizationCodeUpdateOne) SetNillableRequestID ¶
func (_u *OAuthAuthorizationCodeUpdateOne) SetNillableRequestID(v *string) *OAuthAuthorizationCodeUpdateOne
SetNillableRequestID sets the "request_id" field if the given value is not nil.
func (*OAuthAuthorizationCodeUpdateOne) SetNillableRequestedAt ¶
func (_u *OAuthAuthorizationCodeUpdateOne) SetNillableRequestedAt(v *time.Time) *OAuthAuthorizationCodeUpdateOne
SetNillableRequestedAt sets the "requested_at" field if the given value is not nil.
func (*OAuthAuthorizationCodeUpdateOne) SetNillableScopes ¶
func (_u *OAuthAuthorizationCodeUpdateOne) SetNillableScopes(v *string) *OAuthAuthorizationCodeUpdateOne
SetNillableScopes sets the "scopes" field if the given value is not nil.
func (*OAuthAuthorizationCodeUpdateOne) SetNillableSessionType ¶
func (_u *OAuthAuthorizationCodeUpdateOne) SetNillableSessionType(v *string) *OAuthAuthorizationCodeUpdateOne
SetNillableSessionType sets the "session_type" field if the given value is not nil.
func (*OAuthAuthorizationCodeUpdateOne) SetNillableSignature ¶
func (_u *OAuthAuthorizationCodeUpdateOne) SetNillableSignature(v *string) *OAuthAuthorizationCodeUpdateOne
SetNillableSignature sets the "signature" field if the given value is not nil.
func (*OAuthAuthorizationCodeUpdateOne) SetNillableUserID ¶
func (_u *OAuthAuthorizationCodeUpdateOne) SetNillableUserID(v *int) *OAuthAuthorizationCodeUpdateOne
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*OAuthAuthorizationCodeUpdateOne) SetRequestID ¶
func (_u *OAuthAuthorizationCodeUpdateOne) SetRequestID(v string) *OAuthAuthorizationCodeUpdateOne
SetRequestID sets the "request_id" field.
func (*OAuthAuthorizationCodeUpdateOne) SetRequestedAt ¶
func (_u *OAuthAuthorizationCodeUpdateOne) SetRequestedAt(v time.Time) *OAuthAuthorizationCodeUpdateOne
SetRequestedAt sets the "requested_at" field.
func (*OAuthAuthorizationCodeUpdateOne) SetScopes ¶
func (_u *OAuthAuthorizationCodeUpdateOne) SetScopes(v string) *OAuthAuthorizationCodeUpdateOne
SetScopes sets the "scopes" field.
func (*OAuthAuthorizationCodeUpdateOne) SetSessionData ¶
func (_u *OAuthAuthorizationCodeUpdateOne) SetSessionData(v map[string]interface{}) *OAuthAuthorizationCodeUpdateOne
SetSessionData sets the "session_data" field.
func (*OAuthAuthorizationCodeUpdateOne) SetSessionType ¶
func (_u *OAuthAuthorizationCodeUpdateOne) SetSessionType(v string) *OAuthAuthorizationCodeUpdateOne
SetSessionType sets the "session_type" field.
func (*OAuthAuthorizationCodeUpdateOne) SetSignature ¶
func (_u *OAuthAuthorizationCodeUpdateOne) SetSignature(v string) *OAuthAuthorizationCodeUpdateOne
SetSignature sets the "signature" field.
func (*OAuthAuthorizationCodeUpdateOne) SetUserID ¶
func (_u *OAuthAuthorizationCodeUpdateOne) SetUserID(v int) *OAuthAuthorizationCodeUpdateOne
SetUserID sets the "user_id" field.
func (*OAuthAuthorizationCodeUpdateOne) Where ¶
func (_u *OAuthAuthorizationCodeUpdateOne) Where(ps ...predicate.OAuthAuthorizationCode) *OAuthAuthorizationCodeUpdateOne
Where appends a list predicates to the OAuthAuthorizationCodeUpdate builder.
type OAuthAuthorizationCodes ¶
type OAuthAuthorizationCodes []*OAuthAuthorizationCode
OAuthAuthorizationCodes is a parsable slice of OAuthAuthorizationCode.
type OAuthClient ¶
type OAuthClient struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// OAuth 2.0 client identifier
ClientID string `json:"client_id,omitempty"`
// Hashed client secret, empty for public clients
ClientSecretHash string `json:"-"`
// Allowed redirect URIs
RedirectUris []string `json:"redirect_uris,omitempty"`
// Allowed grant types
GrantTypes []string `json:"grant_types,omitempty"`
// Allowed response types
ResponseTypes []string `json:"response_types,omitempty"`
// Space-separated allowed scopes
Scopes string `json:"scopes,omitempty"`
// True for public clients
IsPublic bool `json:"is_public,omitempty"`
// Human-readable client name
Name string `json:"name,omitempty"`
// Optional consumer workspace/tenant ID
WorkspaceID *int `json:"workspace_id,omitempty"`
// contains filtered or unexported fields
}
OAuthClient is the model entity for the OAuthClient schema.
func (*OAuthClient) String ¶
func (_m *OAuthClient) String() string
String implements the fmt.Stringer.
func (*OAuthClient) Unwrap ¶
func (_m *OAuthClient) Unwrap() *OAuthClient
Unwrap unwraps the OAuthClient 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 (*OAuthClient) Update ¶
func (_m *OAuthClient) Update() *OAuthClientUpdateOne
Update returns a builder for updating this OAuthClient. Note that you need to call OAuthClient.Unwrap() before calling this method if this OAuthClient was returned from a transaction, and the transaction was committed or rolled back.
type OAuthClientClient ¶
type OAuthClientClient struct {
// contains filtered or unexported fields
}
OAuthClientClient is a client for the OAuthClient schema.
func NewOAuthClientClient ¶
func NewOAuthClientClient(c config) *OAuthClientClient
NewOAuthClientClient returns a client for the OAuthClient from the given config.
func (*OAuthClientClient) Create ¶
func (c *OAuthClientClient) Create() *OAuthClientCreate
Create returns a builder for creating a OAuthClient entity.
func (*OAuthClientClient) CreateBulk ¶
func (c *OAuthClientClient) CreateBulk(builders ...*OAuthClientCreate) *OAuthClientCreateBulk
CreateBulk returns a builder for creating a bulk of OAuthClient entities.
func (*OAuthClientClient) Delete ¶
func (c *OAuthClientClient) Delete() *OAuthClientDelete
Delete returns a delete builder for OAuthClient.
func (*OAuthClientClient) DeleteOne ¶
func (c *OAuthClientClient) DeleteOne(_m *OAuthClient) *OAuthClientDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*OAuthClientClient) DeleteOneID ¶
func (c *OAuthClientClient) DeleteOneID(id int) *OAuthClientDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*OAuthClientClient) Get ¶
func (c *OAuthClientClient) Get(ctx context.Context, id int) (*OAuthClient, error)
Get returns a OAuthClient entity by its id.
func (*OAuthClientClient) GetX ¶
func (c *OAuthClientClient) GetX(ctx context.Context, id int) *OAuthClient
GetX is like Get, but panics if an error occurs.
func (*OAuthClientClient) Hooks ¶
func (c *OAuthClientClient) Hooks() []Hook
Hooks returns the client hooks.
func (*OAuthClientClient) Intercept ¶
func (c *OAuthClientClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `oauthclient.Intercept(f(g(h())))`.
func (*OAuthClientClient) Interceptors ¶
func (c *OAuthClientClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*OAuthClientClient) MapCreateBulk ¶
func (c *OAuthClientClient) MapCreateBulk(slice any, setFunc func(*OAuthClientCreate, int)) *OAuthClientCreateBulk
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 (*OAuthClientClient) Query ¶
func (c *OAuthClientClient) Query() *OAuthClientQuery
Query returns a query builder for OAuthClient.
func (*OAuthClientClient) Update ¶
func (c *OAuthClientClient) Update() *OAuthClientUpdate
Update returns an update builder for OAuthClient.
func (*OAuthClientClient) UpdateOne ¶
func (c *OAuthClientClient) UpdateOne(_m *OAuthClient) *OAuthClientUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OAuthClientClient) UpdateOneID ¶
func (c *OAuthClientClient) UpdateOneID(id int) *OAuthClientUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OAuthClientClient) Use ¶
func (c *OAuthClientClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `oauthclient.Hooks(f(g(h())))`.
type OAuthClientCreate ¶
type OAuthClientCreate struct {
// contains filtered or unexported fields
}
OAuthClientCreate is the builder for creating a OAuthClient entity.
func (*OAuthClientCreate) Exec ¶
func (_c *OAuthClientCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*OAuthClientCreate) ExecX ¶
func (_c *OAuthClientCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthClientCreate) Mutation ¶
func (_c *OAuthClientCreate) Mutation() *OAuthClientMutation
Mutation returns the OAuthClientMutation object of the builder.
func (*OAuthClientCreate) Save ¶
func (_c *OAuthClientCreate) Save(ctx context.Context) (*OAuthClient, error)
Save creates the OAuthClient in the database.
func (*OAuthClientCreate) SaveX ¶
func (_c *OAuthClientCreate) SaveX(ctx context.Context) *OAuthClient
SaveX calls Save and panics if Save returns an error.
func (*OAuthClientCreate) SetClientID ¶
func (_c *OAuthClientCreate) SetClientID(v string) *OAuthClientCreate
SetClientID sets the "client_id" field.
func (*OAuthClientCreate) SetClientSecretHash ¶
func (_c *OAuthClientCreate) SetClientSecretHash(v string) *OAuthClientCreate
SetClientSecretHash sets the "client_secret_hash" field.
func (*OAuthClientCreate) SetGrantTypes ¶
func (_c *OAuthClientCreate) SetGrantTypes(v []string) *OAuthClientCreate
SetGrantTypes sets the "grant_types" field.
func (*OAuthClientCreate) SetIsPublic ¶
func (_c *OAuthClientCreate) SetIsPublic(v bool) *OAuthClientCreate
SetIsPublic sets the "is_public" field.
func (*OAuthClientCreate) SetName ¶
func (_c *OAuthClientCreate) SetName(v string) *OAuthClientCreate
SetName sets the "name" field.
func (*OAuthClientCreate) SetNillableClientSecretHash ¶
func (_c *OAuthClientCreate) SetNillableClientSecretHash(v *string) *OAuthClientCreate
SetNillableClientSecretHash sets the "client_secret_hash" field if the given value is not nil.
func (*OAuthClientCreate) SetNillableIsPublic ¶
func (_c *OAuthClientCreate) SetNillableIsPublic(v *bool) *OAuthClientCreate
SetNillableIsPublic sets the "is_public" field if the given value is not nil.
func (*OAuthClientCreate) SetNillableScopes ¶
func (_c *OAuthClientCreate) SetNillableScopes(v *string) *OAuthClientCreate
SetNillableScopes sets the "scopes" field if the given value is not nil.
func (*OAuthClientCreate) SetNillableWorkspaceID ¶
func (_c *OAuthClientCreate) SetNillableWorkspaceID(v *int) *OAuthClientCreate
SetNillableWorkspaceID sets the "workspace_id" field if the given value is not nil.
func (*OAuthClientCreate) SetRedirectUris ¶
func (_c *OAuthClientCreate) SetRedirectUris(v []string) *OAuthClientCreate
SetRedirectUris sets the "redirect_uris" field.
func (*OAuthClientCreate) SetResponseTypes ¶
func (_c *OAuthClientCreate) SetResponseTypes(v []string) *OAuthClientCreate
SetResponseTypes sets the "response_types" field.
func (*OAuthClientCreate) SetScopes ¶
func (_c *OAuthClientCreate) SetScopes(v string) *OAuthClientCreate
SetScopes sets the "scopes" field.
func (*OAuthClientCreate) SetWorkspaceID ¶
func (_c *OAuthClientCreate) SetWorkspaceID(v int) *OAuthClientCreate
SetWorkspaceID sets the "workspace_id" field.
type OAuthClientCreateBulk ¶
type OAuthClientCreateBulk struct {
// contains filtered or unexported fields
}
OAuthClientCreateBulk is the builder for creating many OAuthClient entities in bulk.
func (*OAuthClientCreateBulk) Exec ¶
func (_c *OAuthClientCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OAuthClientCreateBulk) ExecX ¶
func (_c *OAuthClientCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthClientCreateBulk) Save ¶
func (_c *OAuthClientCreateBulk) Save(ctx context.Context) ([]*OAuthClient, error)
Save creates the OAuthClient entities in the database.
func (*OAuthClientCreateBulk) SaveX ¶
func (_c *OAuthClientCreateBulk) SaveX(ctx context.Context) []*OAuthClient
SaveX is like Save, but panics if an error occurs.
type OAuthClientDelete ¶
type OAuthClientDelete struct {
// contains filtered or unexported fields
}
OAuthClientDelete is the builder for deleting a OAuthClient entity.
func (*OAuthClientDelete) Exec ¶
func (_d *OAuthClientDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OAuthClientDelete) ExecX ¶
func (_d *OAuthClientDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OAuthClientDelete) Where ¶
func (_d *OAuthClientDelete) Where(ps ...predicate.OAuthClient) *OAuthClientDelete
Where appends a list predicates to the OAuthClientDelete builder.
type OAuthClientDeleteOne ¶
type OAuthClientDeleteOne struct {
// contains filtered or unexported fields
}
OAuthClientDeleteOne is the builder for deleting a single OAuthClient entity.
func (*OAuthClientDeleteOne) Exec ¶
func (_d *OAuthClientDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OAuthClientDeleteOne) ExecX ¶
func (_d *OAuthClientDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthClientDeleteOne) Where ¶
func (_d *OAuthClientDeleteOne) Where(ps ...predicate.OAuthClient) *OAuthClientDeleteOne
Where appends a list predicates to the OAuthClientDelete builder.
type OAuthClientGroupBy ¶
type OAuthClientGroupBy struct {
// contains filtered or unexported fields
}
OAuthClientGroupBy is the group-by builder for OAuthClient entities.
func (*OAuthClientGroupBy) Aggregate ¶
func (_g *OAuthClientGroupBy) Aggregate(fns ...AggregateFunc) *OAuthClientGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OAuthClientGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OAuthClientGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OAuthClientGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OAuthClientGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OAuthClientGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OAuthClientGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OAuthClientGroupBy) Scan ¶
func (_g *OAuthClientGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OAuthClientGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OAuthClientMutation ¶
type OAuthClientMutation struct {
// contains filtered or unexported fields
}
OAuthClientMutation represents an operation that mutates the OAuthClient nodes in the graph.
func (*OAuthClientMutation) AddField ¶
func (m *OAuthClientMutation) 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 (*OAuthClientMutation) AddWorkspaceID ¶
func (m *OAuthClientMutation) AddWorkspaceID(i int)
AddWorkspaceID adds i to the "workspace_id" field.
func (*OAuthClientMutation) AddedEdges ¶
func (m *OAuthClientMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OAuthClientMutation) AddedField ¶
func (m *OAuthClientMutation) 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 (*OAuthClientMutation) AddedFields ¶
func (m *OAuthClientMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OAuthClientMutation) AddedIDs ¶
func (m *OAuthClientMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OAuthClientMutation) AddedWorkspaceID ¶
func (m *OAuthClientMutation) AddedWorkspaceID() (r int, exists bool)
AddedWorkspaceID returns the value that was added to the "workspace_id" field in this mutation.
func (*OAuthClientMutation) AppendGrantTypes ¶
func (m *OAuthClientMutation) AppendGrantTypes(s []string)
AppendGrantTypes adds s to the "grant_types" field.
func (*OAuthClientMutation) AppendRedirectUris ¶
func (m *OAuthClientMutation) AppendRedirectUris(s []string)
AppendRedirectUris adds s to the "redirect_uris" field.
func (*OAuthClientMutation) AppendResponseTypes ¶
func (m *OAuthClientMutation) AppendResponseTypes(s []string)
AppendResponseTypes adds s to the "response_types" field.
func (*OAuthClientMutation) AppendedGrantTypes ¶
func (m *OAuthClientMutation) AppendedGrantTypes() ([]string, bool)
AppendedGrantTypes returns the list of values that were appended to the "grant_types" field in this mutation.
func (*OAuthClientMutation) AppendedRedirectUris ¶
func (m *OAuthClientMutation) AppendedRedirectUris() ([]string, bool)
AppendedRedirectUris returns the list of values that were appended to the "redirect_uris" field in this mutation.
func (*OAuthClientMutation) AppendedResponseTypes ¶
func (m *OAuthClientMutation) AppendedResponseTypes() ([]string, bool)
AppendedResponseTypes returns the list of values that were appended to the "response_types" field in this mutation.
func (*OAuthClientMutation) ClearEdge ¶
func (m *OAuthClientMutation) 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 (*OAuthClientMutation) ClearField ¶
func (m *OAuthClientMutation) 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 (*OAuthClientMutation) ClearWorkspaceID ¶
func (m *OAuthClientMutation) ClearWorkspaceID()
ClearWorkspaceID clears the value of the "workspace_id" field.
func (*OAuthClientMutation) ClearedEdges ¶
func (m *OAuthClientMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OAuthClientMutation) ClearedFields ¶
func (m *OAuthClientMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OAuthClientMutation) Client ¶
func (m OAuthClientMutation) 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 (*OAuthClientMutation) ClientID ¶
func (m *OAuthClientMutation) ClientID() (r string, exists bool)
ClientID returns the value of the "client_id" field in the mutation.
func (*OAuthClientMutation) ClientSecretHash ¶
func (m *OAuthClientMutation) ClientSecretHash() (r string, exists bool)
ClientSecretHash returns the value of the "client_secret_hash" field in the mutation.
func (*OAuthClientMutation) EdgeCleared ¶
func (m *OAuthClientMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OAuthClientMutation) Field ¶
func (m *OAuthClientMutation) 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 (*OAuthClientMutation) FieldCleared ¶
func (m *OAuthClientMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OAuthClientMutation) Fields ¶
func (m *OAuthClientMutation) 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 (*OAuthClientMutation) GrantTypes ¶
func (m *OAuthClientMutation) GrantTypes() (r []string, exists bool)
GrantTypes returns the value of the "grant_types" field in the mutation.
func (*OAuthClientMutation) ID ¶
func (m *OAuthClientMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*OAuthClientMutation) IDs ¶
func (m *OAuthClientMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*OAuthClientMutation) IsPublic ¶
func (m *OAuthClientMutation) IsPublic() (r bool, exists bool)
IsPublic returns the value of the "is_public" field in the mutation.
func (*OAuthClientMutation) Name ¶
func (m *OAuthClientMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*OAuthClientMutation) OldClientID ¶
func (m *OAuthClientMutation) OldClientID(ctx context.Context) (v string, err error)
OldClientID returns the old "client_id" field's value of the OAuthClient entity. If the OAuthClient object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthClientMutation) OldClientSecretHash ¶
func (m *OAuthClientMutation) OldClientSecretHash(ctx context.Context) (v string, err error)
OldClientSecretHash returns the old "client_secret_hash" field's value of the OAuthClient entity. If the OAuthClient object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthClientMutation) 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 (*OAuthClientMutation) OldGrantTypes ¶
func (m *OAuthClientMutation) OldGrantTypes(ctx context.Context) (v []string, err error)
OldGrantTypes returns the old "grant_types" field's value of the OAuthClient entity. If the OAuthClient object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthClientMutation) OldIsPublic ¶
func (m *OAuthClientMutation) OldIsPublic(ctx context.Context) (v bool, err error)
OldIsPublic returns the old "is_public" field's value of the OAuthClient entity. If the OAuthClient object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthClientMutation) OldName ¶
func (m *OAuthClientMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the OAuthClient entity. If the OAuthClient object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthClientMutation) OldRedirectUris ¶
func (m *OAuthClientMutation) OldRedirectUris(ctx context.Context) (v []string, err error)
OldRedirectUris returns the old "redirect_uris" field's value of the OAuthClient entity. If the OAuthClient object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthClientMutation) OldResponseTypes ¶
func (m *OAuthClientMutation) OldResponseTypes(ctx context.Context) (v []string, err error)
OldResponseTypes returns the old "response_types" field's value of the OAuthClient entity. If the OAuthClient object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthClientMutation) OldScopes ¶
func (m *OAuthClientMutation) OldScopes(ctx context.Context) (v string, err error)
OldScopes returns the old "scopes" field's value of the OAuthClient entity. If the OAuthClient object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthClientMutation) OldWorkspaceID ¶
func (m *OAuthClientMutation) OldWorkspaceID(ctx context.Context) (v *int, err error)
OldWorkspaceID returns the old "workspace_id" field's value of the OAuthClient entity. If the OAuthClient object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthClientMutation) Op ¶
func (m *OAuthClientMutation) Op() Op
Op returns the operation name.
func (*OAuthClientMutation) RedirectUris ¶
func (m *OAuthClientMutation) RedirectUris() (r []string, exists bool)
RedirectUris returns the value of the "redirect_uris" field in the mutation.
func (*OAuthClientMutation) RemovedEdges ¶
func (m *OAuthClientMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OAuthClientMutation) RemovedIDs ¶
func (m *OAuthClientMutation) 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 (*OAuthClientMutation) ResetClientID ¶
func (m *OAuthClientMutation) ResetClientID()
ResetClientID resets all changes to the "client_id" field.
func (*OAuthClientMutation) ResetClientSecretHash ¶
func (m *OAuthClientMutation) ResetClientSecretHash()
ResetClientSecretHash resets all changes to the "client_secret_hash" field.
func (*OAuthClientMutation) ResetEdge ¶
func (m *OAuthClientMutation) 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 (*OAuthClientMutation) ResetField ¶
func (m *OAuthClientMutation) 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 (*OAuthClientMutation) ResetGrantTypes ¶
func (m *OAuthClientMutation) ResetGrantTypes()
ResetGrantTypes resets all changes to the "grant_types" field.
func (*OAuthClientMutation) ResetIsPublic ¶
func (m *OAuthClientMutation) ResetIsPublic()
ResetIsPublic resets all changes to the "is_public" field.
func (*OAuthClientMutation) ResetName ¶
func (m *OAuthClientMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*OAuthClientMutation) ResetRedirectUris ¶
func (m *OAuthClientMutation) ResetRedirectUris()
ResetRedirectUris resets all changes to the "redirect_uris" field.
func (*OAuthClientMutation) ResetResponseTypes ¶
func (m *OAuthClientMutation) ResetResponseTypes()
ResetResponseTypes resets all changes to the "response_types" field.
func (*OAuthClientMutation) ResetScopes ¶
func (m *OAuthClientMutation) ResetScopes()
ResetScopes resets all changes to the "scopes" field.
func (*OAuthClientMutation) ResetWorkspaceID ¶
func (m *OAuthClientMutation) ResetWorkspaceID()
ResetWorkspaceID resets all changes to the "workspace_id" field.
func (*OAuthClientMutation) ResponseTypes ¶
func (m *OAuthClientMutation) ResponseTypes() (r []string, exists bool)
ResponseTypes returns the value of the "response_types" field in the mutation.
func (*OAuthClientMutation) Scopes ¶
func (m *OAuthClientMutation) Scopes() (r string, exists bool)
Scopes returns the value of the "scopes" field in the mutation.
func (*OAuthClientMutation) SetClientID ¶
func (m *OAuthClientMutation) SetClientID(s string)
SetClientID sets the "client_id" field.
func (*OAuthClientMutation) SetClientSecretHash ¶
func (m *OAuthClientMutation) SetClientSecretHash(s string)
SetClientSecretHash sets the "client_secret_hash" field.
func (*OAuthClientMutation) SetField ¶
func (m *OAuthClientMutation) 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 (*OAuthClientMutation) SetGrantTypes ¶
func (m *OAuthClientMutation) SetGrantTypes(s []string)
SetGrantTypes sets the "grant_types" field.
func (*OAuthClientMutation) SetIsPublic ¶
func (m *OAuthClientMutation) SetIsPublic(b bool)
SetIsPublic sets the "is_public" field.
func (*OAuthClientMutation) SetName ¶
func (m *OAuthClientMutation) SetName(s string)
SetName sets the "name" field.
func (*OAuthClientMutation) SetOp ¶
func (m *OAuthClientMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*OAuthClientMutation) SetRedirectUris ¶
func (m *OAuthClientMutation) SetRedirectUris(s []string)
SetRedirectUris sets the "redirect_uris" field.
func (*OAuthClientMutation) SetResponseTypes ¶
func (m *OAuthClientMutation) SetResponseTypes(s []string)
SetResponseTypes sets the "response_types" field.
func (*OAuthClientMutation) SetScopes ¶
func (m *OAuthClientMutation) SetScopes(s string)
SetScopes sets the "scopes" field.
func (*OAuthClientMutation) SetWorkspaceID ¶
func (m *OAuthClientMutation) SetWorkspaceID(i int)
SetWorkspaceID sets the "workspace_id" field.
func (OAuthClientMutation) Tx ¶
func (m OAuthClientMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OAuthClientMutation) Type ¶
func (m *OAuthClientMutation) Type() string
Type returns the node type of this mutation (OAuthClient).
func (*OAuthClientMutation) Where ¶
func (m *OAuthClientMutation) Where(ps ...predicate.OAuthClient)
Where appends a list predicates to the OAuthClientMutation builder.
func (*OAuthClientMutation) WhereP ¶
func (m *OAuthClientMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the OAuthClientMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
func (*OAuthClientMutation) WorkspaceID ¶
func (m *OAuthClientMutation) WorkspaceID() (r int, exists bool)
WorkspaceID returns the value of the "workspace_id" field in the mutation.
func (*OAuthClientMutation) WorkspaceIDCleared ¶
func (m *OAuthClientMutation) WorkspaceIDCleared() bool
WorkspaceIDCleared returns if the "workspace_id" field was cleared in this mutation.
type OAuthClientQuery ¶
type OAuthClientQuery struct {
// contains filtered or unexported fields
}
OAuthClientQuery is the builder for querying OAuthClient entities.
func (*OAuthClientQuery) Aggregate ¶
func (_q *OAuthClientQuery) Aggregate(fns ...AggregateFunc) *OAuthClientSelect
Aggregate returns a OAuthClientSelect configured with the given aggregations.
func (*OAuthClientQuery) All ¶
func (_q *OAuthClientQuery) All(ctx context.Context) ([]*OAuthClient, error)
All executes the query and returns a list of OAuthClients.
func (*OAuthClientQuery) AllX ¶
func (_q *OAuthClientQuery) AllX(ctx context.Context) []*OAuthClient
AllX is like All, but panics if an error occurs.
func (*OAuthClientQuery) Clone ¶
func (_q *OAuthClientQuery) Clone() *OAuthClientQuery
Clone returns a duplicate of the OAuthClientQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OAuthClientQuery) Count ¶
func (_q *OAuthClientQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*OAuthClientQuery) CountX ¶
func (_q *OAuthClientQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*OAuthClientQuery) Exist ¶
func (_q *OAuthClientQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*OAuthClientQuery) ExistX ¶
func (_q *OAuthClientQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*OAuthClientQuery) First ¶
func (_q *OAuthClientQuery) First(ctx context.Context) (*OAuthClient, error)
First returns the first OAuthClient entity from the query. Returns a *NotFoundError when no OAuthClient was found.
func (*OAuthClientQuery) FirstID ¶
func (_q *OAuthClientQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first OAuthClient ID from the query. Returns a *NotFoundError when no OAuthClient ID was found.
func (*OAuthClientQuery) FirstIDX ¶
func (_q *OAuthClientQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*OAuthClientQuery) FirstX ¶
func (_q *OAuthClientQuery) FirstX(ctx context.Context) *OAuthClient
FirstX is like First, but panics if an error occurs.
func (*OAuthClientQuery) GroupBy ¶
func (_q *OAuthClientQuery) GroupBy(field string, fields ...string) *OAuthClientGroupBy
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.OAuthClient.Query().
GroupBy(oauthclient.FieldClientID).
Aggregate(_test.Count()).
Scan(ctx, &v)
func (*OAuthClientQuery) IDs ¶
func (_q *OAuthClientQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of OAuthClient IDs.
func (*OAuthClientQuery) IDsX ¶
func (_q *OAuthClientQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*OAuthClientQuery) Limit ¶
func (_q *OAuthClientQuery) Limit(limit int) *OAuthClientQuery
Limit the number of records to be returned by this query.
func (*OAuthClientQuery) Offset ¶
func (_q *OAuthClientQuery) Offset(offset int) *OAuthClientQuery
Offset to start from.
func (*OAuthClientQuery) Only ¶
func (_q *OAuthClientQuery) Only(ctx context.Context) (*OAuthClient, error)
Only returns a single OAuthClient entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OAuthClient entity is found. Returns a *NotFoundError when no OAuthClient entities are found.
func (*OAuthClientQuery) OnlyID ¶
func (_q *OAuthClientQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only OAuthClient ID in the query. Returns a *NotSingularError when more than one OAuthClient ID is found. Returns a *NotFoundError when no entities are found.
func (*OAuthClientQuery) OnlyIDX ¶
func (_q *OAuthClientQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*OAuthClientQuery) OnlyX ¶
func (_q *OAuthClientQuery) OnlyX(ctx context.Context) *OAuthClient
OnlyX is like Only, but panics if an error occurs.
func (*OAuthClientQuery) Order ¶
func (_q *OAuthClientQuery) Order(o ...oauthclient.OrderOption) *OAuthClientQuery
Order specifies how the records should be ordered.
func (*OAuthClientQuery) Select ¶
func (_q *OAuthClientQuery) Select(fields ...string) *OAuthClientSelect
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.OAuthClient.Query().
Select(oauthclient.FieldClientID).
Scan(ctx, &v)
func (*OAuthClientQuery) Unique ¶
func (_q *OAuthClientQuery) Unique(unique bool) *OAuthClientQuery
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 (*OAuthClientQuery) Where ¶
func (_q *OAuthClientQuery) Where(ps ...predicate.OAuthClient) *OAuthClientQuery
Where adds a new predicate for the OAuthClientQuery builder.
type OAuthClientSelect ¶
type OAuthClientSelect struct {
*OAuthClientQuery
// contains filtered or unexported fields
}
OAuthClientSelect is the builder for selecting fields of OAuthClient entities.
func (*OAuthClientSelect) Aggregate ¶
func (_s *OAuthClientSelect) Aggregate(fns ...AggregateFunc) *OAuthClientSelect
Aggregate adds the given aggregation functions to the selector query.
func (*OAuthClientSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OAuthClientSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OAuthClientSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OAuthClientSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OAuthClientSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OAuthClientSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OAuthClientSelect) Scan ¶
func (_s *OAuthClientSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OAuthClientSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OAuthClientUpdate ¶
type OAuthClientUpdate struct {
// contains filtered or unexported fields
}
OAuthClientUpdate is the builder for updating OAuthClient entities.
func (*OAuthClientUpdate) AddWorkspaceID ¶
func (_u *OAuthClientUpdate) AddWorkspaceID(v int) *OAuthClientUpdate
AddWorkspaceID adds value to the "workspace_id" field.
func (*OAuthClientUpdate) AppendGrantTypes ¶
func (_u *OAuthClientUpdate) AppendGrantTypes(v []string) *OAuthClientUpdate
AppendGrantTypes appends value to the "grant_types" field.
func (*OAuthClientUpdate) AppendRedirectUris ¶
func (_u *OAuthClientUpdate) AppendRedirectUris(v []string) *OAuthClientUpdate
AppendRedirectUris appends value to the "redirect_uris" field.
func (*OAuthClientUpdate) AppendResponseTypes ¶
func (_u *OAuthClientUpdate) AppendResponseTypes(v []string) *OAuthClientUpdate
AppendResponseTypes appends value to the "response_types" field.
func (*OAuthClientUpdate) ClearWorkspaceID ¶
func (_u *OAuthClientUpdate) ClearWorkspaceID() *OAuthClientUpdate
ClearWorkspaceID clears the value of the "workspace_id" field.
func (*OAuthClientUpdate) Exec ¶
func (_u *OAuthClientUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OAuthClientUpdate) ExecX ¶
func (_u *OAuthClientUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthClientUpdate) Mutation ¶
func (_u *OAuthClientUpdate) Mutation() *OAuthClientMutation
Mutation returns the OAuthClientMutation object of the builder.
func (*OAuthClientUpdate) Save ¶
func (_u *OAuthClientUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OAuthClientUpdate) SaveX ¶
func (_u *OAuthClientUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OAuthClientUpdate) SetClientID ¶
func (_u *OAuthClientUpdate) SetClientID(v string) *OAuthClientUpdate
SetClientID sets the "client_id" field.
func (*OAuthClientUpdate) SetClientSecretHash ¶
func (_u *OAuthClientUpdate) SetClientSecretHash(v string) *OAuthClientUpdate
SetClientSecretHash sets the "client_secret_hash" field.
func (*OAuthClientUpdate) SetGrantTypes ¶
func (_u *OAuthClientUpdate) SetGrantTypes(v []string) *OAuthClientUpdate
SetGrantTypes sets the "grant_types" field.
func (*OAuthClientUpdate) SetIsPublic ¶
func (_u *OAuthClientUpdate) SetIsPublic(v bool) *OAuthClientUpdate
SetIsPublic sets the "is_public" field.
func (*OAuthClientUpdate) SetName ¶
func (_u *OAuthClientUpdate) SetName(v string) *OAuthClientUpdate
SetName sets the "name" field.
func (*OAuthClientUpdate) SetNillableClientID ¶
func (_u *OAuthClientUpdate) SetNillableClientID(v *string) *OAuthClientUpdate
SetNillableClientID sets the "client_id" field if the given value is not nil.
func (*OAuthClientUpdate) SetNillableClientSecretHash ¶
func (_u *OAuthClientUpdate) SetNillableClientSecretHash(v *string) *OAuthClientUpdate
SetNillableClientSecretHash sets the "client_secret_hash" field if the given value is not nil.
func (*OAuthClientUpdate) SetNillableIsPublic ¶
func (_u *OAuthClientUpdate) SetNillableIsPublic(v *bool) *OAuthClientUpdate
SetNillableIsPublic sets the "is_public" field if the given value is not nil.
func (*OAuthClientUpdate) SetNillableName ¶
func (_u *OAuthClientUpdate) SetNillableName(v *string) *OAuthClientUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*OAuthClientUpdate) SetNillableScopes ¶
func (_u *OAuthClientUpdate) SetNillableScopes(v *string) *OAuthClientUpdate
SetNillableScopes sets the "scopes" field if the given value is not nil.
func (*OAuthClientUpdate) SetNillableWorkspaceID ¶
func (_u *OAuthClientUpdate) SetNillableWorkspaceID(v *int) *OAuthClientUpdate
SetNillableWorkspaceID sets the "workspace_id" field if the given value is not nil.
func (*OAuthClientUpdate) SetRedirectUris ¶
func (_u *OAuthClientUpdate) SetRedirectUris(v []string) *OAuthClientUpdate
SetRedirectUris sets the "redirect_uris" field.
func (*OAuthClientUpdate) SetResponseTypes ¶
func (_u *OAuthClientUpdate) SetResponseTypes(v []string) *OAuthClientUpdate
SetResponseTypes sets the "response_types" field.
func (*OAuthClientUpdate) SetScopes ¶
func (_u *OAuthClientUpdate) SetScopes(v string) *OAuthClientUpdate
SetScopes sets the "scopes" field.
func (*OAuthClientUpdate) SetWorkspaceID ¶
func (_u *OAuthClientUpdate) SetWorkspaceID(v int) *OAuthClientUpdate
SetWorkspaceID sets the "workspace_id" field.
func (*OAuthClientUpdate) Where ¶
func (_u *OAuthClientUpdate) Where(ps ...predicate.OAuthClient) *OAuthClientUpdate
Where appends a list predicates to the OAuthClientUpdate builder.
type OAuthClientUpdateOne ¶
type OAuthClientUpdateOne struct {
// contains filtered or unexported fields
}
OAuthClientUpdateOne is the builder for updating a single OAuthClient entity.
func (*OAuthClientUpdateOne) AddWorkspaceID ¶
func (_u *OAuthClientUpdateOne) AddWorkspaceID(v int) *OAuthClientUpdateOne
AddWorkspaceID adds value to the "workspace_id" field.
func (*OAuthClientUpdateOne) AppendGrantTypes ¶
func (_u *OAuthClientUpdateOne) AppendGrantTypes(v []string) *OAuthClientUpdateOne
AppendGrantTypes appends value to the "grant_types" field.
func (*OAuthClientUpdateOne) AppendRedirectUris ¶
func (_u *OAuthClientUpdateOne) AppendRedirectUris(v []string) *OAuthClientUpdateOne
AppendRedirectUris appends value to the "redirect_uris" field.
func (*OAuthClientUpdateOne) AppendResponseTypes ¶
func (_u *OAuthClientUpdateOne) AppendResponseTypes(v []string) *OAuthClientUpdateOne
AppendResponseTypes appends value to the "response_types" field.
func (*OAuthClientUpdateOne) ClearWorkspaceID ¶
func (_u *OAuthClientUpdateOne) ClearWorkspaceID() *OAuthClientUpdateOne
ClearWorkspaceID clears the value of the "workspace_id" field.
func (*OAuthClientUpdateOne) Exec ¶
func (_u *OAuthClientUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OAuthClientUpdateOne) ExecX ¶
func (_u *OAuthClientUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthClientUpdateOne) Mutation ¶
func (_u *OAuthClientUpdateOne) Mutation() *OAuthClientMutation
Mutation returns the OAuthClientMutation object of the builder.
func (*OAuthClientUpdateOne) Save ¶
func (_u *OAuthClientUpdateOne) Save(ctx context.Context) (*OAuthClient, error)
Save executes the query and returns the updated OAuthClient entity.
func (*OAuthClientUpdateOne) SaveX ¶
func (_u *OAuthClientUpdateOne) SaveX(ctx context.Context) *OAuthClient
SaveX is like Save, but panics if an error occurs.
func (*OAuthClientUpdateOne) Select ¶
func (_u *OAuthClientUpdateOne) Select(field string, fields ...string) *OAuthClientUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OAuthClientUpdateOne) SetClientID ¶
func (_u *OAuthClientUpdateOne) SetClientID(v string) *OAuthClientUpdateOne
SetClientID sets the "client_id" field.
func (*OAuthClientUpdateOne) SetClientSecretHash ¶
func (_u *OAuthClientUpdateOne) SetClientSecretHash(v string) *OAuthClientUpdateOne
SetClientSecretHash sets the "client_secret_hash" field.
func (*OAuthClientUpdateOne) SetGrantTypes ¶
func (_u *OAuthClientUpdateOne) SetGrantTypes(v []string) *OAuthClientUpdateOne
SetGrantTypes sets the "grant_types" field.
func (*OAuthClientUpdateOne) SetIsPublic ¶
func (_u *OAuthClientUpdateOne) SetIsPublic(v bool) *OAuthClientUpdateOne
SetIsPublic sets the "is_public" field.
func (*OAuthClientUpdateOne) SetName ¶
func (_u *OAuthClientUpdateOne) SetName(v string) *OAuthClientUpdateOne
SetName sets the "name" field.
func (*OAuthClientUpdateOne) SetNillableClientID ¶
func (_u *OAuthClientUpdateOne) SetNillableClientID(v *string) *OAuthClientUpdateOne
SetNillableClientID sets the "client_id" field if the given value is not nil.
func (*OAuthClientUpdateOne) SetNillableClientSecretHash ¶
func (_u *OAuthClientUpdateOne) SetNillableClientSecretHash(v *string) *OAuthClientUpdateOne
SetNillableClientSecretHash sets the "client_secret_hash" field if the given value is not nil.
func (*OAuthClientUpdateOne) SetNillableIsPublic ¶
func (_u *OAuthClientUpdateOne) SetNillableIsPublic(v *bool) *OAuthClientUpdateOne
SetNillableIsPublic sets the "is_public" field if the given value is not nil.
func (*OAuthClientUpdateOne) SetNillableName ¶
func (_u *OAuthClientUpdateOne) SetNillableName(v *string) *OAuthClientUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*OAuthClientUpdateOne) SetNillableScopes ¶
func (_u *OAuthClientUpdateOne) SetNillableScopes(v *string) *OAuthClientUpdateOne
SetNillableScopes sets the "scopes" field if the given value is not nil.
func (*OAuthClientUpdateOne) SetNillableWorkspaceID ¶
func (_u *OAuthClientUpdateOne) SetNillableWorkspaceID(v *int) *OAuthClientUpdateOne
SetNillableWorkspaceID sets the "workspace_id" field if the given value is not nil.
func (*OAuthClientUpdateOne) SetRedirectUris ¶
func (_u *OAuthClientUpdateOne) SetRedirectUris(v []string) *OAuthClientUpdateOne
SetRedirectUris sets the "redirect_uris" field.
func (*OAuthClientUpdateOne) SetResponseTypes ¶
func (_u *OAuthClientUpdateOne) SetResponseTypes(v []string) *OAuthClientUpdateOne
SetResponseTypes sets the "response_types" field.
func (*OAuthClientUpdateOne) SetScopes ¶
func (_u *OAuthClientUpdateOne) SetScopes(v string) *OAuthClientUpdateOne
SetScopes sets the "scopes" field.
func (*OAuthClientUpdateOne) SetWorkspaceID ¶
func (_u *OAuthClientUpdateOne) SetWorkspaceID(v int) *OAuthClientUpdateOne
SetWorkspaceID sets the "workspace_id" field.
func (*OAuthClientUpdateOne) Where ¶
func (_u *OAuthClientUpdateOne) Where(ps ...predicate.OAuthClient) *OAuthClientUpdateOne
Where appends a list predicates to the OAuthClientUpdate builder.
type OAuthClients ¶
type OAuthClients []*OAuthClient
OAuthClients is a parsable slice of OAuthClient.
type OAuthRefreshToken ¶
type OAuthRefreshToken struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Type: authorization_code, access_token, refresh_token, pkce, oidc
SessionType string `json:"session_type,omitempty"`
// Unique token/code signature for lookup
Signature string `json:"signature,omitempty"`
// OAuth client ID that owns this session
ClientID string `json:"client_id,omitempty"`
// Optional consumer user ID
UserID *int `json:"user_id,omitempty"`
// Fosite request ID for token revocation
RequestID string `json:"request_id,omitempty"`
// Space-separated granted scopes
Scopes string `json:"scopes,omitempty"`
// Serialized Fosite session data
SessionData map[string]interface{} `json:"session_data,omitempty"`
// Whether this session is still valid
Active bool `json:"active,omitempty"`
// When this session expires
ExpiresAt *time.Time `json:"expires_at,omitempty"`
// When Fosite created the original request
RequestedAt *time.Time `json:"requested_at,omitempty"`
// contains filtered or unexported fields
}
OAuthRefreshToken is the model entity for the OAuthRefreshToken schema.
func (*OAuthRefreshToken) String ¶
func (_m *OAuthRefreshToken) String() string
String implements the fmt.Stringer.
func (*OAuthRefreshToken) Unwrap ¶
func (_m *OAuthRefreshToken) Unwrap() *OAuthRefreshToken
Unwrap unwraps the OAuthRefreshToken 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 (*OAuthRefreshToken) Update ¶
func (_m *OAuthRefreshToken) Update() *OAuthRefreshTokenUpdateOne
Update returns a builder for updating this OAuthRefreshToken. Note that you need to call OAuthRefreshToken.Unwrap() before calling this method if this OAuthRefreshToken was returned from a transaction, and the transaction was committed or rolled back.
type OAuthRefreshTokenClient ¶
type OAuthRefreshTokenClient struct {
// contains filtered or unexported fields
}
OAuthRefreshTokenClient is a client for the OAuthRefreshToken schema.
func NewOAuthRefreshTokenClient ¶
func NewOAuthRefreshTokenClient(c config) *OAuthRefreshTokenClient
NewOAuthRefreshTokenClient returns a client for the OAuthRefreshToken from the given config.
func (*OAuthRefreshTokenClient) Create ¶
func (c *OAuthRefreshTokenClient) Create() *OAuthRefreshTokenCreate
Create returns a builder for creating a OAuthRefreshToken entity.
func (*OAuthRefreshTokenClient) CreateBulk ¶
func (c *OAuthRefreshTokenClient) CreateBulk(builders ...*OAuthRefreshTokenCreate) *OAuthRefreshTokenCreateBulk
CreateBulk returns a builder for creating a bulk of OAuthRefreshToken entities.
func (*OAuthRefreshTokenClient) Delete ¶
func (c *OAuthRefreshTokenClient) Delete() *OAuthRefreshTokenDelete
Delete returns a delete builder for OAuthRefreshToken.
func (*OAuthRefreshTokenClient) DeleteOne ¶
func (c *OAuthRefreshTokenClient) DeleteOne(_m *OAuthRefreshToken) *OAuthRefreshTokenDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*OAuthRefreshTokenClient) DeleteOneID ¶
func (c *OAuthRefreshTokenClient) DeleteOneID(id int) *OAuthRefreshTokenDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*OAuthRefreshTokenClient) Get ¶
func (c *OAuthRefreshTokenClient) Get(ctx context.Context, id int) (*OAuthRefreshToken, error)
Get returns a OAuthRefreshToken entity by its id.
func (*OAuthRefreshTokenClient) GetX ¶
func (c *OAuthRefreshTokenClient) GetX(ctx context.Context, id int) *OAuthRefreshToken
GetX is like Get, but panics if an error occurs.
func (*OAuthRefreshTokenClient) Hooks ¶
func (c *OAuthRefreshTokenClient) Hooks() []Hook
Hooks returns the client hooks.
func (*OAuthRefreshTokenClient) Intercept ¶
func (c *OAuthRefreshTokenClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `oauthrefreshtoken.Intercept(f(g(h())))`.
func (*OAuthRefreshTokenClient) Interceptors ¶
func (c *OAuthRefreshTokenClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*OAuthRefreshTokenClient) MapCreateBulk ¶
func (c *OAuthRefreshTokenClient) MapCreateBulk(slice any, setFunc func(*OAuthRefreshTokenCreate, int)) *OAuthRefreshTokenCreateBulk
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 (*OAuthRefreshTokenClient) Query ¶
func (c *OAuthRefreshTokenClient) Query() *OAuthRefreshTokenQuery
Query returns a query builder for OAuthRefreshToken.
func (*OAuthRefreshTokenClient) Update ¶
func (c *OAuthRefreshTokenClient) Update() *OAuthRefreshTokenUpdate
Update returns an update builder for OAuthRefreshToken.
func (*OAuthRefreshTokenClient) UpdateOne ¶
func (c *OAuthRefreshTokenClient) UpdateOne(_m *OAuthRefreshToken) *OAuthRefreshTokenUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OAuthRefreshTokenClient) UpdateOneID ¶
func (c *OAuthRefreshTokenClient) UpdateOneID(id int) *OAuthRefreshTokenUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OAuthRefreshTokenClient) Use ¶
func (c *OAuthRefreshTokenClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `oauthrefreshtoken.Hooks(f(g(h())))`.
type OAuthRefreshTokenCreate ¶
type OAuthRefreshTokenCreate struct {
// contains filtered or unexported fields
}
OAuthRefreshTokenCreate is the builder for creating a OAuthRefreshToken entity.
func (*OAuthRefreshTokenCreate) Exec ¶
func (_c *OAuthRefreshTokenCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*OAuthRefreshTokenCreate) ExecX ¶
func (_c *OAuthRefreshTokenCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthRefreshTokenCreate) Mutation ¶
func (_c *OAuthRefreshTokenCreate) Mutation() *OAuthRefreshTokenMutation
Mutation returns the OAuthRefreshTokenMutation object of the builder.
func (*OAuthRefreshTokenCreate) Save ¶
func (_c *OAuthRefreshTokenCreate) Save(ctx context.Context) (*OAuthRefreshToken, error)
Save creates the OAuthRefreshToken in the database.
func (*OAuthRefreshTokenCreate) SaveX ¶
func (_c *OAuthRefreshTokenCreate) SaveX(ctx context.Context) *OAuthRefreshToken
SaveX calls Save and panics if Save returns an error.
func (*OAuthRefreshTokenCreate) SetActive ¶
func (_c *OAuthRefreshTokenCreate) SetActive(v bool) *OAuthRefreshTokenCreate
SetActive sets the "active" field.
func (*OAuthRefreshTokenCreate) SetClientID ¶
func (_c *OAuthRefreshTokenCreate) SetClientID(v string) *OAuthRefreshTokenCreate
SetClientID sets the "client_id" field.
func (*OAuthRefreshTokenCreate) SetExpiresAt ¶
func (_c *OAuthRefreshTokenCreate) SetExpiresAt(v time.Time) *OAuthRefreshTokenCreate
SetExpiresAt sets the "expires_at" field.
func (*OAuthRefreshTokenCreate) SetNillableActive ¶
func (_c *OAuthRefreshTokenCreate) SetNillableActive(v *bool) *OAuthRefreshTokenCreate
SetNillableActive sets the "active" field if the given value is not nil.
func (*OAuthRefreshTokenCreate) SetNillableExpiresAt ¶
func (_c *OAuthRefreshTokenCreate) SetNillableExpiresAt(v *time.Time) *OAuthRefreshTokenCreate
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*OAuthRefreshTokenCreate) SetNillableRequestID ¶
func (_c *OAuthRefreshTokenCreate) SetNillableRequestID(v *string) *OAuthRefreshTokenCreate
SetNillableRequestID sets the "request_id" field if the given value is not nil.
func (*OAuthRefreshTokenCreate) SetNillableRequestedAt ¶
func (_c *OAuthRefreshTokenCreate) SetNillableRequestedAt(v *time.Time) *OAuthRefreshTokenCreate
SetNillableRequestedAt sets the "requested_at" field if the given value is not nil.
func (*OAuthRefreshTokenCreate) SetNillableScopes ¶
func (_c *OAuthRefreshTokenCreate) SetNillableScopes(v *string) *OAuthRefreshTokenCreate
SetNillableScopes sets the "scopes" field if the given value is not nil.
func (*OAuthRefreshTokenCreate) SetNillableUserID ¶
func (_c *OAuthRefreshTokenCreate) SetNillableUserID(v *int) *OAuthRefreshTokenCreate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*OAuthRefreshTokenCreate) SetRequestID ¶
func (_c *OAuthRefreshTokenCreate) SetRequestID(v string) *OAuthRefreshTokenCreate
SetRequestID sets the "request_id" field.
func (*OAuthRefreshTokenCreate) SetRequestedAt ¶
func (_c *OAuthRefreshTokenCreate) SetRequestedAt(v time.Time) *OAuthRefreshTokenCreate
SetRequestedAt sets the "requested_at" field.
func (*OAuthRefreshTokenCreate) SetScopes ¶
func (_c *OAuthRefreshTokenCreate) SetScopes(v string) *OAuthRefreshTokenCreate
SetScopes sets the "scopes" field.
func (*OAuthRefreshTokenCreate) SetSessionData ¶
func (_c *OAuthRefreshTokenCreate) SetSessionData(v map[string]interface{}) *OAuthRefreshTokenCreate
SetSessionData sets the "session_data" field.
func (*OAuthRefreshTokenCreate) SetSessionType ¶
func (_c *OAuthRefreshTokenCreate) SetSessionType(v string) *OAuthRefreshTokenCreate
SetSessionType sets the "session_type" field.
func (*OAuthRefreshTokenCreate) SetSignature ¶
func (_c *OAuthRefreshTokenCreate) SetSignature(v string) *OAuthRefreshTokenCreate
SetSignature sets the "signature" field.
func (*OAuthRefreshTokenCreate) SetUserID ¶
func (_c *OAuthRefreshTokenCreate) SetUserID(v int) *OAuthRefreshTokenCreate
SetUserID sets the "user_id" field.
type OAuthRefreshTokenCreateBulk ¶
type OAuthRefreshTokenCreateBulk struct {
// contains filtered or unexported fields
}
OAuthRefreshTokenCreateBulk is the builder for creating many OAuthRefreshToken entities in bulk.
func (*OAuthRefreshTokenCreateBulk) Exec ¶
func (_c *OAuthRefreshTokenCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OAuthRefreshTokenCreateBulk) ExecX ¶
func (_c *OAuthRefreshTokenCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthRefreshTokenCreateBulk) Save ¶
func (_c *OAuthRefreshTokenCreateBulk) Save(ctx context.Context) ([]*OAuthRefreshToken, error)
Save creates the OAuthRefreshToken entities in the database.
func (*OAuthRefreshTokenCreateBulk) SaveX ¶
func (_c *OAuthRefreshTokenCreateBulk) SaveX(ctx context.Context) []*OAuthRefreshToken
SaveX is like Save, but panics if an error occurs.
type OAuthRefreshTokenDelete ¶
type OAuthRefreshTokenDelete struct {
// contains filtered or unexported fields
}
OAuthRefreshTokenDelete is the builder for deleting a OAuthRefreshToken entity.
func (*OAuthRefreshTokenDelete) Exec ¶
func (_d *OAuthRefreshTokenDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OAuthRefreshTokenDelete) ExecX ¶
func (_d *OAuthRefreshTokenDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OAuthRefreshTokenDelete) Where ¶
func (_d *OAuthRefreshTokenDelete) Where(ps ...predicate.OAuthRefreshToken) *OAuthRefreshTokenDelete
Where appends a list predicates to the OAuthRefreshTokenDelete builder.
type OAuthRefreshTokenDeleteOne ¶
type OAuthRefreshTokenDeleteOne struct {
// contains filtered or unexported fields
}
OAuthRefreshTokenDeleteOne is the builder for deleting a single OAuthRefreshToken entity.
func (*OAuthRefreshTokenDeleteOne) Exec ¶
func (_d *OAuthRefreshTokenDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OAuthRefreshTokenDeleteOne) ExecX ¶
func (_d *OAuthRefreshTokenDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthRefreshTokenDeleteOne) Where ¶
func (_d *OAuthRefreshTokenDeleteOne) Where(ps ...predicate.OAuthRefreshToken) *OAuthRefreshTokenDeleteOne
Where appends a list predicates to the OAuthRefreshTokenDelete builder.
type OAuthRefreshTokenGroupBy ¶
type OAuthRefreshTokenGroupBy struct {
// contains filtered or unexported fields
}
OAuthRefreshTokenGroupBy is the group-by builder for OAuthRefreshToken entities.
func (*OAuthRefreshTokenGroupBy) Aggregate ¶
func (_g *OAuthRefreshTokenGroupBy) Aggregate(fns ...AggregateFunc) *OAuthRefreshTokenGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OAuthRefreshTokenGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OAuthRefreshTokenGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OAuthRefreshTokenGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OAuthRefreshTokenGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*OAuthRefreshTokenGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OAuthRefreshTokenGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*OAuthRefreshTokenGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OAuthRefreshTokenGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OAuthRefreshTokenGroupBy) Scan ¶
func (_g *OAuthRefreshTokenGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OAuthRefreshTokenGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OAuthRefreshTokenMutation ¶
type OAuthRefreshTokenMutation struct {
// contains filtered or unexported fields
}
OAuthRefreshTokenMutation represents an operation that mutates the OAuthRefreshToken nodes in the graph.
func (*OAuthRefreshTokenMutation) Active ¶
func (m *OAuthRefreshTokenMutation) Active() (r bool, exists bool)
Active returns the value of the "active" field in the mutation.
func (*OAuthRefreshTokenMutation) AddField ¶
func (m *OAuthRefreshTokenMutation) 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 (*OAuthRefreshTokenMutation) AddUserID ¶
func (m *OAuthRefreshTokenMutation) AddUserID(i int)
AddUserID adds i to the "user_id" field.
func (*OAuthRefreshTokenMutation) AddedEdges ¶
func (m *OAuthRefreshTokenMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OAuthRefreshTokenMutation) AddedField ¶
func (m *OAuthRefreshTokenMutation) 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 (*OAuthRefreshTokenMutation) AddedFields ¶
func (m *OAuthRefreshTokenMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OAuthRefreshTokenMutation) AddedIDs ¶
func (m *OAuthRefreshTokenMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OAuthRefreshTokenMutation) AddedUserID ¶
func (m *OAuthRefreshTokenMutation) AddedUserID() (r int, exists bool)
AddedUserID returns the value that was added to the "user_id" field in this mutation.
func (*OAuthRefreshTokenMutation) ClearEdge ¶
func (m *OAuthRefreshTokenMutation) 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 (*OAuthRefreshTokenMutation) ClearExpiresAt ¶
func (m *OAuthRefreshTokenMutation) ClearExpiresAt()
ClearExpiresAt clears the value of the "expires_at" field.
func (*OAuthRefreshTokenMutation) ClearField ¶
func (m *OAuthRefreshTokenMutation) 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 (*OAuthRefreshTokenMutation) ClearRequestedAt ¶
func (m *OAuthRefreshTokenMutation) ClearRequestedAt()
ClearRequestedAt clears the value of the "requested_at" field.
func (*OAuthRefreshTokenMutation) ClearUserID ¶
func (m *OAuthRefreshTokenMutation) ClearUserID()
ClearUserID clears the value of the "user_id" field.
func (*OAuthRefreshTokenMutation) ClearedEdges ¶
func (m *OAuthRefreshTokenMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OAuthRefreshTokenMutation) ClearedFields ¶
func (m *OAuthRefreshTokenMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OAuthRefreshTokenMutation) Client ¶
func (m OAuthRefreshTokenMutation) 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 (*OAuthRefreshTokenMutation) ClientID ¶
func (m *OAuthRefreshTokenMutation) ClientID() (r string, exists bool)
ClientID returns the value of the "client_id" field in the mutation.
func (*OAuthRefreshTokenMutation) EdgeCleared ¶
func (m *OAuthRefreshTokenMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OAuthRefreshTokenMutation) ExpiresAt ¶
func (m *OAuthRefreshTokenMutation) ExpiresAt() (r time.Time, exists bool)
ExpiresAt returns the value of the "expires_at" field in the mutation.
func (*OAuthRefreshTokenMutation) ExpiresAtCleared ¶
func (m *OAuthRefreshTokenMutation) ExpiresAtCleared() bool
ExpiresAtCleared returns if the "expires_at" field was cleared in this mutation.
func (*OAuthRefreshTokenMutation) Field ¶
func (m *OAuthRefreshTokenMutation) 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 (*OAuthRefreshTokenMutation) FieldCleared ¶
func (m *OAuthRefreshTokenMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OAuthRefreshTokenMutation) Fields ¶
func (m *OAuthRefreshTokenMutation) 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 (*OAuthRefreshTokenMutation) ID ¶
func (m *OAuthRefreshTokenMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*OAuthRefreshTokenMutation) IDs ¶
func (m *OAuthRefreshTokenMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*OAuthRefreshTokenMutation) OldActive ¶
func (m *OAuthRefreshTokenMutation) OldActive(ctx context.Context) (v bool, err error)
OldActive returns the old "active" field's value of the OAuthRefreshToken entity. If the OAuthRefreshToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthRefreshTokenMutation) OldClientID ¶
func (m *OAuthRefreshTokenMutation) OldClientID(ctx context.Context) (v string, err error)
OldClientID returns the old "client_id" field's value of the OAuthRefreshToken entity. If the OAuthRefreshToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthRefreshTokenMutation) OldExpiresAt ¶
OldExpiresAt returns the old "expires_at" field's value of the OAuthRefreshToken entity. If the OAuthRefreshToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthRefreshTokenMutation) 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 (*OAuthRefreshTokenMutation) OldRequestID ¶
func (m *OAuthRefreshTokenMutation) OldRequestID(ctx context.Context) (v string, err error)
OldRequestID returns the old "request_id" field's value of the OAuthRefreshToken entity. If the OAuthRefreshToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthRefreshTokenMutation) OldRequestedAt ¶
OldRequestedAt returns the old "requested_at" field's value of the OAuthRefreshToken entity. If the OAuthRefreshToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthRefreshTokenMutation) OldScopes ¶
func (m *OAuthRefreshTokenMutation) OldScopes(ctx context.Context) (v string, err error)
OldScopes returns the old "scopes" field's value of the OAuthRefreshToken entity. If the OAuthRefreshToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthRefreshTokenMutation) OldSessionData ¶
func (m *OAuthRefreshTokenMutation) OldSessionData(ctx context.Context) (v map[string]interface{}, err error)
OldSessionData returns the old "session_data" field's value of the OAuthRefreshToken entity. If the OAuthRefreshToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthRefreshTokenMutation) OldSessionType ¶
func (m *OAuthRefreshTokenMutation) OldSessionType(ctx context.Context) (v string, err error)
OldSessionType returns the old "session_type" field's value of the OAuthRefreshToken entity. If the OAuthRefreshToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthRefreshTokenMutation) OldSignature ¶
func (m *OAuthRefreshTokenMutation) OldSignature(ctx context.Context) (v string, err error)
OldSignature returns the old "signature" field's value of the OAuthRefreshToken entity. If the OAuthRefreshToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthRefreshTokenMutation) OldUserID ¶
func (m *OAuthRefreshTokenMutation) OldUserID(ctx context.Context) (v *int, err error)
OldUserID returns the old "user_id" field's value of the OAuthRefreshToken entity. If the OAuthRefreshToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthRefreshTokenMutation) Op ¶
func (m *OAuthRefreshTokenMutation) Op() Op
Op returns the operation name.
func (*OAuthRefreshTokenMutation) RemovedEdges ¶
func (m *OAuthRefreshTokenMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OAuthRefreshTokenMutation) RemovedIDs ¶
func (m *OAuthRefreshTokenMutation) 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 (*OAuthRefreshTokenMutation) RequestID ¶
func (m *OAuthRefreshTokenMutation) RequestID() (r string, exists bool)
RequestID returns the value of the "request_id" field in the mutation.
func (*OAuthRefreshTokenMutation) RequestedAt ¶
func (m *OAuthRefreshTokenMutation) RequestedAt() (r time.Time, exists bool)
RequestedAt returns the value of the "requested_at" field in the mutation.
func (*OAuthRefreshTokenMutation) RequestedAtCleared ¶
func (m *OAuthRefreshTokenMutation) RequestedAtCleared() bool
RequestedAtCleared returns if the "requested_at" field was cleared in this mutation.
func (*OAuthRefreshTokenMutation) ResetActive ¶
func (m *OAuthRefreshTokenMutation) ResetActive()
ResetActive resets all changes to the "active" field.
func (*OAuthRefreshTokenMutation) ResetClientID ¶
func (m *OAuthRefreshTokenMutation) ResetClientID()
ResetClientID resets all changes to the "client_id" field.
func (*OAuthRefreshTokenMutation) ResetEdge ¶
func (m *OAuthRefreshTokenMutation) 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 (*OAuthRefreshTokenMutation) ResetExpiresAt ¶
func (m *OAuthRefreshTokenMutation) ResetExpiresAt()
ResetExpiresAt resets all changes to the "expires_at" field.
func (*OAuthRefreshTokenMutation) ResetField ¶
func (m *OAuthRefreshTokenMutation) 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 (*OAuthRefreshTokenMutation) ResetRequestID ¶
func (m *OAuthRefreshTokenMutation) ResetRequestID()
ResetRequestID resets all changes to the "request_id" field.
func (*OAuthRefreshTokenMutation) ResetRequestedAt ¶
func (m *OAuthRefreshTokenMutation) ResetRequestedAt()
ResetRequestedAt resets all changes to the "requested_at" field.
func (*OAuthRefreshTokenMutation) ResetScopes ¶
func (m *OAuthRefreshTokenMutation) ResetScopes()
ResetScopes resets all changes to the "scopes" field.
func (*OAuthRefreshTokenMutation) ResetSessionData ¶
func (m *OAuthRefreshTokenMutation) ResetSessionData()
ResetSessionData resets all changes to the "session_data" field.
func (*OAuthRefreshTokenMutation) ResetSessionType ¶
func (m *OAuthRefreshTokenMutation) ResetSessionType()
ResetSessionType resets all changes to the "session_type" field.
func (*OAuthRefreshTokenMutation) ResetSignature ¶
func (m *OAuthRefreshTokenMutation) ResetSignature()
ResetSignature resets all changes to the "signature" field.
func (*OAuthRefreshTokenMutation) ResetUserID ¶
func (m *OAuthRefreshTokenMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*OAuthRefreshTokenMutation) Scopes ¶
func (m *OAuthRefreshTokenMutation) Scopes() (r string, exists bool)
Scopes returns the value of the "scopes" field in the mutation.
func (*OAuthRefreshTokenMutation) SessionData ¶
func (m *OAuthRefreshTokenMutation) SessionData() (r map[string]interface{}, exists bool)
SessionData returns the value of the "session_data" field in the mutation.
func (*OAuthRefreshTokenMutation) SessionType ¶
func (m *OAuthRefreshTokenMutation) SessionType() (r string, exists bool)
SessionType returns the value of the "session_type" field in the mutation.
func (*OAuthRefreshTokenMutation) SetActive ¶
func (m *OAuthRefreshTokenMutation) SetActive(b bool)
SetActive sets the "active" field.
func (*OAuthRefreshTokenMutation) SetClientID ¶
func (m *OAuthRefreshTokenMutation) SetClientID(s string)
SetClientID sets the "client_id" field.
func (*OAuthRefreshTokenMutation) SetExpiresAt ¶
func (m *OAuthRefreshTokenMutation) SetExpiresAt(t time.Time)
SetExpiresAt sets the "expires_at" field.
func (*OAuthRefreshTokenMutation) SetField ¶
func (m *OAuthRefreshTokenMutation) 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 (*OAuthRefreshTokenMutation) SetOp ¶
func (m *OAuthRefreshTokenMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*OAuthRefreshTokenMutation) SetRequestID ¶
func (m *OAuthRefreshTokenMutation) SetRequestID(s string)
SetRequestID sets the "request_id" field.
func (*OAuthRefreshTokenMutation) SetRequestedAt ¶
func (m *OAuthRefreshTokenMutation) SetRequestedAt(t time.Time)
SetRequestedAt sets the "requested_at" field.
func (*OAuthRefreshTokenMutation) SetScopes ¶
func (m *OAuthRefreshTokenMutation) SetScopes(s string)
SetScopes sets the "scopes" field.
func (*OAuthRefreshTokenMutation) SetSessionData ¶
func (m *OAuthRefreshTokenMutation) SetSessionData(value map[string]interface{})
SetSessionData sets the "session_data" field.
func (*OAuthRefreshTokenMutation) SetSessionType ¶
func (m *OAuthRefreshTokenMutation) SetSessionType(s string)
SetSessionType sets the "session_type" field.
func (*OAuthRefreshTokenMutation) SetSignature ¶
func (m *OAuthRefreshTokenMutation) SetSignature(s string)
SetSignature sets the "signature" field.
func (*OAuthRefreshTokenMutation) SetUserID ¶
func (m *OAuthRefreshTokenMutation) SetUserID(i int)
SetUserID sets the "user_id" field.
func (*OAuthRefreshTokenMutation) Signature ¶
func (m *OAuthRefreshTokenMutation) Signature() (r string, exists bool)
Signature returns the value of the "signature" field in the mutation.
func (OAuthRefreshTokenMutation) Tx ¶
func (m OAuthRefreshTokenMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OAuthRefreshTokenMutation) Type ¶
func (m *OAuthRefreshTokenMutation) Type() string
Type returns the node type of this mutation (OAuthRefreshToken).
func (*OAuthRefreshTokenMutation) UserID ¶
func (m *OAuthRefreshTokenMutation) UserID() (r int, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*OAuthRefreshTokenMutation) UserIDCleared ¶
func (m *OAuthRefreshTokenMutation) UserIDCleared() bool
UserIDCleared returns if the "user_id" field was cleared in this mutation.
func (*OAuthRefreshTokenMutation) Where ¶
func (m *OAuthRefreshTokenMutation) Where(ps ...predicate.OAuthRefreshToken)
Where appends a list predicates to the OAuthRefreshTokenMutation builder.
func (*OAuthRefreshTokenMutation) WhereP ¶
func (m *OAuthRefreshTokenMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the OAuthRefreshTokenMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type OAuthRefreshTokenQuery ¶
type OAuthRefreshTokenQuery struct {
// contains filtered or unexported fields
}
OAuthRefreshTokenQuery is the builder for querying OAuthRefreshToken entities.
func (*OAuthRefreshTokenQuery) Aggregate ¶
func (_q *OAuthRefreshTokenQuery) Aggregate(fns ...AggregateFunc) *OAuthRefreshTokenSelect
Aggregate returns a OAuthRefreshTokenSelect configured with the given aggregations.
func (*OAuthRefreshTokenQuery) All ¶
func (_q *OAuthRefreshTokenQuery) All(ctx context.Context) ([]*OAuthRefreshToken, error)
All executes the query and returns a list of OAuthRefreshTokens.
func (*OAuthRefreshTokenQuery) AllX ¶
func (_q *OAuthRefreshTokenQuery) AllX(ctx context.Context) []*OAuthRefreshToken
AllX is like All, but panics if an error occurs.
func (*OAuthRefreshTokenQuery) Clone ¶
func (_q *OAuthRefreshTokenQuery) Clone() *OAuthRefreshTokenQuery
Clone returns a duplicate of the OAuthRefreshTokenQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OAuthRefreshTokenQuery) Count ¶
func (_q *OAuthRefreshTokenQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*OAuthRefreshTokenQuery) CountX ¶
func (_q *OAuthRefreshTokenQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*OAuthRefreshTokenQuery) Exist ¶
func (_q *OAuthRefreshTokenQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*OAuthRefreshTokenQuery) ExistX ¶
func (_q *OAuthRefreshTokenQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*OAuthRefreshTokenQuery) First ¶
func (_q *OAuthRefreshTokenQuery) First(ctx context.Context) (*OAuthRefreshToken, error)
First returns the first OAuthRefreshToken entity from the query. Returns a *NotFoundError when no OAuthRefreshToken was found.
func (*OAuthRefreshTokenQuery) FirstID ¶
func (_q *OAuthRefreshTokenQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first OAuthRefreshToken ID from the query. Returns a *NotFoundError when no OAuthRefreshToken ID was found.
func (*OAuthRefreshTokenQuery) FirstIDX ¶
func (_q *OAuthRefreshTokenQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*OAuthRefreshTokenQuery) FirstX ¶
func (_q *OAuthRefreshTokenQuery) FirstX(ctx context.Context) *OAuthRefreshToken
FirstX is like First, but panics if an error occurs.
func (*OAuthRefreshTokenQuery) GroupBy ¶
func (_q *OAuthRefreshTokenQuery) GroupBy(field string, fields ...string) *OAuthRefreshTokenGroupBy
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 {
SessionType string `json:"session_type,omitempty"`
Count int `json:"count,omitempty"`
}
client.OAuthRefreshToken.Query().
GroupBy(oauthrefreshtoken.FieldSessionType).
Aggregate(_test.Count()).
Scan(ctx, &v)
func (*OAuthRefreshTokenQuery) IDs ¶
func (_q *OAuthRefreshTokenQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of OAuthRefreshToken IDs.
func (*OAuthRefreshTokenQuery) IDsX ¶
func (_q *OAuthRefreshTokenQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*OAuthRefreshTokenQuery) Limit ¶
func (_q *OAuthRefreshTokenQuery) Limit(limit int) *OAuthRefreshTokenQuery
Limit the number of records to be returned by this query.
func (*OAuthRefreshTokenQuery) Offset ¶
func (_q *OAuthRefreshTokenQuery) Offset(offset int) *OAuthRefreshTokenQuery
Offset to start from.
func (*OAuthRefreshTokenQuery) Only ¶
func (_q *OAuthRefreshTokenQuery) Only(ctx context.Context) (*OAuthRefreshToken, error)
Only returns a single OAuthRefreshToken entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OAuthRefreshToken entity is found. Returns a *NotFoundError when no OAuthRefreshToken entities are found.
func (*OAuthRefreshTokenQuery) OnlyID ¶
func (_q *OAuthRefreshTokenQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only OAuthRefreshToken ID in the query. Returns a *NotSingularError when more than one OAuthRefreshToken ID is found. Returns a *NotFoundError when no entities are found.
func (*OAuthRefreshTokenQuery) OnlyIDX ¶
func (_q *OAuthRefreshTokenQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*OAuthRefreshTokenQuery) OnlyX ¶
func (_q *OAuthRefreshTokenQuery) OnlyX(ctx context.Context) *OAuthRefreshToken
OnlyX is like Only, but panics if an error occurs.
func (*OAuthRefreshTokenQuery) Order ¶
func (_q *OAuthRefreshTokenQuery) Order(o ...oauthrefreshtoken.OrderOption) *OAuthRefreshTokenQuery
Order specifies how the records should be ordered.
func (*OAuthRefreshTokenQuery) Select ¶
func (_q *OAuthRefreshTokenQuery) Select(fields ...string) *OAuthRefreshTokenSelect
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 {
SessionType string `json:"session_type,omitempty"`
}
client.OAuthRefreshToken.Query().
Select(oauthrefreshtoken.FieldSessionType).
Scan(ctx, &v)
func (*OAuthRefreshTokenQuery) Unique ¶
func (_q *OAuthRefreshTokenQuery) Unique(unique bool) *OAuthRefreshTokenQuery
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 (*OAuthRefreshTokenQuery) Where ¶
func (_q *OAuthRefreshTokenQuery) Where(ps ...predicate.OAuthRefreshToken) *OAuthRefreshTokenQuery
Where adds a new predicate for the OAuthRefreshTokenQuery builder.
type OAuthRefreshTokenSelect ¶
type OAuthRefreshTokenSelect struct {
*OAuthRefreshTokenQuery
// contains filtered or unexported fields
}
OAuthRefreshTokenSelect is the builder for selecting fields of OAuthRefreshToken entities.
func (*OAuthRefreshTokenSelect) Aggregate ¶
func (_s *OAuthRefreshTokenSelect) Aggregate(fns ...AggregateFunc) *OAuthRefreshTokenSelect
Aggregate adds the given aggregation functions to the selector query.
func (*OAuthRefreshTokenSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OAuthRefreshTokenSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OAuthRefreshTokenSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OAuthRefreshTokenSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OAuthRefreshTokenSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*OAuthRefreshTokenSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OAuthRefreshTokenSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OAuthRefreshTokenSelect) Scan ¶
func (_s *OAuthRefreshTokenSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OAuthRefreshTokenSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OAuthRefreshTokenUpdate ¶
type OAuthRefreshTokenUpdate struct {
// contains filtered or unexported fields
}
OAuthRefreshTokenUpdate is the builder for updating OAuthRefreshToken entities.
func (*OAuthRefreshTokenUpdate) AddUserID ¶
func (_u *OAuthRefreshTokenUpdate) AddUserID(v int) *OAuthRefreshTokenUpdate
AddUserID adds value to the "user_id" field.
func (*OAuthRefreshTokenUpdate) ClearExpiresAt ¶
func (_u *OAuthRefreshTokenUpdate) ClearExpiresAt() *OAuthRefreshTokenUpdate
ClearExpiresAt clears the value of the "expires_at" field.
func (*OAuthRefreshTokenUpdate) ClearRequestedAt ¶
func (_u *OAuthRefreshTokenUpdate) ClearRequestedAt() *OAuthRefreshTokenUpdate
ClearRequestedAt clears the value of the "requested_at" field.
func (*OAuthRefreshTokenUpdate) ClearUserID ¶
func (_u *OAuthRefreshTokenUpdate) ClearUserID() *OAuthRefreshTokenUpdate
ClearUserID clears the value of the "user_id" field.
func (*OAuthRefreshTokenUpdate) Exec ¶
func (_u *OAuthRefreshTokenUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OAuthRefreshTokenUpdate) ExecX ¶
func (_u *OAuthRefreshTokenUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthRefreshTokenUpdate) Mutation ¶
func (_u *OAuthRefreshTokenUpdate) Mutation() *OAuthRefreshTokenMutation
Mutation returns the OAuthRefreshTokenMutation object of the builder.
func (*OAuthRefreshTokenUpdate) Save ¶
func (_u *OAuthRefreshTokenUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OAuthRefreshTokenUpdate) SaveX ¶
func (_u *OAuthRefreshTokenUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OAuthRefreshTokenUpdate) SetActive ¶
func (_u *OAuthRefreshTokenUpdate) SetActive(v bool) *OAuthRefreshTokenUpdate
SetActive sets the "active" field.
func (*OAuthRefreshTokenUpdate) SetClientID ¶
func (_u *OAuthRefreshTokenUpdate) SetClientID(v string) *OAuthRefreshTokenUpdate
SetClientID sets the "client_id" field.
func (*OAuthRefreshTokenUpdate) SetExpiresAt ¶
func (_u *OAuthRefreshTokenUpdate) SetExpiresAt(v time.Time) *OAuthRefreshTokenUpdate
SetExpiresAt sets the "expires_at" field.
func (*OAuthRefreshTokenUpdate) SetNillableActive ¶
func (_u *OAuthRefreshTokenUpdate) SetNillableActive(v *bool) *OAuthRefreshTokenUpdate
SetNillableActive sets the "active" field if the given value is not nil.
func (*OAuthRefreshTokenUpdate) SetNillableClientID ¶
func (_u *OAuthRefreshTokenUpdate) SetNillableClientID(v *string) *OAuthRefreshTokenUpdate
SetNillableClientID sets the "client_id" field if the given value is not nil.
func (*OAuthRefreshTokenUpdate) SetNillableExpiresAt ¶
func (_u *OAuthRefreshTokenUpdate) SetNillableExpiresAt(v *time.Time) *OAuthRefreshTokenUpdate
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*OAuthRefreshTokenUpdate) SetNillableRequestID ¶
func (_u *OAuthRefreshTokenUpdate) SetNillableRequestID(v *string) *OAuthRefreshTokenUpdate
SetNillableRequestID sets the "request_id" field if the given value is not nil.
func (*OAuthRefreshTokenUpdate) SetNillableRequestedAt ¶
func (_u *OAuthRefreshTokenUpdate) SetNillableRequestedAt(v *time.Time) *OAuthRefreshTokenUpdate
SetNillableRequestedAt sets the "requested_at" field if the given value is not nil.
func (*OAuthRefreshTokenUpdate) SetNillableScopes ¶
func (_u *OAuthRefreshTokenUpdate) SetNillableScopes(v *string) *OAuthRefreshTokenUpdate
SetNillableScopes sets the "scopes" field if the given value is not nil.
func (*OAuthRefreshTokenUpdate) SetNillableSessionType ¶
func (_u *OAuthRefreshTokenUpdate) SetNillableSessionType(v *string) *OAuthRefreshTokenUpdate
SetNillableSessionType sets the "session_type" field if the given value is not nil.
func (*OAuthRefreshTokenUpdate) SetNillableSignature ¶
func (_u *OAuthRefreshTokenUpdate) SetNillableSignature(v *string) *OAuthRefreshTokenUpdate
SetNillableSignature sets the "signature" field if the given value is not nil.
func (*OAuthRefreshTokenUpdate) SetNillableUserID ¶
func (_u *OAuthRefreshTokenUpdate) SetNillableUserID(v *int) *OAuthRefreshTokenUpdate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*OAuthRefreshTokenUpdate) SetRequestID ¶
func (_u *OAuthRefreshTokenUpdate) SetRequestID(v string) *OAuthRefreshTokenUpdate
SetRequestID sets the "request_id" field.
func (*OAuthRefreshTokenUpdate) SetRequestedAt ¶
func (_u *OAuthRefreshTokenUpdate) SetRequestedAt(v time.Time) *OAuthRefreshTokenUpdate
SetRequestedAt sets the "requested_at" field.
func (*OAuthRefreshTokenUpdate) SetScopes ¶
func (_u *OAuthRefreshTokenUpdate) SetScopes(v string) *OAuthRefreshTokenUpdate
SetScopes sets the "scopes" field.
func (*OAuthRefreshTokenUpdate) SetSessionData ¶
func (_u *OAuthRefreshTokenUpdate) SetSessionData(v map[string]interface{}) *OAuthRefreshTokenUpdate
SetSessionData sets the "session_data" field.
func (*OAuthRefreshTokenUpdate) SetSessionType ¶
func (_u *OAuthRefreshTokenUpdate) SetSessionType(v string) *OAuthRefreshTokenUpdate
SetSessionType sets the "session_type" field.
func (*OAuthRefreshTokenUpdate) SetSignature ¶
func (_u *OAuthRefreshTokenUpdate) SetSignature(v string) *OAuthRefreshTokenUpdate
SetSignature sets the "signature" field.
func (*OAuthRefreshTokenUpdate) SetUserID ¶
func (_u *OAuthRefreshTokenUpdate) SetUserID(v int) *OAuthRefreshTokenUpdate
SetUserID sets the "user_id" field.
func (*OAuthRefreshTokenUpdate) Where ¶
func (_u *OAuthRefreshTokenUpdate) Where(ps ...predicate.OAuthRefreshToken) *OAuthRefreshTokenUpdate
Where appends a list predicates to the OAuthRefreshTokenUpdate builder.
type OAuthRefreshTokenUpdateOne ¶
type OAuthRefreshTokenUpdateOne struct {
// contains filtered or unexported fields
}
OAuthRefreshTokenUpdateOne is the builder for updating a single OAuthRefreshToken entity.
func (*OAuthRefreshTokenUpdateOne) AddUserID ¶
func (_u *OAuthRefreshTokenUpdateOne) AddUserID(v int) *OAuthRefreshTokenUpdateOne
AddUserID adds value to the "user_id" field.
func (*OAuthRefreshTokenUpdateOne) ClearExpiresAt ¶
func (_u *OAuthRefreshTokenUpdateOne) ClearExpiresAt() *OAuthRefreshTokenUpdateOne
ClearExpiresAt clears the value of the "expires_at" field.
func (*OAuthRefreshTokenUpdateOne) ClearRequestedAt ¶
func (_u *OAuthRefreshTokenUpdateOne) ClearRequestedAt() *OAuthRefreshTokenUpdateOne
ClearRequestedAt clears the value of the "requested_at" field.
func (*OAuthRefreshTokenUpdateOne) ClearUserID ¶
func (_u *OAuthRefreshTokenUpdateOne) ClearUserID() *OAuthRefreshTokenUpdateOne
ClearUserID clears the value of the "user_id" field.
func (*OAuthRefreshTokenUpdateOne) Exec ¶
func (_u *OAuthRefreshTokenUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OAuthRefreshTokenUpdateOne) ExecX ¶
func (_u *OAuthRefreshTokenUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthRefreshTokenUpdateOne) Mutation ¶
func (_u *OAuthRefreshTokenUpdateOne) Mutation() *OAuthRefreshTokenMutation
Mutation returns the OAuthRefreshTokenMutation object of the builder.
func (*OAuthRefreshTokenUpdateOne) Save ¶
func (_u *OAuthRefreshTokenUpdateOne) Save(ctx context.Context) (*OAuthRefreshToken, error)
Save executes the query and returns the updated OAuthRefreshToken entity.
func (*OAuthRefreshTokenUpdateOne) SaveX ¶
func (_u *OAuthRefreshTokenUpdateOne) SaveX(ctx context.Context) *OAuthRefreshToken
SaveX is like Save, but panics if an error occurs.
func (*OAuthRefreshTokenUpdateOne) Select ¶
func (_u *OAuthRefreshTokenUpdateOne) Select(field string, fields ...string) *OAuthRefreshTokenUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OAuthRefreshTokenUpdateOne) SetActive ¶
func (_u *OAuthRefreshTokenUpdateOne) SetActive(v bool) *OAuthRefreshTokenUpdateOne
SetActive sets the "active" field.
func (*OAuthRefreshTokenUpdateOne) SetClientID ¶
func (_u *OAuthRefreshTokenUpdateOne) SetClientID(v string) *OAuthRefreshTokenUpdateOne
SetClientID sets the "client_id" field.
func (*OAuthRefreshTokenUpdateOne) SetExpiresAt ¶
func (_u *OAuthRefreshTokenUpdateOne) SetExpiresAt(v time.Time) *OAuthRefreshTokenUpdateOne
SetExpiresAt sets the "expires_at" field.
func (*OAuthRefreshTokenUpdateOne) SetNillableActive ¶
func (_u *OAuthRefreshTokenUpdateOne) SetNillableActive(v *bool) *OAuthRefreshTokenUpdateOne
SetNillableActive sets the "active" field if the given value is not nil.
func (*OAuthRefreshTokenUpdateOne) SetNillableClientID ¶
func (_u *OAuthRefreshTokenUpdateOne) SetNillableClientID(v *string) *OAuthRefreshTokenUpdateOne
SetNillableClientID sets the "client_id" field if the given value is not nil.
func (*OAuthRefreshTokenUpdateOne) SetNillableExpiresAt ¶
func (_u *OAuthRefreshTokenUpdateOne) SetNillableExpiresAt(v *time.Time) *OAuthRefreshTokenUpdateOne
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*OAuthRefreshTokenUpdateOne) SetNillableRequestID ¶
func (_u *OAuthRefreshTokenUpdateOne) SetNillableRequestID(v *string) *OAuthRefreshTokenUpdateOne
SetNillableRequestID sets the "request_id" field if the given value is not nil.
func (*OAuthRefreshTokenUpdateOne) SetNillableRequestedAt ¶
func (_u *OAuthRefreshTokenUpdateOne) SetNillableRequestedAt(v *time.Time) *OAuthRefreshTokenUpdateOne
SetNillableRequestedAt sets the "requested_at" field if the given value is not nil.
func (*OAuthRefreshTokenUpdateOne) SetNillableScopes ¶
func (_u *OAuthRefreshTokenUpdateOne) SetNillableScopes(v *string) *OAuthRefreshTokenUpdateOne
SetNillableScopes sets the "scopes" field if the given value is not nil.
func (*OAuthRefreshTokenUpdateOne) SetNillableSessionType ¶
func (_u *OAuthRefreshTokenUpdateOne) SetNillableSessionType(v *string) *OAuthRefreshTokenUpdateOne
SetNillableSessionType sets the "session_type" field if the given value is not nil.
func (*OAuthRefreshTokenUpdateOne) SetNillableSignature ¶
func (_u *OAuthRefreshTokenUpdateOne) SetNillableSignature(v *string) *OAuthRefreshTokenUpdateOne
SetNillableSignature sets the "signature" field if the given value is not nil.
func (*OAuthRefreshTokenUpdateOne) SetNillableUserID ¶
func (_u *OAuthRefreshTokenUpdateOne) SetNillableUserID(v *int) *OAuthRefreshTokenUpdateOne
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*OAuthRefreshTokenUpdateOne) SetRequestID ¶
func (_u *OAuthRefreshTokenUpdateOne) SetRequestID(v string) *OAuthRefreshTokenUpdateOne
SetRequestID sets the "request_id" field.
func (*OAuthRefreshTokenUpdateOne) SetRequestedAt ¶
func (_u *OAuthRefreshTokenUpdateOne) SetRequestedAt(v time.Time) *OAuthRefreshTokenUpdateOne
SetRequestedAt sets the "requested_at" field.
func (*OAuthRefreshTokenUpdateOne) SetScopes ¶
func (_u *OAuthRefreshTokenUpdateOne) SetScopes(v string) *OAuthRefreshTokenUpdateOne
SetScopes sets the "scopes" field.
func (*OAuthRefreshTokenUpdateOne) SetSessionData ¶
func (_u *OAuthRefreshTokenUpdateOne) SetSessionData(v map[string]interface{}) *OAuthRefreshTokenUpdateOne
SetSessionData sets the "session_data" field.
func (*OAuthRefreshTokenUpdateOne) SetSessionType ¶
func (_u *OAuthRefreshTokenUpdateOne) SetSessionType(v string) *OAuthRefreshTokenUpdateOne
SetSessionType sets the "session_type" field.
func (*OAuthRefreshTokenUpdateOne) SetSignature ¶
func (_u *OAuthRefreshTokenUpdateOne) SetSignature(v string) *OAuthRefreshTokenUpdateOne
SetSignature sets the "signature" field.
func (*OAuthRefreshTokenUpdateOne) SetUserID ¶
func (_u *OAuthRefreshTokenUpdateOne) SetUserID(v int) *OAuthRefreshTokenUpdateOne
SetUserID sets the "user_id" field.
func (*OAuthRefreshTokenUpdateOne) Where ¶
func (_u *OAuthRefreshTokenUpdateOne) Where(ps ...predicate.OAuthRefreshToken) *OAuthRefreshTokenUpdateOne
Where appends a list predicates to the OAuthRefreshTokenUpdate builder.
type OAuthRefreshTokens ¶
type OAuthRefreshTokens []*OAuthRefreshToken
OAuthRefreshTokens is a parsable slice of OAuthRefreshToken.
type OAuthSigningKey ¶
type OAuthSigningKey struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Key ID for JWKS
Kid string `json:"kid,omitempty"`
// Signing algorithm
Algorithm string `json:"algorithm,omitempty"`
// PEM-encoded RSA private key
PrivateKeyPem string `json:"-"`
// PEM-encoded RSA public key
PublicKeyPem string `json:"public_key_pem,omitempty"`
// Only active keys sign new tokens
IsActive bool `json:"is_active,omitempty"`
// Key expiry for rotation
ExpiresAt *time.Time `json:"expires_at,omitempty"`
// Retired keys stay in JWKS until this time passes
RetiredAt *time.Time `json:"retired_at,omitempty"`
// contains filtered or unexported fields
}
OAuthSigningKey is the model entity for the OAuthSigningKey schema.
func (*OAuthSigningKey) String ¶
func (_m *OAuthSigningKey) String() string
String implements the fmt.Stringer.
func (*OAuthSigningKey) Unwrap ¶
func (_m *OAuthSigningKey) Unwrap() *OAuthSigningKey
Unwrap unwraps the OAuthSigningKey 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 (*OAuthSigningKey) Update ¶
func (_m *OAuthSigningKey) Update() *OAuthSigningKeyUpdateOne
Update returns a builder for updating this OAuthSigningKey. Note that you need to call OAuthSigningKey.Unwrap() before calling this method if this OAuthSigningKey was returned from a transaction, and the transaction was committed or rolled back.
type OAuthSigningKeyClient ¶
type OAuthSigningKeyClient struct {
// contains filtered or unexported fields
}
OAuthSigningKeyClient is a client for the OAuthSigningKey schema.
func NewOAuthSigningKeyClient ¶
func NewOAuthSigningKeyClient(c config) *OAuthSigningKeyClient
NewOAuthSigningKeyClient returns a client for the OAuthSigningKey from the given config.
func (*OAuthSigningKeyClient) Create ¶
func (c *OAuthSigningKeyClient) Create() *OAuthSigningKeyCreate
Create returns a builder for creating a OAuthSigningKey entity.
func (*OAuthSigningKeyClient) CreateBulk ¶
func (c *OAuthSigningKeyClient) CreateBulk(builders ...*OAuthSigningKeyCreate) *OAuthSigningKeyCreateBulk
CreateBulk returns a builder for creating a bulk of OAuthSigningKey entities.
func (*OAuthSigningKeyClient) Delete ¶
func (c *OAuthSigningKeyClient) Delete() *OAuthSigningKeyDelete
Delete returns a delete builder for OAuthSigningKey.
func (*OAuthSigningKeyClient) DeleteOne ¶
func (c *OAuthSigningKeyClient) DeleteOne(_m *OAuthSigningKey) *OAuthSigningKeyDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*OAuthSigningKeyClient) DeleteOneID ¶
func (c *OAuthSigningKeyClient) DeleteOneID(id int) *OAuthSigningKeyDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*OAuthSigningKeyClient) Get ¶
func (c *OAuthSigningKeyClient) Get(ctx context.Context, id int) (*OAuthSigningKey, error)
Get returns a OAuthSigningKey entity by its id.
func (*OAuthSigningKeyClient) GetX ¶
func (c *OAuthSigningKeyClient) GetX(ctx context.Context, id int) *OAuthSigningKey
GetX is like Get, but panics if an error occurs.
func (*OAuthSigningKeyClient) Hooks ¶
func (c *OAuthSigningKeyClient) Hooks() []Hook
Hooks returns the client hooks.
func (*OAuthSigningKeyClient) Intercept ¶
func (c *OAuthSigningKeyClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `oauthsigningkey.Intercept(f(g(h())))`.
func (*OAuthSigningKeyClient) Interceptors ¶
func (c *OAuthSigningKeyClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*OAuthSigningKeyClient) MapCreateBulk ¶
func (c *OAuthSigningKeyClient) MapCreateBulk(slice any, setFunc func(*OAuthSigningKeyCreate, int)) *OAuthSigningKeyCreateBulk
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 (*OAuthSigningKeyClient) Query ¶
func (c *OAuthSigningKeyClient) Query() *OAuthSigningKeyQuery
Query returns a query builder for OAuthSigningKey.
func (*OAuthSigningKeyClient) Update ¶
func (c *OAuthSigningKeyClient) Update() *OAuthSigningKeyUpdate
Update returns an update builder for OAuthSigningKey.
func (*OAuthSigningKeyClient) UpdateOne ¶
func (c *OAuthSigningKeyClient) UpdateOne(_m *OAuthSigningKey) *OAuthSigningKeyUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OAuthSigningKeyClient) UpdateOneID ¶
func (c *OAuthSigningKeyClient) UpdateOneID(id int) *OAuthSigningKeyUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OAuthSigningKeyClient) Use ¶
func (c *OAuthSigningKeyClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `oauthsigningkey.Hooks(f(g(h())))`.
type OAuthSigningKeyCreate ¶
type OAuthSigningKeyCreate struct {
// contains filtered or unexported fields
}
OAuthSigningKeyCreate is the builder for creating a OAuthSigningKey entity.
func (*OAuthSigningKeyCreate) Exec ¶
func (_c *OAuthSigningKeyCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*OAuthSigningKeyCreate) ExecX ¶
func (_c *OAuthSigningKeyCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthSigningKeyCreate) Mutation ¶
func (_c *OAuthSigningKeyCreate) Mutation() *OAuthSigningKeyMutation
Mutation returns the OAuthSigningKeyMutation object of the builder.
func (*OAuthSigningKeyCreate) Save ¶
func (_c *OAuthSigningKeyCreate) Save(ctx context.Context) (*OAuthSigningKey, error)
Save creates the OAuthSigningKey in the database.
func (*OAuthSigningKeyCreate) SaveX ¶
func (_c *OAuthSigningKeyCreate) SaveX(ctx context.Context) *OAuthSigningKey
SaveX calls Save and panics if Save returns an error.
func (*OAuthSigningKeyCreate) SetAlgorithm ¶
func (_c *OAuthSigningKeyCreate) SetAlgorithm(v string) *OAuthSigningKeyCreate
SetAlgorithm sets the "algorithm" field.
func (*OAuthSigningKeyCreate) SetExpiresAt ¶
func (_c *OAuthSigningKeyCreate) SetExpiresAt(v time.Time) *OAuthSigningKeyCreate
SetExpiresAt sets the "expires_at" field.
func (*OAuthSigningKeyCreate) SetIsActive ¶
func (_c *OAuthSigningKeyCreate) SetIsActive(v bool) *OAuthSigningKeyCreate
SetIsActive sets the "is_active" field.
func (*OAuthSigningKeyCreate) SetKid ¶
func (_c *OAuthSigningKeyCreate) SetKid(v string) *OAuthSigningKeyCreate
SetKid sets the "kid" field.
func (*OAuthSigningKeyCreate) SetNillableAlgorithm ¶
func (_c *OAuthSigningKeyCreate) SetNillableAlgorithm(v *string) *OAuthSigningKeyCreate
SetNillableAlgorithm sets the "algorithm" field if the given value is not nil.
func (*OAuthSigningKeyCreate) SetNillableExpiresAt ¶
func (_c *OAuthSigningKeyCreate) SetNillableExpiresAt(v *time.Time) *OAuthSigningKeyCreate
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*OAuthSigningKeyCreate) SetNillableIsActive ¶
func (_c *OAuthSigningKeyCreate) SetNillableIsActive(v *bool) *OAuthSigningKeyCreate
SetNillableIsActive sets the "is_active" field if the given value is not nil.
func (*OAuthSigningKeyCreate) SetNillableRetiredAt ¶
func (_c *OAuthSigningKeyCreate) SetNillableRetiredAt(v *time.Time) *OAuthSigningKeyCreate
SetNillableRetiredAt sets the "retired_at" field if the given value is not nil.
func (*OAuthSigningKeyCreate) SetPrivateKeyPem ¶
func (_c *OAuthSigningKeyCreate) SetPrivateKeyPem(v string) *OAuthSigningKeyCreate
SetPrivateKeyPem sets the "private_key_pem" field.
func (*OAuthSigningKeyCreate) SetPublicKeyPem ¶
func (_c *OAuthSigningKeyCreate) SetPublicKeyPem(v string) *OAuthSigningKeyCreate
SetPublicKeyPem sets the "public_key_pem" field.
func (*OAuthSigningKeyCreate) SetRetiredAt ¶
func (_c *OAuthSigningKeyCreate) SetRetiredAt(v time.Time) *OAuthSigningKeyCreate
SetRetiredAt sets the "retired_at" field.
type OAuthSigningKeyCreateBulk ¶
type OAuthSigningKeyCreateBulk struct {
// contains filtered or unexported fields
}
OAuthSigningKeyCreateBulk is the builder for creating many OAuthSigningKey entities in bulk.
func (*OAuthSigningKeyCreateBulk) Exec ¶
func (_c *OAuthSigningKeyCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OAuthSigningKeyCreateBulk) ExecX ¶
func (_c *OAuthSigningKeyCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthSigningKeyCreateBulk) Save ¶
func (_c *OAuthSigningKeyCreateBulk) Save(ctx context.Context) ([]*OAuthSigningKey, error)
Save creates the OAuthSigningKey entities in the database.
func (*OAuthSigningKeyCreateBulk) SaveX ¶
func (_c *OAuthSigningKeyCreateBulk) SaveX(ctx context.Context) []*OAuthSigningKey
SaveX is like Save, but panics if an error occurs.
type OAuthSigningKeyDelete ¶
type OAuthSigningKeyDelete struct {
// contains filtered or unexported fields
}
OAuthSigningKeyDelete is the builder for deleting a OAuthSigningKey entity.
func (*OAuthSigningKeyDelete) Exec ¶
func (_d *OAuthSigningKeyDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OAuthSigningKeyDelete) ExecX ¶
func (_d *OAuthSigningKeyDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OAuthSigningKeyDelete) Where ¶
func (_d *OAuthSigningKeyDelete) Where(ps ...predicate.OAuthSigningKey) *OAuthSigningKeyDelete
Where appends a list predicates to the OAuthSigningKeyDelete builder.
type OAuthSigningKeyDeleteOne ¶
type OAuthSigningKeyDeleteOne struct {
// contains filtered or unexported fields
}
OAuthSigningKeyDeleteOne is the builder for deleting a single OAuthSigningKey entity.
func (*OAuthSigningKeyDeleteOne) Exec ¶
func (_d *OAuthSigningKeyDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OAuthSigningKeyDeleteOne) ExecX ¶
func (_d *OAuthSigningKeyDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthSigningKeyDeleteOne) Where ¶
func (_d *OAuthSigningKeyDeleteOne) Where(ps ...predicate.OAuthSigningKey) *OAuthSigningKeyDeleteOne
Where appends a list predicates to the OAuthSigningKeyDelete builder.
type OAuthSigningKeyGroupBy ¶
type OAuthSigningKeyGroupBy struct {
// contains filtered or unexported fields
}
OAuthSigningKeyGroupBy is the group-by builder for OAuthSigningKey entities.
func (*OAuthSigningKeyGroupBy) Aggregate ¶
func (_g *OAuthSigningKeyGroupBy) Aggregate(fns ...AggregateFunc) *OAuthSigningKeyGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OAuthSigningKeyGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OAuthSigningKeyGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OAuthSigningKeyGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OAuthSigningKeyGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OAuthSigningKeyGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*OAuthSigningKeyGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OAuthSigningKeyGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OAuthSigningKeyGroupBy) Scan ¶
func (_g *OAuthSigningKeyGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OAuthSigningKeyGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OAuthSigningKeyMutation ¶
type OAuthSigningKeyMutation struct {
// contains filtered or unexported fields
}
OAuthSigningKeyMutation represents an operation that mutates the OAuthSigningKey nodes in the graph.
func (*OAuthSigningKeyMutation) AddField ¶
func (m *OAuthSigningKeyMutation) 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 (*OAuthSigningKeyMutation) AddedEdges ¶
func (m *OAuthSigningKeyMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OAuthSigningKeyMutation) AddedField ¶
func (m *OAuthSigningKeyMutation) 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 (*OAuthSigningKeyMutation) AddedFields ¶
func (m *OAuthSigningKeyMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OAuthSigningKeyMutation) AddedIDs ¶
func (m *OAuthSigningKeyMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OAuthSigningKeyMutation) Algorithm ¶
func (m *OAuthSigningKeyMutation) Algorithm() (r string, exists bool)
Algorithm returns the value of the "algorithm" field in the mutation.
func (*OAuthSigningKeyMutation) ClearEdge ¶
func (m *OAuthSigningKeyMutation) 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 (*OAuthSigningKeyMutation) ClearExpiresAt ¶
func (m *OAuthSigningKeyMutation) ClearExpiresAt()
ClearExpiresAt clears the value of the "expires_at" field.
func (*OAuthSigningKeyMutation) ClearField ¶
func (m *OAuthSigningKeyMutation) 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 (*OAuthSigningKeyMutation) ClearRetiredAt ¶
func (m *OAuthSigningKeyMutation) ClearRetiredAt()
ClearRetiredAt clears the value of the "retired_at" field.
func (*OAuthSigningKeyMutation) ClearedEdges ¶
func (m *OAuthSigningKeyMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OAuthSigningKeyMutation) ClearedFields ¶
func (m *OAuthSigningKeyMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OAuthSigningKeyMutation) Client ¶
func (m OAuthSigningKeyMutation) 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 (*OAuthSigningKeyMutation) EdgeCleared ¶
func (m *OAuthSigningKeyMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OAuthSigningKeyMutation) ExpiresAt ¶
func (m *OAuthSigningKeyMutation) ExpiresAt() (r time.Time, exists bool)
ExpiresAt returns the value of the "expires_at" field in the mutation.
func (*OAuthSigningKeyMutation) ExpiresAtCleared ¶
func (m *OAuthSigningKeyMutation) ExpiresAtCleared() bool
ExpiresAtCleared returns if the "expires_at" field was cleared in this mutation.
func (*OAuthSigningKeyMutation) Field ¶
func (m *OAuthSigningKeyMutation) 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 (*OAuthSigningKeyMutation) FieldCleared ¶
func (m *OAuthSigningKeyMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OAuthSigningKeyMutation) Fields ¶
func (m *OAuthSigningKeyMutation) 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 (*OAuthSigningKeyMutation) ID ¶
func (m *OAuthSigningKeyMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*OAuthSigningKeyMutation) IDs ¶
func (m *OAuthSigningKeyMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*OAuthSigningKeyMutation) IsActive ¶
func (m *OAuthSigningKeyMutation) IsActive() (r bool, exists bool)
IsActive returns the value of the "is_active" field in the mutation.
func (*OAuthSigningKeyMutation) Kid ¶
func (m *OAuthSigningKeyMutation) Kid() (r string, exists bool)
Kid returns the value of the "kid" field in the mutation.
func (*OAuthSigningKeyMutation) OldAlgorithm ¶
func (m *OAuthSigningKeyMutation) OldAlgorithm(ctx context.Context) (v string, err error)
OldAlgorithm returns the old "algorithm" field's value of the OAuthSigningKey entity. If the OAuthSigningKey object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthSigningKeyMutation) OldExpiresAt ¶
OldExpiresAt returns the old "expires_at" field's value of the OAuthSigningKey entity. If the OAuthSigningKey object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthSigningKeyMutation) 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 (*OAuthSigningKeyMutation) OldIsActive ¶
func (m *OAuthSigningKeyMutation) OldIsActive(ctx context.Context) (v bool, err error)
OldIsActive returns the old "is_active" field's value of the OAuthSigningKey entity. If the OAuthSigningKey object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthSigningKeyMutation) OldKid ¶
func (m *OAuthSigningKeyMutation) OldKid(ctx context.Context) (v string, err error)
OldKid returns the old "kid" field's value of the OAuthSigningKey entity. If the OAuthSigningKey object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthSigningKeyMutation) OldPrivateKeyPem ¶
func (m *OAuthSigningKeyMutation) OldPrivateKeyPem(ctx context.Context) (v string, err error)
OldPrivateKeyPem returns the old "private_key_pem" field's value of the OAuthSigningKey entity. If the OAuthSigningKey object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthSigningKeyMutation) OldPublicKeyPem ¶
func (m *OAuthSigningKeyMutation) OldPublicKeyPem(ctx context.Context) (v string, err error)
OldPublicKeyPem returns the old "public_key_pem" field's value of the OAuthSigningKey entity. If the OAuthSigningKey object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthSigningKeyMutation) OldRetiredAt ¶
OldRetiredAt returns the old "retired_at" field's value of the OAuthSigningKey entity. If the OAuthSigningKey object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OAuthSigningKeyMutation) Op ¶
func (m *OAuthSigningKeyMutation) Op() Op
Op returns the operation name.
func (*OAuthSigningKeyMutation) PrivateKeyPem ¶
func (m *OAuthSigningKeyMutation) PrivateKeyPem() (r string, exists bool)
PrivateKeyPem returns the value of the "private_key_pem" field in the mutation.
func (*OAuthSigningKeyMutation) PublicKeyPem ¶
func (m *OAuthSigningKeyMutation) PublicKeyPem() (r string, exists bool)
PublicKeyPem returns the value of the "public_key_pem" field in the mutation.
func (*OAuthSigningKeyMutation) RemovedEdges ¶
func (m *OAuthSigningKeyMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OAuthSigningKeyMutation) RemovedIDs ¶
func (m *OAuthSigningKeyMutation) 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 (*OAuthSigningKeyMutation) ResetAlgorithm ¶
func (m *OAuthSigningKeyMutation) ResetAlgorithm()
ResetAlgorithm resets all changes to the "algorithm" field.
func (*OAuthSigningKeyMutation) ResetEdge ¶
func (m *OAuthSigningKeyMutation) 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 (*OAuthSigningKeyMutation) ResetExpiresAt ¶
func (m *OAuthSigningKeyMutation) ResetExpiresAt()
ResetExpiresAt resets all changes to the "expires_at" field.
func (*OAuthSigningKeyMutation) ResetField ¶
func (m *OAuthSigningKeyMutation) 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 (*OAuthSigningKeyMutation) ResetIsActive ¶
func (m *OAuthSigningKeyMutation) ResetIsActive()
ResetIsActive resets all changes to the "is_active" field.
func (*OAuthSigningKeyMutation) ResetKid ¶
func (m *OAuthSigningKeyMutation) ResetKid()
ResetKid resets all changes to the "kid" field.
func (*OAuthSigningKeyMutation) ResetPrivateKeyPem ¶
func (m *OAuthSigningKeyMutation) ResetPrivateKeyPem()
ResetPrivateKeyPem resets all changes to the "private_key_pem" field.
func (*OAuthSigningKeyMutation) ResetPublicKeyPem ¶
func (m *OAuthSigningKeyMutation) ResetPublicKeyPem()
ResetPublicKeyPem resets all changes to the "public_key_pem" field.
func (*OAuthSigningKeyMutation) ResetRetiredAt ¶
func (m *OAuthSigningKeyMutation) ResetRetiredAt()
ResetRetiredAt resets all changes to the "retired_at" field.
func (*OAuthSigningKeyMutation) RetiredAt ¶
func (m *OAuthSigningKeyMutation) RetiredAt() (r time.Time, exists bool)
RetiredAt returns the value of the "retired_at" field in the mutation.
func (*OAuthSigningKeyMutation) RetiredAtCleared ¶
func (m *OAuthSigningKeyMutation) RetiredAtCleared() bool
RetiredAtCleared returns if the "retired_at" field was cleared in this mutation.
func (*OAuthSigningKeyMutation) SetAlgorithm ¶
func (m *OAuthSigningKeyMutation) SetAlgorithm(s string)
SetAlgorithm sets the "algorithm" field.
func (*OAuthSigningKeyMutation) SetExpiresAt ¶
func (m *OAuthSigningKeyMutation) SetExpiresAt(t time.Time)
SetExpiresAt sets the "expires_at" field.
func (*OAuthSigningKeyMutation) SetField ¶
func (m *OAuthSigningKeyMutation) 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 (*OAuthSigningKeyMutation) SetIsActive ¶
func (m *OAuthSigningKeyMutation) SetIsActive(b bool)
SetIsActive sets the "is_active" field.
func (*OAuthSigningKeyMutation) SetKid ¶
func (m *OAuthSigningKeyMutation) SetKid(s string)
SetKid sets the "kid" field.
func (*OAuthSigningKeyMutation) SetOp ¶
func (m *OAuthSigningKeyMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*OAuthSigningKeyMutation) SetPrivateKeyPem ¶
func (m *OAuthSigningKeyMutation) SetPrivateKeyPem(s string)
SetPrivateKeyPem sets the "private_key_pem" field.
func (*OAuthSigningKeyMutation) SetPublicKeyPem ¶
func (m *OAuthSigningKeyMutation) SetPublicKeyPem(s string)
SetPublicKeyPem sets the "public_key_pem" field.
func (*OAuthSigningKeyMutation) SetRetiredAt ¶
func (m *OAuthSigningKeyMutation) SetRetiredAt(t time.Time)
SetRetiredAt sets the "retired_at" field.
func (OAuthSigningKeyMutation) Tx ¶
func (m OAuthSigningKeyMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OAuthSigningKeyMutation) Type ¶
func (m *OAuthSigningKeyMutation) Type() string
Type returns the node type of this mutation (OAuthSigningKey).
func (*OAuthSigningKeyMutation) Where ¶
func (m *OAuthSigningKeyMutation) Where(ps ...predicate.OAuthSigningKey)
Where appends a list predicates to the OAuthSigningKeyMutation builder.
func (*OAuthSigningKeyMutation) WhereP ¶
func (m *OAuthSigningKeyMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the OAuthSigningKeyMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type OAuthSigningKeyQuery ¶
type OAuthSigningKeyQuery struct {
// contains filtered or unexported fields
}
OAuthSigningKeyQuery is the builder for querying OAuthSigningKey entities.
func (*OAuthSigningKeyQuery) Aggregate ¶
func (_q *OAuthSigningKeyQuery) Aggregate(fns ...AggregateFunc) *OAuthSigningKeySelect
Aggregate returns a OAuthSigningKeySelect configured with the given aggregations.
func (*OAuthSigningKeyQuery) All ¶
func (_q *OAuthSigningKeyQuery) All(ctx context.Context) ([]*OAuthSigningKey, error)
All executes the query and returns a list of OAuthSigningKeys.
func (*OAuthSigningKeyQuery) AllX ¶
func (_q *OAuthSigningKeyQuery) AllX(ctx context.Context) []*OAuthSigningKey
AllX is like All, but panics if an error occurs.
func (*OAuthSigningKeyQuery) Clone ¶
func (_q *OAuthSigningKeyQuery) Clone() *OAuthSigningKeyQuery
Clone returns a duplicate of the OAuthSigningKeyQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OAuthSigningKeyQuery) Count ¶
func (_q *OAuthSigningKeyQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*OAuthSigningKeyQuery) CountX ¶
func (_q *OAuthSigningKeyQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*OAuthSigningKeyQuery) Exist ¶
func (_q *OAuthSigningKeyQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*OAuthSigningKeyQuery) ExistX ¶
func (_q *OAuthSigningKeyQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*OAuthSigningKeyQuery) First ¶
func (_q *OAuthSigningKeyQuery) First(ctx context.Context) (*OAuthSigningKey, error)
First returns the first OAuthSigningKey entity from the query. Returns a *NotFoundError when no OAuthSigningKey was found.
func (*OAuthSigningKeyQuery) FirstID ¶
func (_q *OAuthSigningKeyQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first OAuthSigningKey ID from the query. Returns a *NotFoundError when no OAuthSigningKey ID was found.
func (*OAuthSigningKeyQuery) FirstIDX ¶
func (_q *OAuthSigningKeyQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*OAuthSigningKeyQuery) FirstX ¶
func (_q *OAuthSigningKeyQuery) FirstX(ctx context.Context) *OAuthSigningKey
FirstX is like First, but panics if an error occurs.
func (*OAuthSigningKeyQuery) GroupBy ¶
func (_q *OAuthSigningKeyQuery) GroupBy(field string, fields ...string) *OAuthSigningKeyGroupBy
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 {
Kid string `json:"kid,omitempty"`
Count int `json:"count,omitempty"`
}
client.OAuthSigningKey.Query().
GroupBy(oauthsigningkey.FieldKid).
Aggregate(_test.Count()).
Scan(ctx, &v)
func (*OAuthSigningKeyQuery) IDs ¶
func (_q *OAuthSigningKeyQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of OAuthSigningKey IDs.
func (*OAuthSigningKeyQuery) IDsX ¶
func (_q *OAuthSigningKeyQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*OAuthSigningKeyQuery) Limit ¶
func (_q *OAuthSigningKeyQuery) Limit(limit int) *OAuthSigningKeyQuery
Limit the number of records to be returned by this query.
func (*OAuthSigningKeyQuery) Offset ¶
func (_q *OAuthSigningKeyQuery) Offset(offset int) *OAuthSigningKeyQuery
Offset to start from.
func (*OAuthSigningKeyQuery) Only ¶
func (_q *OAuthSigningKeyQuery) Only(ctx context.Context) (*OAuthSigningKey, error)
Only returns a single OAuthSigningKey entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OAuthSigningKey entity is found. Returns a *NotFoundError when no OAuthSigningKey entities are found.
func (*OAuthSigningKeyQuery) OnlyID ¶
func (_q *OAuthSigningKeyQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only OAuthSigningKey ID in the query. Returns a *NotSingularError when more than one OAuthSigningKey ID is found. Returns a *NotFoundError when no entities are found.
func (*OAuthSigningKeyQuery) OnlyIDX ¶
func (_q *OAuthSigningKeyQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*OAuthSigningKeyQuery) OnlyX ¶
func (_q *OAuthSigningKeyQuery) OnlyX(ctx context.Context) *OAuthSigningKey
OnlyX is like Only, but panics if an error occurs.
func (*OAuthSigningKeyQuery) Order ¶
func (_q *OAuthSigningKeyQuery) Order(o ...oauthsigningkey.OrderOption) *OAuthSigningKeyQuery
Order specifies how the records should be ordered.
func (*OAuthSigningKeyQuery) Select ¶
func (_q *OAuthSigningKeyQuery) Select(fields ...string) *OAuthSigningKeySelect
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 {
Kid string `json:"kid,omitempty"`
}
client.OAuthSigningKey.Query().
Select(oauthsigningkey.FieldKid).
Scan(ctx, &v)
func (*OAuthSigningKeyQuery) Unique ¶
func (_q *OAuthSigningKeyQuery) Unique(unique bool) *OAuthSigningKeyQuery
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 (*OAuthSigningKeyQuery) Where ¶
func (_q *OAuthSigningKeyQuery) Where(ps ...predicate.OAuthSigningKey) *OAuthSigningKeyQuery
Where adds a new predicate for the OAuthSigningKeyQuery builder.
type OAuthSigningKeySelect ¶
type OAuthSigningKeySelect struct {
*OAuthSigningKeyQuery
// contains filtered or unexported fields
}
OAuthSigningKeySelect is the builder for selecting fields of OAuthSigningKey entities.
func (*OAuthSigningKeySelect) Aggregate ¶
func (_s *OAuthSigningKeySelect) Aggregate(fns ...AggregateFunc) *OAuthSigningKeySelect
Aggregate adds the given aggregation functions to the selector query.
func (*OAuthSigningKeySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OAuthSigningKeySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OAuthSigningKeySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OAuthSigningKeySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OAuthSigningKeySelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*OAuthSigningKeySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OAuthSigningKeySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OAuthSigningKeySelect) Scan ¶
func (_s *OAuthSigningKeySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OAuthSigningKeySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OAuthSigningKeyUpdate ¶
type OAuthSigningKeyUpdate struct {
// contains filtered or unexported fields
}
OAuthSigningKeyUpdate is the builder for updating OAuthSigningKey entities.
func (*OAuthSigningKeyUpdate) ClearExpiresAt ¶
func (_u *OAuthSigningKeyUpdate) ClearExpiresAt() *OAuthSigningKeyUpdate
ClearExpiresAt clears the value of the "expires_at" field.
func (*OAuthSigningKeyUpdate) ClearRetiredAt ¶
func (_u *OAuthSigningKeyUpdate) ClearRetiredAt() *OAuthSigningKeyUpdate
ClearRetiredAt clears the value of the "retired_at" field.
func (*OAuthSigningKeyUpdate) Exec ¶
func (_u *OAuthSigningKeyUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OAuthSigningKeyUpdate) ExecX ¶
func (_u *OAuthSigningKeyUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthSigningKeyUpdate) Mutation ¶
func (_u *OAuthSigningKeyUpdate) Mutation() *OAuthSigningKeyMutation
Mutation returns the OAuthSigningKeyMutation object of the builder.
func (*OAuthSigningKeyUpdate) Save ¶
func (_u *OAuthSigningKeyUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OAuthSigningKeyUpdate) SaveX ¶
func (_u *OAuthSigningKeyUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OAuthSigningKeyUpdate) SetAlgorithm ¶
func (_u *OAuthSigningKeyUpdate) SetAlgorithm(v string) *OAuthSigningKeyUpdate
SetAlgorithm sets the "algorithm" field.
func (*OAuthSigningKeyUpdate) SetExpiresAt ¶
func (_u *OAuthSigningKeyUpdate) SetExpiresAt(v time.Time) *OAuthSigningKeyUpdate
SetExpiresAt sets the "expires_at" field.
func (*OAuthSigningKeyUpdate) SetIsActive ¶
func (_u *OAuthSigningKeyUpdate) SetIsActive(v bool) *OAuthSigningKeyUpdate
SetIsActive sets the "is_active" field.
func (*OAuthSigningKeyUpdate) SetKid ¶
func (_u *OAuthSigningKeyUpdate) SetKid(v string) *OAuthSigningKeyUpdate
SetKid sets the "kid" field.
func (*OAuthSigningKeyUpdate) SetNillableAlgorithm ¶
func (_u *OAuthSigningKeyUpdate) SetNillableAlgorithm(v *string) *OAuthSigningKeyUpdate
SetNillableAlgorithm sets the "algorithm" field if the given value is not nil.
func (*OAuthSigningKeyUpdate) SetNillableExpiresAt ¶
func (_u *OAuthSigningKeyUpdate) SetNillableExpiresAt(v *time.Time) *OAuthSigningKeyUpdate
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*OAuthSigningKeyUpdate) SetNillableIsActive ¶
func (_u *OAuthSigningKeyUpdate) SetNillableIsActive(v *bool) *OAuthSigningKeyUpdate
SetNillableIsActive sets the "is_active" field if the given value is not nil.
func (*OAuthSigningKeyUpdate) SetNillableKid ¶
func (_u *OAuthSigningKeyUpdate) SetNillableKid(v *string) *OAuthSigningKeyUpdate
SetNillableKid sets the "kid" field if the given value is not nil.
func (*OAuthSigningKeyUpdate) SetNillablePrivateKeyPem ¶
func (_u *OAuthSigningKeyUpdate) SetNillablePrivateKeyPem(v *string) *OAuthSigningKeyUpdate
SetNillablePrivateKeyPem sets the "private_key_pem" field if the given value is not nil.
func (*OAuthSigningKeyUpdate) SetNillablePublicKeyPem ¶
func (_u *OAuthSigningKeyUpdate) SetNillablePublicKeyPem(v *string) *OAuthSigningKeyUpdate
SetNillablePublicKeyPem sets the "public_key_pem" field if the given value is not nil.
func (*OAuthSigningKeyUpdate) SetNillableRetiredAt ¶
func (_u *OAuthSigningKeyUpdate) SetNillableRetiredAt(v *time.Time) *OAuthSigningKeyUpdate
SetNillableRetiredAt sets the "retired_at" field if the given value is not nil.
func (*OAuthSigningKeyUpdate) SetPrivateKeyPem ¶
func (_u *OAuthSigningKeyUpdate) SetPrivateKeyPem(v string) *OAuthSigningKeyUpdate
SetPrivateKeyPem sets the "private_key_pem" field.
func (*OAuthSigningKeyUpdate) SetPublicKeyPem ¶
func (_u *OAuthSigningKeyUpdate) SetPublicKeyPem(v string) *OAuthSigningKeyUpdate
SetPublicKeyPem sets the "public_key_pem" field.
func (*OAuthSigningKeyUpdate) SetRetiredAt ¶
func (_u *OAuthSigningKeyUpdate) SetRetiredAt(v time.Time) *OAuthSigningKeyUpdate
SetRetiredAt sets the "retired_at" field.
func (*OAuthSigningKeyUpdate) Where ¶
func (_u *OAuthSigningKeyUpdate) Where(ps ...predicate.OAuthSigningKey) *OAuthSigningKeyUpdate
Where appends a list predicates to the OAuthSigningKeyUpdate builder.
type OAuthSigningKeyUpdateOne ¶
type OAuthSigningKeyUpdateOne struct {
// contains filtered or unexported fields
}
OAuthSigningKeyUpdateOne is the builder for updating a single OAuthSigningKey entity.
func (*OAuthSigningKeyUpdateOne) ClearExpiresAt ¶
func (_u *OAuthSigningKeyUpdateOne) ClearExpiresAt() *OAuthSigningKeyUpdateOne
ClearExpiresAt clears the value of the "expires_at" field.
func (*OAuthSigningKeyUpdateOne) ClearRetiredAt ¶
func (_u *OAuthSigningKeyUpdateOne) ClearRetiredAt() *OAuthSigningKeyUpdateOne
ClearRetiredAt clears the value of the "retired_at" field.
func (*OAuthSigningKeyUpdateOne) Exec ¶
func (_u *OAuthSigningKeyUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OAuthSigningKeyUpdateOne) ExecX ¶
func (_u *OAuthSigningKeyUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OAuthSigningKeyUpdateOne) Mutation ¶
func (_u *OAuthSigningKeyUpdateOne) Mutation() *OAuthSigningKeyMutation
Mutation returns the OAuthSigningKeyMutation object of the builder.
func (*OAuthSigningKeyUpdateOne) Save ¶
func (_u *OAuthSigningKeyUpdateOne) Save(ctx context.Context) (*OAuthSigningKey, error)
Save executes the query and returns the updated OAuthSigningKey entity.
func (*OAuthSigningKeyUpdateOne) SaveX ¶
func (_u *OAuthSigningKeyUpdateOne) SaveX(ctx context.Context) *OAuthSigningKey
SaveX is like Save, but panics if an error occurs.
func (*OAuthSigningKeyUpdateOne) Select ¶
func (_u *OAuthSigningKeyUpdateOne) Select(field string, fields ...string) *OAuthSigningKeyUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OAuthSigningKeyUpdateOne) SetAlgorithm ¶
func (_u *OAuthSigningKeyUpdateOne) SetAlgorithm(v string) *OAuthSigningKeyUpdateOne
SetAlgorithm sets the "algorithm" field.
func (*OAuthSigningKeyUpdateOne) SetExpiresAt ¶
func (_u *OAuthSigningKeyUpdateOne) SetExpiresAt(v time.Time) *OAuthSigningKeyUpdateOne
SetExpiresAt sets the "expires_at" field.
func (*OAuthSigningKeyUpdateOne) SetIsActive ¶
func (_u *OAuthSigningKeyUpdateOne) SetIsActive(v bool) *OAuthSigningKeyUpdateOne
SetIsActive sets the "is_active" field.
func (*OAuthSigningKeyUpdateOne) SetKid ¶
func (_u *OAuthSigningKeyUpdateOne) SetKid(v string) *OAuthSigningKeyUpdateOne
SetKid sets the "kid" field.
func (*OAuthSigningKeyUpdateOne) SetNillableAlgorithm ¶
func (_u *OAuthSigningKeyUpdateOne) SetNillableAlgorithm(v *string) *OAuthSigningKeyUpdateOne
SetNillableAlgorithm sets the "algorithm" field if the given value is not nil.
func (*OAuthSigningKeyUpdateOne) SetNillableExpiresAt ¶
func (_u *OAuthSigningKeyUpdateOne) SetNillableExpiresAt(v *time.Time) *OAuthSigningKeyUpdateOne
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*OAuthSigningKeyUpdateOne) SetNillableIsActive ¶
func (_u *OAuthSigningKeyUpdateOne) SetNillableIsActive(v *bool) *OAuthSigningKeyUpdateOne
SetNillableIsActive sets the "is_active" field if the given value is not nil.
func (*OAuthSigningKeyUpdateOne) SetNillableKid ¶
func (_u *OAuthSigningKeyUpdateOne) SetNillableKid(v *string) *OAuthSigningKeyUpdateOne
SetNillableKid sets the "kid" field if the given value is not nil.
func (*OAuthSigningKeyUpdateOne) SetNillablePrivateKeyPem ¶
func (_u *OAuthSigningKeyUpdateOne) SetNillablePrivateKeyPem(v *string) *OAuthSigningKeyUpdateOne
SetNillablePrivateKeyPem sets the "private_key_pem" field if the given value is not nil.
func (*OAuthSigningKeyUpdateOne) SetNillablePublicKeyPem ¶
func (_u *OAuthSigningKeyUpdateOne) SetNillablePublicKeyPem(v *string) *OAuthSigningKeyUpdateOne
SetNillablePublicKeyPem sets the "public_key_pem" field if the given value is not nil.
func (*OAuthSigningKeyUpdateOne) SetNillableRetiredAt ¶
func (_u *OAuthSigningKeyUpdateOne) SetNillableRetiredAt(v *time.Time) *OAuthSigningKeyUpdateOne
SetNillableRetiredAt sets the "retired_at" field if the given value is not nil.
func (*OAuthSigningKeyUpdateOne) SetPrivateKeyPem ¶
func (_u *OAuthSigningKeyUpdateOne) SetPrivateKeyPem(v string) *OAuthSigningKeyUpdateOne
SetPrivateKeyPem sets the "private_key_pem" field.
func (*OAuthSigningKeyUpdateOne) SetPublicKeyPem ¶
func (_u *OAuthSigningKeyUpdateOne) SetPublicKeyPem(v string) *OAuthSigningKeyUpdateOne
SetPublicKeyPem sets the "public_key_pem" field.
func (*OAuthSigningKeyUpdateOne) SetRetiredAt ¶
func (_u *OAuthSigningKeyUpdateOne) SetRetiredAt(v time.Time) *OAuthSigningKeyUpdateOne
SetRetiredAt sets the "retired_at" field.
func (*OAuthSigningKeyUpdateOne) Where ¶
func (_u *OAuthSigningKeyUpdateOne) Where(ps ...predicate.OAuthSigningKey) *OAuthSigningKeyUpdateOne
Where appends a list predicates to the OAuthSigningKeyUpdate builder.
type OAuthSigningKeys ¶
type OAuthSigningKeys []*OAuthSigningKey
OAuthSigningKeys is a parsable slice of OAuthSigningKey.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type PersonalAccessToken ¶
type PersonalAccessToken struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Consumer user ID that owns the token
UserID int `json:"user_id,omitempty"`
// Human-readable token name
Name string `json:"name,omitempty"`
// SHA-256 hash of the raw token
TokenHash string `json:"token_hash,omitempty"`
// Safe token prefix for display
TokenPrefix string `json:"token_prefix,omitempty"`
// Last time this token authenticated
LastUsedAt *time.Time `json:"last_used_at,omitempty"`
// Token expiry, nil means no expiry
ExpiresAt *time.Time `json:"expires_at,omitempty"`
// contains filtered or unexported fields
}
PersonalAccessToken is the model entity for the PersonalAccessToken schema.
func (*PersonalAccessToken) String ¶
func (_m *PersonalAccessToken) String() string
String implements the fmt.Stringer.
func (*PersonalAccessToken) Unwrap ¶
func (_m *PersonalAccessToken) Unwrap() *PersonalAccessToken
Unwrap unwraps the PersonalAccessToken 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 (*PersonalAccessToken) Update ¶
func (_m *PersonalAccessToken) Update() *PersonalAccessTokenUpdateOne
Update returns a builder for updating this PersonalAccessToken. Note that you need to call PersonalAccessToken.Unwrap() before calling this method if this PersonalAccessToken was returned from a transaction, and the transaction was committed or rolled back.
type PersonalAccessTokenClient ¶
type PersonalAccessTokenClient struct {
// contains filtered or unexported fields
}
PersonalAccessTokenClient is a client for the PersonalAccessToken schema.
func NewPersonalAccessTokenClient ¶
func NewPersonalAccessTokenClient(c config) *PersonalAccessTokenClient
NewPersonalAccessTokenClient returns a client for the PersonalAccessToken from the given config.
func (*PersonalAccessTokenClient) Create ¶
func (c *PersonalAccessTokenClient) Create() *PersonalAccessTokenCreate
Create returns a builder for creating a PersonalAccessToken entity.
func (*PersonalAccessTokenClient) CreateBulk ¶
func (c *PersonalAccessTokenClient) CreateBulk(builders ...*PersonalAccessTokenCreate) *PersonalAccessTokenCreateBulk
CreateBulk returns a builder for creating a bulk of PersonalAccessToken entities.
func (*PersonalAccessTokenClient) Delete ¶
func (c *PersonalAccessTokenClient) Delete() *PersonalAccessTokenDelete
Delete returns a delete builder for PersonalAccessToken.
func (*PersonalAccessTokenClient) DeleteOne ¶
func (c *PersonalAccessTokenClient) DeleteOne(_m *PersonalAccessToken) *PersonalAccessTokenDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PersonalAccessTokenClient) DeleteOneID ¶
func (c *PersonalAccessTokenClient) DeleteOneID(id int) *PersonalAccessTokenDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PersonalAccessTokenClient) Get ¶
func (c *PersonalAccessTokenClient) Get(ctx context.Context, id int) (*PersonalAccessToken, error)
Get returns a PersonalAccessToken entity by its id.
func (*PersonalAccessTokenClient) GetX ¶
func (c *PersonalAccessTokenClient) GetX(ctx context.Context, id int) *PersonalAccessToken
GetX is like Get, but panics if an error occurs.
func (*PersonalAccessTokenClient) Hooks ¶
func (c *PersonalAccessTokenClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PersonalAccessTokenClient) Intercept ¶
func (c *PersonalAccessTokenClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `personalaccesstoken.Intercept(f(g(h())))`.
func (*PersonalAccessTokenClient) Interceptors ¶
func (c *PersonalAccessTokenClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PersonalAccessTokenClient) MapCreateBulk ¶
func (c *PersonalAccessTokenClient) MapCreateBulk(slice any, setFunc func(*PersonalAccessTokenCreate, int)) *PersonalAccessTokenCreateBulk
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 (*PersonalAccessTokenClient) Query ¶
func (c *PersonalAccessTokenClient) Query() *PersonalAccessTokenQuery
Query returns a query builder for PersonalAccessToken.
func (*PersonalAccessTokenClient) Update ¶
func (c *PersonalAccessTokenClient) Update() *PersonalAccessTokenUpdate
Update returns an update builder for PersonalAccessToken.
func (*PersonalAccessTokenClient) UpdateOne ¶
func (c *PersonalAccessTokenClient) UpdateOne(_m *PersonalAccessToken) *PersonalAccessTokenUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PersonalAccessTokenClient) UpdateOneID ¶
func (c *PersonalAccessTokenClient) UpdateOneID(id int) *PersonalAccessTokenUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PersonalAccessTokenClient) Use ¶
func (c *PersonalAccessTokenClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `personalaccesstoken.Hooks(f(g(h())))`.
type PersonalAccessTokenCreate ¶
type PersonalAccessTokenCreate struct {
// contains filtered or unexported fields
}
PersonalAccessTokenCreate is the builder for creating a PersonalAccessToken entity.
func (*PersonalAccessTokenCreate) Exec ¶
func (_c *PersonalAccessTokenCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PersonalAccessTokenCreate) ExecX ¶
func (_c *PersonalAccessTokenCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PersonalAccessTokenCreate) Mutation ¶
func (_c *PersonalAccessTokenCreate) Mutation() *PersonalAccessTokenMutation
Mutation returns the PersonalAccessTokenMutation object of the builder.
func (*PersonalAccessTokenCreate) Save ¶
func (_c *PersonalAccessTokenCreate) Save(ctx context.Context) (*PersonalAccessToken, error)
Save creates the PersonalAccessToken in the database.
func (*PersonalAccessTokenCreate) SaveX ¶
func (_c *PersonalAccessTokenCreate) SaveX(ctx context.Context) *PersonalAccessToken
SaveX calls Save and panics if Save returns an error.
func (*PersonalAccessTokenCreate) SetExpiresAt ¶
func (_c *PersonalAccessTokenCreate) SetExpiresAt(v time.Time) *PersonalAccessTokenCreate
SetExpiresAt sets the "expires_at" field.
func (*PersonalAccessTokenCreate) SetLastUsedAt ¶
func (_c *PersonalAccessTokenCreate) SetLastUsedAt(v time.Time) *PersonalAccessTokenCreate
SetLastUsedAt sets the "last_used_at" field.
func (*PersonalAccessTokenCreate) SetName ¶
func (_c *PersonalAccessTokenCreate) SetName(v string) *PersonalAccessTokenCreate
SetName sets the "name" field.
func (*PersonalAccessTokenCreate) SetNillableExpiresAt ¶
func (_c *PersonalAccessTokenCreate) SetNillableExpiresAt(v *time.Time) *PersonalAccessTokenCreate
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*PersonalAccessTokenCreate) SetNillableLastUsedAt ¶
func (_c *PersonalAccessTokenCreate) SetNillableLastUsedAt(v *time.Time) *PersonalAccessTokenCreate
SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.
func (*PersonalAccessTokenCreate) SetTokenHash ¶
func (_c *PersonalAccessTokenCreate) SetTokenHash(v string) *PersonalAccessTokenCreate
SetTokenHash sets the "token_hash" field.
func (*PersonalAccessTokenCreate) SetTokenPrefix ¶
func (_c *PersonalAccessTokenCreate) SetTokenPrefix(v string) *PersonalAccessTokenCreate
SetTokenPrefix sets the "token_prefix" field.
func (*PersonalAccessTokenCreate) SetUserID ¶
func (_c *PersonalAccessTokenCreate) SetUserID(v int) *PersonalAccessTokenCreate
SetUserID sets the "user_id" field.
type PersonalAccessTokenCreateBulk ¶
type PersonalAccessTokenCreateBulk struct {
// contains filtered or unexported fields
}
PersonalAccessTokenCreateBulk is the builder for creating many PersonalAccessToken entities in bulk.
func (*PersonalAccessTokenCreateBulk) Exec ¶
func (_c *PersonalAccessTokenCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PersonalAccessTokenCreateBulk) ExecX ¶
func (_c *PersonalAccessTokenCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PersonalAccessTokenCreateBulk) Save ¶
func (_c *PersonalAccessTokenCreateBulk) Save(ctx context.Context) ([]*PersonalAccessToken, error)
Save creates the PersonalAccessToken entities in the database.
func (*PersonalAccessTokenCreateBulk) SaveX ¶
func (_c *PersonalAccessTokenCreateBulk) SaveX(ctx context.Context) []*PersonalAccessToken
SaveX is like Save, but panics if an error occurs.
type PersonalAccessTokenDelete ¶
type PersonalAccessTokenDelete struct {
// contains filtered or unexported fields
}
PersonalAccessTokenDelete is the builder for deleting a PersonalAccessToken entity.
func (*PersonalAccessTokenDelete) Exec ¶
func (_d *PersonalAccessTokenDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PersonalAccessTokenDelete) ExecX ¶
func (_d *PersonalAccessTokenDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PersonalAccessTokenDelete) Where ¶
func (_d *PersonalAccessTokenDelete) Where(ps ...predicate.PersonalAccessToken) *PersonalAccessTokenDelete
Where appends a list predicates to the PersonalAccessTokenDelete builder.
type PersonalAccessTokenDeleteOne ¶
type PersonalAccessTokenDeleteOne struct {
// contains filtered or unexported fields
}
PersonalAccessTokenDeleteOne is the builder for deleting a single PersonalAccessToken entity.
func (*PersonalAccessTokenDeleteOne) Exec ¶
func (_d *PersonalAccessTokenDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PersonalAccessTokenDeleteOne) ExecX ¶
func (_d *PersonalAccessTokenDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PersonalAccessTokenDeleteOne) Where ¶
func (_d *PersonalAccessTokenDeleteOne) Where(ps ...predicate.PersonalAccessToken) *PersonalAccessTokenDeleteOne
Where appends a list predicates to the PersonalAccessTokenDelete builder.
type PersonalAccessTokenGroupBy ¶
type PersonalAccessTokenGroupBy struct {
// contains filtered or unexported fields
}
PersonalAccessTokenGroupBy is the group-by builder for PersonalAccessToken entities.
func (*PersonalAccessTokenGroupBy) Aggregate ¶
func (_g *PersonalAccessTokenGroupBy) Aggregate(fns ...AggregateFunc) *PersonalAccessTokenGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PersonalAccessTokenGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PersonalAccessTokenGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PersonalAccessTokenGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PersonalAccessTokenGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*PersonalAccessTokenGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PersonalAccessTokenGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*PersonalAccessTokenGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PersonalAccessTokenGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PersonalAccessTokenGroupBy) Scan ¶
func (_g *PersonalAccessTokenGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PersonalAccessTokenGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PersonalAccessTokenMutation ¶
type PersonalAccessTokenMutation struct {
// contains filtered or unexported fields
}
PersonalAccessTokenMutation represents an operation that mutates the PersonalAccessToken nodes in the graph.
func (*PersonalAccessTokenMutation) AddField ¶
func (m *PersonalAccessTokenMutation) 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 (*PersonalAccessTokenMutation) AddUserID ¶
func (m *PersonalAccessTokenMutation) AddUserID(i int)
AddUserID adds i to the "user_id" field.
func (*PersonalAccessTokenMutation) AddedEdges ¶
func (m *PersonalAccessTokenMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PersonalAccessTokenMutation) AddedField ¶
func (m *PersonalAccessTokenMutation) 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 (*PersonalAccessTokenMutation) AddedFields ¶
func (m *PersonalAccessTokenMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PersonalAccessTokenMutation) AddedIDs ¶
func (m *PersonalAccessTokenMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PersonalAccessTokenMutation) AddedUserID ¶
func (m *PersonalAccessTokenMutation) AddedUserID() (r int, exists bool)
AddedUserID returns the value that was added to the "user_id" field in this mutation.
func (*PersonalAccessTokenMutation) ClearEdge ¶
func (m *PersonalAccessTokenMutation) 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 (*PersonalAccessTokenMutation) ClearExpiresAt ¶
func (m *PersonalAccessTokenMutation) ClearExpiresAt()
ClearExpiresAt clears the value of the "expires_at" field.
func (*PersonalAccessTokenMutation) ClearField ¶
func (m *PersonalAccessTokenMutation) 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 (*PersonalAccessTokenMutation) ClearLastUsedAt ¶
func (m *PersonalAccessTokenMutation) ClearLastUsedAt()
ClearLastUsedAt clears the value of the "last_used_at" field.
func (*PersonalAccessTokenMutation) ClearedEdges ¶
func (m *PersonalAccessTokenMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PersonalAccessTokenMutation) ClearedFields ¶
func (m *PersonalAccessTokenMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PersonalAccessTokenMutation) Client ¶
func (m PersonalAccessTokenMutation) 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 (*PersonalAccessTokenMutation) EdgeCleared ¶
func (m *PersonalAccessTokenMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PersonalAccessTokenMutation) ExpiresAt ¶
func (m *PersonalAccessTokenMutation) ExpiresAt() (r time.Time, exists bool)
ExpiresAt returns the value of the "expires_at" field in the mutation.
func (*PersonalAccessTokenMutation) ExpiresAtCleared ¶
func (m *PersonalAccessTokenMutation) ExpiresAtCleared() bool
ExpiresAtCleared returns if the "expires_at" field was cleared in this mutation.
func (*PersonalAccessTokenMutation) Field ¶
func (m *PersonalAccessTokenMutation) 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 (*PersonalAccessTokenMutation) FieldCleared ¶
func (m *PersonalAccessTokenMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PersonalAccessTokenMutation) Fields ¶
func (m *PersonalAccessTokenMutation) 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 (*PersonalAccessTokenMutation) ID ¶
func (m *PersonalAccessTokenMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*PersonalAccessTokenMutation) IDs ¶
func (m *PersonalAccessTokenMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*PersonalAccessTokenMutation) LastUsedAt ¶
func (m *PersonalAccessTokenMutation) LastUsedAt() (r time.Time, exists bool)
LastUsedAt returns the value of the "last_used_at" field in the mutation.
func (*PersonalAccessTokenMutation) LastUsedAtCleared ¶
func (m *PersonalAccessTokenMutation) LastUsedAtCleared() bool
LastUsedAtCleared returns if the "last_used_at" field was cleared in this mutation.
func (*PersonalAccessTokenMutation) Name ¶
func (m *PersonalAccessTokenMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*PersonalAccessTokenMutation) OldExpiresAt ¶
OldExpiresAt returns the old "expires_at" field's value of the PersonalAccessToken entity. If the PersonalAccessToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PersonalAccessTokenMutation) 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 (*PersonalAccessTokenMutation) OldLastUsedAt ¶
OldLastUsedAt returns the old "last_used_at" field's value of the PersonalAccessToken entity. If the PersonalAccessToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PersonalAccessTokenMutation) OldName ¶
func (m *PersonalAccessTokenMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the PersonalAccessToken entity. If the PersonalAccessToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PersonalAccessTokenMutation) OldTokenHash ¶
func (m *PersonalAccessTokenMutation) OldTokenHash(ctx context.Context) (v string, err error)
OldTokenHash returns the old "token_hash" field's value of the PersonalAccessToken entity. If the PersonalAccessToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PersonalAccessTokenMutation) OldTokenPrefix ¶
func (m *PersonalAccessTokenMutation) OldTokenPrefix(ctx context.Context) (v string, err error)
OldTokenPrefix returns the old "token_prefix" field's value of the PersonalAccessToken entity. If the PersonalAccessToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PersonalAccessTokenMutation) OldUserID ¶
func (m *PersonalAccessTokenMutation) OldUserID(ctx context.Context) (v int, err error)
OldUserID returns the old "user_id" field's value of the PersonalAccessToken entity. If the PersonalAccessToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PersonalAccessTokenMutation) Op ¶
func (m *PersonalAccessTokenMutation) Op() Op
Op returns the operation name.
func (*PersonalAccessTokenMutation) RemovedEdges ¶
func (m *PersonalAccessTokenMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PersonalAccessTokenMutation) RemovedIDs ¶
func (m *PersonalAccessTokenMutation) 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 (*PersonalAccessTokenMutation) ResetEdge ¶
func (m *PersonalAccessTokenMutation) 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 (*PersonalAccessTokenMutation) ResetExpiresAt ¶
func (m *PersonalAccessTokenMutation) ResetExpiresAt()
ResetExpiresAt resets all changes to the "expires_at" field.
func (*PersonalAccessTokenMutation) ResetField ¶
func (m *PersonalAccessTokenMutation) 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 (*PersonalAccessTokenMutation) ResetLastUsedAt ¶
func (m *PersonalAccessTokenMutation) ResetLastUsedAt()
ResetLastUsedAt resets all changes to the "last_used_at" field.
func (*PersonalAccessTokenMutation) ResetName ¶
func (m *PersonalAccessTokenMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*PersonalAccessTokenMutation) ResetTokenHash ¶
func (m *PersonalAccessTokenMutation) ResetTokenHash()
ResetTokenHash resets all changes to the "token_hash" field.
func (*PersonalAccessTokenMutation) ResetTokenPrefix ¶
func (m *PersonalAccessTokenMutation) ResetTokenPrefix()
ResetTokenPrefix resets all changes to the "token_prefix" field.
func (*PersonalAccessTokenMutation) ResetUserID ¶
func (m *PersonalAccessTokenMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*PersonalAccessTokenMutation) SetExpiresAt ¶
func (m *PersonalAccessTokenMutation) SetExpiresAt(t time.Time)
SetExpiresAt sets the "expires_at" field.
func (*PersonalAccessTokenMutation) SetField ¶
func (m *PersonalAccessTokenMutation) 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 (*PersonalAccessTokenMutation) SetLastUsedAt ¶
func (m *PersonalAccessTokenMutation) SetLastUsedAt(t time.Time)
SetLastUsedAt sets the "last_used_at" field.
func (*PersonalAccessTokenMutation) SetName ¶
func (m *PersonalAccessTokenMutation) SetName(s string)
SetName sets the "name" field.
func (*PersonalAccessTokenMutation) SetOp ¶
func (m *PersonalAccessTokenMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PersonalAccessTokenMutation) SetTokenHash ¶
func (m *PersonalAccessTokenMutation) SetTokenHash(s string)
SetTokenHash sets the "token_hash" field.
func (*PersonalAccessTokenMutation) SetTokenPrefix ¶
func (m *PersonalAccessTokenMutation) SetTokenPrefix(s string)
SetTokenPrefix sets the "token_prefix" field.
func (*PersonalAccessTokenMutation) SetUserID ¶
func (m *PersonalAccessTokenMutation) SetUserID(i int)
SetUserID sets the "user_id" field.
func (*PersonalAccessTokenMutation) TokenHash ¶
func (m *PersonalAccessTokenMutation) TokenHash() (r string, exists bool)
TokenHash returns the value of the "token_hash" field in the mutation.
func (*PersonalAccessTokenMutation) TokenPrefix ¶
func (m *PersonalAccessTokenMutation) TokenPrefix() (r string, exists bool)
TokenPrefix returns the value of the "token_prefix" field in the mutation.
func (PersonalAccessTokenMutation) Tx ¶
func (m PersonalAccessTokenMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PersonalAccessTokenMutation) Type ¶
func (m *PersonalAccessTokenMutation) Type() string
Type returns the node type of this mutation (PersonalAccessToken).
func (*PersonalAccessTokenMutation) UserID ¶
func (m *PersonalAccessTokenMutation) UserID() (r int, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*PersonalAccessTokenMutation) Where ¶
func (m *PersonalAccessTokenMutation) Where(ps ...predicate.PersonalAccessToken)
Where appends a list predicates to the PersonalAccessTokenMutation builder.
func (*PersonalAccessTokenMutation) WhereP ¶
func (m *PersonalAccessTokenMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PersonalAccessTokenMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type PersonalAccessTokenQuery ¶
type PersonalAccessTokenQuery struct {
// contains filtered or unexported fields
}
PersonalAccessTokenQuery is the builder for querying PersonalAccessToken entities.
func (*PersonalAccessTokenQuery) Aggregate ¶
func (_q *PersonalAccessTokenQuery) Aggregate(fns ...AggregateFunc) *PersonalAccessTokenSelect
Aggregate returns a PersonalAccessTokenSelect configured with the given aggregations.
func (*PersonalAccessTokenQuery) All ¶
func (_q *PersonalAccessTokenQuery) All(ctx context.Context) ([]*PersonalAccessToken, error)
All executes the query and returns a list of PersonalAccessTokens.
func (*PersonalAccessTokenQuery) AllX ¶
func (_q *PersonalAccessTokenQuery) AllX(ctx context.Context) []*PersonalAccessToken
AllX is like All, but panics if an error occurs.
func (*PersonalAccessTokenQuery) Clone ¶
func (_q *PersonalAccessTokenQuery) Clone() *PersonalAccessTokenQuery
Clone returns a duplicate of the PersonalAccessTokenQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PersonalAccessTokenQuery) Count ¶
func (_q *PersonalAccessTokenQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PersonalAccessTokenQuery) CountX ¶
func (_q *PersonalAccessTokenQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PersonalAccessTokenQuery) Exist ¶
func (_q *PersonalAccessTokenQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PersonalAccessTokenQuery) ExistX ¶
func (_q *PersonalAccessTokenQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PersonalAccessTokenQuery) First ¶
func (_q *PersonalAccessTokenQuery) First(ctx context.Context) (*PersonalAccessToken, error)
First returns the first PersonalAccessToken entity from the query. Returns a *NotFoundError when no PersonalAccessToken was found.
func (*PersonalAccessTokenQuery) FirstID ¶
func (_q *PersonalAccessTokenQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first PersonalAccessToken ID from the query. Returns a *NotFoundError when no PersonalAccessToken ID was found.
func (*PersonalAccessTokenQuery) FirstIDX ¶
func (_q *PersonalAccessTokenQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*PersonalAccessTokenQuery) FirstX ¶
func (_q *PersonalAccessTokenQuery) FirstX(ctx context.Context) *PersonalAccessToken
FirstX is like First, but panics if an error occurs.
func (*PersonalAccessTokenQuery) GroupBy ¶
func (_q *PersonalAccessTokenQuery) GroupBy(field string, fields ...string) *PersonalAccessTokenGroupBy
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 int `json:"user_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.PersonalAccessToken.Query().
GroupBy(personalaccesstoken.FieldUserID).
Aggregate(_test.Count()).
Scan(ctx, &v)
func (*PersonalAccessTokenQuery) IDs ¶
func (_q *PersonalAccessTokenQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of PersonalAccessToken IDs.
func (*PersonalAccessTokenQuery) IDsX ¶
func (_q *PersonalAccessTokenQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*PersonalAccessTokenQuery) Limit ¶
func (_q *PersonalAccessTokenQuery) Limit(limit int) *PersonalAccessTokenQuery
Limit the number of records to be returned by this query.
func (*PersonalAccessTokenQuery) Offset ¶
func (_q *PersonalAccessTokenQuery) Offset(offset int) *PersonalAccessTokenQuery
Offset to start from.
func (*PersonalAccessTokenQuery) Only ¶
func (_q *PersonalAccessTokenQuery) Only(ctx context.Context) (*PersonalAccessToken, error)
Only returns a single PersonalAccessToken entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PersonalAccessToken entity is found. Returns a *NotFoundError when no PersonalAccessToken entities are found.
func (*PersonalAccessTokenQuery) OnlyID ¶
func (_q *PersonalAccessTokenQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only PersonalAccessToken ID in the query. Returns a *NotSingularError when more than one PersonalAccessToken ID is found. Returns a *NotFoundError when no entities are found.
func (*PersonalAccessTokenQuery) OnlyIDX ¶
func (_q *PersonalAccessTokenQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PersonalAccessTokenQuery) OnlyX ¶
func (_q *PersonalAccessTokenQuery) OnlyX(ctx context.Context) *PersonalAccessToken
OnlyX is like Only, but panics if an error occurs.
func (*PersonalAccessTokenQuery) Order ¶
func (_q *PersonalAccessTokenQuery) Order(o ...personalaccesstoken.OrderOption) *PersonalAccessTokenQuery
Order specifies how the records should be ordered.
func (*PersonalAccessTokenQuery) Select ¶
func (_q *PersonalAccessTokenQuery) Select(fields ...string) *PersonalAccessTokenSelect
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 int `json:"user_id,omitempty"`
}
client.PersonalAccessToken.Query().
Select(personalaccesstoken.FieldUserID).
Scan(ctx, &v)
func (*PersonalAccessTokenQuery) Unique ¶
func (_q *PersonalAccessTokenQuery) Unique(unique bool) *PersonalAccessTokenQuery
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 (*PersonalAccessTokenQuery) Where ¶
func (_q *PersonalAccessTokenQuery) Where(ps ...predicate.PersonalAccessToken) *PersonalAccessTokenQuery
Where adds a new predicate for the PersonalAccessTokenQuery builder.
type PersonalAccessTokenSelect ¶
type PersonalAccessTokenSelect struct {
*PersonalAccessTokenQuery
// contains filtered or unexported fields
}
PersonalAccessTokenSelect is the builder for selecting fields of PersonalAccessToken entities.
func (*PersonalAccessTokenSelect) Aggregate ¶
func (_s *PersonalAccessTokenSelect) Aggregate(fns ...AggregateFunc) *PersonalAccessTokenSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PersonalAccessTokenSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PersonalAccessTokenSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PersonalAccessTokenSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PersonalAccessTokenSelect) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*PersonalAccessTokenSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PersonalAccessTokenSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*PersonalAccessTokenSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PersonalAccessTokenSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PersonalAccessTokenSelect) Scan ¶
func (_s *PersonalAccessTokenSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PersonalAccessTokenSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PersonalAccessTokenUpdate ¶
type PersonalAccessTokenUpdate struct {
// contains filtered or unexported fields
}
PersonalAccessTokenUpdate is the builder for updating PersonalAccessToken entities.
func (*PersonalAccessTokenUpdate) AddUserID ¶
func (_u *PersonalAccessTokenUpdate) AddUserID(v int) *PersonalAccessTokenUpdate
AddUserID adds value to the "user_id" field.
func (*PersonalAccessTokenUpdate) ClearExpiresAt ¶
func (_u *PersonalAccessTokenUpdate) ClearExpiresAt() *PersonalAccessTokenUpdate
ClearExpiresAt clears the value of the "expires_at" field.
func (*PersonalAccessTokenUpdate) ClearLastUsedAt ¶
func (_u *PersonalAccessTokenUpdate) ClearLastUsedAt() *PersonalAccessTokenUpdate
ClearLastUsedAt clears the value of the "last_used_at" field.
func (*PersonalAccessTokenUpdate) Exec ¶
func (_u *PersonalAccessTokenUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PersonalAccessTokenUpdate) ExecX ¶
func (_u *PersonalAccessTokenUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PersonalAccessTokenUpdate) Mutation ¶
func (_u *PersonalAccessTokenUpdate) Mutation() *PersonalAccessTokenMutation
Mutation returns the PersonalAccessTokenMutation object of the builder.
func (*PersonalAccessTokenUpdate) Save ¶
func (_u *PersonalAccessTokenUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PersonalAccessTokenUpdate) SaveX ¶
func (_u *PersonalAccessTokenUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PersonalAccessTokenUpdate) SetExpiresAt ¶
func (_u *PersonalAccessTokenUpdate) SetExpiresAt(v time.Time) *PersonalAccessTokenUpdate
SetExpiresAt sets the "expires_at" field.
func (*PersonalAccessTokenUpdate) SetLastUsedAt ¶
func (_u *PersonalAccessTokenUpdate) SetLastUsedAt(v time.Time) *PersonalAccessTokenUpdate
SetLastUsedAt sets the "last_used_at" field.
func (*PersonalAccessTokenUpdate) SetName ¶
func (_u *PersonalAccessTokenUpdate) SetName(v string) *PersonalAccessTokenUpdate
SetName sets the "name" field.
func (*PersonalAccessTokenUpdate) SetNillableExpiresAt ¶
func (_u *PersonalAccessTokenUpdate) SetNillableExpiresAt(v *time.Time) *PersonalAccessTokenUpdate
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*PersonalAccessTokenUpdate) SetNillableLastUsedAt ¶
func (_u *PersonalAccessTokenUpdate) SetNillableLastUsedAt(v *time.Time) *PersonalAccessTokenUpdate
SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.
func (*PersonalAccessTokenUpdate) SetNillableName ¶
func (_u *PersonalAccessTokenUpdate) SetNillableName(v *string) *PersonalAccessTokenUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*PersonalAccessTokenUpdate) SetNillableTokenHash ¶
func (_u *PersonalAccessTokenUpdate) SetNillableTokenHash(v *string) *PersonalAccessTokenUpdate
SetNillableTokenHash sets the "token_hash" field if the given value is not nil.
func (*PersonalAccessTokenUpdate) SetNillableTokenPrefix ¶
func (_u *PersonalAccessTokenUpdate) SetNillableTokenPrefix(v *string) *PersonalAccessTokenUpdate
SetNillableTokenPrefix sets the "token_prefix" field if the given value is not nil.
func (*PersonalAccessTokenUpdate) SetNillableUserID ¶
func (_u *PersonalAccessTokenUpdate) SetNillableUserID(v *int) *PersonalAccessTokenUpdate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*PersonalAccessTokenUpdate) SetTokenHash ¶
func (_u *PersonalAccessTokenUpdate) SetTokenHash(v string) *PersonalAccessTokenUpdate
SetTokenHash sets the "token_hash" field.
func (*PersonalAccessTokenUpdate) SetTokenPrefix ¶
func (_u *PersonalAccessTokenUpdate) SetTokenPrefix(v string) *PersonalAccessTokenUpdate
SetTokenPrefix sets the "token_prefix" field.
func (*PersonalAccessTokenUpdate) SetUserID ¶
func (_u *PersonalAccessTokenUpdate) SetUserID(v int) *PersonalAccessTokenUpdate
SetUserID sets the "user_id" field.
func (*PersonalAccessTokenUpdate) Where ¶
func (_u *PersonalAccessTokenUpdate) Where(ps ...predicate.PersonalAccessToken) *PersonalAccessTokenUpdate
Where appends a list predicates to the PersonalAccessTokenUpdate builder.
type PersonalAccessTokenUpdateOne ¶
type PersonalAccessTokenUpdateOne struct {
// contains filtered or unexported fields
}
PersonalAccessTokenUpdateOne is the builder for updating a single PersonalAccessToken entity.
func (*PersonalAccessTokenUpdateOne) AddUserID ¶
func (_u *PersonalAccessTokenUpdateOne) AddUserID(v int) *PersonalAccessTokenUpdateOne
AddUserID adds value to the "user_id" field.
func (*PersonalAccessTokenUpdateOne) ClearExpiresAt ¶
func (_u *PersonalAccessTokenUpdateOne) ClearExpiresAt() *PersonalAccessTokenUpdateOne
ClearExpiresAt clears the value of the "expires_at" field.
func (*PersonalAccessTokenUpdateOne) ClearLastUsedAt ¶
func (_u *PersonalAccessTokenUpdateOne) ClearLastUsedAt() *PersonalAccessTokenUpdateOne
ClearLastUsedAt clears the value of the "last_used_at" field.
func (*PersonalAccessTokenUpdateOne) Exec ¶
func (_u *PersonalAccessTokenUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PersonalAccessTokenUpdateOne) ExecX ¶
func (_u *PersonalAccessTokenUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PersonalAccessTokenUpdateOne) Mutation ¶
func (_u *PersonalAccessTokenUpdateOne) Mutation() *PersonalAccessTokenMutation
Mutation returns the PersonalAccessTokenMutation object of the builder.
func (*PersonalAccessTokenUpdateOne) Save ¶
func (_u *PersonalAccessTokenUpdateOne) Save(ctx context.Context) (*PersonalAccessToken, error)
Save executes the query and returns the updated PersonalAccessToken entity.
func (*PersonalAccessTokenUpdateOne) SaveX ¶
func (_u *PersonalAccessTokenUpdateOne) SaveX(ctx context.Context) *PersonalAccessToken
SaveX is like Save, but panics if an error occurs.
func (*PersonalAccessTokenUpdateOne) Select ¶
func (_u *PersonalAccessTokenUpdateOne) Select(field string, fields ...string) *PersonalAccessTokenUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PersonalAccessTokenUpdateOne) SetExpiresAt ¶
func (_u *PersonalAccessTokenUpdateOne) SetExpiresAt(v time.Time) *PersonalAccessTokenUpdateOne
SetExpiresAt sets the "expires_at" field.
func (*PersonalAccessTokenUpdateOne) SetLastUsedAt ¶
func (_u *PersonalAccessTokenUpdateOne) SetLastUsedAt(v time.Time) *PersonalAccessTokenUpdateOne
SetLastUsedAt sets the "last_used_at" field.
func (*PersonalAccessTokenUpdateOne) SetName ¶
func (_u *PersonalAccessTokenUpdateOne) SetName(v string) *PersonalAccessTokenUpdateOne
SetName sets the "name" field.
func (*PersonalAccessTokenUpdateOne) SetNillableExpiresAt ¶
func (_u *PersonalAccessTokenUpdateOne) SetNillableExpiresAt(v *time.Time) *PersonalAccessTokenUpdateOne
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*PersonalAccessTokenUpdateOne) SetNillableLastUsedAt ¶
func (_u *PersonalAccessTokenUpdateOne) SetNillableLastUsedAt(v *time.Time) *PersonalAccessTokenUpdateOne
SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.
func (*PersonalAccessTokenUpdateOne) SetNillableName ¶
func (_u *PersonalAccessTokenUpdateOne) SetNillableName(v *string) *PersonalAccessTokenUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*PersonalAccessTokenUpdateOne) SetNillableTokenHash ¶
func (_u *PersonalAccessTokenUpdateOne) SetNillableTokenHash(v *string) *PersonalAccessTokenUpdateOne
SetNillableTokenHash sets the "token_hash" field if the given value is not nil.
func (*PersonalAccessTokenUpdateOne) SetNillableTokenPrefix ¶
func (_u *PersonalAccessTokenUpdateOne) SetNillableTokenPrefix(v *string) *PersonalAccessTokenUpdateOne
SetNillableTokenPrefix sets the "token_prefix" field if the given value is not nil.
func (*PersonalAccessTokenUpdateOne) SetNillableUserID ¶
func (_u *PersonalAccessTokenUpdateOne) SetNillableUserID(v *int) *PersonalAccessTokenUpdateOne
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*PersonalAccessTokenUpdateOne) SetTokenHash ¶
func (_u *PersonalAccessTokenUpdateOne) SetTokenHash(v string) *PersonalAccessTokenUpdateOne
SetTokenHash sets the "token_hash" field.
func (*PersonalAccessTokenUpdateOne) SetTokenPrefix ¶
func (_u *PersonalAccessTokenUpdateOne) SetTokenPrefix(v string) *PersonalAccessTokenUpdateOne
SetTokenPrefix sets the "token_prefix" field.
func (*PersonalAccessTokenUpdateOne) SetUserID ¶
func (_u *PersonalAccessTokenUpdateOne) SetUserID(v int) *PersonalAccessTokenUpdateOne
SetUserID sets the "user_id" field.
func (*PersonalAccessTokenUpdateOne) Where ¶
func (_u *PersonalAccessTokenUpdateOne) Where(ps ...predicate.PersonalAccessToken) *PersonalAccessTokenUpdateOne
Where appends a list predicates to the PersonalAccessTokenUpdate builder.
type PersonalAccessTokens ¶
type PersonalAccessTokens []*PersonalAccessToken
PersonalAccessTokens is a parsable slice of PersonalAccessToken.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
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 RollbackFunc ¶
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.
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 ¶
Rollbacker is the interface that wraps the Rollback method.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct {
// OAuthAccessToken is the client for interacting with the OAuthAccessToken builders.
OAuthAccessToken *OAuthAccessTokenClient
// OAuthAuthorizationCode is the client for interacting with the OAuthAuthorizationCode builders.
OAuthAuthorizationCode *OAuthAuthorizationCodeClient
// OAuthClient is the client for interacting with the OAuthClient builders.
OAuthClient *OAuthClientClient
// OAuthRefreshToken is the client for interacting with the OAuthRefreshToken builders.
OAuthRefreshToken *OAuthRefreshTokenClient
// OAuthSigningKey is the client for interacting with the OAuthSigningKey builders.
OAuthSigningKey *OAuthSigningKeyClient
// PersonalAccessToken is the client for interacting with the PersonalAccessToken builders.
PersonalAccessToken *PersonalAccessTokenClient
// contains filtered or unexported fields
}
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
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.
Source Files
¶
- client.go
- ent.go
- mutation.go
- oauthaccesstoken.go
- oauthaccesstoken_create.go
- oauthaccesstoken_delete.go
- oauthaccesstoken_query.go
- oauthaccesstoken_update.go
- oauthauthorizationcode.go
- oauthauthorizationcode_create.go
- oauthauthorizationcode_delete.go
- oauthauthorizationcode_query.go
- oauthauthorizationcode_update.go
- oauthclient.go
- oauthclient_create.go
- oauthclient_delete.go
- oauthclient_query.go
- oauthclient_update.go
- oauthrefreshtoken.go
- oauthrefreshtoken_create.go
- oauthrefreshtoken_delete.go
- oauthrefreshtoken_query.go
- oauthrefreshtoken_update.go
- oauthsigningkey.go
- oauthsigningkey_create.go
- oauthsigningkey_delete.go
- oauthsigningkey_query.go
- oauthsigningkey_update.go
- personalaccesstoken.go
- personalaccesstoken_create.go
- personalaccesstoken_delete.go
- personalaccesstoken_query.go
- personalaccesstoken_update.go
- runtime.go
- tx.go