Documentation ¶
Index ¶
- type Chart
- func (entity *Chart) AddIndicator(indicator *ChartIndicator)
- func (entity *Chart) AddStrategy(strategy *ChartStrategy)
- func (entity *Chart) AddTrade(trade Trade)
- func (entity *Chart) GetAutoTrade() uint
- func (entity *Chart) GetBase() string
- func (entity *Chart) GetExchangeName() string
- func (entity *Chart) GetId() uint
- func (entity *Chart) GetIndicators() []ChartIndicator
- func (entity *Chart) GetPeriod() int
- func (entity *Chart) GetQuote() string
- func (entity *Chart) GetStrategies() []ChartStrategy
- func (entity *Chart) GetTrades() []Trade
- func (entity *Chart) GetUserId() uint
- func (entity *Chart) IsAutoTrade() bool
- func (entity *Chart) SetIndicators(indicators []ChartIndicator)
- func (entity *Chart) SetStrategies(strategies []ChartStrategy)
- func (entity *Chart) SetTrades(trades []Trade)
- type ChartEntity
- type ChartIndicator
- type ChartIndicatorEntity
- type ChartStrategy
- type ChartStrategyEntity
- type GlobalMarketCap
- type MarketCap
- type Plugin
- type PluginEntity
- type PriceHistory
- type PriceHistoryEntity
- type Profit
- func (entity *Profit) GetBought() string
- func (entity *Profit) GetFee() string
- func (entity *Profit) GetId() uint
- func (entity *Profit) GetQuantity() string
- func (entity *Profit) GetSold() string
- func (entity *Profit) GetTax() string
- func (entity *Profit) GetTotal() string
- func (entity *Profit) GetTradeId() uint
- func (entity *Profit) GetUserId() uint
- type ProfitEntity
- type Trade
- func (trade *Trade) GetAmount() string
- func (trade *Trade) GetBase() string
- func (trade *Trade) GetChartData() string
- func (trade *Trade) GetChartId() uint
- func (trade *Trade) GetDate() time.Time
- func (trade *Trade) GetExchangeName() string
- func (trade *Trade) GetId() uint
- func (trade *Trade) GetPrice() string
- func (trade *Trade) GetQuote() string
- func (trade *Trade) GetType() string
- func (trade *Trade) GetUserId() uint
- type TradeEntity
- type Transaction
- func (tx *Transaction) GetCategory() string
- func (tx *Transaction) GetCurrencyPair() string
- func (tx *Transaction) GetDate() time.Time
- func (tx *Transaction) GetFee() string
- func (tx *Transaction) GetFeeCurrency() string
- func (tx *Transaction) GetFiatFee() string
- func (tx *Transaction) GetFiatFeeCurrency() string
- func (tx *Transaction) GetFiatPrice() string
- func (tx *Transaction) GetFiatPriceCurrency() string
- func (tx *Transaction) GetFiatQuantity() string
- func (tx *Transaction) GetFiatQuantityCurrency() string
- func (tx *Transaction) GetFiatTotal() string
- func (tx *Transaction) GetFiatTotalCurrency() string
- func (tx *Transaction) GetId() string
- func (tx *Transaction) GetMarketPair() string
- func (tx *Transaction) GetNetwork() string
- func (tx *Transaction) GetNetworkDisplayName() string
- func (tx *Transaction) GetPrice() string
- func (tx *Transaction) GetPriceCurrency() string
- func (tx *Transaction) GetQuantity() string
- func (tx *Transaction) GetQuantityCurrency() string
- func (tx *Transaction) GetQuoteFiatPrice() string
- func (tx *Transaction) GetQuoteFiatPriceCurrency() string
- func (tx *Transaction) GetTotal() string
- func (tx *Transaction) GetTotalCurrency() string
- func (tx *Transaction) GetType() string
- func (tx *Transaction) GetUserId() uint
- func (tx *Transaction) IsDeleted() bool
- func (tx *Transaction) SetCategory(category string)
- func (tx *Transaction) SetDeleted(value int)
- type TransactionEntity
- type User
- func (entity *User) GetCharts() []Chart
- func (entity *User) GetEtherbase() string
- func (entity *User) GetExchanges() []UserCryptoExchange
- func (entity *User) GetFiatExchange() string
- func (entity *User) GetId() uint
- func (entity *User) GetKeystore() string
- func (entity *User) GetLocalCurrency() string
- func (entity *User) GetTokens() []UserToken
- func (entity *User) GetUsername() string
- func (entity *User) GetWallets() []UserWallet
- type UserCryptoExchange
- func (entity *UserCryptoExchange) GetExtra() string
- func (entity *UserCryptoExchange) GetKey() string
- func (entity *UserCryptoExchange) GetMarkets() string
- func (entity *UserCryptoExchange) GetName() string
- func (entity *UserCryptoExchange) GetSecret() string
- func (entity *UserCryptoExchange) GetUserID() uint
- type UserEntity
- type UserExchangeEntity
- type UserToken
- type UserTokenEntity
- type UserWallet
- type UserWalletEntity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chart ¶
type Chart struct { Id uint `gorm:"primary_key;AUTO_INCREMENT"` UserId uint `gorm:"foreign_key;unique_index:idx_chart"` Base string `gorm:"unique_index:idx_chart"` Quote string `gorm:"unique_index:idx_chart"` Exchange string `gorm:"unique_index:idx_chart"` Period int AutoTrade uint Indicators []ChartIndicator `gorm:"ForeignKey:ChartId"` Strategies []ChartStrategy `gorm:"ForeignKey:ChartId"` Trades []Trade `gorm:"ForeignKey:ChartId"` User User ChartEntity }
func (*Chart) AddIndicator ¶
func (entity *Chart) AddIndicator(indicator *ChartIndicator)
func (*Chart) AddStrategy ¶
func (entity *Chart) AddStrategy(strategy *ChartStrategy)
func (*Chart) GetAutoTrade ¶
func (*Chart) GetExchangeName ¶
func (*Chart) GetIndicators ¶
func (entity *Chart) GetIndicators() []ChartIndicator
func (*Chart) GetStrategies ¶
func (entity *Chart) GetStrategies() []ChartStrategy
func (*Chart) IsAutoTrade ¶
func (*Chart) SetIndicators ¶
func (entity *Chart) SetIndicators(indicators []ChartIndicator)
func (*Chart) SetStrategies ¶
func (entity *Chart) SetStrategies(strategies []ChartStrategy)
type ChartEntity ¶
type ChartEntity interface { GetId() uint GetUserId() uint GetBase() string GetQuote() string GetPeriod() int GetExchangeName() string IsAutoTrade() bool GetAutoTrade() uint SetIndicators(indicators []ChartIndicator) GetIndicators() []ChartIndicator AddIndicator(indicator *ChartIndicator) SetStrategies(strategies []ChartStrategy) GetStrategies() []ChartStrategy AddStrategy(strategy *ChartStrategy) SetTrades(trades []Trade) GetTrades() []Trade AddTrade(trade Trade) }
type ChartIndicator ¶
type ChartIndicator struct { Id uint `gorm:"primary_key"` ChartId uint `gorm:"foreign_key;unique_index:idx_chart_indicator"` Name string `gorm:"unique_index:idx_chart_indicator"` Parameters string `gorm:"not null"` }
func (*ChartIndicator) GetChartId ¶
func (entity *ChartIndicator) GetChartId() uint
func (*ChartIndicator) GetId ¶
func (entity *ChartIndicator) GetId() uint
func (*ChartIndicator) GetName ¶
func (entity *ChartIndicator) GetName() string
func (*ChartIndicator) GetParameters ¶
func (entity *ChartIndicator) GetParameters() string
type ChartIndicatorEntity ¶
type ChartStrategy ¶
type ChartStrategy struct { Id uint `gorm:"primary_key"` ChartId uint `gorm:"foreign_key;unique_index:idx_chart_strategy"` Name string `gorm:"unique_index:idx_chart_strategy"` Parameters string `gorm:"not null"` }
func (*ChartStrategy) GetChartId ¶
func (entity *ChartStrategy) GetChartId() uint
func (*ChartStrategy) GetId ¶
func (entity *ChartStrategy) GetId() uint
func (*ChartStrategy) GetName ¶
func (entity *ChartStrategy) GetName() string
func (*ChartStrategy) GetParameters ¶
func (entity *ChartStrategy) GetParameters() string
type ChartStrategyEntity ¶
type GlobalMarketCap ¶
type MarketCap ¶
type MarketCap struct { Id string `gorm:"index"` Name string `gorm:"index"` Symbol string `gorm:"primary_key"` Rank string PriceUSD string PriceBTC string VolumeUSD24h string MarketCapUSD string AvailableSupply string TotalSupply string MaxSupply string PercentChange1h string PercentChange24h string PercentChange7d string LastUpdated string }
type Plugin ¶
type Plugin struct { Name string `gorm:"primary_key"` Filename string `gorm:"unique;not null"` Version string `gorm:"not null"` Type string `gorm:"not null"` PluginEntity }
func (*Plugin) GetFilename ¶
func (*Plugin) GetVersion ¶
type PluginEntity ¶
type PriceHistory ¶
type PriceHistory struct { Time int64 `json:"time"` Open float64 `json:"open"` High float64 `json:"high"` Low float64 `json:"low"` Close float64 `json:"close"` Volume float64 `json:"volume"` MarketCap int64 `json:"marketCap"` PriceHistoryEntity }
func (*PriceHistory) GetClose ¶
func (ph *PriceHistory) GetClose() float64
func (*PriceHistory) GetHigh ¶
func (ph *PriceHistory) GetHigh() float64
func (*PriceHistory) GetLow ¶
func (ph *PriceHistory) GetLow() float64
func (*PriceHistory) GetMarketCap ¶
func (ph *PriceHistory) GetMarketCap() int64
func (*PriceHistory) GetOpen ¶
func (ph *PriceHistory) GetOpen() float64
func (*PriceHistory) GetTime ¶
func (ph *PriceHistory) GetTime() int64
func (*PriceHistory) GetVolume ¶
func (ph *PriceHistory) GetVolume() float64
type PriceHistoryEntity ¶
type Profit ¶
type Profit struct { Id uint `gorm:"primary_key"` UserId uint `gorm:"unique_index:idx_profit"` TradeId uint `gorm:"foreign_key;unique_index:idx_profit"` Quantity string Bought string Sold string Fee string Tax string Total string ProfitEntity }
func (*Profit) GetQuantity ¶
func (*Profit) GetTradeId ¶
type ProfitEntity ¶
type Trade ¶
type Trade struct { Id uint `gorm:"primary_key"` ChartId uint `gorm:"foreign_key"` UserId uint `gorm:"foreign_key;index"` Base string `gorm:"index"` Quote string `gorm:"index"` Exchange string `gorm:"index"` Date time.Time Type string Price string Amount string ChartData string TradeEntity }
func (*Trade) GetChartData ¶
func (*Trade) GetChartId ¶
func (*Trade) GetExchangeName ¶
type TradeEntity ¶
type Transaction ¶
type Transaction struct { Id string `gorm:"type:varchar(200);primary_key"` UserId uint Date time.Time MarketPair string `gorm:"type:varchar(10)"` CurrencyPair string `gorm:"type:varchar(10)"` Type string `gorm:"type:varchar(64)"` Category string `gorm:"type:varchar(200)"` Network string `gorm:"type:varchar(200)"` NetworkDisplayName string `gorm:"type:varchar(200)"` Quantity string `gorm:"type:varchar(64)"` QuantityCurrency string `gorm:"type:varchar(6)"` FiatQuantity string `gorm:"type:varchar(64)"` FiatQuantityCurrency string `gorm:"type:varchar(6)"` Price string `gorm:"type:varchar(64)"` PriceCurrency string `gorm:"type:varchar(6)"` FiatPrice string `gorm:"type:varchar(64)"` FiatPriceCurrency string `gorm:"type:varchar(6)"` QuoteFiatPrice string `gorm:"type:varchar(64)"` QuoteFiatPriceCurrency string `gorm:"type:varchar(6)"` Fee string `gorm:"type:varchar(64)"` FeeCurrency string `gorm:"type:varchar(6)"` FiatFee string `gorm:"type:varchar(64)"` FiatFeeCurrency string `gorm:"type:varchar(6)"` Total string `gorm:"type:varchar(64)"` TotalCurrency string `gorm:"type:varchar(6)"` FiatTotal string `gorm:"type:varchar(64)"` FiatTotalCurrency string `gorm:"type:varchar(6)"` Deleted int `gorm:"type:integer;default:0"` TransactionEntity }
func (*Transaction) GetCategory ¶
func (tx *Transaction) GetCategory() string
func (*Transaction) GetCurrencyPair ¶
func (tx *Transaction) GetCurrencyPair() string
func (*Transaction) GetDate ¶
func (tx *Transaction) GetDate() time.Time
func (*Transaction) GetFee ¶
func (tx *Transaction) GetFee() string
func (*Transaction) GetFeeCurrency ¶
func (tx *Transaction) GetFeeCurrency() string
func (*Transaction) GetFiatFee ¶
func (tx *Transaction) GetFiatFee() string
func (*Transaction) GetFiatFeeCurrency ¶
func (tx *Transaction) GetFiatFeeCurrency() string
func (*Transaction) GetFiatPrice ¶
func (tx *Transaction) GetFiatPrice() string
func (*Transaction) GetFiatPriceCurrency ¶
func (tx *Transaction) GetFiatPriceCurrency() string
func (*Transaction) GetFiatQuantity ¶
func (tx *Transaction) GetFiatQuantity() string
func (*Transaction) GetFiatQuantityCurrency ¶
func (tx *Transaction) GetFiatQuantityCurrency() string
func (*Transaction) GetFiatTotal ¶
func (tx *Transaction) GetFiatTotal() string
func (*Transaction) GetFiatTotalCurrency ¶
func (tx *Transaction) GetFiatTotalCurrency() string
func (*Transaction) GetId ¶
func (tx *Transaction) GetId() string
func (*Transaction) GetMarketPair ¶
func (tx *Transaction) GetMarketPair() string
func (*Transaction) GetNetwork ¶
func (tx *Transaction) GetNetwork() string
func (*Transaction) GetNetworkDisplayName ¶
func (tx *Transaction) GetNetworkDisplayName() string
func (*Transaction) GetPrice ¶
func (tx *Transaction) GetPrice() string
func (*Transaction) GetPriceCurrency ¶
func (tx *Transaction) GetPriceCurrency() string
func (*Transaction) GetQuantity ¶
func (tx *Transaction) GetQuantity() string
func (*Transaction) GetQuantityCurrency ¶
func (tx *Transaction) GetQuantityCurrency() string
func (*Transaction) GetQuoteFiatPrice ¶
func (tx *Transaction) GetQuoteFiatPrice() string
func (*Transaction) GetQuoteFiatPriceCurrency ¶
func (tx *Transaction) GetQuoteFiatPriceCurrency() string
func (*Transaction) GetTotal ¶
func (tx *Transaction) GetTotal() string
func (*Transaction) GetTotalCurrency ¶
func (tx *Transaction) GetTotalCurrency() string
func (*Transaction) GetType ¶
func (tx *Transaction) GetType() string
func (*Transaction) GetUserId ¶
func (tx *Transaction) GetUserId() uint
func (*Transaction) IsDeleted ¶
func (tx *Transaction) IsDeleted() bool
func (*Transaction) SetCategory ¶
func (tx *Transaction) SetCategory(category string)
func (*Transaction) SetDeleted ¶
func (tx *Transaction) SetDeleted(value int)
type TransactionEntity ¶
type TransactionEntity interface { GetId() string GetUserId() uint GetDate() time.Time GetMarketPair() string GetCurrencyPair() string GetType() string GetCategory() string SetCategory(category string) GetNetwork() string GetNetworkDisplayName() string GetQuantity() string GetQuantityCurrency() string GetFiatQuantity() string GetFiatQuantityCurrency() string GetPrice() string GetPriceCurrency() string GetFiatPrice() string GetFiatPriceCurrency() string GetQuoteFiatPrice() string GetQuoteFiatPriceCurrency() string GetFee() string GetFeeCurrency() string GetTotal() string GetTotalCurrency() string GetFiatFee() string GetFiatFeeCurrency() string GetFiatTotal() string GetFiatTotalCurrency() string IsDeleted() bool SetDeleted(value int) }
type User ¶
type User struct { Id uint `gorm:"primary_key;AUTO_INCREMENT"` Username string `gorm:"type:varchar(100);unique_index"` LocalCurrency string `gorm:"type:varchar(5)"` FiatExchange string Etherbase string `gorm:"type:varchar(160)"` Keystore string Charts []Chart Wallets []UserWallet Tokens []UserToken Exchanges []UserCryptoExchange UserEntity }
func (*User) GetEtherbase ¶
func (*User) GetExchanges ¶
func (entity *User) GetExchanges() []UserCryptoExchange
func (*User) GetFiatExchange ¶
func (*User) GetKeystore ¶
func (*User) GetLocalCurrency ¶
func (*User) GetUsername ¶
func (*User) GetWallets ¶
func (entity *User) GetWallets() []UserWallet
type UserCryptoExchange ¶
type UserCryptoExchange struct { UserID uint `gorm:"type:integer;primary_key"` Name string `gorm:"type:varchar(200);primary_key"` Key string `gorm:"not null" sql:"type:varchar(255)"` Secret string `gorm:"not null" sql:"type:text"` Markets string `sql:"type:text"` Extra string `gorm:"not null" sql:"type:varchar(255)"` UserExchangeEntity }
func (*UserCryptoExchange) GetExtra ¶
func (entity *UserCryptoExchange) GetExtra() string
func (*UserCryptoExchange) GetKey ¶
func (entity *UserCryptoExchange) GetKey() string
func (*UserCryptoExchange) GetMarkets ¶
func (entity *UserCryptoExchange) GetMarkets() string
func (*UserCryptoExchange) GetName ¶
func (entity *UserCryptoExchange) GetName() string
func (*UserCryptoExchange) GetSecret ¶
func (entity *UserCryptoExchange) GetSecret() string
func (*UserCryptoExchange) GetUserID ¶
func (entity *UserCryptoExchange) GetUserID() uint
type UserEntity ¶
type UserEntity interface { GetId() uint GetUsername() string GetLocalCurrency() string GetFiatExchange() string GetEtherbase() string GetKeystore() string GetWallets() []UserWallet GetExchanges() []UserCryptoExchange }
type UserExchangeEntity ¶
type UserToken ¶
type UserToken struct { UserId uint Symbol string `gorm:"primary_key"` ContractAddress string `gorm:"unique_index"` WalletAddress string UserTokenEntity }
func (*UserToken) GetContractAddress ¶
func (*UserToken) GetWalletAddress ¶
type UserTokenEntity ¶
type UserWallet ¶
type UserWallet struct { UserId uint Currency string `gorm:"primary_key"` Address string `gorm:"primary_key"` Native uint UserWalletEntity }
func (*UserWallet) GetAddress ¶
func (entity *UserWallet) GetAddress() string
func (*UserWallet) GetCurrency ¶
func (entity *UserWallet) GetCurrency() string
func (*UserWallet) GetUserId ¶
func (entity *UserWallet) GetUserId() uint
func (*UserWallet) IsNative ¶
func (entity *UserWallet) IsNative() bool
Click to show internal directories.
Click to hide internal directories.