blob: 1a2ac6bd8ad6005b8b88e3be5f034b3ec0b41d2d [file] [log] [blame]
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: go.chromium.org/luci/examples/appengine/helloworld_v2/apipb/helloworld.proto
package apipb
import prpc "go.chromium.org/luci/grpc/prpc"
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
func init() {
proto.RegisterFile("go.chromium.org/luci/examples/appengine/helloworld_v2/apipb/helloworld.proto", fileDescriptor_b9f5b742d8a336b6)
}
var fileDescriptor_b9f5b742d8a336b6 = []byte{
// 172 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0xce, 0x31, 0xcf, 0x82, 0x40,
0x0c, 0xc6, 0xf1, 0x77, 0xe1, 0x25, 0x61, 0x64, 0x30, 0x06, 0x37, 0x3f, 0x40, 0x9b, 0xe0, 0xe4,
0x6a, 0x34, 0x3a, 0xb8, 0xb9, 0xb9, 0x98, 0x03, 0xeb, 0x71, 0xc9, 0x1d, 0x6d, 0x2a, 0xa8, 0x7c,
0x7b, 0x03, 0x84, 0xe8, 0xe2, 0xfa, 0xfc, 0xfb, 0x4b, 0x9a, 0x1c, 0x2d, 0x43, 0x59, 0x29, 0x07,
0xd7, 0x06, 0x60, 0xb5, 0xe8, 0xdb, 0xd2, 0x21, 0xbd, 0x4c, 0x10, 0x4f, 0x77, 0x34, 0x22, 0x54,
0x5b, 0x57, 0x13, 0x56, 0xe4, 0x3d, 0x3f, 0x59, 0xfd, 0xf5, 0xf2, 0xc8, 0xd1, 0x88, 0x93, 0xe2,
0x6b, 0x03, 0x51, 0x6e, 0x38, 0x9d, 0xf7, 0x1a, 0x26, 0x0d, 0x9f, 0x9e, 0x2d, 0x2c, 0xb3, 0xf5,
0x84, 0xc3, 0x5d, 0xd1, 0xde, 0x90, 0x82, 0x34, 0xdd, 0xc8, 0xf2, 0x6d, 0x12, 0xef, 0x95, 0xa8,
0x21, 0x4d, 0xd7, 0x49, 0x74, 0x32, 0xdd, 0xc1, 0xa5, 0x33, 0x18, 0x05, 0x4c, 0x02, 0x76, 0xbd,
0xc8, 0x7e, 0xec, 0xcb, 0xbf, 0x4d, 0x7c, 0x8e, 0x86, 0xb7, 0x8a, 0xff, 0x21, 0xad, 0xde, 0x01,
0x00, 0x00, 0xff, 0xff, 0xee, 0x0e, 0x36, 0x84, 0xdc, 0x00, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// GreeterClient is the client API for Greeter service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type GreeterClient interface {
SayHi(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
}
type greeterPRPCClient struct {
client *prpc.Client
}
func NewGreeterPRPCClient(client *prpc.Client) GreeterClient {
return &greeterPRPCClient{client}
}
func (c *greeterPRPCClient) SayHi(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.client.Call(ctx, "luci.examples.helloworld.Greeter", "SayHi", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
type greeterClient struct {
cc grpc.ClientConnInterface
}
func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient {
return &greeterClient{cc}
}
func (c *greeterClient) SayHi(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/luci.examples.helloworld.Greeter/SayHi", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// GreeterServer is the server API for Greeter service.
type GreeterServer interface {
SayHi(context.Context, *empty.Empty) (*empty.Empty, error)
}
// UnimplementedGreeterServer can be embedded to have forward compatible implementations.
type UnimplementedGreeterServer struct {
}
func (*UnimplementedGreeterServer) SayHi(ctx context.Context, req *empty.Empty) (*empty.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method SayHi not implemented")
}
func RegisterGreeterServer(s prpc.Registrar, srv GreeterServer) {
s.RegisterService(&_Greeter_serviceDesc, srv)
}
func _Greeter_SayHi_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(empty.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GreeterServer).SayHi(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/luci.examples.helloworld.Greeter/SayHi",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GreeterServer).SayHi(ctx, req.(*empty.Empty))
}
return interceptor(ctx, in, info, handler)
}
var _Greeter_serviceDesc = grpc.ServiceDesc{
ServiceName: "luci.examples.helloworld.Greeter",
HandlerType: (*GreeterServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "SayHi",
Handler: _Greeter_SayHi_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "go.chromium.org/luci/examples/appengine/helloworld_v2/apipb/helloworld.proto",
}