Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CLI ¶
type CLI struct {
// Config is a store where CLI can persist data in a key, value format.
Config Store
// DBPath is the filepath for the datastore being used. It does not have a
// default, so it must be set. The wipe and backup commands currently assume
// that the database is stored in a local file.
DBPath string
// Err is used by CLI to log errors. By default, it writes to stderr with no
// date prefix.
Err io.Writer
// In is the input stream that the CLI reads from. It defaults to stdin.
In io.Reader
// Out is where CLI prints its regular output. It defaults to stdout
Out io.Writer
// Transactions is a Transactions table, it allows the CLI app to interact
// with a store of transactions. It does not have a default, so it must be set.
Transactions Table
// contains filtered or unexported fields
}
type Table ¶
type Table interface {
Insert(transaction.Transaction) error
RangeTotal(start, end time.Time) (transaction.Cent, error)
Remove(transactionID int) error
Search(query string, limit int) (*transaction.Rows, error)
Total() (transaction.Cent, error)
}
Click to show internal directories.
Click to hide internal directories.