Documentation ¶
Index ¶
- type Config
- type Parser
- type Record
- func (self *Record) AccountId() string
- func (self *Record) Between(d1 time.Time, d2 time.Time) bool
- func (self *Record) Date() time.Time
- func (self *Record) Line() int
- func (self *Record) Money() float32
- func (self *Record) Note() string
- func (self *Record) Out() bool
- func (self *Record) Parse(fields map[string]string, line int) error
- func (self *Record) Valid() bool
- func (self *Record) Vs() string
- type Report
- type ReportData
- func (self *ReportData) BeginDateString() string
- func (self *ReportData) Count() int
- func (self *ReportData) EndDateString() string
- func (self *ReportData) Money() float32
- func (self *ReportData) MonthsBetween() int
- func (self *ReportData) PerMonthString(format string) string
- func (self *ReportData) SortedSections() []*Section
- type Section
- type SectionConfig
- type SectionItem
- type SectionRule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Sections []*SectionConfig Template string // contains filtered or unexported fields }
func LoadConfig ¶
func (*Config) SkipFromSum ¶
func (*Config) SkipPerMonth ¶
type Report ¶
type Report struct {
// contains filtered or unexported fields
}
func (*Report) Data ¶
func (self *Report) Data() *ReportData
type ReportData ¶
type ReportData struct {
// contains filtered or unexported fields
}
func NewReportData ¶
func NewReportData(cfg *Config) *ReportData
func (*ReportData) BeginDateString ¶
func (self *ReportData) BeginDateString() string
func (*ReportData) Count ¶
func (self *ReportData) Count() int
func (*ReportData) EndDateString ¶
func (self *ReportData) EndDateString() string
func (*ReportData) Money ¶
func (self *ReportData) Money() float32
func (*ReportData) MonthsBetween ¶
func (self *ReportData) MonthsBetween() int
func (*ReportData) PerMonthString ¶
func (self *ReportData) PerMonthString(format string) string
func (*ReportData) SortedSections ¶
func (self *ReportData) SortedSections() []*Section
type Section ¶
type Section struct {
// contains filtered or unexported fields
}
func (*Section) MonthsBetween ¶
func (*Section) PerMonthString ¶
func (*Section) SortedItems ¶
func (self *Section) SortedItems() []*SectionItem
type SectionConfig ¶
type SectionConfig struct { Name string Rules []*SectionRule Order int Skip bool SkipPerMonth bool `yaml:"skipPerMonth"` }
type SectionItem ¶
type SectionItem struct {
// contains filtered or unexported fields
}
func (*SectionItem) Add ¶
func (self *SectionItem) Add(money float32)
func (*SectionItem) Count ¶
func (self *SectionItem) Count() int
func (*SectionItem) Money ¶
func (self *SectionItem) Money() float32
func (*SectionItem) MonthsBetween ¶
func (self *SectionItem) MonthsBetween() int
func (*SectionItem) Name ¶
func (self *SectionItem) Name() string
func (*SectionItem) PerMonthString ¶
func (self *SectionItem) PerMonthString(format string) string
type SectionRule ¶
type SectionRule struct { Key string Re string Account string Vs string If string // contains filtered or unexported fields }
func (*SectionRule) ExtractKey ¶
func (self *SectionRule) ExtractKey(rec Record) (string, error)
Click to show internal directories.
Click to hide internal directories.