Skip to content

Commit

Permalink
feat: Rename to sqlc-dev/plugin-sdk-go
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleconroy committed Nov 2, 2023
1 parent 6952bc2 commit 4e909a7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions codegen/codegen.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package codegen
import (
"context"

"github.com/sqlc-dev/sqlc-go/internal/rpc"
pb "github.com/sqlc-dev/sqlc-go/plugin"
"github.com/sqlc-dev/plugin-sdk-go/internal/rpc"
pb "github.com/sqlc-dev/plugin-sdk-go/plugin"
)

type Handler func(context.Context, *pb.GenerateRequest) (*pb.GenerateResponse, error)
Expand Down
2 changes: 1 addition & 1 deletion codegen/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package codegen
import (
"context"

pb "github.com/sqlc-dev/sqlc-go/plugin"
pb "github.com/sqlc-dev/plugin-sdk-go/plugin"
)

type server struct {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/sqlc-dev/sqlc-go
module github.com/sqlc-dev/plugin-sdk-go

go 1.19

Expand Down
5 changes: 2 additions & 3 deletions internal/rpc/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import (
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protoreflect"

"github.com/sqlc-dev/sqlc-go/plugin"
pb "github.com/sqlc-dev/sqlc-go/plugin"
pb "github.com/sqlc-dev/plugin-sdk-go/plugin"
)

func Handle(server pb.CodegenServiceServer) {
Expand Down Expand Up @@ -109,7 +108,7 @@ func (s *stdioRPCHandler) processUnaryRPC(srv *serviceInfo, md *grpc.MethodDesc)
// TODO make this generic
switch md.MethodName {
case "Generate":
var req plugin.GenerateRequest
var req pb.GenerateRequest
if err := proto.Unmarshal(reqBytes, &req); err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions sdk/sdk.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package sdk

import (
pb "github.com/sqlc-dev/sqlc-go/plugin"
pb "github.com/sqlc-dev/plugin-sdk-go/plugin"

"github.com/sqlc-dev/sqlc-go/pattern"
"github.com/sqlc-dev/plugin-sdk-go/pattern"
)

func DataType(n *pb.Identifier) string {
Expand Down

0 comments on commit 4e909a7

Please sign in to comment.