store

package
v0.0.0-...-97274ee Latest Latest
Warning

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

Go to latest
Published: May 3, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrRecordNotFound ...
	ErrRecordNotFound = errors.New("record not found")
)

Functions

This section is empty.

Types

type AccountStore

type AccountStore interface {
	Create(*model.Account) error
	Find(id string) (*model.Account, error)
	GetBalance(id string) (float64, error)
	SetBalance(id string, balance float64) error
	UpdateBalance(id string, balance float64) error
	Delete(id string) error
}

type JobStore

type JobStore interface {
	CancelTransactionAndCorrectBalance(jobRunInterval time.Duration, accountId int) error
}

type Store

type Store interface {
	Account() AccountStore
	Transaction() TransactionStore
	Job() JobStore
	Close()
}

type TransactionStore

type TransactionStore interface {
	Save(*model.IncomingRequest, string) error
	Fetch(int) ([]model.Transaction, error)
	Update(int) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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