store_queries

package
v0.0.0-...-0f07f94 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: MIT Imports: 5 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 Entry

type Entry struct {
	Did             string       `json:"did"`
	Handle          string       `json:"handle"`
	IsValid         bool         `json:"is_valid"`
	LastCheckedTime sql.NullTime `json:"last_checked_time"`
	CreatedAt       time.Time    `json:"created_at"`
	UpdatedAt       sql.NullTime `json:"updated_at"`
}

type GetEntriesForValidationParams

type GetEntriesForValidationParams struct {
	LastCheckedTime sql.NullTime `json:"last_checked_time"`
	Limit           int32        `json:"limit"`
}

type GetEntriesParams

type GetEntriesParams struct {
	Limit  int32 `json:"limit"`
	Offset int32 `json:"offset"`
}

type Queries

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

func New

func New(db DBTX) *Queries

func Prepare

func Prepare(ctx context.Context, db DBTX) (*Queries, error)

func (*Queries) Close

func (q *Queries) Close() error

func (*Queries) GetEntries

func (q *Queries) GetEntries(ctx context.Context, arg GetEntriesParams) ([]Entry, error)

func (*Queries) GetEntriesForValidation

func (q *Queries) GetEntriesForValidation(ctx context.Context, arg GetEntriesForValidationParams) ([]Entry, error)

func (*Queries) GetEntryByDID

func (q *Queries) GetEntryByDID(ctx context.Context, did string) (Entry, error)

func (*Queries) GetEntryByHandle

func (q *Queries) GetEntryByHandle(ctx context.Context, handle string) (Entry, error)

func (*Queries) UpdateEntriesValidation

func (q *Queries) UpdateEntriesValidation(ctx context.Context, arg UpdateEntriesValidationParams) error

func (*Queries) UpdateEntry

func (q *Queries) UpdateEntry(ctx context.Context, arg UpdateEntryParams) error

func (*Queries) WithTx

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

type UpdateEntriesValidationParams

type UpdateEntriesValidationParams struct {
	LastCheckedTime sql.NullTime `json:"last_checked_time"`
	IsValid         bool         `json:"is_valid"`
	Dids            []string     `json:"dids"`
}

type UpdateEntryParams

type UpdateEntryParams struct {
	Did             string       `json:"did"`
	Handle          string       `json:"handle"`
	IsValid         bool         `json:"is_valid"`
	LastCheckedTime sql.NullTime `json:"last_checked_time"`
}

Jump to

Keyboard shortcuts

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