sqlc

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type GetCurrentJWKParams

type GetCurrentJWKParams struct {
	Algorithm string         `json:"algorithm"`
	Use       sql.NullString `json:"use"`
}

type Jwk

type Jwk struct {
	Kid       string         `json:"kid"`
	KeyData   string         `json:"key_data"`
	Algorithm string         `json:"algorithm"`
	Use       sql.NullString `json:"use"`
	CreatedAt time.Time      `json:"created_at"`
	ExpiresAt sql.NullTime   `json:"expires_at"`
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CleanupOldKeys

func (q *Queries) CleanupOldKeys(ctx context.Context, createdAt time.Time) error

func (*Queries) DeleteExpiredJWKS

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

func (*Queries) GetAllCurrentJWKS

func (q *Queries) GetAllCurrentJWKS(ctx context.Context) ([]Jwk, error)

func (*Queries) GetCurrentJWK

func (q *Queries) GetCurrentJWK(ctx context.Context, arg GetCurrentJWKParams) (string, error)

JWT Key queries

func (*Queries) StoreJWK

func (q *Queries) StoreJWK(ctx context.Context, arg StoreJWKParams) error

func (*Queries) WithTx

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

type StoreJWKParams

type StoreJWKParams struct {
	Kid       string         `json:"kid"`
	KeyData   string         `json:"key_data"`
	Algorithm string         `json:"algorithm"`
	Use       sql.NullString `json:"use"`
	CreatedAt time.Time      `json:"created_at"`
	ExpiresAt sql.NullTime   `json:"expires_at"`
}

Jump to

Keyboard shortcuts

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