Skip to content

Commit

Permalink
fixup! Config: Restructure versioning to share types
Browse files Browse the repository at this point in the history
  • Loading branch information
gbjk committed Oct 13, 2024
1 parent f342cac commit 73a9a54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/versions/v0/types.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package v0

// Exchange contains a sub-section of exchange config
type Exchange struct {
AvailablePairs string `json:"availablePairs,omitempty"`
EnabledPairs string `json:"enabledPairs,omitempty"`
Expand All @@ -8,6 +9,7 @@ type Exchange struct {
RequestCurrencyPairFormat *PairFormat `json:"requestCurrencyPairFormat,omitempty"`
}

// PairFormat contains pair formatting config
type PairFormat struct {
Uppercase bool `json:"uppercase"`
Delimiter string `json:"delimiter,omitempty"`
Expand Down
2 changes: 2 additions & 0 deletions config/versions/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package v1

import v0 "github.com/thrasher-corp/gocryptotrader/config/versions/v0"

// PairsManager contains exchange pair management config
type PairsManager struct {
BypassConfigFormatUpgrades bool `json:"bypassConfigFormatUpgrades"`
RequestFormat *v0.PairFormat `json:"requestFormat,omitempty"`
Expand All @@ -11,6 +12,7 @@ type PairsManager struct {
Pairs FullStore `json:"pairs"`
}

// FullStore contains a pair store by asset name
type FullStore map[string]struct {
Enabled string `json:"enabled"`
Available string `json:"available"`
Expand Down

0 comments on commit 73a9a54

Please sign in to comment.