Help us shape the future of Go! Take the 2026 Go Developer Survey

cmd

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FilterUnknown = iota
	FilterTypeTransactionID
	FilterTypeAccountName
	FilterTypeCurrency
	FilterTypeInitialBalance
	FilterTypeStore
	FilterTypeDescription
	FilterTypeDatetime
	FilterTypeGroup
	FilterTypeIdentifier
	FilterTypeTag
	FilterTypeNegativeFlag
)

Variables

View Source
var CommandValidations = []func(parser.ParsedCmdLine, config.Config, db.DBTX, map[parser.ArgKind]int) (parser.ParsedCmdLine, error){
	validateAmount,
}

CommandValidations List of command line validator

View Source
var Handlers = map[string]CommandFunc{
	"init":        Init,
	"add":         Add,
	"show":        Show,
	"categories":  Categories,
	"stats":       Stats,
	"group":       Group,
	"tags":        Tags,
	"modify":      Modify,
	"report":      Report,
	"list":        List,
	"delete":      Delete,
	"purge":       Purge,
	"restore":     Restore,
	"undo":        Undo,
	"by":          By,
	"accounts":    Accounts,
	"balance":     Balance,
	"fakeit":      Fakeit,
	"transfer":    Transfer,
	"set-balance": SetBalance,
	"budget":      Budget,
	"config":      Config,
	"backup":      Backup,
	"import":      Import,
	"theme":       Theme,
	"sum":         Sum,
	"summary":     Summary,
	"groups":      Groups,
	"stores":      Places,
	"help":        Help,
}

Functions

func Accounts

func Accounts(parsed parser.ParsedCmdLine, config config.Config, cashDb db.DBTX) error

func Add

func Add(parsed parser.ParsedCmdLine, config config.Config, cashDb db.DBTX) error

func Backup

func Backup(parsed parser.ParsedCmdLine, cfg config.Config, _ db.DBTX) error

func Balance

func Balance(parsed parser.ParsedCmdLine, cfg config.Config, query db.DBTX) error

func Budget

func Budget(parsed parser.ParsedCmdLine, _ config.Config, query db.DBTX) error

func By

func By(parsed parser.ParsedCmdLine, _ config.Config, query db.DBTX) error

func Categories

func Categories(parsed parser.ParsedCmdLine, config config.Config, cashDb db.DBTX) error

func Config

func Config(parsed parser.ParsedCmdLine, _ config.Config, cashDb db.DBTX) error

func Delete

func Delete(parsed parser.ParsedCmdLine, cfg config.Config, query db.DBTX) error

func Dispatch

func Dispatch(parsed parser.ParsedCmdLine, cfg config.Config, tx db.DBTX) error

func Fakeit

func Fakeit(parsed parser.ParsedCmdLine, cfg config.Config, cashDb db.DBTX) error

func FormatBudgetDemo

func FormatBudgetDemo(parsed parser.ParsedCmdLine) string

func Group

func Group(parsed parser.ParsedCmdLine, _ config.Config, cashDb db.DBTX) error

func Groups

func Groups(parsed parser.ParsedCmdLine, _ config.Config, cashDb db.DBTX) error

func Help

func Help(parsed parser.ParsedCmdLine, config config.Config, db db.DBTX) error

func Import

func Import(parsed parser.ParsedCmdLine, cfg config.Config, query db.DBTX) error

func Init

func Init(parsed parser.ParsedCmdLine, _ config.Config, query db.DBTX) error

func List

func List(parsed parser.ParsedCmdLine, config config.Config, cashDb db.DBTX) error

func Modify

func Modify(parsed parser.ParsedCmdLine, cfg config.Config, cashDb db.DBTX) error

func ModifyAccount

func ModifyAccount(parsed parser.ParsedCmdLine, cfg config.Config, cashDb db.DBTX) error

func ModifyTransactions

func ModifyTransactions(parsed parser.ParsedCmdLine, cfg config.Config, cashDb db.DBTX) error

func Places

func Places(parsed parser.ParsedCmdLine, _ config.Config, cashDb db.DBTX) error

func Purge

func Purge(parsed parser.ParsedCmdLine, _ config.Config, query db.DBTX) error

func Report

func Report(parsed parser.ParsedCmdLine, _ config.Config, query db.DBTX) error

func Restore

func Restore(parsed parser.ParsedCmdLine, cfg config.Config, query db.DBTX) error

func SetBalance

func SetBalance(parsed parser.ParsedCmdLine, _ config.Config, query db.DBTX) error

func Show

func Show(parsed parser.ParsedCmdLine, cfg config.Config, query db.DBTX) error

func Stats

func Stats(parsed parser.ParsedCmdLine, _ config.Config, query db.DBTX) error

func Sum

func Sum(parsed parser.ParsedCmdLine, _ config.Config, query db.DBTX) error

func Summary

func Summary(parsed parser.ParsedCmdLine, cfg config.Config, cashDb db.DBTX) error

func Tags

func Tags(parsed parser.ParsedCmdLine, _ config.Config, query db.DBTX) error

func Theme

func Theme(parsed parser.ParsedCmdLine, _ config.Config, query db.DBTX) error

func Transfer

func Transfer(parsed parser.ParsedCmdLine, cfg config.Config, cashDb db.DBTX) error

func Undo

func Undo(parsed parser.ParsedCmdLine, _ config.Config, query db.DBTX) error

Types

type AddTransactionInput

type AddTransactionInput struct {
	Identifier   domain.TransactionID
	Amount       float64
	Account      string
	Desc         string
	Date         time.Time
	Type         string
	StoreName    string
	CategoryName string
	GroupName    string
}

type CommandFunc

type CommandFunc func(parsed parser.ParsedCmdLine, config config.Config, db db.DBTX) error

Jump to

Keyboard shortcuts

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