sqlcgen

package
v1.22.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateLoginChallengeParams

type CreateLoginChallengeParams struct {
	ID                  string
	ClientID            string
	CodeChallenge       string
	CodeChallengeMethod string
	ResponseType        string
	RequestedScopes     []string
	RedirectUri         string
	State               string
	CsrfToken           string
	CreatedAt           pgtype.Timestamptz
	ExpiresAt           pgtype.Timestamptz
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type LoginChallenge

type LoginChallenge struct {
	ID                  string
	ClientID            string
	CodeChallenge       string
	CodeChallengeMethod string
	ResponseType        string
	RequestedScopes     []string
	RedirectUri         string
	State               string
	CsrfToken           string
	CreatedAt           pgtype.Timestamptz
	ExpiresAt           pgtype.Timestamptz
	VerifierID          pgtype.Text
	Subject             pgtype.Text
	Name                pgtype.Text
	Email               pgtype.Text
	VerifierExpiresAt   pgtype.Timestamptz
	Consumed            bool
}

type Querier

type Querier interface {
	CreateLoginChallenge(ctx context.Context, arg CreateLoginChallengeParams) (LoginChallenge, error)
	DeleteAllLoginChallenges(ctx context.Context) error
	GetLoginChallengeByID(ctx context.Context, id string) (LoginChallenge, error)
	GetLoginChallengeByIDForUpdate(ctx context.Context, id string) (LoginChallenge, error)
	GetLoginChallengeByVerifierIDForUpdate(ctx context.Context, verifierID pgtype.Text) (LoginChallenge, error)
	UpdateLoginChallengeVerifier(ctx context.Context, arg UpdateLoginChallengeVerifierParams) (LoginChallenge, error)
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateLoginChallenge

func (q *Queries) CreateLoginChallenge(ctx context.Context, arg CreateLoginChallengeParams) (LoginChallenge, error)

func (*Queries) DeleteAllLoginChallenges

func (q *Queries) DeleteAllLoginChallenges(ctx context.Context) error

func (*Queries) GetLoginChallengeByID

func (q *Queries) GetLoginChallengeByID(ctx context.Context, id string) (LoginChallenge, error)

func (*Queries) GetLoginChallengeByIDForUpdate

func (q *Queries) GetLoginChallengeByIDForUpdate(ctx context.Context, id string) (LoginChallenge, error)

func (*Queries) GetLoginChallengeByVerifierIDForUpdate

func (q *Queries) GetLoginChallengeByVerifierIDForUpdate(ctx context.Context, verifierID pgtype.Text) (LoginChallenge, error)

func (*Queries) UpdateLoginChallengeVerifier

func (q *Queries) UpdateLoginChallengeVerifier(ctx context.Context, arg UpdateLoginChallengeVerifierParams) (LoginChallenge, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type UpdateLoginChallengeVerifierParams

type UpdateLoginChallengeVerifierParams struct {
	ID                string
	VerifierID        pgtype.Text
	Subject           pgtype.Text
	Name              pgtype.Text
	Email             pgtype.Text
	VerifierExpiresAt pgtype.Timestamptz
	Consumed          bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL