qfxdb

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2020 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package qfxdb provides the data structures for storing which fitIds have been processed.

Index

Constants

This section is empty.

Variables

View Source
var (
	NoPermission = errors.New("qfxdb: Insufficient permission.")
)

Functions

This section is empty.

Types

type FitIdSet

type FitIdSet map[string]bool

FitIdSet represents a set of fitids.

type NoPermissionStore

type NoPermissionStore struct {
}

NoPermissionStore implements Store by always returning NoPermission error.

func (NoPermissionStore) Add

func (n NoPermissionStore) Add(
	t db.Transaction, accountId int64, fitIds FitIdSet) error

func (NoPermissionStore) Find

func (n NoPermissionStore) Find(
	t db.Transaction, accountId int64, fitIds FitIdSet) (
	found FitIdSet, err error)

type ReadOnlyStore

type ReadOnlyStore struct {
	NoPermissionStore
	// contains filtered or unexported fields
}

func ReadOnlyWrapper

func ReadOnlyWrapper(s Store) ReadOnlyStore

func (ReadOnlyStore) Find

func (s ReadOnlyStore) Find(
	t db.Transaction, accountId int64, fitIds FitIdSet) (
	found FitIdSet, err error)

type Store

type Store interface {
	// Add adds a set of fitIds to the store for a particular account Id.
	Add(t db.Transaction, accountId int64, fitIds FitIdSet) error

	// Find finds fitIds for a particular account Id and returns them.
	// fitIds is the set of fitIds to look for. The returned set of fitIds will
	// always be a subset of the fitIds parameter or nil if Find cannot find any
	// of the fitIds.
	Find(t db.Transaction, accountId int64, fitIds FitIdSet) (FitIdSet, error)
}

Interface Store handles storage and retrieval of fitIds from QFX files.

Directories

Path Synopsis
Package fixture provides test suites to test implementations of the qfxdb.Store interface.
Package fixture provides test suites to test implementations of the qfxdb.Store interface.
Package for_sqlite provides a sqlite implementation for storing processed QFX file fitIds.
Package for_sqlite provides a sqlite implementation for storing processed QFX file fitIds.

Jump to

Keyboard shortcuts

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