-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from izumin5210/izumin5210/register-funcs
Split register funcs from genrated foo_server.go
- Loading branch information
Showing
26 changed files
with
253 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...t_ServiceGenerator-book#01-Generate_without_test-app-server-book_server_register_funcs.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package server | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/grpc-ecosystem/grpc-gateway/runtime" | ||
"google.golang.org/grpc" | ||
|
||
api_pb "testapp/api" | ||
) | ||
|
||
// RegisterWithServer implements grapiserver.Server.RegisterWithServer. | ||
func (s *bookServiceServerImpl) RegisterWithServer(grpcSvr *grpc.Server) { | ||
api_pb.RegisterBookServiceServer(grpcSvr, s) | ||
} | ||
|
||
// RegisterWithHandler implements grapiserver.Server.RegisterWithHandler. | ||
func (s *bookServiceServerImpl) RegisterWithHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { | ||
return api_pb.RegisterBookServiceHandler(ctx, mux, conn) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...r/.snapshots/Test_ServiceGenerator-book-Scaffold-app-server-book_server_register_funcs.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package server | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/grpc-ecosystem/grpc-gateway/runtime" | ||
"google.golang.org/grpc" | ||
|
||
api_pb "testapp/api" | ||
) | ||
|
||
// RegisterWithServer implements grapiserver.Server.RegisterWithServer. | ||
func (s *bookServiceServerImpl) RegisterWithServer(grpcSvr *grpc.Server) { | ||
api_pb.RegisterBookServiceServer(grpcSvr, s) | ||
} | ||
|
||
// RegisterWithHandler implements grapiserver.Server.RegisterWithHandler. | ||
func (s *bookServiceServerImpl) RegisterWithHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { | ||
return api_pb.RegisterBookServiceHandler(ctx, mux, conn) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...tor/.snapshots/Test_ServiceGenerator-foo-Generate-app-server-foo_server_register_funcs.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package server | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/grpc-ecosystem/grpc-gateway/runtime" | ||
"google.golang.org/grpc" | ||
|
||
api_pb "testapp/api" | ||
) | ||
|
||
// RegisterWithServer implements grapiserver.Server.RegisterWithServer. | ||
func (s *fooServiceServerImpl) RegisterWithServer(grpcSvr *grpc.Server) { | ||
api_pb.RegisterFooServiceServer(grpcSvr, s) | ||
} | ||
|
||
// RegisterWithHandler implements grapiserver.Server.RegisterWithHandler. | ||
func (s *fooServiceServerImpl) RegisterWithHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { | ||
return api_pb.RegisterFooServiceHandler(ctx, mux, conn) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...pshots/Test_ServiceGenerator-foo-bar-Generate-app-server-foo-bar_server_register_funcs.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package foo | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/grpc-ecosystem/grpc-gateway/runtime" | ||
"google.golang.org/grpc" | ||
|
||
foo_pb "testapp/api/foo" | ||
) | ||
|
||
// RegisterWithServer implements grapiserver.Server.RegisterWithServer. | ||
func (s *barServiceServerImpl) RegisterWithServer(grpcSvr *grpc.Server) { | ||
foo_pb.RegisterBarServiceServer(grpcSvr, s) | ||
} | ||
|
||
// RegisterWithHandler implements grapiserver.Server.RegisterWithHandler. | ||
func (s *barServiceServerImpl) RegisterWithHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { | ||
return foo_pb.RegisterBarServiceHandler(ctx, mux, conn) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...est_ServiceGenerator-foo-bar-baz-Generate-app-server-foo-bar_baz_server_register_funcs.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package foo | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/grpc-ecosystem/grpc-gateway/runtime" | ||
"google.golang.org/grpc" | ||
|
||
foo_pb "testapp/api/foo" | ||
) | ||
|
||
// RegisterWithServer implements grapiserver.Server.RegisterWithServer. | ||
func (s *barBazServiceServerImpl) RegisterWithServer(grpcSvr *grpc.Server) { | ||
foo_pb.RegisterBarBazServiceServer(grpcSvr, s) | ||
} | ||
|
||
// RegisterWithHandler implements grapiserver.Server.RegisterWithHandler. | ||
func (s *barBazServiceServerImpl) RegisterWithHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { | ||
return foo_pb.RegisterBarBazServiceHandler(ctx, mux, conn) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...-bar-baz_with_list,create,delete-Generate-app-server-foo-bar_baz_server_register_funcs.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package foo | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/grpc-ecosystem/grpc-gateway/runtime" | ||
"google.golang.org/grpc" | ||
|
||
foo_pb "testapp/api/foo" | ||
) | ||
|
||
// RegisterWithServer implements grapiserver.Server.RegisterWithServer. | ||
func (s *barBazServiceServerImpl) RegisterWithServer(grpcSvr *grpc.Server) { | ||
foo_pb.RegisterBarBazServiceServer(grpcSvr, s) | ||
} | ||
|
||
// RegisterWithHandler implements grapiserver.Server.RegisterWithHandler. | ||
func (s *barBazServiceServerImpl) RegisterWithHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { | ||
return foo_pb.RegisterBarBazServiceHandler(ctx, mux, conn) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...t,create,rename,delete,move_move-Generate-app-server-foo-bar_baz_server_register_funcs.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package foo | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/grpc-ecosystem/grpc-gateway/runtime" | ||
"google.golang.org/grpc" | ||
|
||
foo_pb "testapp/api/foo" | ||
) | ||
|
||
// RegisterWithServer implements grapiserver.Server.RegisterWithServer. | ||
func (s *barBazServiceServerImpl) RegisterWithServer(grpcSvr *grpc.Server) { | ||
foo_pb.RegisterBarBazServiceServer(grpcSvr, s) | ||
} | ||
|
||
// RegisterWithHandler implements grapiserver.Server.RegisterWithHandler. | ||
func (s *barBazServiceServerImpl) RegisterWithHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { | ||
return foo_pb.RegisterBarBazServiceHandler(ctx, mux, conn) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.