format

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSVFormatter

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

func NewCSVFormatter

func NewCSVFormatter(w io.Writer) *CSVFormatter

func (*CSVFormatter) Flush

func (f *CSVFormatter) Flush() error

type FormatType

type FormatType string
const (
	FormatTypeMoneyDance FormatType = "moneydance"
)
const (
	FormatTypeYNAB FormatType = "ynab"
)

func All

func All() []FormatType

type Formatter

type Formatter interface {
	WriteHeader() error
	WriteTransaction(t *domain.Transaction) error
	Flush() error
}

func NewFormatter

func NewFormatter(format FormatType, w io.Writer) (Formatter, error)

type MoneyDanceFormatter

type MoneyDanceFormatter struct {
	*CSVFormatter
	// contains filtered or unexported fields
}

func (*MoneyDanceFormatter) WriteHeader

func (m *MoneyDanceFormatter) WriteHeader() error

func (*MoneyDanceFormatter) WriteTransaction

func (m *MoneyDanceFormatter) WriteTransaction(t *domain.Transaction) error

type YNABFormatter

type YNABFormatter struct {
	*CSVFormatter
	// contains filtered or unexported fields
}

func (*YNABFormatter) WriteHeader

func (y *YNABFormatter) WriteHeader() error

func (*YNABFormatter) WriteTransaction

func (y *YNABFormatter) WriteTransaction(t *domain.Transaction) error

Jump to

Keyboard shortcuts

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