| Index: milo/api/proto/buildbotserver_dec.go
|
| diff --git a/examples/appengine/helloworld_standard/proto/greeterserver_dec.go b/milo/api/proto/buildbotserver_dec.go
|
| similarity index 76%
|
| copy from examples/appengine/helloworld_standard/proto/greeterserver_dec.go
|
| copy to milo/api/proto/buildbotserver_dec.go
|
| index 9cfeb5b2869823d8673e0bae82f44c7394c7ef03..f97ec0559a4572b928863498f76d2cee54eb0851 100644
|
| --- a/examples/appengine/helloworld_standard/proto/greeterserver_dec.go
|
| +++ b/milo/api/proto/buildbotserver_dec.go
|
| @@ -1,15 +1,15 @@
|
| // Code generated by svcdec; DO NOT EDIT
|
|
|
| -package helloworld
|
| +package milo
|
|
|
| import (
|
| proto "github.com/golang/protobuf/proto"
|
| context "golang.org/x/net/context"
|
| )
|
|
|
| -type DecoratedGreeter struct {
|
| +type DecoratedBuildbot struct {
|
| // Service is the service to decorate.
|
| - Service GreeterServer
|
| + Service BuildbotServer
|
| // Prelude is called for each method before forwarding the call to Service.
|
| // If Prelude returns an error, it the call is skipped and the error is
|
| // processed via the Postlude (if one is defined), or it is returned directly.
|
| @@ -22,17 +22,17 @@ type DecoratedGreeter struct {
|
| Postlude func(c context.Context, methodName string, rsp proto.Message, err error) error
|
| }
|
|
|
| -func (s *DecoratedGreeter) SayHello(c context.Context, req *HelloRequest) (rsp *HelloReply, err error) {
|
| +func (s *DecoratedBuildbot) GetMaster(c context.Context, req *MasterRequest) (rsp *MasterReply, err error) {
|
| var newCtx context.Context
|
| if s.Prelude != nil {
|
| - newCtx, err = s.Prelude(c, "SayHello", req)
|
| + newCtx, err = s.Prelude(c, "GetMaster", req)
|
| }
|
| if err == nil {
|
| c = newCtx
|
| - rsp, err = s.Service.SayHello(c, req)
|
| + rsp, err = s.Service.GetMaster(c, req)
|
| }
|
| if s.Postlude != nil {
|
| - err = s.Postlude(c, "SayHello", rsp, err)
|
| + err = s.Postlude(c, "GetMaster", rsp, err)
|
| }
|
| return
|
| }
|
|
|