package template

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"
)

var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

const _ = proto.ProtoPackageIsVersion2 

type TestParam struct {
	K                    string   `protobuf:"bytes,1,opt,name=k,proto3" json:"k,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

var xxx_messageInfo_TestParam proto.InternalMessageInfo

func (m *TestParam) GetK() string {
	if m != nil {
		return m.K
	}
	return ""
}

type TestRet struct {
	Err                  string   `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"`
	K                    string   `protobuf:"bytes,2,opt,name=k,proto3" json:"k,omitempty"`
	V                    string   `protobuf:"bytes,3,opt,name=v,proto3" json:"v,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

var xxx_messageInfo_TestRet proto.InternalMessageInfo

func (m *TestRet) GetErr() string {
	if m != nil {
		return m.Err
	}
	return ""
}

func (m *TestRet) GetK() string {
	if m != nil {
		return m.K
	}
	return ""
}

func (m *TestRet) GetV() string {
	if m != nil {
		return m.V
	}
	return ""
}

func init() {
	proto.RegisterType((*TestParam)(nil), "template.TestParam")
	proto.RegisterType((*TestRet)(nil), "template.TestRet")
}

var _ context.Context
var _ grpc.ClientConn

const _ = grpc.SupportPackageIsVersion4

type TemplateClient interface {
	Test(ctx context.Context, in *TestParam, opts ...grpc.CallOption) (*TestRet, error)
}

type templateClient struct {
	cc *grpc.ClientConn
}

func NewTemplateClient(cc *grpc.ClientConn) TemplateClient {
	return &templateClient{cc}
}

func (c *templateClient) Test(ctx context.Context, in *TestParam, opts ...grpc.CallOption) (*TestRet, error) {
	out := new(TestRet)
	err := c.cc.Invoke(ctx, "/template.Template/Test", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

type TemplateServer interface {
	Test(context.Context, *TestParam) (*TestRet, error)
}

func RegisterTemplateServer(s *grpc.Server, srv TemplateServer) {
	s.RegisterService(&_Template_serviceDesc, srv)
}

func _Template_Test_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(TestParam)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TemplateServer).Test(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/template.Template/Test",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TemplateServer).Test(ctx, req.(*TestParam))
	}
	return interceptor(ctx, in, info, handler)
}

var _Template_serviceDesc = grpc.ServiceDesc{
	ServiceName: "template.Template",
	HandlerType: (*TemplateServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Test",
			Handler:    _Template_Test_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pb/template/template_rpc.proto",
}

func init() {
	proto.RegisterFile("pb/template/template_rpc.proto", fileDescriptor_template_rpc_7b23dbc3175237ed)
}

var fileDescriptor_template_rpc_7b23dbc3175237ed = []byte{

	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2b, 0x48, 0xd2, 0x2f,
	0x49, 0xcd, 0x2d, 0xc8, 0x49, 0x2c, 0x49, 0x85, 0x33, 0xe2, 0x8b, 0x0a, 0x92, 0xf5, 0x0a, 0x8a,
	0xf2, 0x4b, 0xf2, 0x85, 0x38, 0x60, 0x62, 0x4a, 0x92, 0x5c, 0x9c, 0x21, 0xa9, 0xc5, 0x25, 0x01,
	0x89, 0x45, 0x89, 0xb9, 0x42, 0x3c, 0x5c, 0x8c, 0xd9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41,
	0x8c, 0xd9, 0x4a, 0xe6, 0x5c, 0xec, 0x20, 0xa9, 0xa0, 0xd4, 0x12, 0x21, 0x01, 0x2e, 0xe6, 0xd4,
	0xa2, 0x22, 0xa8, 0x14, 0x88, 0x09, 0x51, 0xca, 0x04, 0x55, 0x0a, 0xe2, 0x95, 0x49, 0x30, 0x43,
	0x78, 0x65, 0x46, 0x36, 0x5c, 0x1c, 0x21, 0x50, 0xf3, 0x85, 0x0c, 0xb8, 0x58, 0x40, 0x86, 0x08,
	0x09, 0xeb, 0xc1, 0xac, 0xd4, 0x83, 0xdb, 0x27, 0x25, 0x88, 0x2a, 0x18, 0x94, 0x5a, 0xa2, 0xc4,
	0x90, 0xc4, 0x06, 0x76, 0xa2, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x8e, 0xc1, 0x50, 0x0d, 0xc4,
	0x00, 0x00, 0x00,
}
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: pb/template/template_rpc.proto

package template

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 TestParam struct {
	K                    string   `protobuf:"bytes,1,opt,name=k,proto3" json:"k,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

var xxx_messageInfo_TestParam proto.InternalMessageInfo

func (m *TestParam) GetK() string {
	if m != nil {
		return m.K
	}
	return ""
}

type TestRet struct {
	Err                  string   `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"`
	K                    string   `protobuf:"bytes,2,opt,name=k,proto3" json:"k,omitempty"`
	V                    string   `protobuf:"bytes,3,opt,name=v,proto3" json:"v,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

var xxx_messageInfo_TestRet proto.InternalMessageInfo

func (m *TestRet) GetErr() string {
	if m != nil {
		return m.Err
	}
	return ""
}

func (m *TestRet) GetK() string {
	if m != nil {
		return m.K
	}
	return ""
}

func (m *TestRet) GetV() string {
	if m != nil {
		return m.V
	}
	return ""
}

func init() {
	proto.RegisterType((*TestParam)(nil), "template.TestParam")
	proto.RegisterType((*TestRet)(nil), "template.TestRet")
}

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

// TemplateClient is the client API for Template service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type TemplateClient interface {
	Test(ctx context.Context, in *TestParam, opts ...grpc.CallOption) (*TestRet, error)
}

type templateClient struct {
	cc *grpc.ClientConn
}

func NewTemplateClient(cc *grpc.ClientConn) TemplateClient {
	return &templateClient{cc}
}

func (c *templateClient) Test(ctx context.Context, in *TestParam, opts ...grpc.CallOption) (*TestRet, error) {
	out := new(TestRet)
	err := c.cc.Invoke(ctx, "/template.Template/Test", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// TemplateServer is the server API for Template service.
type TemplateServer interface {
	Test(context.Context, *TestParam) (*TestRet, error)
}

func RegisterTemplateServer(s *grpc.Server, srv TemplateServer) {
	s.RegisterService(&_Template_serviceDesc, srv)
}

func _Template_Test_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(TestParam)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TemplateServer).Test(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/template.Template/Test",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TemplateServer).Test(ctx, req.(*TestParam))
	}
	return interceptor(ctx, in, info, handler)
}

var _Template_serviceDesc = grpc.ServiceDesc{
	ServiceName: "template.Template",
	HandlerType: (*TemplateServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Test",
			Handler:    _Template_Test_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pb/template/template_rpc.proto",
}

func init() {
	proto.RegisterFile("pb/template/template_rpc.proto", fileDescriptor_template_rpc_7b23dbc3175237ed)
}

var fileDescriptor_template_rpc_7b23dbc3175237ed = []byte{
	// 147 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2b, 0x48, 0xd2, 0x2f,
	0x49, 0xcd, 0x2d, 0xc8, 0x49, 0x2c, 0x49, 0x85, 0x33, 0xe2, 0x8b, 0x0a, 0x92, 0xf5, 0x0a, 0x8a,
	0xf2, 0x4b, 0xf2, 0x85, 0x38, 0x60, 0x62, 0x4a, 0x92, 0x5c, 0x9c, 0x21, 0xa9, 0xc5, 0x25, 0x01,
	0x89, 0x45, 0x89, 0xb9, 0x42, 0x3c, 0x5c, 0x8c, 0xd9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41,
	0x8c, 0xd9, 0x4a, 0xe6, 0x5c, 0xec, 0x20, 0xa9, 0xa0, 0xd4, 0x12, 0x21, 0x01, 0x2e, 0xe6, 0xd4,
	0xa2, 0x22, 0xa8, 0x14, 0x88, 0x09, 0x51, 0xca, 0x04, 0x55, 0x0a, 0xe2, 0x95, 0x49, 0x30, 0x43,
	0x78, 0x65, 0x46, 0x36, 0x5c, 0x1c, 0x21, 0x50, 0xf3, 0x85, 0x0c, 0xb8, 0x58, 0x40, 0x86, 0x08,
	0x09, 0xeb, 0xc1, 0xac, 0xd4, 0x83, 0xdb, 0x27, 0x25, 0x88, 0x2a, 0x18, 0x94, 0x5a, 0xa2, 0xc4,
	0x90, 0xc4, 0x06, 0x76, 0xa2, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x8e, 0xc1, 0x50, 0x0d, 0xc4,
	0x00, 0x00, 0x00,
}
