3 Star 9 Fork 3

Gitee 极速下载/grpc-gateway

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/grpc-ecosystem/grpc-gateway
克隆/下载
helloworld.pb.go 10.49 KB
一键复制 编辑 原始数据 按行查看 历史
Mayank 提交于 2018-11-19 16:39 . Added support for more WKT (#816)
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: helloworld.proto
package helloworld
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/protobuf/ptypes/wrappers"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
math "math"
)
// 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,proto3" json:"name,omitempty"`
StrVal *wrappers.StringValue `protobuf:"bytes,2,opt,name=strVal,proto3" json:"strVal,omitempty"`
FloatVal *wrappers.FloatValue `protobuf:"bytes,3,opt,name=floatVal,proto3" json:"floatVal,omitempty"`
DoubleVal *wrappers.DoubleValue `protobuf:"bytes,4,opt,name=doubleVal,proto3" json:"doubleVal,omitempty"`
BoolVal *wrappers.BoolValue `protobuf:"bytes,5,opt,name=boolVal,proto3" json:"boolVal,omitempty"`
BytesVal *wrappers.BytesValue `protobuf:"bytes,6,opt,name=bytesVal,proto3" json:"bytesVal,omitempty"`
Int32Val *wrappers.Int32Value `protobuf:"bytes,7,opt,name=int32Val,proto3" json:"int32Val,omitempty"`
Uint32Val *wrappers.UInt32Value `protobuf:"bytes,8,opt,name=uint32Val,proto3" json:"uint32Val,omitempty"`
Int64Val *wrappers.Int64Value `protobuf:"bytes,9,opt,name=int64Val,proto3" json:"int64Val,omitempty"`
Uint64Val *wrappers.UInt64Value `protobuf:"bytes,10,opt,name=uint64Val,proto3" json:"uint64Val,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *HelloRequest) Reset() { *m = HelloRequest{} }
func (m *HelloRequest) String() string { return proto.CompactTextString(m) }
func (*HelloRequest) ProtoMessage() {}
func (*HelloRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_17b8c58d586b62f2, []int{0}
}
func (m *HelloRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_HelloRequest.Unmarshal(m, b)
}
func (m *HelloRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_HelloRequest.Marshal(b, m, deterministic)
}
func (m *HelloRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_HelloRequest.Merge(m, src)
}
func (m *HelloRequest) XXX_Size() int {
return xxx_messageInfo_HelloRequest.Size(m)
}
func (m *HelloRequest) XXX_DiscardUnknown() {
xxx_messageInfo_HelloRequest.DiscardUnknown(m)
}
var xxx_messageInfo_HelloRequest proto.InternalMessageInfo
func (m *HelloRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *HelloRequest) GetStrVal() *wrappers.StringValue {
if m != nil {
return m.StrVal
}
return nil
}
func (m *HelloRequest) GetFloatVal() *wrappers.FloatValue {
if m != nil {
return m.FloatVal
}
return nil
}
func (m *HelloRequest) GetDoubleVal() *wrappers.DoubleValue {
if m != nil {
return m.DoubleVal
}
return nil
}
func (m *HelloRequest) GetBoolVal() *wrappers.BoolValue {
if m != nil {
return m.BoolVal
}
return nil
}
func (m *HelloRequest) GetBytesVal() *wrappers.BytesValue {
if m != nil {
return m.BytesVal
}
return nil
}
func (m *HelloRequest) GetInt32Val() *wrappers.Int32Value {
if m != nil {
return m.Int32Val
}
return nil
}
func (m *HelloRequest) GetUint32Val() *wrappers.UInt32Value {
if m != nil {
return m.Uint32Val
}
return nil
}
func (m *HelloRequest) GetInt64Val() *wrappers.Int64Value {
if m != nil {
return m.Int64Val
}
return nil
}
func (m *HelloRequest) GetUint64Val() *wrappers.UInt64Value {
if m != nil {
return m.Uint64Val
}
return nil
}
type HelloReply struct {
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *HelloReply) Reset() { *m = HelloReply{} }
func (m *HelloReply) String() string { return proto.CompactTextString(m) }
func (*HelloReply) ProtoMessage() {}
func (*HelloReply) Descriptor() ([]byte, []int) {
return fileDescriptor_17b8c58d586b62f2, []int{1}
}
func (m *HelloReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_HelloReply.Unmarshal(m, b)
}
func (m *HelloReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_HelloReply.Marshal(b, m, deterministic)
}
func (m *HelloReply) XXX_Merge(src proto.Message) {
xxx_messageInfo_HelloReply.Merge(m, src)
}
func (m *HelloReply) XXX_Size() int {
return xxx_messageInfo_HelloReply.Size(m)
}
func (m *HelloReply) XXX_DiscardUnknown() {
xxx_messageInfo_HelloReply.DiscardUnknown(m)
}
var xxx_messageInfo_HelloReply proto.InternalMessageInfo
func (m *HelloReply) GetMessage() string {
if m != nil {
return m.Message
}
return ""
}
func init() {
proto.RegisterType((*HelloRequest)(nil), "helloworld.HelloRequest")
proto.RegisterType((*HelloReply)(nil), "helloworld.HelloReply")
}
func init() { proto.RegisterFile("helloworld.proto", fileDescriptor_17b8c58d586b62f2) }
var fileDescriptor_17b8c58d586b62f2 = []byte{
// 468 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xcd, 0x8a, 0xd4, 0x40,
0x14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
0x75, 0x6b, 0xf7, 0x09, 0x8d, 0xf1, 0x3d, 0xf6, 0x08, 0x15, 0xdf, 0xa8, 0x76, 0xbf, 0xa6, 0x09,
0x6a, 0x5d, 0x51, 0x50, 0xec, 0x3b, 0xd3, 0xee, 0x63, 0xba, 0x42, 0xd5, 0xd6, 0x01, 0x35, 0xd7,
0x8b, 0x30, 0x13, 0x17, 0xde, 0x49, 0x6e, 0xf5, 0x41, 0xc3, 0xbd, 0xa0, 0xe6, 0x37, 0x14, 0xf2,
0x4c, 0x10, 0x4d, 0x50, 0x07, 0xe4, 0xd9, 0xce, 0x93, 0xf8, 0x9b, 0xff, 0x26, 0x9d, 0xd8, 0x2f,
0xa1, 0x2d, 0x66, 0xb8, 0xa6, 0xd3, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x65, 0xa5, 0x95, 0xa8,
0x13, 0x04, 0x00, 0x00,
}
// 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
// GreeterClient is the client API for Greeter service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type GreeterClient interface {
SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error)
}
type greeterClient struct {
cc *grpc.ClientConn
}
func NewGreeterClient(cc *grpc.ClientConn) GreeterClient {
return &greeterClient{cc}
}
func (c *greeterClient) SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) {
out := new(HelloReply)
err := c.cc.Invoke(ctx, "/helloworld.Greeter/SayHello", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// GreeterServer is the server API for Greeter service.
type GreeterServer interface {
SayHello(context.Context, *HelloRequest) (*HelloReply, error)
}
func RegisterGreeterServer(s *grpc.Server, srv GreeterServer) {
s.RegisterService(&_Greeter_serviceDesc, srv)
}
func _Greeter_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(HelloRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GreeterServer).SayHello(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/helloworld.Greeter/SayHello",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GreeterServer).SayHello(ctx, req.(*HelloRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Greeter_serviceDesc = grpc.ServiceDesc{
ServiceName: "helloworld.Greeter",
HandlerType: (*GreeterServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "SayHello",
Handler: _Greeter_SayHello_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "helloworld.proto",
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/grpc-gateway.git
git@gitee.com:mirrors/grpc-gateway.git
mirrors
grpc-gateway
grpc-gateway
v1.6.3

搜索帮助

0d507c66 1850385 C8b1a773 1850385