cmd

package
v0.0.0-...-aebc9c5 Latest Latest
Warning

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

Go to latest
Published: May 16, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewImportCommand

func NewImportCommand() *cobra.Command

func NewLoginCommand

func NewLoginCommand() *cobra.Command

func NewRootCommand

func NewRootCommand() *cobra.Command

func Run

func Run()

Types

type EarnEvent

type EarnEvent string

func (EarnEvent) String

func (e EarnEvent) String() string

type PurchaseEvent

type PurchaseEvent string

func (PurchaseEvent) String

func (p PurchaseEvent) String() string

type RowData

type RowData struct {
	Fiat string
	CRO  string
	// TODO: compute these from the other two values
	PurchasePrice string
	PercentChange string
	FiatChange    string
}

func NewRowData

func NewRowData(record []string, rowNumber int64) *RowData

TODO: refactor this to be part of the transaction importer struct

func (*RowData) ToSlice

func (r *RowData) ToSlice() []interface{}

type TransactionImporter

type TransactionImporter struct {
	Googlesheet        *sheets.Service
	SpreadsheetID      string
	CryptoTransactions *csv.Reader
	// contains filtered or unexported fields
}

func NewTransactionImporter

func NewTransactionImporter(opts TransactionImporterOpts) *TransactionImporter

func (*TransactionImporter) Validate

func (t *TransactionImporter) Validate() error

type TransactionImporterOpts

type TransactionImporterOpts struct {
	Credentials            string
	SpreadsheetID          string
	CryptoTransactionsFile string
	StartRow               int64
	StartColumn            string
	SheetName              string
	Fiat                   string
}

Jump to

Keyboard shortcuts

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