|
// Code generated by protoc-gen-go. DO NOT EDIT. // source: hello_world.proto
/*
Package hello_world is a generated protocol buffer package.
It is generated from these files:
hello_world.proto
It has these top-level messages:
HelloRequest
HelloResponse
*/
package hello_world
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
client "github.com/micro/go-micro/client"
server "github.com/micro/go-micro/server"
context "golang.org/x/net/context"
)
// 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 HelloRequest struct {
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}
func (m *HelloRequest) Reset() { *m = HelloRequest{} }
func (m *HelloRequest) String() string { return proto.CompactTextString(m) }
func (*HelloRequest) ProtoMessage() {}
func (*HelloRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *HelloRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
type HelloResponse struct {
Greeting string `protobuf:"bytes,2,opt,name=greeting" json:"greeting,omitempty"`
}
func (m *HelloResponse) Reset() { *m = HelloResponse{} }
func (m *HelloResponse) String() string { return proto.CompactTextString(m) }
func (*HelloResponse) ProtoMessage() {}
func (*HelloResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *HelloResponse) GetGreeting() string {
if m != nil {
return m.Greeting
}
return ""
}
func init() {
proto.RegisterType((*HelloRequest)(nil), "HelloRequest")
proto.RegisterType((*HelloResponse)(nil), "HelloResponse")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ client.Option
var _ server.Option
// Client API for HelloWorld service
type HelloWorldClient interface {
Hello(ctx context.Context, in *HelloRequest, opts ...client.CallOption) (*HelloResponse, error)
}
type helloWorldClient struct {
c client.Client
serviceName string
}
func NewHelloWorldClient(serviceName string, c client.Client) HelloWorldClient {
if c == nil {
c = client.NewClient()
}
if len(serviceName) == 0 {
serviceName = "helloworld"
}
return &helloWorldClient{
c: c,
serviceName: serviceName,
}
}
func (c *helloWorldClient) Hello(ctx context.Context, in *HelloRequest, opts ...client.CallOption) (*HelloResponse, error) {
req := c.c.NewRequest(c.serviceName, "HelloWorld.Hello", in)
out := new(HelloResponse)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for HelloWorld service
type HelloWorldHandler interface {
Hello(context.Context, *HelloRequest, *HelloResponse) error
}
func RegisterHelloWorldHandler(s server.Server, hdlr HelloWorldHandler, opts ...server.HandlerOption) {
s.Handle(s.NewHandler(&HelloWorld{hdlr}, opts...))
}
type HelloWorld struct {
HelloWorldHandler
}
func (h *HelloWorld) Hello(ctx context.Context, in *HelloRequest, out *HelloResponse) error {
return h.HelloWorldHandler.Hello(ctx, in, out)
}
func init() { proto.RegisterFile("hello_world.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 136 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcc, 0x48, 0xcd, 0xc9,
0xc9, 0x8f, 0x2f, 0xcf, 0x2f, 0xca, 0x49, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x57, 0x52, 0xe2,
0xe2, 0xf1, 0x00, 0x09, 0x06, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x08, 0x09, 0x71, 0xb1, 0xe4,
0x25, 0xe6, 0xa6, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x81, 0xd9, 0x4a, 0xda, 0x5c, 0xbc,
0x50, 0x35, 0xc5, 0x05, 0xf9, 0x79, 0xc5, 0xa9, 0x42, 0x52, 0x5c, 0x1c, 0xe9, 0x45, 0xa9, 0xa9,
0x25, 0x99, 0x79, 0xe9, 0x12, 0x4c, 0x60, 0x85, 0x70, 0xbe, 0x91, 0x19, 0x17, 0x17, 0x58, 0x71,
0x38, 0xc8, 0x12, 0x21, 0x0d, 0x2e, 0x56, 0x30, 0x4f, 0x88, 0x57, 0x0f, 0xd9, 0x1a, 0x29, 0x3e,
0x3d, 0x14, 0x13, 0x95, 0x18, 0x92, 0xd8, 0xc0, 0xee, 0x31, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff,
0x7e, 0xdc, 0x2e, 0x9b, 0xa4, 0x00, 0x00, 0x00,
}
|
|