Skip to content

Commit

Permalink
Update for extracted SDK (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
plorenz committed Dec 10, 2019
1 parent 5ace6f7 commit c9b1fd6
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 46 deletions.
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ require (
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19
github.com/michaelquigley/pfxlog v0.0.0-20190813191113-2be43bd0dccc
github.com/netfoundry/ziti-edge v0.0.0-20191206152118-c8a0152d0cc7
github.com/netfoundry/ziti-edge v0.0.0-20191209152826-1b734f68ffb4
github.com/netfoundry/ziti-fabric v0.0.0-20191203174113-af4eb6e60864
github.com/netfoundry/ziti-foundation v0.0.0-20191203170231-5c1204e0e65d
github.com/netfoundry/ziti-sdk-golang v0.0.0-20191209154431-2db321362451
github.com/pborman/uuid v1.2.0
github.com/pkg/errors v0.8.1
github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563
Expand Down
7 changes: 5 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,15 @@ github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/netfoundry/ziti-edge v0.0.0-20191206152118-c8a0152d0cc7 h1:7IoGnJ1v/wYpmJU519CtltHk08qvru5AFMghKEf5s+s=
github.com/netfoundry/ziti-edge v0.0.0-20191206152118-c8a0152d0cc7/go.mod h1:BsXaKKCj1etLy3J6nyRLBnWUIztdZte44PGhkiIjgjE=
github.com/netfoundry/ziti-edge v0.0.0-20191209152826-1b734f68ffb4 h1:AB+YmEEPrUEzll+EvVrjiYXsfjlxGuFPSMcX79UrwLY=
github.com/netfoundry/ziti-edge v0.0.0-20191209152826-1b734f68ffb4/go.mod h1:b9NqxGsJSVKqW8kurADYrvPrC6OfJZAIsaeMk7v5bSg=
github.com/netfoundry/ziti-fabric v0.0.0-20191203174113-af4eb6e60864 h1:GGMpVeTIqeN+ZFC2MJX3qQNX+V9Zkda9lquhw1Toh+k=
github.com/netfoundry/ziti-fabric v0.0.0-20191203174113-af4eb6e60864/go.mod h1:ktqE4LYK1Z4MGBpP29ylnUvEsSNwk7jXBfq2K/kq4nw=
github.com/netfoundry/ziti-foundation v0.0.0-20191203170231-5c1204e0e65d h1:V6VZeV8JVUipJhZgDUNUhaJ2L6bqmosAf+SNUj6C1f0=
github.com/netfoundry/ziti-foundation v0.0.0-20191203170231-5c1204e0e65d/go.mod h1:27kvN9RZk7cpt2xba6owuXktNphq5hPK62CAiKnIS10=
github.com/netfoundry/ziti-sdk-golang v0.0.0-20191206202611-43555d2de4f9/go.mod h1:WJ49orNIo3R813cG4hfB4mww8NU4mCzQBsKQldqs/ZQ=
github.com/netfoundry/ziti-sdk-golang v0.0.0-20191209154431-2db321362451 h1:6prHYMlluujLMhwhB+M4ZcXxIp4B7T6YPImKsMFRJXU=
github.com/netfoundry/ziti-sdk-golang v0.0.0-20191209154431-2db321362451/go.mod h1:WJ49orNIo3R813cG4hfB4mww8NU4mCzQBsKQldqs/ZQ=
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
github.com/oleiade/reflections v1.0.0 h1:0ir4pc6v8/PJ0yw5AEtMddfXpWBXg9cnG7SgSoJuCgY=
github.com/oleiade/reflections v1.0.0/go.mod h1:RbATFBbKYkVdqmSFtx13Bb/tVhR0lgOBXunWTZKeL4w=
Expand Down
14 changes: 7 additions & 7 deletions test/data-maker/data-maker.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
package main

import (
"github.com/netfoundry/ziti-edge/sdk/ziti"
"fmt"
"github.com/michaelquigley/pfxlog"
"github.com/netfoundry/ziti-sdk-golang/ziti"
"github.com/sirupsen/logrus"
"io"
"log"
Expand Down Expand Up @@ -72,12 +72,12 @@ func respond(conn io.ReadWriteCloser) {
sizeUnits := 'b'

cmd := string(buf[:n])
for _, rune := range cmd {
if unicode.IsDigit(rune) {
num := (int)(rune - '0')
size = size * 10 + num
for _, ch := range cmd {
if unicode.IsDigit(ch) {
num := (int)(ch - '0')
size = size*10 + num
} else {
sizeUnits = rune
sizeUnits = ch
break
}
}
Expand Down Expand Up @@ -133,4 +133,4 @@ func fill(buf []byte) {
buf[i] = '.'
}
}
}
}
6 changes: 3 additions & 3 deletions test/multi-conn-test/multi-conn-test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
package main

import (
"github.com/netfoundry/ziti-edge/sdk/ziti"
"github.com/netfoundry/ziti-foundation/util/debugz"
"fmt"
"github.com/michaelquigley/pfxlog"
"github.com/netfoundry/ziti-foundation/util/debugz"
"github.com/netfoundry/ziti-sdk-golang/ziti"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"io"
Expand Down Expand Up @@ -85,7 +85,7 @@ func main() {
}
}

func runFunc(cmd *cobra.Command, args []string) {
func runFunc(_ *cobra.Command, args []string) {
ztContext = ziti.NewContext()

if len(args) > 0 {
Expand Down
4 changes: 2 additions & 2 deletions test/sdk-echo-server/sdk-echo-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
package main

import (
"github.com/netfoundry/ziti-edge/sdk/ziti"
"github.com/netfoundry/ziti-foundation/util/debugz"
"fmt"
"github.com/michaelquigley/pfxlog"
"github.com/netfoundry/ziti-foundation/util/debugz"
"github.com/netfoundry/ziti-sdk-golang/ziti"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"io"
Expand Down
8 changes: 4 additions & 4 deletions test/zapp-fortio-grpc-server/zapp-fortio-grpc-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
package main

import (
"github.com/netfoundry/ziti-edge/sdk/ziti"
"github.com/netfoundry/ziti-edge/sdk/ziti/edge"
"github.com/netfoundry/ziti-foundation/util/debugz"
"fmt"
"github.com/michaelquigley/pfxlog"
"github.com/netfoundry/ziti-foundation/util/debugz"
"github.com/netfoundry/ziti-sdk-golang/ziti"
"github.com/netfoundry/ziti-sdk-golang/ziti/edge"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"golang.org/x/net/context"
Expand Down Expand Up @@ -76,7 +76,7 @@ func main() {
}
}

func runFunc(cmd *cobra.Command, args []string) {
func runFunc(_ *cobra.Command, args []string) {
log := pfxlog.Logger()
ztContext := ziti.NewContext()

Expand Down
30 changes: 15 additions & 15 deletions ziti-enroller/subcmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@
limitations under the License.
*/

package subcmd

import (
"github.com/netfoundry/ziti-foundation/identity/certtools"
"github.com/netfoundry/ziti-edge/sdk/ziti/enroll"
"encoding/json"
"fmt"
"github.com/michaelquigley/pfxlog"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"io/ioutil"
"os"
"strings"
)
package subcmd

import (
"encoding/json"
"fmt"
"github.com/michaelquigley/pfxlog"
"github.com/netfoundry/ziti-foundation/identity/certtools"
"github.com/netfoundry/ziti-sdk-golang/ziti/enroll"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"io/ioutil"
"os"
"strings"
)

// global state used by all subcommands are located here for easy discovery
var verbose bool
Expand Down
6 changes: 3 additions & 3 deletions ziti-fabric-test/subcmd/loop2/dialer.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
package loop2

import (
"fmt"
"github.com/michaelquigley/pfxlog"
"github.com/netfoundry/ziti-cmd/ziti-fabric-test/subcmd/loop2/pb"
"github.com/netfoundry/ziti-fabric/xgress_transport"
"github.com/netfoundry/ziti-foundation/identity/dotziti"
"github.com/netfoundry/ziti-foundation/identity/identity"
"github.com/netfoundry/ziti-edge/sdk/ziti"
"github.com/netfoundry/ziti-foundation/transport"
"fmt"
"github.com/michaelquigley/pfxlog"
"github.com/netfoundry/ziti-sdk-golang/ziti"
"github.com/spf13/cobra"
"net"
"strings"
Expand Down
6 changes: 3 additions & 3 deletions ziti-fabric-test/subcmd/loop3/dialer.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
package loop3

import (
"fmt"
"github.com/michaelquigley/pfxlog"
loop3_pb "github.com/netfoundry/ziti-cmd/ziti-fabric-test/subcmd/loop3/pb"
"github.com/netfoundry/ziti-fabric/xgress_transport"
"github.com/netfoundry/ziti-foundation/identity/dotziti"
"github.com/netfoundry/ziti-foundation/identity/identity"
"github.com/netfoundry/ziti-edge/sdk/ziti"
"github.com/netfoundry/ziti-foundation/transport"
"fmt"
"github.com/michaelquigley/pfxlog"
"github.com/netfoundry/ziti-sdk-golang/ziti"
"github.com/spf13/cobra"
"net"
"strings"
Expand Down
12 changes: 6 additions & 6 deletions ziti-tunnel/cmd/ziti-tunnel/subcmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
package subcmd

import (
"github.com/netfoundry/ziti-edge/sdk/ziti"
"github.com/netfoundry/ziti-edge/sdk/ziti/config"
"github.com/netfoundry/ziti-edge/tunnel/dns"
"github.com/netfoundry/ziti-edge/tunnel/intercept"
"fmt"
"github.com/michaelquigley/pfxlog"
"github.com/netfoundry/ziti-edge/tunnel/dns"
"github.com/netfoundry/ziti-edge/tunnel/intercept"
"github.com/netfoundry/ziti-sdk-golang/ziti"
"github.com/netfoundry/ziti-sdk-golang/ziti/config"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"os"
Expand Down Expand Up @@ -62,7 +62,7 @@ func Execute() {
}
}

func rootPreRun(cmd *cobra.Command, args []string) {
func rootPreRun(cmd *cobra.Command, _ []string) {
verbose, err := cmd.Flags().GetBool("verbose")
if err != nil {
println("err")
Expand All @@ -83,7 +83,7 @@ func rootPreRun(cmd *cobra.Command, args []string) {
}
}

func rootPostRun(cmd *cobra.Command, args []string) {
func rootPostRun(cmd *cobra.Command, _ []string) {
log := pfxlog.Logger()

identityJson := cmd.Flag("identity").Value.String()
Expand Down

0 comments on commit c9b1fd6

Please sign in to comment.