This commit is contained in:
Michael Quigley 2022-08-19 10:44:02 -04:00
parent 6fa4fc2973
commit 7da2311c6c
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
2 changed files with 11 additions and 15 deletions

View File

@ -1,15 +0,0 @@
package main
import (
"github.com/go-openapi/runtime"
httptransport "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
"github.com/openziti-test-kitchen/zrok/rest_client_zrok"
)
func newZrokClient() *rest_client_zrok.Zrok {
transport := httptransport.New(endpoint, "/api/v1", nil)
transport.Producers["application/zrok.v1+json"] = runtime.JSONProducer()
transport.Consumers["application/zrok.v1+json"] = runtime.JSONConsumer()
return rest_client_zrok.New(transport, strfmt.Default)
}

View File

@ -1,7 +1,11 @@
package main
import (
"github.com/go-openapi/runtime"
httptransport "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
"github.com/michaelquigley/pfxlog"
"github.com/openziti-test-kitchen/zrok/rest_client_zrok"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"os"
@ -38,3 +42,10 @@ func main() {
panic(err)
}
}
func newZrokClient() *rest_client_zrok.Zrok {
transport := httptransport.New(endpoint, "/api/v1", nil)
transport.Producers["application/zrok.v1+json"] = runtime.JSONProducer()
transport.Consumers["application/zrok.v1+json"] = runtime.JSONConsumer()
return rest_client_zrok.New(transport, strfmt.Default)
}