postgres

package
v0.0.0-...-509f1ac Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Schema string

Functions

This section is empty.

Types

type CacheResponseParams

type CacheResponseParams struct {
	ReqHash    string
	Body       pgtype.Text
	Headers    pgtype.Text
	StatusCode pgtype.Int4
}

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 Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CacheResponse

func (q *Queries) CacheResponse(ctx context.Context, arg CacheResponseParams) (Response, error)

func (*Queries) DeleteAllResponses

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

func (*Queries) GetResponse

func (q *Queries) GetResponse(ctx context.Context, reqHash string) (Response, error)

func (*Queries) WithTx

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

type Response

type Response struct {
	ReqHash    string
	Body       pgtype.Text
	Headers    pgtype.Text
	StatusCode pgtype.Int4
	UpdatedAt  pgtype.Timestamptz
}

Jump to

Keyboard shortcuts

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