diff --git a/coverage.out b/coverage.out index 1fe4f2e..0801633 100644 --- a/coverage.out +++ b/coverage.out @@ -1,23 +1,4 @@ mode: set -github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:43.34,48.2 4 1 -github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:51.44,54.2 2 1 -github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:57.44,59.2 1 1 -github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:62.51,83.2 14 1 -github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:86.57,109.24 17 1 -github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:112.2,123.13 11 1 -github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:109.24,111.3 1 1 -github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:127.66,128.21 1 1 -github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:128.21,133.3 4 1 -github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:136.83,137.21 1 1 -github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:137.21,143.3 5 1 -github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:147.75,149.2 1 1 -github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:152.53,156.16 4 1 -github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:159.2,159.12 1 1 -github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:156.16,158.3 1 1 -github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:163.43,165.53 2 1 -github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:168.2,168.12 1 1 -github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:165.53,167.3 1 1 -github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:172.39,174.2 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 @@ -28,3 +9,22 @@ 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 +github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:44.34,49.2 4 1 +github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:52.44,55.2 2 1 +github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:58.44,60.2 1 1 +github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:63.51,84.2 14 1 +github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:87.57,110.24 17 1 +github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:113.2,124.13 11 1 +github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:110.24,112.3 1 1 +github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:128.66,129.21 1 1 +github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:129.21,134.3 4 1 +github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:137.83,138.21 1 1 +github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:138.21,144.3 5 1 +github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:148.75,150.2 1 1 +github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:153.53,157.16 4 1 +github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:160.2,160.12 1 1 +github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:157.16,159.3 1 1 +github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:164.43,166.53 2 1 +github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:169.2,169.12 1 1 +github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:166.53,168.3 1 1 +github.com/Ulbora/Six910BTCPayServerPlugin/plugin.go:173.39,175.2 1 1 diff --git a/plugin.go b/plugin.go index d3cbaf7..1f065c4 100644 --- a/plugin.go +++ b/plugin.go @@ -16,6 +16,7 @@ import ( type Plugin interface { SetClient(c cl.Client) NewPairConnect(host string) *BTCPay + NewClient(btc *BTCPay) Plugin CreateInvoice(inv *cl.InvoiceReq) *cl.InvoiceResponse SetLogLevel(level int) IsPluginLoaded() bool diff --git a/plugin_test.go b/plugin_test.go index 8e3de6e..7e8122c 100644 --- a/plugin_test.go +++ b/plugin_test.go @@ -132,7 +132,9 @@ func TestPayPlugin_CreateInvoice(t *testing.T) { ppi.SetClient(mc.New()) - c := ppi.NewClient(&btc) + c := ppi.New() + + c.NewClient(&btc) var req cl.InvoiceReq req.Price = 100.00