blob: fd4a47a65a5158e775dbfc9aacfac1cf4c684501 [file] [log] [blame]
// Code generated by svcdec; DO NOT EDIT
package buildbot
import (
proto "github.com/golang/protobuf/proto"
context "golang.org/x/net/context"
)
type DecoratedBuildbot struct {
// Service is the service to decorate.
Service BuildbotServer
// Prelude is called in each method before forwarding the call to Service.
// If Prelude returns an error, it is returned without forwrading the call.
Prelude func(c context.Context, methodName string, req proto.Message) (context.Context, error)
}
func (s *DecoratedBuildbot) Search(c context.Context, req *SearchRequest) (*SearchResponse, error) {
c, err := s.Prelude(c, "Search", req)
if err != nil {
return nil, err
}
return s.Service.Search(c, req)
}
func (s *DecoratedBuildbot) Schedule(c context.Context, req *ScheduleRequest) (*ScheduleResponse, error) {
c, err := s.Prelude(c, "Schedule", req)
if err != nil {
return nil, err
}
return s.Service.Schedule(c, req)
}