Documentation
¶
Index ¶
- type BulkUpsertClientsParams
- type Client
- type CreateClientParams
- type DBTX
- type Querier
- type Queries
- func (q *Queries) BulkUpsertClients(ctx context.Context, arg BulkUpsertClientsParams) error
- func (q *Queries) CreateClient(ctx context.Context, arg CreateClientParams) (Client, error)
- func (q *Queries) DeleteClient(ctx context.Context, id string) (int64, error)
- func (q *Queries) GetClient(ctx context.Context, id string) (Client, error)
- func (q *Queries) UpsertClient(ctx context.Context, arg UpsertClientParams) (Client, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type UpsertClientParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BulkUpsertClientsParams ¶ added in v1.104.1
type BulkUpsertClientsParams struct {
Ids []string
Secrets [][]byte
RedirectUris [][]byte
GrantTypes [][]byte
ResponseTypes [][]byte
Scopes [][]byte
Publics []bool
Names []string
Owners []string
Trusteds []bool
CreatedAts []pgtype.Timestamptz
UpdatedAts []pgtype.Timestamptz
Dynamics []bool
OrganizationIds []pgtype.UUID
OwningCellIds []int64
SourceIds []int64
}
type Client ¶
type Client struct {
ID string
Secret []byte
RedirectUris []byte
GrantTypes []byte
ResponseTypes []byte
Scopes []byte
Public bool
Name string
Owner string
Trusted bool
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
Dynamic bool
OrganizationID pgtype.UUID
OwningCellID pgtype.Int8
SourceID pgtype.Int8
}
type CreateClientParams ¶
type CreateClientParams struct {
ID string
Secret []byte
RedirectUris []byte
GrantTypes []byte
ResponseTypes []byte
Scopes []byte
Public bool
Name string
Owner string
Trusted bool
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
Dynamic bool
OrganizationID pgtype.UUID
OwningCellID pgtype.Int8
SourceID pgtype.Int8
}
type Querier ¶
type Querier interface {
// Keep the SET list in step with UpsertClient. NULLIF stores a 0 cell or
// source id as NULL, as pkgstorage.Int8OrNull does for the single-record path.
// Rows lock in statement order, so ORDER BY keeps two batches that share
// clients from deadlocking each other.
BulkUpsertClients(ctx context.Context, arg BulkUpsertClientsParams) error
CreateClient(ctx context.Context, arg CreateClientParams) (Client, error)
DeleteClient(ctx context.Context, id string) (int64, error)
GetClient(ctx context.Context, id string) (Client, error)
// created_at is written only on insert; ON CONFLICT leaves the stored value
// untouched so it remains immutable across updates.
UpsertClient(ctx context.Context, arg UpsertClientParams) (Client, error)
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) BulkUpsertClients ¶ added in v1.104.1
func (q *Queries) BulkUpsertClients(ctx context.Context, arg BulkUpsertClientsParams) error
Keep the SET list in step with UpsertClient. NULLIF stores a 0 cell or source id as NULL, as pkgstorage.Int8OrNull does for the single-record path. Rows lock in statement order, so ORDER BY keeps two batches that share clients from deadlocking each other.
func (*Queries) CreateClient ¶
func (*Queries) DeleteClient ¶
func (*Queries) UpsertClient ¶
created_at is written only on insert; ON CONFLICT leaves the stored value untouched so it remains immutable across updates.
type UpsertClientParams ¶
type UpsertClientParams struct {
ID string
Secret []byte
RedirectUris []byte
GrantTypes []byte
ResponseTypes []byte
Scopes []byte
Public bool
Name string
Owner string
Trusted bool
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
Dynamic bool
OrganizationID pgtype.UUID
OwningCellID pgtype.Int8
SourceID pgtype.Int8
}
Click to show internal directories.
Click to hide internal directories.