storage

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Code generated by options-gen. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound           = errors.New("not found")
	ErrIntegrityViolation = errors.New("integrity violation")
)

Functions

This section is empty.

Types

type InsertQueryResultsReq

type InsertQueryResultsReq struct {
	ID        uuid6.UUID
	UserID    config.UserID
	CreatedAt time.Time
	Query     string
	Response  json.RawMessage
}

type OptOptionsSetter

type OptOptionsSetter func(o *Options)

type Options

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

func NewOptions

func NewOptions(
	logger *slog.Logger,
	dbWrite *sql.DB,
	options ...OptOptionsSetter,
) Options

func (*Options) Validate

func (o *Options) Validate() error

type Service

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

func New

func New(opts Options) (*Service, error)

func (*Service) Conn

func (s *Service) Conn(ctx context.Context) qrm.DB

func (*Service) DoInTx

func (s *Service) DoInTx(ctx context.Context, transactionCallback func(conn qrm.DB) error) error

func (*Service) GetQueryResults

func (*Service) GetQueryResults(conn qrm.DB, uid config.UserID, id uuid6.UUID) (*model.QueryResults, error)

func (*Service) InsertQueryResults

func (*Service) InsertQueryResults(conn qrm.DB, req InsertQueryResultsReq) error

Directories

Path Synopsis
jetgen

Jump to

Keyboard shortcuts

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