querycmd

package
v0.0.0-...-afd3e11 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2021 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QueryBalance

func QueryBalance(ctx context.Context, writer io.Writer, tx *sql.Tx, year int, fiat currency.Symbol, source string, of OutputFormat) error

func QueryTransactions

func QueryTransactions(ctx context.Context, writer io.Writer, tx *sql.Tx, year int, loc *time.Location, baseCurrency, source string, of OutputFormat) error

func QueryWalletBalance

func QueryWalletBalance(ctx context.Context, w io.Writer, tx *sql.Tx, baseCurrency, source string, of OutputFormat) error

Types

type Balance

type Balance struct {
	Wallet   string
	Currency string
	Quantity *decimal.Big
}

type OutputFormat

type OutputFormat string
const (
	OutputFormatTable OutputFormat = "table"
	OutputFormatCSV   OutputFormat = "csv"
)

type TableWriter

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

func NewTableWriter

func NewTableWriter(w io.Writer) *TableWriter

func (*TableWriter) PrintBalances

func (t *TableWriter) PrintBalances(bs models.BalanceSlice)

func (*TableWriter) PrintEvents

func (t *TableWriter) PrintEvents(es models.EventSlice)

func (*TableWriter) Write

func (t *TableWriter) Write(value interface{}) error

type WalletBalance

type WalletBalance struct {
	Wallet []Balance
}

Jump to

Keyboard shortcuts

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