Help us shape the future of Go! Take the 2026 Go Developer Survey

queries

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateTrustParams

type CreateTrustParams struct {
	TenantID  string      `db:"tenant_id"`
	Blocked   bool        `db:"blocked"`
	Issuer    string      `db:"issuer"`
	JwksUri   string      `db:"jwks_uri"`
	Audiences []string    `db:"audiences"`
	ClientID  pgtype.Text `db:"client_id"`
}

type DBTX

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

type GetTrustRow

type GetTrustRow struct {
	Issuer    string      `db:"issuer"`
	Blocked   bool        `db:"blocked"`
	JwksUri   string      `db:"jwks_uri"`
	Audiences []string    `db:"audiences"`
	ClientID  pgtype.Text `db:"client_id"`
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateTrust

func (q *Queries) CreateTrust(ctx context.Context, arg CreateTrustParams) error

func (*Queries) DeleteTrust

func (q *Queries) DeleteTrust(ctx context.Context, tenantID string) (int64, error)

func (*Queries) GetTrust

func (q *Queries) GetTrust(ctx context.Context, tenantID string) (GetTrustRow, error)

func (*Queries) UpdateTrust

func (q *Queries) UpdateTrust(ctx context.Context, arg UpdateTrustParams) (int64, error)

func (*Queries) WithTx

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

type Trust

type Trust struct {
	TenantID  string           `db:"tenant_id"`
	Blocked   bool             `db:"blocked"`
	Issuer    string           `db:"issuer"`
	JwksUri   string           `db:"jwks_uri"`
	Audiences []string         `db:"audiences"`
	CreatedAt pgtype.Timestamp `db:"created_at"`
	ClientID  pgtype.Text      `db:"client_id"`
}

type UpdateTrustParams

type UpdateTrustParams struct {
	Blocked   bool        `db:"blocked"`
	Issuer    string      `db:"issuer"`
	JwksUri   string      `db:"jwks_uri"`
	Audiences []string    `db:"audiences"`
	ClientID  pgtype.Text `db:"client_id"`
	TenantID  string      `db:"tenant_id"`
}

Jump to

Keyboard shortcuts

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