Documentation ¶
Index ¶
Constants ¶
View Source
const DateFormat = "2006-01-02"
DateFormat is the format of the date used in the app
View Source
const ExternalCurrencyIssuer = ""
ExternalCurrencyIssuer is the placeholder in the DB for currencies external to stellar which have to no issuer
View Source
const TimeFormat = "2006-01-02 15:04:05"
TimeFormat is the format of the time used in the app
Variables ¶
View Source
var CurrencyCodeToName = make(map[string]string)
CurrencyCodeToName holds relations from currency code to currency name
View Source
var ModelCols = map[string]DataColumns{
"coinmetrics": {
DateCol: 0,
ExchangeRateCol: 4,
SkipLines: 1,
},
"sauder": {
DateCol: 1,
ExchangeRateCol: 3,
SkipLines: 2,
},
}
ModelCols are the columns in the csv where the respective data is found
Functions ¶
Types ¶
type CleanupConfig ¶
type CleanupConfig struct { CleanupMinutesInterval int HoursToKeepMinutelyData int HoursToKeepHourlyData int }
CleanupConfig imported from config file
type Config ¶
type Config struct { LocalDownloadDir string HorizonURL string CORSHosts []string DB DBConfig ImportTransactions []TransactionData Ticker TickerConfig Cleanup CleanupConfig Port string SQLMigrationDir string ApplicationDir string IsDevSystem bool HTTPClient *http.Client }
Config holds the data imported from the config file and command line
var Cnf *Config
Cnf holds configs
type DBConfig ¶
type DBConfig struct { DBUser string DBPassword string DBHost string DBPort int64 DBName string DBSchema string }
DBConfig imported from config file
type DataColumns ¶
DataColumns struct
type TickerConfig ¶
type TickerConfig struct { TickSeconds int SourceCurrency string DestinationCurrency []string DecentralizedExchangeCode []string DecentralizedExchangeDomain []string DecentralizedExchangeIssuer []string }
TickerConfig imported from config file
type TransactionData ¶
type TransactionData struct { Model string FileURL string SourceCurrency string DestinationCurrency string SourceCurrencyName string DestinationCurrencyName string SourceCurrencyIssuer string DestinationCurrencyIssuer string }
TransactionData holds data relevant for a transaction between two currencies
Click to show internal directories.
Click to hide internal directories.