sqlcgen

package
v1.18.2 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 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 CreateAuthCodeParams

type CreateAuthCodeParams struct {
	Signature          string
	RequestID          string
	ClientID           string
	Subject            string
	RequestedScopes    []string
	GrantedScopes      []string
	RequestedAudiences []string
	GrantedAudiences   []string
	FormData           string
	SessionData        []byte
	RequestedAt        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 GetAuthCodeRow

type GetAuthCodeRow struct {
	Signature          string
	RequestID          string
	ClientID           string
	Subject            string
	RequestedScopes    []string
	GrantedScopes      []string
	RequestedAudiences []string
	GrantedAudiences   []string
	FormData           string
	SessionData        []byte
	Active             bool
	RequestedAt        pgtype.Timestamptz
	ExpiresAt          pgtype.Timestamptz
}

type Querier

type Querier interface {
	CreateAuthCode(ctx context.Context, arg CreateAuthCodeParams) error
	GetAuthCode(ctx context.Context, signature string) (GetAuthCodeRow, error)
	InvalidateAuthCode(ctx context.Context, signature string) (int64, error)
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateAuthCode

func (q *Queries) CreateAuthCode(ctx context.Context, arg CreateAuthCodeParams) error

func (*Queries) GetAuthCode

func (q *Queries) GetAuthCode(ctx context.Context, signature string) (GetAuthCodeRow, error)

func (*Queries) InvalidateAuthCode

func (q *Queries) InvalidateAuthCode(ctx context.Context, signature string) (int64, error)

func (*Queries) WithTx

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

Jump to

Keyboard shortcuts

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