transaction

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2022 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 Transaction

type Transaction struct {
	ID                     string `gorm:"primaryKey"`
	CreatedAt              time.Time
	TemplateName           string
	Date                   string
	Amount                 string
	Currency               string
	AccountNumber          string
	VendorReferenceId      string
	TransactionReferenceId string
}

Represents a credit transaction

func ParseTransaction

func ParseTransaction(text string, template *TransactionTemplate) (*Transaction, error)

type TransactionTemplate

type TransactionTemplate struct {
	Email                         string `yaml:"email"`
	TemplateName                  string `yaml:"name"`
	DatePattern                   string `yaml:"datePattern"`
	AmountPattern                 string `yaml:"amountPattern"`
	CurrencyPattern               string `yaml:"currencyPattern"`
	AccountNumberPattern          string `yaml:"accountNumberPattern"`
	VendorReferenceIdPattern      string `yaml:"vendorReferenceIdPattern"`
	TransactionReferenceIdPattern string `yaml:"transactionReferenceIdPattern"`
}

Template used for parsing transactions from messages

Jump to

Keyboard shortcuts

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