Regenerate go-kit example with new encoder

This commit is contained in:
Manfred Touron 2016-12-15 16:30:14 +01:00
parent df709b52ac
commit d3abcca373
No known key found for this signature in database
GPG Key ID: 9CCF47DF1FD978A1
7 changed files with 10 additions and 7 deletions

View File

@ -18,6 +18,6 @@ $(TARGETS_GO): %_go:
$(TARGETS_TMPL): %_tmpl:
@mkdir -p $(dir $*)gen
protoc -I. --gotemplate_out=template_dir=templates:services "$*"
protoc -I. --gotemplate_out=destination_dir=services/$(call service_name,$*)/gen,template_dir=templates:services "$*"
@rm -rf services/services # need to investigate why this directory is created
gofmt -w $(dir $*)gen

View File

@ -2,6 +2,7 @@ package session_endpoints
import (
"fmt"
"github.com/go-kit/kit/endpoint"
pb "github.com/moul/protoc-gen-gotemplate/examples/go-kit/services/session/gen/pb"
context "golang.org/x/net/context"

View File

@ -4,7 +4,7 @@ import (
"fmt"
grpctransport "github.com/go-kit/kit/transport/grpc"
endpoint "github.com/moul/protoc-gen-gotemplate/examples/go-kit/services/session/gen/endpoints"
endpoints "github.com/moul/protoc-gen-gotemplate/examples/go-kit/services/session/gen/endpoints"
pb "github.com/moul/protoc-gen-gotemplate/examples/go-kit/services/session/gen/pb"
context "golang.org/x/net/context"
)
@ -12,7 +12,7 @@ import (
// avoid import errors
var _ = fmt.Errorf
func MakeGRPCServer(ctx context.Context, endpoints endpoint.Endpoints) pb.SessionServiceServer {
func MakeGRPCServer(ctx context.Context, endpoints endpoints.Endpoints) pb.SessionServiceServer {
options := []grpctransport.ServerOption{}
return &grpcServer{

View File

@ -2,6 +2,7 @@ package sprint_endpoints
import (
"fmt"
"github.com/go-kit/kit/endpoint"
pb "github.com/moul/protoc-gen-gotemplate/examples/go-kit/services/sprint/gen/pb"
context "golang.org/x/net/context"

View File

@ -4,7 +4,7 @@ import (
"fmt"
grpctransport "github.com/go-kit/kit/transport/grpc"
endpoint "github.com/moul/protoc-gen-gotemplate/examples/go-kit/services/sprint/gen/endpoints"
endpoints "github.com/moul/protoc-gen-gotemplate/examples/go-kit/services/sprint/gen/endpoints"
pb "github.com/moul/protoc-gen-gotemplate/examples/go-kit/services/sprint/gen/pb"
context "golang.org/x/net/context"
)
@ -12,7 +12,7 @@ import (
// avoid import errors
var _ = fmt.Errorf
func MakeGRPCServer(ctx context.Context, endpoints endpoint.Endpoints) pb.SprintServiceServer {
func MakeGRPCServer(ctx context.Context, endpoints endpoints.Endpoints) pb.SprintServiceServer {
options := []grpctransport.ServerOption{}
return &grpcServer{

View File

@ -2,6 +2,7 @@ package user_endpoints
import (
"fmt"
"github.com/go-kit/kit/endpoint"
pb "github.com/moul/protoc-gen-gotemplate/examples/go-kit/services/user/gen/pb"
context "golang.org/x/net/context"

View File

@ -4,7 +4,7 @@ import (
"fmt"
grpctransport "github.com/go-kit/kit/transport/grpc"
endpoint "github.com/moul/protoc-gen-gotemplate/examples/go-kit/services/user/gen/endpoints"
endpoints "github.com/moul/protoc-gen-gotemplate/examples/go-kit/services/user/gen/endpoints"
pb "github.com/moul/protoc-gen-gotemplate/examples/go-kit/services/user/gen/pb"
context "golang.org/x/net/context"
)
@ -12,7 +12,7 @@ import (
// avoid import errors
var _ = fmt.Errorf
func MakeGRPCServer(ctx context.Context, endpoints endpoint.Endpoints) pb.UserServiceServer {
func MakeGRPCServer(ctx context.Context, endpoints endpoints.Endpoints) pb.UserServiceServer {
options := []grpctransport.ServerOption{}
return &grpcServer{