Documentation ¶
Index ¶
- Constants
- type BoltSettingStorage
- func (s *BoltSettingStorage) AddTokenByAddress(t common.Token, timestamp uint64) error
- func (s *BoltSettingStorage) AddTokenByID(t common.Token, timestamp uint64) error
- func (s *BoltSettingStorage) GetActiveTokenByAddress(addr ethereum.Address) (common.Token, error)
- func (s *BoltSettingStorage) GetActiveTokenByID(id string) (common.Token, error)
- func (s *BoltSettingStorage) GetActiveTokens() (result []common.Token, err error)
- func (s *BoltSettingStorage) GetAllTokens() (result []common.Token, err error)
- func (s *BoltSettingStorage) GetDepositAddresses(ex settings.ExchangeName) (common.ExchangeAddresses, error)
- func (s *BoltSettingStorage) GetExchangeInfo(ex settings.ExchangeName) (common.ExchangeInfo, error)
- func (s *BoltSettingStorage) GetExchangeNotifications() (common.ExchangeNotifications, error)
- func (s *BoltSettingStorage) GetExchangeStatus() (common.ExchangesStatus, error)
- func (s *BoltSettingStorage) GetExchangeVersion() (uint64, error)
- func (s *BoltSettingStorage) GetExternalTokenByAddress(addr ethereum.Address) (common.Token, error)
- func (s *BoltSettingStorage) GetExternalTokenByID(id string) (common.Token, error)
- func (s *BoltSettingStorage) GetExternalTokens() (result []common.Token, err error)
- func (s *BoltSettingStorage) GetFee(ex settings.ExchangeName) (common.ExchangeFees, error)
- func (s *BoltSettingStorage) GetInternalTokenByAddress(addr ethereum.Address) (common.Token, error)
- func (s *BoltSettingStorage) GetInternalTokenByID(id string) (common.Token, error)
- func (s *BoltSettingStorage) GetInternalTokens() (result []common.Token, err error)
- func (s *BoltSettingStorage) GetMinDeposit(ex settings.ExchangeName) (common.ExchangesMinDeposit, error)
- func (s *BoltSettingStorage) GetPendingTokenUpdates() (map[string]common.TokenUpdate, error)
- func (s *BoltSettingStorage) GetTokenByAddress(addr ethereum.Address) (common.Token, error)
- func (s *BoltSettingStorage) GetTokenByID(id string) (common.Token, error)
- func (s *BoltSettingStorage) GetTokenPairs(ex settings.ExchangeName) ([]common.TokenPair, error)
- func (s *BoltSettingStorage) GetTokenVersion() (uint64, error)
- func (s *BoltSettingStorage) RemovePendingTokenUpdates() error
- func (s *BoltSettingStorage) StoreDepositAddress(ex settings.ExchangeName, addrs common.ExchangeAddresses, timestamp uint64) error
- func (s *BoltSettingStorage) StoreExchangeInfo(ex settings.ExchangeName, exInfo common.ExchangeInfo, timestamp uint64) error
- func (s *BoltSettingStorage) StoreExchangeNotification(exchange, action, token string, fromTime, toTime uint64, isWarning bool, ...) error
- func (s *BoltSettingStorage) StoreExchangeStatus(data common.ExchangesStatus) error
- func (s *BoltSettingStorage) StoreFee(ex settings.ExchangeName, data common.ExchangeFees, timestamp uint64) error
- func (s *BoltSettingStorage) StoreMinDeposit(ex settings.ExchangeName, data common.ExchangesMinDeposit, timestamp uint64) error
- func (s *BoltSettingStorage) StorePendingTokenUpdates(trs map[string]common.TokenUpdate) error
- func (s *BoltSettingStorage) StoreTokenPairs(ex settings.ExchangeName, data []common.TokenPair, timestamp uint64) error
- func (s *BoltSettingStorage) UpdateToken(t common.Token, timestamp uint64) error
- func (s *BoltSettingStorage) UpdateTokenWithExchangeSetting(tokens []common.Token, ...) error
- type FilterFunction
Constants ¶
const ( TokenBucketByID string = "token_by_id" TokenBucketByAddress string = "token_by_addr" ExchangeFeeBucket string = "exchange_fee" ExchangeMinDepositBucket string = "exchange_min_deposit" ExchangeDepositAddress string = "exchange_deposit_address" ExchangeTokenPairs string = "exchange_token_pairs" ExchangeInfo string = "exchange_info" ExchangeStatus string = "exchange_status" ExchangeNotifications string = "exchange_notifications" PendingTokenRequest string = "pending_token_request" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoltSettingStorage ¶
type BoltSettingStorage struct {
// contains filtered or unexported fields
}
func NewBoltSettingStorage ¶
func NewBoltSettingStorage(dbPath string) (*BoltSettingStorage, error)
func (*BoltSettingStorage) AddTokenByAddress ¶
func (s *BoltSettingStorage) AddTokenByAddress(t common.Token, timestamp uint64) error
func (*BoltSettingStorage) AddTokenByID ¶
func (s *BoltSettingStorage) AddTokenByID(t common.Token, timestamp uint64) error
func (*BoltSettingStorage) GetActiveTokenByAddress ¶
func (*BoltSettingStorage) GetActiveTokenByID ¶
func (s *BoltSettingStorage) GetActiveTokenByID(id string) (common.Token, error)
func (*BoltSettingStorage) GetActiveTokens ¶
func (s *BoltSettingStorage) GetActiveTokens() (result []common.Token, err error)
func (*BoltSettingStorage) GetAllTokens ¶
func (s *BoltSettingStorage) GetAllTokens() (result []common.Token, err error)
func (*BoltSettingStorage) GetDepositAddresses ¶
func (s *BoltSettingStorage) GetDepositAddresses(ex settings.ExchangeName) (common.ExchangeAddresses, error)
GetDepositAddresses returns a map[tokenID]DepositAddress and error if occur
func (*BoltSettingStorage) GetExchangeInfo ¶
func (s *BoltSettingStorage) GetExchangeInfo(ex settings.ExchangeName) (common.ExchangeInfo, error)
func (*BoltSettingStorage) GetExchangeNotifications ¶
func (s *BoltSettingStorage) GetExchangeNotifications() (common.ExchangeNotifications, error)
func (*BoltSettingStorage) GetExchangeStatus ¶
func (s *BoltSettingStorage) GetExchangeStatus() (common.ExchangesStatus, error)
GetExchangeStatus get exchange status to dashboard and analytics
func (*BoltSettingStorage) GetExchangeVersion ¶
func (s *BoltSettingStorage) GetExchangeVersion() (uint64, error)
func (*BoltSettingStorage) GetExternalTokenByAddress ¶
func (*BoltSettingStorage) GetExternalTokenByID ¶
func (s *BoltSettingStorage) GetExternalTokenByID(id string) (common.Token, error)
func (*BoltSettingStorage) GetExternalTokens ¶
func (s *BoltSettingStorage) GetExternalTokens() (result []common.Token, err error)
func (*BoltSettingStorage) GetFee ¶
func (s *BoltSettingStorage) GetFee(ex settings.ExchangeName) (common.ExchangeFees, error)
GetFee returns a map[tokenID]exchangeFees and error if occur
func (*BoltSettingStorage) GetInternalTokenByAddress ¶
func (*BoltSettingStorage) GetInternalTokenByID ¶
func (s *BoltSettingStorage) GetInternalTokenByID(id string) (common.Token, error)
func (*BoltSettingStorage) GetInternalTokens ¶
func (s *BoltSettingStorage) GetInternalTokens() (result []common.Token, err error)
func (*BoltSettingStorage) GetMinDeposit ¶
func (s *BoltSettingStorage) GetMinDeposit(ex settings.ExchangeName) (common.ExchangesMinDeposit, error)
GetMinDeposit returns a map[tokenID]MinDeposit and error if occur
func (*BoltSettingStorage) GetPendingTokenUpdates ¶
func (s *BoltSettingStorage) GetPendingTokenUpdates() (map[string]common.TokenUpdate, error)
func (*BoltSettingStorage) GetTokenByAddress ¶
func (*BoltSettingStorage) GetTokenByID ¶
func (s *BoltSettingStorage) GetTokenByID(id string) (common.Token, error)
func (*BoltSettingStorage) GetTokenPairs ¶
func (s *BoltSettingStorage) GetTokenPairs(ex settings.ExchangeName) ([]common.TokenPair, error)
GetTokenPairs returns a list of TokenPairs available at current exchange return error if occur
func (*BoltSettingStorage) GetTokenVersion ¶
func (s *BoltSettingStorage) GetTokenVersion() (uint64, error)
func (*BoltSettingStorage) RemovePendingTokenUpdates ¶
func (s *BoltSettingStorage) RemovePendingTokenUpdates() error
func (*BoltSettingStorage) StoreDepositAddress ¶
func (s *BoltSettingStorage) StoreDepositAddress(ex settings.ExchangeName, addrs common.ExchangeAddresses, timestamp uint64) error
StoreDepositAddress stores the depositAddress with exchangeName as key into database and return error if occur
func (*BoltSettingStorage) StoreExchangeInfo ¶
func (s *BoltSettingStorage) StoreExchangeInfo(ex settings.ExchangeName, exInfo common.ExchangeInfo, timestamp uint64) error
func (*BoltSettingStorage) StoreExchangeNotification ¶
func (*BoltSettingStorage) StoreExchangeStatus ¶
func (s *BoltSettingStorage) StoreExchangeStatus(data common.ExchangesStatus) error
func (*BoltSettingStorage) StoreFee ¶
func (s *BoltSettingStorage) StoreFee(ex settings.ExchangeName, data common.ExchangeFees, timestamp uint64) error
StoreFee stores the fee with exchangeName as key into database and return error if occur
func (*BoltSettingStorage) StoreMinDeposit ¶
func (s *BoltSettingStorage) StoreMinDeposit(ex settings.ExchangeName, data common.ExchangesMinDeposit, timestamp uint64) error
StoreMinDeposit stores the minDeposit with exchangeName as key into database and return error if occur
func (*BoltSettingStorage) StorePendingTokenUpdates ¶
func (s *BoltSettingStorage) StorePendingTokenUpdates(trs map[string]common.TokenUpdate) error
func (*BoltSettingStorage) StoreTokenPairs ¶
func (s *BoltSettingStorage) StoreTokenPairs(ex settings.ExchangeName, data []common.TokenPair, timestamp uint64) error
StoreTokenPairs store the list of TokenPairs with exchangeName as key into database and return error if occur
func (*BoltSettingStorage) UpdateToken ¶
func (s *BoltSettingStorage) UpdateToken(t common.Token, timestamp uint64) error
func (*BoltSettingStorage) UpdateTokenWithExchangeSetting ¶
func (s *BoltSettingStorage) UpdateTokenWithExchangeSetting(tokens []common.Token, exSetting map[settings.ExchangeName]*common.ExchangeSetting, availExs []settings.ExchangeName, timestamp uint64) error
UpdateTokenWithExchangeSetting will attempt to apply all the token and exchange settings as well as remove pending Token listing in one TX. reroll and return err if occur