Refactor SQL queries and schema to use OIDC subject instead of Keycloak ID for user identification
This commit is contained in:
35
internal/db/querier.go
Normal file
35
internal/db/querier.go
Normal file
@ -0,0 +1,35 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.29.0
|
||||
|
||||
package db
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
type Querier interface {
|
||||
CreatePayment(ctx context.Context, arg CreatePaymentParams) (Payment, error)
|
||||
CreateSite(ctx context.Context, arg CreateSiteParams) (Site, error)
|
||||
CreateUser(ctx context.Context, arg CreateUserParams) (User, error)
|
||||
// THIS IS NOT USED YET
|
||||
// -- name: UpdateSiteDomain :one
|
||||
// UPDATE sites
|
||||
// SET domain = ?
|
||||
// WHERE id = ?
|
||||
// RETURNING *;
|
||||
DeleteSite(ctx context.Context, id int64) error
|
||||
DeleteUser(ctx context.Context, id int64) error
|
||||
GetPaymentByID(ctx context.Context, id int64) (Payment, error)
|
||||
GetPaymentsByUserID(ctx context.Context, userID int64) ([]Payment, error)
|
||||
GetSiteByDomain(ctx context.Context, domain string) (Site, error)
|
||||
GetSiteByID(ctx context.Context, id int64) (Site, error)
|
||||
GetSitesByUserID(ctx context.Context, userID int64) ([]Site, error)
|
||||
GetUserByID(ctx context.Context, id int64) (User, error)
|
||||
GetUserByOIDCSubject(ctx context.Context, oidcSubject string) (User, error)
|
||||
ListUsers(ctx context.Context) ([]User, error)
|
||||
UpdatePaymentStatus(ctx context.Context, arg UpdatePaymentStatusParams) (Payment, error)
|
||||
UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error)
|
||||
}
|
||||
|
||||
var _ Querier = (*Queries)(nil)
|
Reference in New Issue
Block a user