General engine improvements (#437)

* Add exchange manager to engine

* Several improvements for engine and friends

1) New file.Exists func
2) gRPC TLS cert expiration date check and regeneration
3) New donation var for use across the codebase
4) Use Go log package until the logger is initialised

* Add cert tests and create dir tree if it doesn't exist for file.Write

* Link up donation address to documentation tool plus minor adjustments

* Fix remaining donation addrs

* Move non-needed reload exchange funcs

* Revert accidental config_example.json changes 🕯️

* Use go logger for logging until the logger has initiliased, otherwise no output will be seen

* Link up portfolio delay val and other fixes

* Run go mod tidy after dependabot PR

* Address nitterinos
This commit is contained in:
Adrian Gallagher
2020-02-06 12:32:01 +11:00
committed by GitHub
parent 2e6ff1c398
commit b949388994
186 changed files with 922 additions and 604 deletions

View File

@@ -94,4 +94,4 @@ When submitting a PR, please abide by our coding guidelines:
If this framework helped you in any way, or you would like to support the developers working on it, please donate Bitcoin to:
***1F5zVDgNjorJ51oGebSvNCrSAHpwGkUdDB***
***bc1qk0jareu4jytc0cfrhr5wgshsq8282awpavfahc***

View File

@@ -59,5 +59,5 @@ upper := strings.ToUpper(testString)
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -19,5 +19,5 @@ upper := strings.ToUpper(testString)
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -8,5 +8,5 @@
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -22,5 +22,5 @@ for more details
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -51,5 +51,5 @@ via Slack:
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -41,5 +41,5 @@ err := s.Connect
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -43,5 +43,5 @@ err := s.Connect
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -51,5 +51,5 @@ via Telegram:
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -213,5 +213,5 @@ servers are configured by the pool array and attempted first to last allowedDiff
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -18,5 +18,5 @@ bitcoinString := newPair.GetFirstCurrency
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -10,5 +10,5 @@
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -17,5 +17,5 @@ symbol := symbol.GetSymbolByCurrencyName(chineseYen)
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -16,5 +16,5 @@ b := translation.HasTranslation("BTC")
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -9,5 +9,5 @@
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -7,5 +7,5 @@ providers.
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -36,5 +36,5 @@ mapstringfloat, err := c.GetRates("USD", "EUR,CHY")
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -36,5 +36,5 @@ mapstringfloat, err := c.GetRates("USD", "EUR,CHY")
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -36,5 +36,5 @@ mapstringfloat, err := c.GetRates("USD", "EUR,CHY")
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{- end}}

View File

@@ -36,5 +36,5 @@ mapstringfloat, err := c.GetRates("USD", "EUR,CHY")
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -36,5 +36,5 @@ mapstringfloat, err := c.GetRates("USD", "EUR,CHY")
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -100,11 +100,12 @@ type DocumentationDetails struct {
// Attributes defines specific documentation attributes when a template is
// executed
type Attributes struct {
Name string
Contributors []Contributor
NameURL string
Year int
CapitalName string
Name string
Contributors []Contributor
NameURL string
Year int
CapitalName string
DonationAddress string
}
func main() {
@@ -199,6 +200,21 @@ func main() {
URL: "https://github.com/zeldrinn",
Contributions: 1,
},
{
Login: "starit",
URL: "https://github.com/starit",
Contributions: 1,
},
{
Login: "Jimexist",
URL: "https://github.com/Jimexist",
Contributions: 1,
},
{
Login: "lookfirst",
URL: "https://github.com/lookfirst",
Contributions: 1,
},
}...)
if verbose {
@@ -378,11 +394,12 @@ func GetContributorList(repo string) ([]Contributor, error) {
// GetDocumentationAttributes returns specific attributes for a file template
func GetDocumentationAttributes(packageName string, contributors []Contributor) Attributes {
return Attributes{
Name: GetPackageName(packageName, false),
Contributors: contributors,
NameURL: GetGoDocURL(packageName),
Year: time.Now().Year(),
CapitalName: GetPackageName(packageName, true),
Name: GetPackageName(packageName, false),
Contributors: contributors,
NameURL: GetGoDocURL(packageName),
Year: time.Now().Year(),
CapitalName: GetPackageName(packageName, true),
DonationAddress: core.BitcoinDonationAddress,
}
}

View File

@@ -6,5 +6,5 @@
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -10,5 +10,5 @@
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -102,5 +102,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -102,5 +102,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -101,5 +101,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -94,5 +94,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -94,5 +94,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -102,5 +102,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -94,5 +94,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -95,5 +95,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -95,5 +95,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -102,5 +102,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -102,5 +102,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -102,5 +102,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -37,5 +37,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -9,5 +9,5 @@ implementation
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -10,5 +10,5 @@ enabled exchanges i.e.
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -38,5 +38,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -94,5 +94,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -101,5 +101,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -94,5 +94,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -102,5 +102,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -101,5 +101,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -94,5 +94,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -94,5 +94,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -95,5 +95,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -94,5 +94,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -94,5 +94,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -6,5 +6,5 @@
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -102,5 +102,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -94,5 +94,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -9,5 +9,5 @@
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -102,5 +102,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -7,5 +7,5 @@
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -94,5 +94,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -101,5 +101,5 @@ if err != nil {
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -6,5 +6,5 @@
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -59,7 +59,7 @@ We are aiming to support the top 20 highest volume exchanges based off the [Coin
+ REST API support for all exchanges.
+ Websocket support for applicable exchanges.
+ Ability to turn off/on certain exchanges.
+ Communication packages (Slack, SMS via SMSGlobal, Telegram and SMTP)
+ Communication packages (Slack, SMS via SMSGlobal, Telegram and SMTP).
+ HTTP rate limiter package.
+ Unified API for exchange usage.
+ Customisation of HTTP client features including setting a proxy, user agent and adjusting transport settings.
@@ -69,10 +69,11 @@ We are aiming to support the top 20 highest volume exchanges based off the [Coin
+ Connection monitor package.
+ gRPC service and JSON RPC proxy. See [gRPC service](/gctrpc/README.md).
+ gRPC client. See [gctcli](/cmd/gctcli/README.md).
+ Forex currency converter packages (CurrencyConverterAPI, CurrencyLayer, Fixer.io, OpenExchangeRates)
+ Forex currency converter packages (CurrencyConverterAPI, CurrencyLayer, Fixer.io, OpenExchangeRates).
+ Packages for handling currency pairs, tickers and orderbooks.
+ Portfolio management tool; fetches balances from supported exchanges and allows for custom address tracking.
+ Basic event trigger system.
+ Scripting support. See [gctscript](/gctscript/README.md).
+ WebGUI (discontinued).
## Planned Features
@@ -120,13 +121,7 @@ copy config_example.json %APPDATA%\GoCryptoTrader\config.json
+ Make any neccessary changes to the `config.json` file.
+ Run the `gocryptotrader` binary file inside your GOPATH bin folder.
## Donations
<img src="https://github.com/thrasher-corp/gocryptotrader/blob/master/web/src/assets/donate.png?raw=true" hspace="70">
If this framework helped you in any way, or you would like to support the developers working on it, please donate Bitcoin to:
***1F5zVDgNjorJ51oGebSvNCrSAHpwGkUdDB***
{{template "donations" .}}
## Binaries

View File

@@ -5,5 +5,5 @@
If this framework helped you in any way, or you would like to support the developers working on it, please donate Bitcoin to:
***1F5zVDgNjorJ51oGebSvNCrSAHpwGkUdDB***
***{{.DonationAddress}}***
{{- end}}

View File

@@ -6,5 +6,5 @@ This folder contains a configuration test file for non-deployement test params.
It also has the code coverage test files that allow us to monitor our entire
codebase, click this link for more information [https://codecov.io/](https://codecov.io/).
{{template "contributions"}}
{{template "donations" -}}
{{end}}
{{template "donations" .}}
{{- end}}

View File

@@ -16,5 +16,5 @@ go run ./config.go -infile path/of/config.json -outfile path/of/new/config.json
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -19,5 +19,5 @@ go run gocryptotrader.go -r
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -19,5 +19,5 @@ go run exchange_template.go -name Bitmex -ws -rest
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -16,5 +16,5 @@ go run main.go
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -14,5 +14,5 @@ go run portfolio.go -infile path/to/config.json -key AESDecryptionKey
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -12,5 +12,5 @@ This folder contains an assortment of tools.
Please see individual tool's README file
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -14,5 +14,5 @@ go run main.go
### Please click GoDocs chevron above to view current GoDoc information for this package
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}

View File

@@ -62,5 +62,5 @@ Voila! You can use your Angular + Electron app in a local development environmen
|Maxime GRIS|https://github.com/maximegris |Angular4 + Electron Base|
|Shazbert|https://github.com/shazbert |Initial designs|
{{template "contributions"}}
{{template "donations"}}
{{template "donations" .}}
{{end}}