mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-21 23:16:49 +00:00
Fixes issue: https://github.com/thrasher-/gocryptotrader/issues/131 Supersedes: https://github.com/thrasher-/gocryptotrader/pull/123
37 lines
703 B
Go
37 lines
703 B
Go
package base
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// Settings enforces standard variables across the provider packages
|
|
type Settings struct {
|
|
Name string
|
|
Enabled bool
|
|
Verbose bool
|
|
RESTPollingDelay time.Duration
|
|
APIKey string
|
|
APIKeyLvl int
|
|
PrimaryProvider bool
|
|
}
|
|
|
|
// Base enforces standard variables across the provider packages
|
|
type Base struct {
|
|
Settings
|
|
}
|
|
|
|
// GetName returns name of provider
|
|
func (b *Base) GetName() string {
|
|
return b.Name
|
|
}
|
|
|
|
// IsEnabled returns true if enabled
|
|
func (b *Base) IsEnabled() bool {
|
|
return b.Enabled
|
|
}
|
|
|
|
// IsPrimaryProvider returns true if primary provider
|
|
func (b *Base) IsPrimaryProvider() bool {
|
|
return b.PrimaryProvider
|
|
}
|