sqllite

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateResponseParams

type CreateResponseParams struct {
	Path      string
	Body      string
	CachedAt  int64
	ExpiredAt int64
}

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 Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateResponse

func (q *Queries) CreateResponse(ctx context.Context, arg CreateResponseParams) (Response, error)

func (*Queries) GetResponse

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

func (*Queries) UpdateResponse

func (q *Queries) UpdateResponse(ctx context.Context, arg UpdateResponseParams) (Response, error)

func (*Queries) WithTx

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

type Response

type Response struct {
	Path      string
	Body      string
	CachedAt  int64
	ExpiredAt int64
}

type UpdateResponseParams

type UpdateResponseParams struct {
	Body      string
	CachedAt  int64
	ExpiredAt int64
	Path      string
}

Jump to

Keyboard shortcuts

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