common

package
v0.0.0-...-dd63fed Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoKnownTradeType = errors.New("no known trade type")

Functions

func SetIdForTransaction

func SetIdForTransaction(tx *CointrackingTx) error

Types

type CointrackingTx

type CointrackingTx struct {
	Type         *TxType      `csv:"type"`
	BuyValue     float64      `csv:"buy_value"`
	BuyCurrency  string       `csv:"buy_currency"`
	SellValue    float64      `csv:"sell"`
	SellCurrency string       `csv:"sell_currency"`
	FeeValue     float64      `csv:"fee"`
	FeeCurrency  string       `csv:"fee_currency"`
	Exchange     string       `csv:"exchange"`
	Group        string       `csv:"group"`
	Comment      string       `csv:"comment"`
	DateTime     *TxTimestamp `csv:"date"`
	ID           string       `csv:"-" hash:"-"`
}

type Ct2BpTxMapping

type Ct2BpTxMapping struct {
	Cointracking TxDisplayName `json:"cointracking"`
	Blockpit     TxDisplayName `json:"blockpit"`
}

type ExportFileInfo

type ExportFileInfo struct {
	FileName     string            `json:"fileName"`
	TxCount      int               `json:"txCount"`
	SkippedTxs   int               `json:"skippedTxs"`
	Exchanges    []string          `json:"exchanges"`
	FilePath     string            `json:"-"`
	Transactions []*CointrackingTx `json:"-"`
}

type TimezoneData

type TimezoneData struct {
	Value         string `json:"value"`
	Title         string `json:"title"`
	OffsetSeconds int    `json:"-"`
}

type TxDisplayName

type TxDisplayName struct {
	Title string `json:"title"`
	Value string `json:"value"`
}

type TxTimestamp

type TxTimestamp struct {
	Time time.Time
}

func (*TxTimestamp) MarshalCSV

func (ts *TxTimestamp) MarshalCSV() (string, error)

func (*TxTimestamp) UnmarshalCSV

func (ts *TxTimestamp) UnmarshalCSV(csv string) error

type TxType

type TxType struct {
	TxType ctt.CtTxType
}

func (*TxType) MarshalCSV

func (tt *TxType) MarshalCSV() (string, error)

func (*TxType) UnmarshalCSV

func (tt *TxType) UnmarshalCSV(csv string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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