Documentation ¶
Index ¶
- Constants
- func NewReader(r io.Reader) io.Reader
- func ValidateColumnNames(lang string, names []string) error
- type ColumnID
- type Extractor
- type Record
- func (r Record) Currency() string
- func (r Record) Currency1() string
- func (r Record) Currency1JPYRate() *decimal.Big
- func (r Record) Currency1Quantity() *decimal.Big
- func (r Record) Currency2() string
- func (r Record) Currency2Quantity() *decimal.Big
- func (r Record) DealType() int
- func (r Record) Fee() *decimal.Big
- func (r Record) Get(id ColumnID) string
- func (r Record) OrderID() string
- func (r Record) Remarks() string
- func (r Record) TrPrice() *decimal.Big
- func (r Record) TrType() int
- type Repository
- type TableWriter
- type TransactionHistory
- type Translator
Constants ¶
View Source
const ( TrTypeUnknown int = iota TrTypeBuy TrTypeSell TrTypeReceive TrTypeDeposit TrTypeWithdraw TrTypeTransfer TrTypeFee )
View Source
const ( En = "en" Jp = "jp" )
View Source
const ( DealTypeUnkown = iota DealTypeNone DealTypeSelf DealTypeMed )
View Source
const FiatCode = "JPY"
View Source
const WalletCode = "BF"
Variables ¶
This section is empty.
Functions ¶
func ValidateColumnNames ¶
ValidateColumnNames checks columns
Types ¶
type Record ¶
type Record []string
func (Record) Currency1JPYRate ¶
func (Record) Currency1Quantity ¶
func (Record) Currency2Quantity ¶
type Repository ¶
type Repository interface { FindTransactions(ctx context.Context, start, end time.Time) (models.BFTransactionSlice, error) FindTransactionsByYear(ctx context.Context, year int, location *time.Location) (models.BFTransactionSlice, error) CreateTransactions(ctx context.Context, trs models.BFTransactionSlice) error }
func NewRepository ¶
func NewRepository(db boil.ContextExecutor) Repository
type TableWriter ¶
type TableWriter struct {
// contains filtered or unexported fields
}
func NewTableWriter ¶
func NewTableWriter(w io.Writer) *TableWriter
func (*TableWriter) PrintTransactions ¶
func (t *TableWriter) PrintTransactions(slice models.BFTransactionSlice)
func (*TableWriter) PrintTransactionsShort ¶
func (t *TableWriter) PrintTransactionsShort(slice models.BFTransactionSlice)
func (*TableWriter) Write ¶
func (t *TableWriter) Write(value interface{}) error
type TransactionHistory ¶
type TransactionHistory struct {
Transactions models.BFTransactionSlice
}
func Extract ¶
func Extract(reader io.Reader) (*TransactionHistory, error)
Extract extracts transactions from a reader
func ExtractFromFile ¶
func ExtractFromFile(path string) (*TransactionHistory, error)
type Translator ¶
type Translator struct { }
func NewTranslator ¶
func NewTranslator() *Translator
func (*Translator) Translate ¶
func (t *Translator) Translate(ctx context.Context, repo eupholio.Repository, start, end time.Time) error
Translate stores extracted transaction data to transaction table
Click to show internal directories.
Click to hide internal directories.