Skip to content

Commit

Permalink
Moved imports to v2; Moved to Go 1.14.2
Browse files Browse the repository at this point in the history
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
  • Loading branch information
bwplotka committed May 1, 2020
1 parent eb2c8a6 commit 32306f8
Show file tree
Hide file tree
Showing 40 changed files with 91 additions and 91 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ some of them itself, but also will link to useful external repos.
`middleware` itself provides support for chaining interceptors, here's an example:

```go
import "github.com/grpc-ecosystem/go-grpc-middleware"
import "github.com/grpc-ecosystem/go-grpc-middleware/v2"

myServer := grpc.NewServer(
grpc.StreamInterceptor(middleware.ChainStreamServer(
Expand Down
2 changes: 1 addition & 1 deletion auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package auth
import (
"context"

middleware "github.com/grpc-ecosystem/go-grpc-middleware"
middleware "github.com/grpc-ecosystem/go-grpc-middleware/v2"
"google.golang.org/grpc"
)

Expand Down
8 changes: 4 additions & 4 deletions auth/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"testing"
"time"

"github.com/grpc-ecosystem/go-grpc-middleware/auth"
"github.com/grpc-ecosystem/go-grpc-middleware/grpctesting"
pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto"
"github.com/grpc-ecosystem/go-grpc-middleware/util/metautils"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/auth"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting"
pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/util/metautils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
Expand Down
4 changes: 2 additions & 2 deletions auth/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package auth_test
import (
"context"

"github.com/grpc-ecosystem/go-grpc-middleware/auth"
"github.com/grpc-ecosystem/go-grpc-middleware/interceptors/tags"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/auth"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
Expand Down
2 changes: 1 addition & 1 deletion auth/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"context"
"strings"

"github.com/grpc-ecosystem/go-grpc-middleware/util/metautils"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/util/metautils"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
Expand Down
2 changes: 1 addition & 1 deletion auth/metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"context"
"testing"

"github.com/grpc-ecosystem/go-grpc-middleware/util/metautils"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/util/metautils"
"github.com/stretchr/testify/assert"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
module github.com/grpc-ecosystem/go-grpc-middleware
module github.com/grpc-ecosystem/go-grpc-middleware/v2

go 1.14

require (
github.com/gogo/protobuf v1.2.1
Expand All @@ -10,5 +12,3 @@ require (
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 // indirect
google.golang.org/grpc v1.19.0
)

go 1.13
2 changes: 1 addition & 1 deletion grpctesting/interceptor_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"runtime"
"time"

pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto"
pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"google.golang.org/grpc"
Expand Down
2 changes: 1 addition & 1 deletion grpctesting/pingservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"io"
"testing"

pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto"
pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
Expand Down
4 changes: 2 additions & 2 deletions interceptors/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"testing"
"time"

"github.com/grpc-ecosystem/go-grpc-middleware/grpctesting"
pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting"
pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"google.golang.org/grpc"
Expand Down
4 changes: 2 additions & 2 deletions interceptors/logging/interceptors.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"io"
"time"

"github.com/grpc-ecosystem/go-grpc-middleware/interceptors"
"github.com/grpc-ecosystem/go-grpc-middleware/interceptors/tags"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags"
"google.golang.org/grpc"
)

Expand Down
12 changes: 6 additions & 6 deletions interceptors/logging/interceptors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ import (
"sync"
"testing"

middleware "github.com/grpc-ecosystem/go-grpc-middleware"
"github.com/grpc-ecosystem/go-grpc-middleware/grpctesting"
"github.com/grpc-ecosystem/go-grpc-middleware/interceptors"
"github.com/grpc-ecosystem/go-grpc-middleware/interceptors/logging"
"github.com/grpc-ecosystem/go-grpc-middleware/interceptors/tags"
middleware "github.com/grpc-ecosystem/go-grpc-middleware/v2"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"

pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto"
pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion interceptors/logging/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"io"

"github.com/golang/protobuf/proto"
"github.com/grpc-ecosystem/go-grpc-middleware/interceptors"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
Expand Down
4 changes: 2 additions & 2 deletions interceptors/logging/payload.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

"github.com/golang/protobuf/jsonpb"
"github.com/golang/protobuf/proto"
"github.com/grpc-ecosystem/go-grpc-middleware/interceptors"
"github.com/grpc-ecosystem/go-grpc-middleware/interceptors/tags"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags"
"google.golang.org/grpc"
)

Expand Down
12 changes: 6 additions & 6 deletions interceptors/logging/payload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (
"strings"
"testing"

middleware "github.com/grpc-ecosystem/go-grpc-middleware"
"github.com/grpc-ecosystem/go-grpc-middleware/grpctesting"
pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto"
"github.com/grpc-ecosystem/go-grpc-middleware/interceptors"
"github.com/grpc-ecosystem/go-grpc-middleware/interceptors/logging"
"github.com/grpc-ecosystem/go-grpc-middleware/interceptors/tags"
middleware "github.com/grpc-ecosystem/go-grpc-middleware/v2"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting"
pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
Expand Down
4 changes: 2 additions & 2 deletions interceptors/ratelimit/examples_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ratelimit_test

import (
middleware "github.com/grpc-ecosystem/go-grpc-middleware"
"github.com/grpc-ecosystem/go-grpc-middleware/interceptors/ratelimit"
middleware "github.com/grpc-ecosystem/go-grpc-middleware/v2"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/ratelimit"
"google.golang.org/grpc"
)

Expand Down
4 changes: 2 additions & 2 deletions interceptors/recovery/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package recovery_test

import (
middleware "github.com/grpc-ecosystem/go-grpc-middleware"
"github.com/grpc-ecosystem/go-grpc-middleware/interceptors/recovery"
middleware "github.com/grpc-ecosystem/go-grpc-middleware/v2"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/recovery"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
Expand Down
8 changes: 4 additions & 4 deletions interceptors/recovery/interceptors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"context"
"testing"

middleware "github.com/grpc-ecosystem/go-grpc-middleware"
"github.com/grpc-ecosystem/go-grpc-middleware/grpctesting"
pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto"
"github.com/grpc-ecosystem/go-grpc-middleware/interceptors/recovery"
middleware "github.com/grpc-ecosystem/go-grpc-middleware/v2"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting"
pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/recovery"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
Expand Down
2 changes: 1 addition & 1 deletion interceptors/retry/backoff.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package retry
import (
"time"

"github.com/grpc-ecosystem/go-grpc-middleware/util/backoffutils"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/util/backoffutils"
)

// BackoffLinear is very simple: it waits for a fixed period of time between calls.
Expand Down
4 changes: 2 additions & 2 deletions interceptors/retry/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"io"
"time"

pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto"
"github.com/grpc-ecosystem/go-grpc-middleware/interceptors/retry"
pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/retry"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
)
Expand Down
2 changes: 1 addition & 1 deletion interceptors/retry/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"sync"
"time"

"github.com/grpc-ecosystem/go-grpc-middleware/util/metautils"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/util/metautils"
"golang.org/x/net/trace"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
Expand Down
8 changes: 4 additions & 4 deletions interceptors/retry/retry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"testing"
"time"

middleware "github.com/grpc-ecosystem/go-grpc-middleware"
"github.com/grpc-ecosystem/go-grpc-middleware/grpctesting"
pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto"
"github.com/grpc-ecosystem/go-grpc-middleware/interceptors/retry"
middleware "github.com/grpc-ecosystem/go-grpc-middleware/v2"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting"
pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/retry"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
Expand Down
4 changes: 2 additions & 2 deletions interceptors/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"testing"
"time"

"github.com/grpc-ecosystem/go-grpc-middleware/grpctesting"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting"
"google.golang.org/grpc/status"

pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto"
pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"google.golang.org/grpc"
Expand Down
2 changes: 1 addition & 1 deletion interceptors/tags/examples_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package tags_test

import (
"github.com/grpc-ecosystem/go-grpc-middleware/interceptors/tags"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags"
"google.golang.org/grpc"
)

Expand Down
6 changes: 3 additions & 3 deletions interceptors/tags/fieldextractor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"testing"
"time"

pb_gogotestproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/gogotestproto"
pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto"
"github.com/grpc-ecosystem/go-grpc-middleware/interceptors/tags"
pb_gogotestproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/gogotestproto"
pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion interceptors/tags/interceptors.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"context"
"time"

"github.com/grpc-ecosystem/go-grpc-middleware/interceptors"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors"
"google.golang.org/grpc"
"google.golang.org/grpc/peer"
)
Expand Down
6 changes: 3 additions & 3 deletions interceptors/tags/interceptors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"testing"
"time"

grpctesting "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting"
pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto"
"github.com/grpc-ecosystem/go-grpc-middleware/interceptors/tags"
grpctesting "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting"
pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
Expand Down
4 changes: 2 additions & 2 deletions interceptors/tracing/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"io"
"time"

"github.com/grpc-ecosystem/go-grpc-middleware/interceptors"
"github.com/grpc-ecosystem/go-grpc-middleware/util/metautils"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/util/metautils"
"github.com/opentracing/opentracing-go"
"github.com/opentracing/opentracing-go/ext"
"github.com/opentracing/opentracing-go/log"
Expand Down
2 changes: 1 addition & 1 deletion interceptors/tracing/id_extract.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package tracing
import (
"strings"

"github.com/grpc-ecosystem/go-grpc-middleware/interceptors/tags"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags"
"github.com/opentracing/opentracing-go"
"google.golang.org/grpc/grpclog"
)
Expand Down
10 changes: 5 additions & 5 deletions interceptors/tracing/interceptors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"strings"
"testing"

middleware "github.com/grpc-ecosystem/go-grpc-middleware"
middleware "github.com/grpc-ecosystem/go-grpc-middleware/v2"
"github.com/opentracing/opentracing-go"
"github.com/opentracing/opentracing-go/mocktracer"
"github.com/stretchr/testify/assert"
Expand All @@ -22,10 +22,10 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/codes"

"github.com/grpc-ecosystem/go-grpc-middleware/grpctesting"
pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto"
"github.com/grpc-ecosystem/go-grpc-middleware/interceptors/tags"
"github.com/grpc-ecosystem/go-grpc-middleware/interceptors/tracing"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting"
pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tracing"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions interceptors/tracing/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"context"
"time"

"github.com/grpc-ecosystem/go-grpc-middleware/interceptors"
"github.com/grpc-ecosystem/go-grpc-middleware/interceptors/tags"
"github.com/grpc-ecosystem/go-grpc-middleware/util/metautils"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/util/metautils"
"github.com/opentracing/opentracing-go"
"github.com/opentracing/opentracing-go/ext"
"github.com/opentracing/opentracing-go/log"
Expand Down
6 changes: 3 additions & 3 deletions interceptors/validator/validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"io"
"testing"

"github.com/grpc-ecosystem/go-grpc-middleware/grpctesting"
pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/grpctesting/testproto"
"github.com/grpc-ecosystem/go-grpc-middleware/interceptors/validator"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting"
pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/v2/grpctesting/testproto"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/validator"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
Expand Down
Loading

0 comments on commit 32306f8

Please sign in to comment.