store

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

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

Go to latest
Published: Jun 14, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenDB

func OpenDB(cfg *config.Conf) (*sql.DB, error)

OpenDB returns a sql connection pool

Types

type Store

type Store interface {
	ContainerInsert(title, notes string) (int, error)
	ContainerUpdate(title, notes string, id int) (int, error)
	ContainerGet(id int) (*sqlite.Container, error)
	ContainerGetAll() ([]*sqlite.Container, error)
	ContainerDelete(id int) error

	ItemInsert(fk int, name, description string, image []byte) (int, error)
	ItemUpdate(id int, name, description string, image []byte) error
	ItemGet(id int) (*sqlite.Item, error)
	ItemGetAllByContainer(id int) ([]*sqlite.Item, error)
	ItemDelete(id int) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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