-
Notifications
You must be signed in to change notification settings - Fork 250
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore_: reorganize thirdparty dir into categories
- Loading branch information
Showing
27 changed files
with
79 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package thirdparty | ||
|
||
//go:generate mockgen -package=mock_thirdparty -source=types.go -destination=mock/types.go | ||
|
||
type DataParsed struct { | ||
Name string `json:"name"` | ||
ID string `json:"id"` | ||
Inputs map[string]string `json:"inputs"` | ||
Signature string `json:"signature"` | ||
} | ||
|
||
type DecoderProvider interface { | ||
Run(data string) (*DataParsed, error) | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package thirdparty | ||
|
||
//go:generate mockgen -package=mock_thirdparty -source=types.go -destination=mock/market_types.go | ||
|
||
type HistoricalPrice struct { | ||
Timestamp int64 `json:"time"` | ||
Value float64 `json:"close"` | ||
} | ||
|
||
type TokenMarketValues struct { | ||
MKTCAP float64 `json:"MKTCAP"` | ||
HIGHDAY float64 `json:"HIGHDAY"` | ||
LOWDAY float64 `json:"LOWDAY"` | ||
CHANGEPCTHOUR float64 `json:"CHANGEPCTHOUR"` | ||
CHANGEPCTDAY float64 `json:"CHANGEPCTDAY"` | ||
CHANGEPCT24HOUR float64 `json:"CHANGEPCT24HOUR"` | ||
CHANGE24HOUR float64 `json:"CHANGE24HOUR"` | ||
} | ||
|
||
type TokenDetails struct { | ||
ID string `json:"Id"` | ||
Name string `json:"Name"` | ||
Symbol string `json:"Symbol"` | ||
Description string `json:"Description"` | ||
TotalCoinsMined float64 `json:"TotalCoinsMined"` | ||
AssetLaunchDate string `json:"AssetLaunchDate"` | ||
AssetWhitepaperURL string `json:"AssetWhitepaperUrl"` | ||
AssetWebsiteURL string `json:"AssetWebsiteUrl"` | ||
BuiltOn string `json:"BuiltOn"` | ||
SmartContractAddress string `json:"SmartContractAddress"` | ||
} | ||
|
||
type MarketDataProvider interface { | ||
ID() string | ||
FetchPrices(symbols []string, currencies []string) (map[string]map[string]float64, error) | ||
FetchHistoricalDailyPrices(symbol string, currency string, limit int, allData bool, aggregate int) ([]HistoricalPrice, error) | ||
FetchHistoricalHourlyPrices(symbol string, currency string, limit int, aggregate int) ([]HistoricalPrice, error) | ||
FetchTokenMarketValues(symbols []string, currency string) (map[string]TokenMarketValues, error) | ||
FetchTokenDetails(symbols []string) (map[string]TokenDetails, error) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters