ocli

package
v0.0.0-...-ebf0f6e Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateManualAccount

func CreateManualAccount(input []string) *omoney.Account

func CreateManualTransaction

func CreateManualTransaction(input []string) *omoney.Transaction

func LoadModel

func LoadModel(dataDir string) (*omoney.Model, error)

func ParseTokensToFlags

func ParseTokensToFlags(tokens []string, flagMap map[string]int) (map[string][]string, error)

format of flagMap is {<flag>: <number of arguments for flag>}

func ReadCsv

func ReadCsv(filepath string, existingAccounts map[string]string) []*omoney.Transaction

Given the path to a csv file, and the map existingAccounts of alias -> id, interactively parse the csv file into a slice of transaction structs

func Save

func Save(model *omoney.Model) error

Types

type LinkTmplData

type LinkTmplData struct {
	LinkToken string
}

type Linker

type Linker struct {
	Results       chan string
	RelinkResults chan bool
	Errors        chan error
	Client        *plaid.APIClient
	// contains filtered or unexported fields
}

func NewLinker

func NewLinker(client *plaid.APIClient, countries []string, lang string) *Linker
func (l *Linker) Link(port string) (*TokenPair, error)

type LogLevel

type LogLevel int
const (
	Disable LogLevel = iota
	Debug
	DebugDetail
	DebugMinuteDetail
)

type OLogger

type OLogger struct {
	Level LogLevel
}

func NewOLogger

func NewOLogger(level LogLevel) *OLogger

func (*OLogger) Print

func (l *OLogger) Print(level LogLevel, v ...any)

func (*OLogger) Printf

func (l *OLogger) Printf(level LogLevel, format string, v ...any)

func (*OLogger) Println

func (l *OLogger) Println(level LogLevel, v ...any)

type OView

type OView interface {
	ShowAccount(account plaid.AccountBase)
	ShowAccounts(accounts []plaid.AccountBase)
}

type OViewPlain

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

func NewOViewPlain

func NewOViewPlain(enableColor bool) *OViewPlain

func (*OViewPlain) ShowAccount

func (v *OViewPlain) ShowAccount(acc omoney.Account)

func (*OViewPlain) ShowAccounts

func (v *OViewPlain) ShowAccounts(accounts []omoney.Account, ops ...ShowAccountOptions)

func (*OViewPlain) ShowPlaidAccount

func (v *OViewPlain) ShowPlaidAccount(account plaid.AccountBase)

func (*OViewPlain) ShowPlaidAccounts

func (v *OViewPlain) ShowPlaidAccounts(accounts []plaid.AccountBase)

func (*OViewPlain) ShowTransaction

func (v *OViewPlain) ShowTransaction(tr omoney.Transaction, ops ...ShowTransactionOptions)

func (*OViewPlain) ShowTransactions

func (v *OViewPlain) ShowTransactions(trs []*omoney.Transaction, invert bool, startIndex int)

type ShowAccountOptions

type ShowAccountOptions struct {
	ShowType   bool
	ShowAnchor bool
	ShowId     bool
}

type ShowTransactionOptions

type ShowTransactionOptions struct {
	ShowId       bool
	ShowCategory bool
	ShowInstDesc bool
	ShowDesc     bool
}

type TokenPair

type TokenPair struct {
	ItemID      string
	AccessToken string
}

Jump to

Keyboard shortcuts

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