sqlite

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDSNRequired = errors.New("dsn required")
)
View Source
var (
	ErrStorageRequired = errors.New("storage required")
)

Functions

This section is empty.

Types

type ProjectRepository

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

func NewProjectRepository

func NewProjectRepository(s *Storage) (*ProjectRepository, error)

func (*ProjectRepository) Projects

func (r *ProjectRepository) Projects(ctx context.Context, topic string) (josegpt.Projects, error)

func (*ProjectRepository) UpsertProjects

func (r *ProjectRepository) UpsertProjects(ctx context.Context, pp josegpt.Projects) error

type Storage

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

func Open

func Open(dsn string) (*Storage, error)

func (*Storage) BeginTx

func (s *Storage) BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error)

func (*Storage) Close

func (s *Storage) Close() error

type TopicRepository

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

func NewTopicRepository

func NewTopicRepository(s *Storage) (*TopicRepository, error)

func (*TopicRepository) Topics

func (r *TopicRepository) Topics(ctx context.Context) ([]string, error)

Jump to

Keyboard shortcuts

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