forked from micro/micro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hello.pb.go
130 lines (106 loc) · 4.17 KB
/
hello.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
// Code generated by protoc-gen-go.
// source: github.com/micro/micro/examples/greeter/server/proto/hello/hello.proto
// DO NOT EDIT!
/*
Package go_micro_srv_greeter is a generated protocol buffer package.
It is generated from these files:
github.com/micro/micro/examples/greeter/server/proto/hello/hello.proto
It has these top-level messages:
Request
Response
*/
package go_micro_srv_greeter
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.
const _ = proto.ProtoPackageIsVersion1
type Request struct {
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}
func (m *Request) Reset() { *m = Request{} }
func (m *Request) String() string { return proto.CompactTextString(m) }
func (*Request) ProtoMessage() {}
func (*Request) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type Response struct {
Msg string `protobuf:"bytes,1,opt,name=msg" json:"msg,omitempty"`
}
func (m *Response) Reset() { *m = Response{} }
func (m *Response) String() string { return proto.CompactTextString(m) }
func (*Response) ProtoMessage() {}
func (*Response) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func init() {
proto.RegisterType((*Request)(nil), "go.micro.srv.greeter.Request")
proto.RegisterType((*Response)(nil), "go.micro.srv.greeter.Response")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ client.Option
var _ server.Option
// Client API for Say service
type SayClient interface {
Hello(ctx context.Context, in *Request, opts ...client.CallOption) (*Response, error)
}
type sayClient struct {
c client.Client
serviceName string
}
func NewSayClient(serviceName string, c client.Client) SayClient {
if c == nil {
c = client.NewClient()
}
if len(serviceName) == 0 {
serviceName = "go.micro.srv.greeter"
}
return &sayClient{
c: c,
serviceName: serviceName,
}
}
func (c *sayClient) Hello(ctx context.Context, in *Request, opts ...client.CallOption) (*Response, error) {
req := c.c.NewRequest(c.serviceName, "Say.Hello", in)
out := new(Response)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for Say service
type SayHandler interface {
Hello(context.Context, *Request, *Response) error
}
func RegisterSayHandler(s server.Server, hdlr SayHandler) {
s.Handle(s.NewHandler(&Say{hdlr}))
}
type Say struct {
SayHandler
}
func (h *Say) Hello(ctx context.Context, in *Request, out *Response) error {
return h.SayHandler.Hello(ctx, in, out)
}
var fileDescriptor0 = []byte{
// 181 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x72, 0x4b, 0xcf, 0x2c, 0xc9,
0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0xcd, 0x4c, 0x2e, 0xca, 0x87, 0x92, 0xa9, 0x15,
0x89, 0xb9, 0x05, 0x39, 0xa9, 0xc5, 0xfa, 0xe9, 0x45, 0xa9, 0xa9, 0x25, 0xa9, 0x45, 0xfa, 0xc5,
0xa9, 0x45, 0x65, 0x40, 0xaa, 0xa0, 0x28, 0xbf, 0x24, 0x5f, 0x3f, 0x23, 0x35, 0x27, 0x07, 0x4a,
0xea, 0x81, 0x45, 0x84, 0x44, 0xd2, 0xf3, 0xf5, 0xc0, 0x3a, 0xf5, 0x8a, 0x8b, 0xca, 0xf4, 0xa0,
0x9a, 0x94, 0x64, 0xb9, 0xd8, 0x83, 0x52, 0x0b, 0x4b, 0x53, 0x8b, 0x4b, 0x84, 0x84, 0xb8, 0x58,
0xf2, 0x12, 0x73, 0x53, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0xc0, 0x6c, 0x25, 0x19, 0x2e,
0x8e, 0xa0, 0xd4, 0xe2, 0x82, 0xfc, 0xbc, 0xe2, 0x54, 0x21, 0x01, 0x2e, 0xe6, 0xdc, 0xe2, 0x74,
0xa8, 0x34, 0x88, 0x69, 0xe4, 0xcf, 0xc5, 0x1c, 0x9c, 0x58, 0x29, 0xe4, 0xc1, 0xc5, 0xea, 0x01,
0xb2, 0x48, 0x48, 0x56, 0x0f, 0x9b, 0x1d, 0x7a, 0x50, 0x0b, 0xa4, 0xe4, 0x70, 0x49, 0x43, 0x2c,
0x50, 0x62, 0x48, 0x62, 0x03, 0x3b, 0xd5, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x9c, 0x05, 0xb2,
0xd3, 0xf4, 0x00, 0x00, 0x00,
}