db

package
v0.0.0-...-571a155 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

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

Repository is able to save and find a transaction(s).

func NewRepository

func NewRepository(cfg *details.Config) (repo *Repository, err error)

NewRepository initialize the repository.

func (*Repository) Create

func (r *Repository) Create(t core.Transaction) (core.Transaction, error)

Create persists a transaction in db.

func (*Repository) CreateCategory

func (r *Repository) CreateCategory(category core.Category) error

CreateCategory persists a category in db.

func (*Repository) Find

func (r *Repository) Find() ([]core.Transaction, error)

Find transactions in db.

Jump to

Keyboard shortcuts

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