// Code generated by protoc-gen-go. DO NOT EDIT.
// source: test.proto

package test // import "grpc_server/test"

/*
定义包名
*/

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

// 定义 Req 消息结构
type Req struct {
	// 类型 字段 = 标识号
	JsonStr              string   `protobuf:"bytes,1,opt,name=jsonStr,proto3" json:"jsonStr,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *Req) Reset()         { *m = Req{} }
func (m *Req) String() string { return proto.CompactTextString(m) }
func (*Req) ProtoMessage()    {}
func (*Req) Descriptor() ([]byte, []int) {
	return fileDescriptor_test_ac46a10897c7cb80, []int{0}
}
func (m *Req) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_Req.Unmarshal(m, b)
}
func (m *Req) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_Req.Marshal(b, m, deterministic)
}
func (dst *Req) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Req.Merge(dst, src)
}
func (m *Req) XXX_Size() int {
	return xxx_messageInfo_Req.Size(m)
}
func (m *Req) XXX_DiscardUnknown() {
	xxx_messageInfo_Req.DiscardUnknown(m)
}

var xxx_messageInfo_Req proto.InternalMessageInfo

func (m *Req) GetJsonStr() string {
	if m != nil {
		return m.JsonStr
	}
	return ""
}

// 定义 Res 消息结构
type Res struct {
	BackJson             string   `protobuf:"bytes,1,opt,name=backJson,proto3" json:"backJson,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *Res) Reset()         { *m = Res{} }
func (m *Res) String() string { return proto.CompactTextString(m) }
func (*Res) ProtoMessage()    {}
func (*Res) Descriptor() ([]byte, []int) {
	return fileDescriptor_test_ac46a10897c7cb80, []int{1}
}
func (m *Res) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_Res.Unmarshal(m, b)
}
func (m *Res) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_Res.Marshal(b, m, deterministic)
}
func (dst *Res) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Res.Merge(dst, src)
}
func (m *Res) XXX_Size() int {
	return xxx_messageInfo_Res.Size(m)
}
func (m *Res) XXX_DiscardUnknown() {
	xxx_messageInfo_Res.DiscardUnknown(m)
}

var xxx_messageInfo_Res proto.InternalMessageInfo

func (m *Res) GetBackJson() string {
	if m != nil {
		return m.BackJson
	}
	return ""
}

func init() {
	proto.RegisterType((*Req)(nil), "test.Req")
	proto.RegisterType((*Res)(nil), "test.Res")
}

// 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.SupportPackageIsVersion4

// WaiterClient is the client API for Waiter service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type WaiterClient interface {
	// 定义接口 (结构体可以复用)
	// 方法 (请求消息结构体) returns (返回消息结构体) {}
	DoMD5(ctx context.Context, in *Req, opts ...grpc.CallOption) (*Res, error)
}

type waiterClient struct {
	cc *grpc.ClientConn
}

func NewWaiterClient(cc *grpc.ClientConn) WaiterClient {
	return &waiterClient{cc}
}

func (c *waiterClient) DoMD5(ctx context.Context, in *Req, opts ...grpc.CallOption) (*Res, error) {
	out := new(Res)
	err := c.cc.Invoke(ctx, "/test.Waiter/DoMD5", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// WaiterServer is the server API for Waiter service.
type WaiterServer interface {
	// 定义接口 (结构体可以复用)
	// 方法 (请求消息结构体) returns (返回消息结构体) {}
	DoMD5(context.Context, *Req) (*Res, error)
}

func RegisterWaiterServer(s *grpc.Server, srv WaiterServer) {
	s.RegisterService(&_Waiter_serviceDesc, srv)
}

func _Waiter_DoMD5_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Req)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(WaiterServer).DoMD5(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/test.Waiter/DoMD5",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(WaiterServer).DoMD5(ctx, req.(*Req))
	}
	return interceptor(ctx, in, info, handler)
}

var _Waiter_serviceDesc = grpc.ServiceDesc{
	ServiceName: "test.Waiter",
	HandlerType: (*WaiterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "DoMD5",
			Handler:    _Waiter_DoMD5_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "test.proto",
}

func init() { proto.RegisterFile("test.proto", fileDescriptor_test_ac46a10897c7cb80) }

var fileDescriptor_test_ac46a10897c7cb80 = []byte{
	// 143 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2a, 0x49, 0x2d, 0x2e,
	0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x01, 0xb1, 0x95, 0xe4, 0xb9, 0x98, 0x83, 0x52,
	0x0b, 0x85, 0x24, 0xb8, 0xd8, 0xb3, 0x8a, 0xf3, 0xf3, 0x82, 0x4b, 0x8a, 0x24, 0x18, 0x15, 0x18,
	0x35, 0x38, 0x83, 0x60, 0x5c, 0x25, 0x45, 0x90, 0x82, 0x62, 0x21, 0x29, 0x2e, 0x8e, 0xa4, 0xc4,
	0xe4, 0x6c, 0xaf, 0xe2, 0xfc, 0x3c, 0xa8, 0x0a, 0x38, 0xdf, 0x48, 0x93, 0x8b, 0x2d, 0x3c, 0x31,
	0xb3, 0x24, 0xb5, 0x48, 0x48, 0x9e, 0x8b, 0xd5, 0x25, 0xdf, 0xd7, 0xc5, 0x54, 0x88, 0x53, 0x0f,
	0x6c, 0x53, 0x50, 0x6a, 0xa1, 0x14, 0x9c, 0x59, 0xac, 0xc4, 0xe0, 0x24, 0x14, 0x25, 0x90, 0x5e,
	0x54, 0x90, 0x1c, 0x5f, 0x9c, 0x5a, 0x54, 0x96, 0x5a, 0xa4, 0x0f, 0x92, 0x49, 0x62, 0x03, 0xbb,
	0xc7, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xf1, 0xba, 0xcc, 0x3d, 0x9d, 0x00, 0x00, 0x00,
}
