Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Rule ¶
type Rule interface {
Match(ledger.Transaction) bool
Apply(*ledger.Transaction)
}
Rule can match a transaction and apply a transformation to it
type Rules ¶
type Rules []Rule
Rules enables transformation of transactions across multiple, sequential rules
func (Rules) Apply ¶
func (r Rules) Apply(txn *ledger.Transaction)
Apply runs a match and subsequent apply for each rule on the given transaction
func (*Rules) UnmarshalJSON ¶ added in v0.3.0
UnmarshalJSON parses the given bytes into rules
type Store ¶ added in v0.3.0
type Store struct {
// contains filtered or unexported fields
}
Store enables manipulation of rules in memory
func (*Store) Apply ¶ added in v0.3.0
func (s *Store) Apply(txn *ledger.Transaction)
Apply transforms the given transaction based on the current rules
func (*Store) ApplyAll ¶ added in v0.3.0
func (s *Store) ApplyAll(txns []ledger.Transaction)
ApplyAll transforms the given transactions based on the current rules
func (*Store) MarshalJSON ¶ added in v0.3.0
MarshalJSON returns JSON-encoded rules
Click to show internal directories.
Click to hide internal directories.