types

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountMapping added in v1.0.0

type AccountMapping map[string]string

type Auth

type Auth struct {
	Addr             string                    `json:"mail-addr"`
	Username         string                    `json:"mail-username"`
	Password         string                    `json:"mail-password"`
	ToshlToken       string                    `json:"toshl-token"`
	TwilioAccountSid string                    `json:"twilio-account-sid"`
	TwilioAuthToken  string                    `json:"twilio-auth-token"`
	TwilioFromNumber string                    `json:"twilio-from-number"`
	TwilioToNumber   string                    `json:"twilio-to-number"`
	RapidApiKey      string                    `json:"rapidapi-key"`
	RapidApiHost     string                    `json:"rapidapi-host"`
	ArchiveMailbox   string                    `json:"archive_mailbox"`
	Timezone         string                    `json:"timezone"`
	StockOptions     StockOptions              `json:"stock_options"`
	FundOptions      FundOptions               `json:"fund_options"`
	AccountMappings  map[string]AccountMapping `json:"account_mappings"`
}

type BankDelegate

type BankDelegate interface {
	FilterMessage(message types.Message) bool
	ExtractTransactionInfoFromMessage(message types.Message) (*TransactionInfo, error)
	String() string
}

type BankMessage added in v0.2.6

type BankMessage struct {
	types.Message

	Bank BankDelegate
}

type Currency

type Currency struct {
	toshl.Currency
}

type FundOptions added in v1.0.0

type FundOptions struct {
	Enabled bool     `json:"enabled"`
	Funds   []string `json:"funds"`
	Times   []string `json:"times"`
}

type StockOptions added in v1.0.0

type StockOptions struct {
	Enabled bool     `json:"enabled"`
	Stocks  []string `json:"stocks"`
	Times   []string `json:"times"`
}

type TransactionInfo

type TransactionInfo struct {
	Bank            BankDelegate
	MsgId           uint32
	TransactionType TransactionType
	Type            string
	Place           string
	Value           Currency
	Account         string
	Date            time.Time
}

type TransactionType added in v1.0.0

type TransactionType int8
const (
	Expense TransactionType = iota
	Income
	Transaction
)

func (TransactionType) IsValid added in v1.0.0

func (t TransactionType) IsValid() bool

func (TransactionType) String added in v1.0.0

func (t TransactionType) String() string

Jump to

Keyboard shortcuts

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