persistence

package
v0.0.0-...-e5a091a Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const SCHEMA_VERSION = 1

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider interface {
	Close() error

	GetMeta() (*model.Meta, error)

	GetAllTransactions() ([]model.Transaction, error)
	AddTransaction(*model.Transaction) error
	UpdateTransaction(*model.Transaction) error
	GetTransactionById(id int) (*model.Transaction, error)
	DeleteTransaction(*model.Transaction) error
	CountTransactions() (uint64, error)
}

func FromDbConnection

func FromDbConnection(db *sql.DB) (pp Provider, err error)

func FromSqlite

func FromSqlite(dbPath string) (pp Provider, err error)

Jump to

Keyboard shortcuts

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