OLD | NEW |
1 // Code generated by svcdec; DO NOT EDIT | 1 // Code generated by svcdec; DO NOT EDIT |
2 | 2 |
3 package logdog | 3 package logdog |
4 | 4 |
5 import ( | 5 import ( |
6 proto "github.com/golang/protobuf/proto" | 6 proto "github.com/golang/protobuf/proto" |
7 context "golang.org/x/net/context" | 7 context "golang.org/x/net/context" |
8 | |
9 google_protobuf "github.com/luci/luci-go/common/proto/google" | |
10 ) | 8 ) |
11 | 9 |
12 type DecoratedAdmin struct { | 10 type DecoratedRegistration struct { |
13 // Service is the service to decorate. | 11 // Service is the service to decorate. |
14 » Service AdminServer | 12 » Service RegistrationServer |
15 // Prelude is called in each method before forwarding the call to Servic
e. | 13 // Prelude is called in each method before forwarding the call to Servic
e. |
16 // If Prelude returns an error, it is returned without forwarding the ca
ll. | 14 // If Prelude returns an error, it is returned without forwarding the ca
ll. |
17 Prelude func(c context.Context, methodName string, req proto.Message) (c
ontext.Context, error) | 15 Prelude func(c context.Context, methodName string, req proto.Message) (c
ontext.Context, error) |
18 } | 16 } |
19 | 17 |
20 func (s *DecoratedAdmin) SetConfig(c context.Context, req *SetConfigRequest) (*g
oogle_protobuf.Empty, error) { | 18 func (s *DecoratedRegistration) RegisterPrefix(c context.Context, req *RegisterP
refixRequest) (*RegisterPrefixResponse, error) { |
21 » c, err := s.Prelude(c, "SetConfig", req) | 19 » c, err := s.Prelude(c, "RegisterPrefix", req) |
22 if err != nil { | 20 if err != nil { |
23 return nil, err | 21 return nil, err |
24 } | 22 } |
25 » return s.Service.SetConfig(c, req) | 23 » return s.Service.RegisterPrefix(c, req) |
26 } | 24 } |
OLD | NEW |