blob: cf99979fe610656add8a9527ba82e52f38d0452b [file] [log] [blame]
// Code generated by protoc-gen-go.
// source: fortune.proto
// DO NOT EDIT!
/*
Package fortune is a generated protocol buffer package.
It is generated from these files:
fortune.proto
It has these top-level messages:
FortuneGetRequest
FortuneGetResponse
FortuneAddRequest
FortuneAddResponse
FortuneHasRequest
FortuneHasResponse
*/
package fortune
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// 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.ProtoPackageIsVersion2 // please upgrade the proto package
type FortuneGetRequest struct {
}
func (m *FortuneGetRequest) Reset() { *m = FortuneGetRequest{} }
func (m *FortuneGetRequest) String() string { return proto.CompactTextString(m) }
func (*FortuneGetRequest) ProtoMessage() {}
func (*FortuneGetRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type FortuneGetResponse struct {
Fortune string `protobuf:"bytes,1,opt,name=fortune" json:"fortune,omitempty"`
}
func (m *FortuneGetResponse) Reset() { *m = FortuneGetResponse{} }
func (m *FortuneGetResponse) String() string { return proto.CompactTextString(m) }
func (*FortuneGetResponse) ProtoMessage() {}
func (*FortuneGetResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
type FortuneAddRequest struct {
Fortune string `protobuf:"bytes,1,opt,name=fortune" json:"fortune,omitempty"`
}
func (m *FortuneAddRequest) Reset() { *m = FortuneAddRequest{} }
func (m *FortuneAddRequest) String() string { return proto.CompactTextString(m) }
func (*FortuneAddRequest) ProtoMessage() {}
func (*FortuneAddRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
type FortuneAddResponse struct {
Succeeded bool `protobuf:"varint,1,opt,name=succeeded" json:"succeeded,omitempty"`
}
func (m *FortuneAddResponse) Reset() { *m = FortuneAddResponse{} }
func (m *FortuneAddResponse) String() string { return proto.CompactTextString(m) }
func (*FortuneAddResponse) ProtoMessage() {}
func (*FortuneAddResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
type FortuneHasRequest struct {
Fortune string `protobuf:"bytes,1,opt,name=fortune" json:"fortune,omitempty"`
}
func (m *FortuneHasRequest) Reset() { *m = FortuneHasRequest{} }
func (m *FortuneHasRequest) String() string { return proto.CompactTextString(m) }
func (*FortuneHasRequest) ProtoMessage() {}
func (*FortuneHasRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
type FortuneHasResponse struct {
Has bool `protobuf:"varint,1,opt,name=has" json:"has,omitempty"`
}
func (m *FortuneHasResponse) Reset() { *m = FortuneHasResponse{} }
func (m *FortuneHasResponse) String() string { return proto.CompactTextString(m) }
func (*FortuneHasResponse) ProtoMessage() {}
func (*FortuneHasResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func init() {
proto.RegisterType((*FortuneGetRequest)(nil), "fortune.FortuneGetRequest")
proto.RegisterType((*FortuneGetResponse)(nil), "fortune.FortuneGetResponse")
proto.RegisterType((*FortuneAddRequest)(nil), "fortune.FortuneAddRequest")
proto.RegisterType((*FortuneAddResponse)(nil), "fortune.FortuneAddResponse")
proto.RegisterType((*FortuneHasRequest)(nil), "fortune.FortuneHasRequest")
proto.RegisterType((*FortuneHasResponse)(nil), "fortune.FortuneHasResponse")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// 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.SupportPackageIsVersion3
// Client API for Fortune service
type FortuneClient interface {
Get(ctx context.Context, in *FortuneGetRequest, opts ...grpc.CallOption) (*FortuneGetResponse, error)
Add(ctx context.Context, in *FortuneAddRequest, opts ...grpc.CallOption) (*FortuneAddResponse, error)
Has(ctx context.Context, in *FortuneHasRequest, opts ...grpc.CallOption) (*FortuneHasResponse, error)
}
type fortuneClient struct {
cc *grpc.ClientConn
}
func NewFortuneClient(cc *grpc.ClientConn) FortuneClient {
return &fortuneClient{cc}
}
func (c *fortuneClient) Get(ctx context.Context, in *FortuneGetRequest, opts ...grpc.CallOption) (*FortuneGetResponse, error) {
out := new(FortuneGetResponse)
err := grpc.Invoke(ctx, "/fortune.Fortune/Get", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fortuneClient) Add(ctx context.Context, in *FortuneAddRequest, opts ...grpc.CallOption) (*FortuneAddResponse, error) {
out := new(FortuneAddResponse)
err := grpc.Invoke(ctx, "/fortune.Fortune/Add", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fortuneClient) Has(ctx context.Context, in *FortuneHasRequest, opts ...grpc.CallOption) (*FortuneHasResponse, error) {
out := new(FortuneHasResponse)
err := grpc.Invoke(ctx, "/fortune.Fortune/Has", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for Fortune service
type FortuneServer interface {
Get(context.Context, *FortuneGetRequest) (*FortuneGetResponse, error)
Add(context.Context, *FortuneAddRequest) (*FortuneAddResponse, error)
Has(context.Context, *FortuneHasRequest) (*FortuneHasResponse, error)
}
func RegisterFortuneServer(s *grpc.Server, srv FortuneServer) {
s.RegisterService(&_Fortune_serviceDesc, srv)
}
func _Fortune_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FortuneGetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FortuneServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/fortune.Fortune/Get",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FortuneServer).Get(ctx, req.(*FortuneGetRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Fortune_Add_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FortuneAddRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FortuneServer).Add(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/fortune.Fortune/Add",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FortuneServer).Add(ctx, req.(*FortuneAddRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Fortune_Has_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FortuneHasRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FortuneServer).Has(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/fortune.Fortune/Has",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FortuneServer).Has(ctx, req.(*FortuneHasRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Fortune_serviceDesc = grpc.ServiceDesc{
ServiceName: "fortune.Fortune",
HandlerType: (*FortuneServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Get",
Handler: _Fortune_Get_Handler,
},
{
MethodName: "Add",
Handler: _Fortune_Add_Handler,
},
{
MethodName: "Has",
Handler: _Fortune_Has_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: fileDescriptor0,
}
func init() { proto.RegisterFile("fortune.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 210 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x4d, 0xcb, 0x2f, 0x2a,
0x29, 0xcd, 0x4b, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x87, 0x72, 0x95, 0x84, 0xb9,
0x04, 0xdd, 0x20, 0x4c, 0xf7, 0xd4, 0x92, 0xa0, 0xd4, 0xc2, 0xd2, 0xd4, 0xe2, 0x12, 0x25, 0x3d,
0x2e, 0x21, 0x64, 0xc1, 0xe2, 0x82, 0xfc, 0xbc, 0xe2, 0x54, 0x21, 0x09, 0x2e, 0x98, 0x2e, 0x09,
0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0xb8, 0x21, 0xba, 0x70, 0x43, 0x1c, 0x53, 0x52, 0xa0, 0x86,
0xe0, 0x51, 0x6e, 0x04, 0x37, 0x1e, 0xac, 0x1c, 0x6a, 0xbc, 0x0c, 0x17, 0x67, 0x71, 0x69, 0x72,
0x72, 0x6a, 0x6a, 0x4a, 0x6a, 0x0a, 0x58, 0x07, 0x47, 0x10, 0x42, 0x00, 0xc9, 0x0a, 0x8f, 0xc4,
0x62, 0xc2, 0x56, 0xa8, 0xc1, 0xad, 0x00, 0x2b, 0x87, 0x5a, 0x21, 0xc0, 0xc5, 0x9c, 0x91, 0x58,
0x0c, 0x35, 0x1c, 0xc4, 0x34, 0x3a, 0xcf, 0xc8, 0xc5, 0x0e, 0x55, 0x28, 0xe4, 0xc0, 0xc5, 0x0c,
0xf4, 0xae, 0x90, 0x94, 0x1e, 0x2c, 0xa8, 0x30, 0x02, 0x46, 0x4a, 0x1a, 0xab, 0x1c, 0xc4, 0x74,
0x25, 0x06, 0x90, 0x09, 0x40, 0x1f, 0x61, 0x9a, 0x80, 0x08, 0x15, 0x4c, 0x13, 0x90, 0x82, 0x00,
0x62, 0x02, 0xd0, 0xc1, 0x98, 0x26, 0x20, 0x3c, 0x8d, 0x69, 0x02, 0x92, 0x0f, 0x95, 0x18, 0x92,
0xd8, 0xc0, 0x11, 0x6c, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xf7, 0x42, 0x87, 0x1b, 0xf1, 0x01,
0x00, 0x00,
}