Skip to content

Commit

Permalink
update paring link
Browse files Browse the repository at this point in the history
  • Loading branch information
KenWilliamson committed May 23, 2021
1 parent 44b8675 commit d52b5bf
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 23 deletions.
46 changes: 24 additions & 22 deletions coverage.out
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
mode: set
github.com/Ulbora/Six910BTCPayServerPlugin/mockBTCPayClient.go:17.44,19.2 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/mockBTCPayClient.go:22.49,24.2 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/mockBTCPayClient.go:27.74,29.2 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/mockBTCPayClient.go:32.70,34.2 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/mockBTCPayClient.go:37.70,39.2 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/mockBTCPayClient.go:42.94,44.2 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/mockBTCPayClient.go:47.82,49.2 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/mockBTCPayClient.go:52.77,54.2 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/mockBTCPayClient.go:57.86,59.2 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:38.34,43.2 4 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:46.44,48.2 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:51.51,71.2 13 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:74.57,97.24 17 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:100.2,109.13 9 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:97.24,99.3 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:113.66,114.21 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:114.21,119.3 4 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:122.83,123.21 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:40.34,45.2 4 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:48.44,51.2 2 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:54.44,56.2 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:59.51,79.2 13 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:82.57,105.24 17 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:108.2,118.13 10 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:105.24,107.3 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:122.66,123.21 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:123.21,128.3 4 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:132.75,134.2 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:137.53,141.16 4 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:144.2,144.12 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:141.16,143.3 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:131.83,132.21 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:132.21,137.3 4 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:141.75,143.2 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:146.53,150.16 4 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:153.2,153.12 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:150.16,152.3 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/mockBTCPayClient.go:19.44,21.2 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/mockBTCPayClient.go:24.51,26.2 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/mockBTCPayClient.go:29.49,31.2 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/mockBTCPayClient.go:34.74,36.2 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/mockBTCPayClient.go:39.70,41.2 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/mockBTCPayClient.go:44.70,46.2 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/mockBTCPayClient.go:49.94,51.2 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/mockBTCPayClient.go:54.82,56.2 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/mockBTCPayClient.go:59.77,61.2 1 1
github.com/Ulbora/Six910BTCPayServerPlugin/mockBTCPayClient.go:64.86,66.2 1 1
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ module github.com/Ulbora/Six910BTCPayServerPlugin
go 1.15

require (
github.com/Ulbora/BTCPayClient v1.0.0
github.com/Ulbora/BTCPayClient v1.0.1
github.com/Ulbora/Level_Logger v1.0.2
github.com/btcsuite/btcd v0.21.0-beta
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a // indirect
)
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
github.com/Ulbora/BTCPayClient v1.0.0 h1:hQByHlGBPmST3mQRJUXKhd8vUjxvJuLz5IMxWnAmbXQ=
github.com/Ulbora/BTCPayClient v1.0.0/go.mod h1:9+M6EUN5UQJs0nUvk8E2b7yJ5a/XJzLkiOLdC5xTHDU=
github.com/Ulbora/BTCPayClient v1.0.1 h1:f2BQ3ShK132a4/2ji0Tq1NU9PiQkensp519ghBE9Jz4=
github.com/Ulbora/BTCPayClient v1.0.1/go.mod h1:9+M6EUN5UQJs0nUvk8E2b7yJ5a/XJzLkiOLdC5xTHDU=
github.com/Ulbora/GoProxy v1.0.1 h1:7gFPaJdXDV3tFDSWYxpQx7SQmNKcZPrv4SMwxa+vFhA=
github.com/Ulbora/GoProxy v1.0.1/go.mod h1:8qICy+U1tSywRYoy9RdP+Zm6G2nN2K1YcvMupVlkIYI=
github.com/Ulbora/Level_Logger v1.0.2 h1:uhuNi1oSQ1zSDhuYQS7NEHqtR4lAYPGyW2XGwJZtxmk=
Expand Down Expand Up @@ -110,6 +112,7 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsr
github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg=
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ=
github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218=
Expand Down Expand Up @@ -420,6 +423,8 @@ golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a h1:kr2P4QFmQr29mSLA43kwrOcgcReGTfbE9N577tCTuBc=
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
Expand Down Expand Up @@ -473,6 +478,7 @@ golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/
golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand Down
7 changes: 7 additions & 0 deletions mockBTCPayClient.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package six910btcplugin

import (
"log"

cl "github.com/Ulbora/BTCPayClient"
)

Expand All @@ -18,6 +20,11 @@ func (a *MockBTCPayClient) New() cl.Client {
return a
}

//SetLogLevel SetLogLevel
func (a *MockBTCPayClient) SetLogLevel(level int) {
log.Println("Setting log level on mock to ", level)
}

//GetClientID GetClientID
func (a *MockBTCPayClient) GetClientID() string {
return a.MockClientID
Expand Down
9 changes: 9 additions & 0 deletions plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type Plugin interface {
SetClient(c cl.Client)
NewPairConnect(host string) *BTCPay
CreateInvoice(inv *cl.InvoiceReq) *cl.InvoiceResponse
SetLogLevel(level int)
}

//PayPlugin PayPlugin
Expand All @@ -32,6 +33,7 @@ type BTCPay struct {
PrivateKey string
Token string
Host string
PairingURL string
}

//New New
Expand All @@ -42,6 +44,12 @@ func (p *PayPlugin) New() Plugin {
return p
}

//SetLogLevel SetLogLevel
func (p *PayPlugin) SetLogLevel(level int) {
p.log.LogLevel = level
p.Client.SetLogLevel(level)
}

//SetClient SetClient
func (p *PayPlugin) SetClient(c cl.Client) {
p.Client = c
Expand Down Expand Up @@ -105,6 +113,7 @@ func (p *PayPlugin) NewPairConnect(host string) *BTCPay {
rtn.PrivateKey = pkh
rtn.PublicKey = pub
rtn.Token = resp.Data[0].Token
rtn.PairingURL = pairingURL

return &rtn

Expand Down
8 changes: 8 additions & 0 deletions plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,11 @@ func TestPayPlugin_CreateInvoice(t *testing.T) {
// t.Fail()

}

func TestPayPlugin_SetLogLevel(t *testing.T) {
var ppi PayPlugin
var mc MockBTCPayClient
ppi.SetClient(mc.New())
p := ppi.New()
p.SetLogLevel(3)
}
2 changes: 2 additions & 0 deletions updateMods.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# GO111MODULE=on go get -u
go get -u all ./...

0 comments on commit d52b5bf

Please sign in to comment.