Skip to content

Commit

Permalink
feat(datastore): reference new protos (#10724)
Browse files Browse the repository at this point in the history
  • Loading branch information
codyoss authored Aug 22, 2024
1 parent 5e67869 commit d8887df
Show file tree
Hide file tree
Showing 19 changed files with 22 additions and 18 deletions.
2 changes: 1 addition & 1 deletion datastore/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ import (
"net/url"
"time"

pb "cloud.google.com/go/datastore/apiv1/datastorepb"
"cloud.google.com/go/datastore/internal"
cloudinternal "cloud.google.com/go/internal"
"cloud.google.com/go/internal/trace"
"cloud.google.com/go/internal/version"
gax "github.com/googleapis/gax-go/v2"
pb "google.golang.org/genproto/googleapis/datastore/v1"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
Expand Down
2 changes: 1 addition & 1 deletion datastore/datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ import (
"reflect"
"time"

pb "cloud.google.com/go/datastore/apiv1/datastorepb"
"cloud.google.com/go/internal/trace"
"google.golang.org/api/option"
"google.golang.org/api/option/internaloption"
"google.golang.org/api/transport"
gtransport "google.golang.org/api/transport/grpc"
pb "google.golang.org/genproto/googleapis/datastore/v1"
"google.golang.org/grpc"
"google.golang.org/protobuf/types/known/timestamppb"
)
Expand Down
2 changes: 1 addition & 1 deletion datastore/datastore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ import (
"testing"
"time"

pb "cloud.google.com/go/datastore/apiv1/datastorepb"
"cloud.google.com/go/internal/testutil"
"github.com/google/go-cmp/cmp"
"google.golang.org/api/option"
"google.golang.org/api/transport/grpc"
pb "google.golang.org/genproto/googleapis/datastore/v1"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/timestamppb"
)
Expand Down
2 changes: 1 addition & 1 deletion datastore/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ import (
"testing"
"time"

pb "cloud.google.com/go/datastore/apiv1/datastorepb"
"cloud.google.com/go/internal/testutil"
"cloud.google.com/go/internal/uid"
"cloud.google.com/go/rpcreplay"
"github.com/google/go-cmp/cmp/cmpopts"
"google.golang.org/api/iterator"
"google.golang.org/api/option"
pb "google.golang.org/genproto/googleapis/datastore/v1"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
Expand Down
2 changes: 1 addition & 1 deletion datastore/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"strconv"
"strings"

pb "google.golang.org/genproto/googleapis/datastore/v1"
pb "cloud.google.com/go/datastore/apiv1/datastorepb"
"google.golang.org/protobuf/proto"
)

Expand Down
2 changes: 1 addition & 1 deletion datastore/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"time"

"cloud.google.com/go/civil"
pb "cloud.google.com/go/datastore/apiv1/datastorepb"
"cloud.google.com/go/internal/fields"
pb "google.golang.org/genproto/googleapis/datastore/v1"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion datastore/load_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
"time"

"cloud.google.com/go/civil"
pb "cloud.google.com/go/datastore/apiv1/datastorepb"
"cloud.google.com/go/internal/testutil"
"github.com/google/go-cmp/cmp/cmpopts"
pb "google.golang.org/genproto/googleapis/datastore/v1"
"google.golang.org/protobuf/types/known/timestamppb"
)

Expand Down
2 changes: 1 addition & 1 deletion datastore/mock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ import (
"reflect"
"testing"

pb "cloud.google.com/go/datastore/apiv1/datastorepb"
"cloud.google.com/go/internal/testutil"
"google.golang.org/api/option"
pb "google.golang.org/genproto/googleapis/datastore/v1"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/protobuf/encoding/prototext"
Expand Down
2 changes: 1 addition & 1 deletion datastore/mutation.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package datastore
import (
"fmt"

pb "google.golang.org/genproto/googleapis/datastore/v1"
pb "cloud.google.com/go/datastore/apiv1/datastorepb"
)

// A Mutation represents a change to a Datastore entity.
Expand Down
2 changes: 1 addition & 1 deletion datastore/mutation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package datastore
import (
"testing"

pb "cloud.google.com/go/datastore/apiv1/datastorepb"
"cloud.google.com/go/internal/testutil"
pb "google.golang.org/genproto/googleapis/datastore/v1"
)

func TestMutationProtos(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion datastore/prop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"strings"
"testing"

pb "cloud.google.com/go/datastore/apiv1/datastorepb"
"cloud.google.com/go/internal/testutil"
pb "google.golang.org/genproto/googleapis/datastore/v1"
)

func TestLoadSavePLS(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion datastore/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ import (
"strings"
"time"

pb "cloud.google.com/go/datastore/apiv1/datastorepb"
"cloud.google.com/go/internal/protostruct"
"cloud.google.com/go/internal/trace"
"google.golang.org/api/iterator"
pb "google.golang.org/genproto/googleapis/datastore/v1"
wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
)

Expand Down
2 changes: 1 addition & 1 deletion datastore/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"strings"
"testing"

pb "cloud.google.com/go/datastore/apiv1/datastorepb"
"cloud.google.com/go/internal/testutil"
"github.com/google/go-cmp/cmp"
pb "google.golang.org/genproto/googleapis/datastore/v1"
"google.golang.org/grpc"
"google.golang.org/protobuf/proto"
)
Expand Down
2 changes: 1 addition & 1 deletion datastore/save.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"unicode/utf8"

"cloud.google.com/go/civil"
pb "google.golang.org/genproto/googleapis/datastore/v1"
pb "cloud.google.com/go/datastore/apiv1/datastorepb"
llpb "google.golang.org/genproto/googleapis/type/latlng"
timepb "google.golang.org/protobuf/types/known/timestamppb"
)
Expand Down
2 changes: 1 addition & 1 deletion datastore/save_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"time"

"cloud.google.com/go/civil"
pb "cloud.google.com/go/datastore/apiv1/datastorepb"
"cloud.google.com/go/internal/testutil"
pb "google.golang.org/genproto/googleapis/datastore/v1"
)

func TestInterfaceToProtoNil(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion datastore/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
"sync"
"time"

pb "cloud.google.com/go/datastore/apiv1/datastorepb"
"cloud.google.com/go/internal/trace"
gax "github.com/googleapis/gax-go/v2"
pb "google.golang.org/genproto/googleapis/datastore/v1"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/types/known/timestamppb"
Expand Down
2 changes: 1 addition & 1 deletion datastore/transaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"testing"
"time"

pb "cloud.google.com/go/datastore/apiv1/datastorepb"
gax "github.com/googleapis/gax-go/v2"
pb "google.golang.org/genproto/googleapis/datastore/v1"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
Expand Down
2 changes: 1 addition & 1 deletion datastore/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
"testing"
"time"

pb "cloud.google.com/go/datastore/apiv1/datastorepb"
"cloud.google.com/go/internal/testutil"
"github.com/google/go-cmp/cmp"
pb "google.golang.org/genproto/googleapis/datastore/v1"
"google.golang.org/grpc"
)

Expand Down
4 changes: 4 additions & 0 deletions internal/aliasfix/mappings.go
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,10 @@ var GenprotoPkgMigration map[string]Pkg = map[string]Pkg{
ImportPath: "cloud.google.com/go/datastore/admin/apiv1/adminpb",
Status: StatusMigrated,
},
"google.golang.org/genproto/googleapis/datastore/v1": {
ImportPath: "cloud.google.com/go/datastore/apiv1/datastorepb",
Status: StatusMigrated,
},
"google.golang.org/genproto/googleapis/devtools/artifactregistry/v1": {
ImportPath: "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb",
Status: StatusMigrated,
Expand Down

0 comments on commit d8887df

Please sign in to comment.