Documentation ¶
Index ¶
- Constants
- func ValidateColumnNames(names []string) error
- type ColumnID
- type Extractor
- type History
- type Record
- func (r Record) Amount() *decimal.Big
- func (r Record) Comment() string
- func (r Record) Fee() *decimal.Big
- func (r Record) Get(id ColumnID) string
- func (r Record) ID() string
- func (r Record) Operation() string
- func (r Record) OriginalCurrency() string
- func (r Record) Price() *decimal.Big
- func (r Record) Time() (time.Time, error)
- func (r Record) TradingCurrency() string
- type Repository
- type Translator
Constants ¶
View Source
const ( WalletCode = "COINCHECK" FiatCode = "JPY" )
View Source
const ( OperationReceived = "Received" OperationLimitOrder = "Limit Order" OperationCompletedTradingContracts = "Completed trading contracts" OperationSent = "Sent" OperationBankWithdrawal = "Bank Withdrawal" OperationCancelLimitOrder = "Cancel Limit Order" )
View Source
const ( IDColumn = "id" TimeColumn = "time" OperationColumn = "operation" AmountColumn = "amount" TradingCurrencyColumn = "trading_currency" PriceColumn = "price" OriginalCurrencyColumn = "original_currency" FeeColumn = "fee" CommentColumn = "comment" )
Variables ¶
This section is empty.
Functions ¶
func ValidateColumnNames ¶
ValidateColumnNames checks columns
Types ¶
type History ¶
type History struct {
Entries models.CoincheckHistorySlice
}
func ExtractFromFile ¶
type Repository ¶
type Repository interface { FindHistories(ctx context.Context, start, end time.Time) (models.CoincheckHistorySlice, error) FindHistoriesByYear(ctx context.Context, year int, location *time.Location) (models.CoincheckHistorySlice, error) CreateHistories(ctx context.Context, hs models.CoincheckHistorySlice) error }
func NewRepository ¶
func NewRepository(db boil.ContextExecutor) Repository
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.