importer

package
v0.0.0-...-737f61f Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GmailImporter

type GmailImporter struct {
	Queries []gmail.QuerySet
	Parsers []Parser
}

GmailImporter knows to query gmail for messages and how to parse them.

func NewGmailImporter

func NewGmailImporter(queries []gmail.QuerySet, parsers []Parser) GmailImporter

type MsgImporter

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

MsgImporter knows how to import messages

func NewMsgImporter

func NewMsgImporter(ruleConfig []byte, allParsers []Parser) (*MsgImporter, error)

NewMsgImporter creates a new MsgImporter

func (*MsgImporter) ImportMessage

func (mi *MsgImporter) ImportMessage(msg ledgertools.Message) (*ledgertools.Transaction, error)

ImportMessage imports an email message and produces a Transaction. nil will be returned if the email message is of a type we don't recognize

type Parsed

type Parsed struct {
	Date        time.Time
	CheckNumber string // may not be set
	Payee       string
	Comments    []string // These should not contain the leading ; character

	Amount            string
	PaymentInstrument string
}

Parsed represents parsed data that we can convert to a Transaction with the help of a RuleSet.

func NewParsed

func NewParsed(date time.Time, checkNumber, payee string, comments []string, amount, paymentInstrument string) *Parsed

NewParsed Creates a new Parsed entry

type Parser

type Parser func(msg ledgertools.Message) (*Parsed, error)

Directories

Path Synopsis
Package mailimp provides helpers for email importers
Package mailimp provides helpers for email importers

Jump to

Keyboard shortcuts

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