Skip to content

Commit

Permalink
Upgraded deps, broke apart client interface
Browse files Browse the repository at this point in the history
  • Loading branch information
mrz1836 committed Jan 24, 2022
1 parent 3a219cb commit 02f84eb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "strings"
const (

// version is the current package version
version = "v0.2.0"
version = "v0.2.1"

// defaultUserAgent is the default user agent for all requests
defaultUserAgent string = "go-bsvrates: " + version
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.16
require (
github.com/gojektech/heimdall/v6 v6.1.0
github.com/mrz1836/go-preev v0.3.0
github.com/mrz1836/go-whatsonchain v0.9.2
github.com/mrz1836/go-whatsonchain v0.9.3
github.com/shopspring/decimal v1.3.1
github.com/stretchr/testify v1.7.0
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVY
github.com/mattn/goveralls v0.0.6/go.mod h1:h8b4ow6FxSPMQHF6o2ve3qsclnffZjYTNEKmLesRwqw=
github.com/mrz1836/go-preev v0.3.0 h1:K8noknqWSOr+S3O1mJI/c6wd0TVo7Q/kpiC9hPtkl5I=
github.com/mrz1836/go-preev v0.3.0/go.mod h1:tOcsi6SnHWQqA3Ujhr9vlbaV8R9lQo3Sb1bU3Wc6hNQ=
github.com/mrz1836/go-whatsonchain v0.9.2 h1:kM46Lm2xggWBfDwzSix+EL2aJmfstS7+tXL0+V/OKCY=
github.com/mrz1836/go-whatsonchain v0.9.2/go.mod h1:qVch/m2I8ecQGqapkH4/41/mWoFO0J03R9QEPTOPSw4=
github.com/mrz1836/go-whatsonchain v0.9.3 h1:ScxaLynpqb1p4PziuNCyEEypz4RMWLBpD66IwnEc+X4=
github.com/mrz1836/go-whatsonchain v0.9.3/go.mod h1:qVch/m2I8ecQGqapkH4/41/mWoFO0J03R9QEPTOPSw4=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
Expand Down
9 changes: 7 additions & 2 deletions interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@ import (
"github.com/mrz1836/go-whatsonchain"
)

// RateService is the rate methods
type RateService interface {
GetConversion(ctx context.Context, currency Currency, amount float64) (satoshis int64, providerUsed Provider, err error)
GetRate(ctx context.Context, currency Currency) (rate float64, providerUsed Provider, err error)
}

// ClientInterface is the BSVRate client interface
type ClientInterface interface {
RateService
CoinPaprika() CoinPaprikaInterface
GetConversion(ctx context.Context, currency Currency, amount float64) (satoshis int64, providerUsed Provider, err error)
GetRate(ctx context.Context, currency Currency) (rate float64, providerUsed Provider, err error)
Preev() preev.ClientInterface
Providers() []Provider
SetCoinPaprika(client CoinPaprikaInterface)
Expand Down

0 comments on commit 02f84eb

Please sign in to comment.