go-common/app/tool/bmproto/protoc-gen-bm/example/demo.pb.go
2019-04-22 18:49:16 +08:00

2213 lines
54 KiB
Go

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: demo.proto
package v1
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
import encoding_binary "encoding/binary"
import io "io"
// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package
// Bar请求
type Bar1Req struct {
// 用户uid
//
// aaa
Uid int32 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty" form:"uid"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Bar1Req) Reset() { *m = Bar1Req{} }
func (m *Bar1Req) String() string { return proto.CompactTextString(m) }
func (*Bar1Req) ProtoMessage() {}
func (*Bar1Req) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_4b2170f3d67b04fe, []int{0}
}
func (m *Bar1Req) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Bar1Req) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Bar1Req.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *Bar1Req) XXX_Merge(src proto.Message) {
xxx_messageInfo_Bar1Req.Merge(dst, src)
}
func (m *Bar1Req) XXX_Size() int {
return m.Size()
}
func (m *Bar1Req) XXX_DiscardUnknown() {
xxx_messageInfo_Bar1Req.DiscardUnknown(m)
}
var xxx_messageInfo_Bar1Req proto.InternalMessageInfo
func (m *Bar1Req) GetUid() int32 {
if m != nil {
return m.Uid
}
return 0
}
// Bar 相应
type Bar1Resp struct {
// 用户名
// `mock:"hello"`
Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname"`
// idshaha
// `mock:"343242"`
Ids []int32 `protobuf:"varint,3,rep,packed,name=ids" json:"ids"`
List []*Bar1Resp_List `protobuf:"bytes,4,rep,name=list" json:"list"`
Alist *Bar1Resp_List `protobuf:"bytes,5,opt,name=alist" json:"alist"`
Amap map[string]*Bar1Resp_List `protobuf:"bytes,6,rep,name=amap" json:"amap" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Bar1Resp) Reset() { *m = Bar1Resp{} }
func (m *Bar1Resp) String() string { return proto.CompactTextString(m) }
func (*Bar1Resp) ProtoMessage() {}
func (*Bar1Resp) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_4b2170f3d67b04fe, []int{1}
}
func (m *Bar1Resp) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Bar1Resp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Bar1Resp.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *Bar1Resp) XXX_Merge(src proto.Message) {
xxx_messageInfo_Bar1Resp.Merge(dst, src)
}
func (m *Bar1Resp) XXX_Size() int {
return m.Size()
}
func (m *Bar1Resp) XXX_DiscardUnknown() {
xxx_messageInfo_Bar1Resp.DiscardUnknown(m)
}
var xxx_messageInfo_Bar1Resp proto.InternalMessageInfo
func (m *Bar1Resp) GetUname() string {
if m != nil {
return m.Uname
}
return ""
}
func (m *Bar1Resp) GetIds() []int32 {
if m != nil {
return m.Ids
}
return nil
}
func (m *Bar1Resp) GetList() []*Bar1Resp_List {
if m != nil {
return m.List
}
return nil
}
func (m *Bar1Resp) GetAlist() *Bar1Resp_List {
if m != nil {
return m.Alist
}
return nil
}
func (m *Bar1Resp) GetAmap() map[string]*Bar1Resp_List {
if m != nil {
return m.Amap
}
return nil
}
type Bar1Resp_List struct {
// `mock:"\"withquote"`
Hello string `protobuf:"bytes,1,opt,name=hello,proto3" json:"hello"`
World string `protobuf:"bytes,2,opt,name=world,proto3" json:"world"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Bar1Resp_List) Reset() { *m = Bar1Resp_List{} }
func (m *Bar1Resp_List) String() string { return proto.CompactTextString(m) }
func (*Bar1Resp_List) ProtoMessage() {}
func (*Bar1Resp_List) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_4b2170f3d67b04fe, []int{1, 0}
}
func (m *Bar1Resp_List) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Bar1Resp_List) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Bar1Resp_List.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *Bar1Resp_List) XXX_Merge(src proto.Message) {
xxx_messageInfo_Bar1Resp_List.Merge(dst, src)
}
func (m *Bar1Resp_List) XXX_Size() int {
return m.Size()
}
func (m *Bar1Resp_List) XXX_DiscardUnknown() {
xxx_messageInfo_Bar1Resp_List.DiscardUnknown(m)
}
var xxx_messageInfo_Bar1Resp_List proto.InternalMessageInfo
func (m *Bar1Resp_List) GetHello() string {
if m != nil {
return m.Hello
}
return ""
}
func (m *Bar1Resp_List) GetWorld() string {
if m != nil {
return m.World
}
return ""
}
// 获取房间信息请求
type GetInfoReq struct {
// 房间id
// `mock:"123"
RoomId int64 `protobuf:"varint,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty" form:"room_id" validate:"required"`
ManyIds []int64 `protobuf:"varint,2,rep,packed,name=many_ids,json=manyIds" json:"many_ids,omitempty" form:"many_ids"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetInfoReq) Reset() { *m = GetInfoReq{} }
func (m *GetInfoReq) String() string { return proto.CompactTextString(m) }
func (*GetInfoReq) ProtoMessage() {}
func (*GetInfoReq) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_4b2170f3d67b04fe, []int{2}
}
func (m *GetInfoReq) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *GetInfoReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_GetInfoReq.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *GetInfoReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetInfoReq.Merge(dst, src)
}
func (m *GetInfoReq) XXX_Size() int {
return m.Size()
}
func (m *GetInfoReq) XXX_DiscardUnknown() {
xxx_messageInfo_GetInfoReq.DiscardUnknown(m)
}
var xxx_messageInfo_GetInfoReq proto.InternalMessageInfo
func (m *GetInfoReq) GetRoomId() int64 {
if m != nil {
return m.RoomId
}
return 0
}
func (m *GetInfoReq) GetManyIds() []int64 {
if m != nil {
return m.ManyIds
}
return nil
}
// 获取房间信息响应
type GetInfoResp struct {
// 房间id 注释貌似只有放在前面才能被识别,放到字段声明后面是没用的
Roomid int64 `protobuf:"varint,1,opt,name=roomid,proto3" json:"roomid"`
// 用户名
Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname"`
// 开播时间
LiveTime string `protobuf:"bytes,3,opt,name=live_time,json=liveTime,proto3" json:"live_time"`
Amap map[int32]string `protobuf:"bytes,4,rep,name=amap" json:"amap" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// `mock:"6.02214129e23"`
Rate float32 `protobuf:"fixed32,5,opt,name=rate,proto3" json:"rate"`
// 用户mid
Mid int64 `protobuf:"varint,6,opt,name=mid,proto3" json:"mid"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetInfoResp) Reset() { *m = GetInfoResp{} }
func (m *GetInfoResp) String() string { return proto.CompactTextString(m) }
func (*GetInfoResp) ProtoMessage() {}
func (*GetInfoResp) Descriptor() ([]byte, []int) {
return fileDescriptor_demo_4b2170f3d67b04fe, []int{3}
}
func (m *GetInfoResp) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *GetInfoResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_GetInfoResp.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *GetInfoResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetInfoResp.Merge(dst, src)
}
func (m *GetInfoResp) XXX_Size() int {
return m.Size()
}
func (m *GetInfoResp) XXX_DiscardUnknown() {
xxx_messageInfo_GetInfoResp.DiscardUnknown(m)
}
var xxx_messageInfo_GetInfoResp proto.InternalMessageInfo
func (m *GetInfoResp) GetRoomid() int64 {
if m != nil {
return m.Roomid
}
return 0
}
func (m *GetInfoResp) GetUname() string {
if m != nil {
return m.Uname
}
return ""
}
func (m *GetInfoResp) GetLiveTime() string {
if m != nil {
return m.LiveTime
}
return ""
}
func (m *GetInfoResp) GetAmap() map[int32]string {
if m != nil {
return m.Amap
}
return nil
}
func (m *GetInfoResp) GetRate() float32 {
if m != nil {
return m.Rate
}
return 0
}
func (m *GetInfoResp) GetMid() int64 {
if m != nil {
return m.Mid
}
return 0
}
func init() {
proto.RegisterType((*Bar1Req)(nil), "live.livedemo.v1.Bar1Req")
proto.RegisterType((*Bar1Resp)(nil), "live.livedemo.v1.Bar1Resp")
proto.RegisterMapType((map[string]*Bar1Resp_List)(nil), "live.livedemo.v1.Bar1Resp.AmapEntry")
proto.RegisterType((*Bar1Resp_List)(nil), "live.livedemo.v1.Bar1Resp.List")
proto.RegisterType((*GetInfoReq)(nil), "live.livedemo.v1.GetInfoReq")
proto.RegisterType((*GetInfoResp)(nil), "live.livedemo.v1.GetInfoResp")
proto.RegisterMapType((map[int32]string)(nil), "live.livedemo.v1.GetInfoResp.AmapEntry")
}
// 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
// FooClient is the client API for Foo service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type FooClient interface {
// 根据uid得到uname
// `method:"post" midware:"auth,verify"`
//
// 这是详细说明
UnameByUid(ctx context.Context, in *Bar1Req, opts ...grpc.CallOption) (*Bar1Resp, error)
// 获取房间信息
// `midware:"guest"`
GetInfo(ctx context.Context, in *GetInfoReq, opts ...grpc.CallOption) (*GetInfoResp, error)
// 根据uid得到uname v3
UnameByUid3(ctx context.Context, in *Bar1Req, opts ...grpc.CallOption) (*Bar1Resp, error)
// test comment
// `internal:"true"`
UnameByUid4(ctx context.Context, in *Bar1Req, opts ...grpc.CallOption) (*Bar1Resp, error)
// `dynamic_resp:"true"`
GetDynamic(ctx context.Context, in *Bar1Req, opts ...grpc.CallOption) (*Bar1Resp, error)
// `dynamic:"true"`
Nointerface(ctx context.Context, in *Bar1Req, opts ...grpc.CallOption) (*Bar1Resp, error)
}
type fooClient struct {
cc *grpc.ClientConn
}
func NewFooClient(cc *grpc.ClientConn) FooClient {
return &fooClient{cc}
}
func (c *fooClient) UnameByUid(ctx context.Context, in *Bar1Req, opts ...grpc.CallOption) (*Bar1Resp, error) {
out := new(Bar1Resp)
err := c.cc.Invoke(ctx, "/live.livedemo.v1.Foo/uname_by_uid", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fooClient) GetInfo(ctx context.Context, in *GetInfoReq, opts ...grpc.CallOption) (*GetInfoResp, error) {
out := new(GetInfoResp)
err := c.cc.Invoke(ctx, "/live.livedemo.v1.Foo/get_info", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fooClient) UnameByUid3(ctx context.Context, in *Bar1Req, opts ...grpc.CallOption) (*Bar1Resp, error) {
out := new(Bar1Resp)
err := c.cc.Invoke(ctx, "/live.livedemo.v1.Foo/uname_by_uid3", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fooClient) UnameByUid4(ctx context.Context, in *Bar1Req, opts ...grpc.CallOption) (*Bar1Resp, error) {
out := new(Bar1Resp)
err := c.cc.Invoke(ctx, "/live.livedemo.v1.Foo/uname_by_uid4", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fooClient) GetDynamic(ctx context.Context, in *Bar1Req, opts ...grpc.CallOption) (*Bar1Resp, error) {
out := new(Bar1Resp)
err := c.cc.Invoke(ctx, "/live.livedemo.v1.Foo/get_dynamic", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fooClient) Nointerface(ctx context.Context, in *Bar1Req, opts ...grpc.CallOption) (*Bar1Resp, error) {
out := new(Bar1Resp)
err := c.cc.Invoke(ctx, "/live.livedemo.v1.Foo/nointerface", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FooServer is the server API for Foo service.
type FooServer interface {
// 根据uid得到uname
// `method:"post" midware:"auth,verify"`
//
// 这是详细说明
UnameByUid(context.Context, *Bar1Req) (*Bar1Resp, error)
// 获取房间信息
// `midware:"guest"`
GetInfo(context.Context, *GetInfoReq) (*GetInfoResp, error)
// 根据uid得到uname v3
UnameByUid3(context.Context, *Bar1Req) (*Bar1Resp, error)
// test comment
// `internal:"true"`
UnameByUid4(context.Context, *Bar1Req) (*Bar1Resp, error)
// `dynamic_resp:"true"`
GetDynamic(context.Context, *Bar1Req) (*Bar1Resp, error)
// `dynamic:"true"`
Nointerface(context.Context, *Bar1Req) (*Bar1Resp, error)
}
func RegisterFooServer(s *grpc.Server, srv FooServer) {
s.RegisterService(&_Foo_serviceDesc, srv)
}
func _Foo_UnameByUid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Bar1Req)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FooServer).UnameByUid(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/live.livedemo.v1.Foo/UnameByUid",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FooServer).UnameByUid(ctx, req.(*Bar1Req))
}
return interceptor(ctx, in, info, handler)
}
func _Foo_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetInfoReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FooServer).GetInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/live.livedemo.v1.Foo/GetInfo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FooServer).GetInfo(ctx, req.(*GetInfoReq))
}
return interceptor(ctx, in, info, handler)
}
func _Foo_UnameByUid3_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Bar1Req)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FooServer).UnameByUid3(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/live.livedemo.v1.Foo/UnameByUid3",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FooServer).UnameByUid3(ctx, req.(*Bar1Req))
}
return interceptor(ctx, in, info, handler)
}
func _Foo_UnameByUid4_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Bar1Req)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FooServer).UnameByUid4(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/live.livedemo.v1.Foo/UnameByUid4",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FooServer).UnameByUid4(ctx, req.(*Bar1Req))
}
return interceptor(ctx, in, info, handler)
}
func _Foo_GetDynamic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Bar1Req)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FooServer).GetDynamic(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/live.livedemo.v1.Foo/GetDynamic",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FooServer).GetDynamic(ctx, req.(*Bar1Req))
}
return interceptor(ctx, in, info, handler)
}
func _Foo_Nointerface_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Bar1Req)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FooServer).Nointerface(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/live.livedemo.v1.Foo/Nointerface",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FooServer).Nointerface(ctx, req.(*Bar1Req))
}
return interceptor(ctx, in, info, handler)
}
var _Foo_serviceDesc = grpc.ServiceDesc{
ServiceName: "live.livedemo.v1.Foo",
HandlerType: (*FooServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "uname_by_uid",
Handler: _Foo_UnameByUid_Handler,
},
{
MethodName: "get_info",
Handler: _Foo_GetInfo_Handler,
},
{
MethodName: "uname_by_uid3",
Handler: _Foo_UnameByUid3_Handler,
},
{
MethodName: "uname_by_uid4",
Handler: _Foo_UnameByUid4_Handler,
},
{
MethodName: "get_dynamic",
Handler: _Foo_GetDynamic_Handler,
},
{
MethodName: "nointerface",
Handler: _Foo_Nointerface_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "demo.proto",
}
// Foo2Client is the client API for Foo2 service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type Foo2Client interface {
Hello(ctx context.Context, in *Bar1Req, opts ...grpc.CallOption) (*Bar1Resp, error)
}
type foo2Client struct {
cc *grpc.ClientConn
}
func NewFoo2Client(cc *grpc.ClientConn) Foo2Client {
return &foo2Client{cc}
}
func (c *foo2Client) Hello(ctx context.Context, in *Bar1Req, opts ...grpc.CallOption) (*Bar1Resp, error) {
out := new(Bar1Resp)
err := c.cc.Invoke(ctx, "/live.livedemo.v1.Foo2/hello", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Foo2Server is the server API for Foo2 service.
type Foo2Server interface {
Hello(context.Context, *Bar1Req) (*Bar1Resp, error)
}
func RegisterFoo2Server(s *grpc.Server, srv Foo2Server) {
s.RegisterService(&_Foo2_serviceDesc, srv)
}
func _Foo2_Hello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Bar1Req)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(Foo2Server).Hello(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/live.livedemo.v1.Foo2/Hello",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(Foo2Server).Hello(ctx, req.(*Bar1Req))
}
return interceptor(ctx, in, info, handler)
}
var _Foo2_serviceDesc = grpc.ServiceDesc{
ServiceName: "live.livedemo.v1.Foo2",
HandlerType: (*Foo2Server)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "hello",
Handler: _Foo2_Hello_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "demo.proto",
}
func (m *Bar1Req) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Bar1Req) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Uid != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintDemo(dAtA, i, uint64(m.Uid))
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *Bar1Resp) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Bar1Resp) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Uname) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintDemo(dAtA, i, uint64(len(m.Uname)))
i += copy(dAtA[i:], m.Uname)
}
if len(m.Ids) > 0 {
dAtA2 := make([]byte, len(m.Ids)*10)
var j1 int
for _, num1 := range m.Ids {
num := uint64(num1)
for num >= 1<<7 {
dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
j1++
}
dAtA2[j1] = uint8(num)
j1++
}
dAtA[i] = 0x1a
i++
i = encodeVarintDemo(dAtA, i, uint64(j1))
i += copy(dAtA[i:], dAtA2[:j1])
}
if len(m.List) > 0 {
for _, msg := range m.List {
dAtA[i] = 0x22
i++
i = encodeVarintDemo(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if m.Alist != nil {
dAtA[i] = 0x2a
i++
i = encodeVarintDemo(dAtA, i, uint64(m.Alist.Size()))
n3, err := m.Alist.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n3
}
if len(m.Amap) > 0 {
for k, _ := range m.Amap {
dAtA[i] = 0x32
i++
v := m.Amap[k]
msgSize := 0
if v != nil {
msgSize = v.Size()
msgSize += 1 + sovDemo(uint64(msgSize))
}
mapSize := 1 + len(k) + sovDemo(uint64(len(k))) + msgSize
i = encodeVarintDemo(dAtA, i, uint64(mapSize))
dAtA[i] = 0xa
i++
i = encodeVarintDemo(dAtA, i, uint64(len(k)))
i += copy(dAtA[i:], k)
if v != nil {
dAtA[i] = 0x12
i++
i = encodeVarintDemo(dAtA, i, uint64(v.Size()))
n4, err := v.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n4
}
}
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *Bar1Resp_List) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Bar1Resp_List) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Hello) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintDemo(dAtA, i, uint64(len(m.Hello)))
i += copy(dAtA[i:], m.Hello)
}
if len(m.World) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintDemo(dAtA, i, uint64(len(m.World)))
i += copy(dAtA[i:], m.World)
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *GetInfoReq) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *GetInfoReq) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.RoomId != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintDemo(dAtA, i, uint64(m.RoomId))
}
if len(m.ManyIds) > 0 {
dAtA6 := make([]byte, len(m.ManyIds)*10)
var j5 int
for _, num1 := range m.ManyIds {
num := uint64(num1)
for num >= 1<<7 {
dAtA6[j5] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
j5++
}
dAtA6[j5] = uint8(num)
j5++
}
dAtA[i] = 0x12
i++
i = encodeVarintDemo(dAtA, i, uint64(j5))
i += copy(dAtA[i:], dAtA6[:j5])
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *GetInfoResp) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *GetInfoResp) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Roomid != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintDemo(dAtA, i, uint64(m.Roomid))
}
if len(m.Uname) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintDemo(dAtA, i, uint64(len(m.Uname)))
i += copy(dAtA[i:], m.Uname)
}
if len(m.LiveTime) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintDemo(dAtA, i, uint64(len(m.LiveTime)))
i += copy(dAtA[i:], m.LiveTime)
}
if len(m.Amap) > 0 {
for k, _ := range m.Amap {
dAtA[i] = 0x22
i++
v := m.Amap[k]
mapSize := 1 + sovDemo(uint64(k)) + 1 + len(v) + sovDemo(uint64(len(v)))
i = encodeVarintDemo(dAtA, i, uint64(mapSize))
dAtA[i] = 0x8
i++
i = encodeVarintDemo(dAtA, i, uint64(k))
dAtA[i] = 0x12
i++
i = encodeVarintDemo(dAtA, i, uint64(len(v)))
i += copy(dAtA[i:], v)
}
}
if m.Rate != 0 {
dAtA[i] = 0x2d
i++
encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Rate))))
i += 4
}
if m.Mid != 0 {
dAtA[i] = 0x30
i++
i = encodeVarintDemo(dAtA, i, uint64(m.Mid))
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func encodeVarintDemo(dAtA []byte, offset int, v uint64) int {
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return offset + 1
}
func (m *Bar1Req) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Uid != 0 {
n += 1 + sovDemo(uint64(m.Uid))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Bar1Resp) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Uname)
if l > 0 {
n += 1 + l + sovDemo(uint64(l))
}
if len(m.Ids) > 0 {
l = 0
for _, e := range m.Ids {
l += sovDemo(uint64(e))
}
n += 1 + sovDemo(uint64(l)) + l
}
if len(m.List) > 0 {
for _, e := range m.List {
l = e.Size()
n += 1 + l + sovDemo(uint64(l))
}
}
if m.Alist != nil {
l = m.Alist.Size()
n += 1 + l + sovDemo(uint64(l))
}
if len(m.Amap) > 0 {
for k, v := range m.Amap {
_ = k
_ = v
l = 0
if v != nil {
l = v.Size()
l += 1 + sovDemo(uint64(l))
}
mapEntrySize := 1 + len(k) + sovDemo(uint64(len(k))) + l
n += mapEntrySize + 1 + sovDemo(uint64(mapEntrySize))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Bar1Resp_List) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Hello)
if l > 0 {
n += 1 + l + sovDemo(uint64(l))
}
l = len(m.World)
if l > 0 {
n += 1 + l + sovDemo(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *GetInfoReq) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.RoomId != 0 {
n += 1 + sovDemo(uint64(m.RoomId))
}
if len(m.ManyIds) > 0 {
l = 0
for _, e := range m.ManyIds {
l += sovDemo(uint64(e))
}
n += 1 + sovDemo(uint64(l)) + l
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *GetInfoResp) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Roomid != 0 {
n += 1 + sovDemo(uint64(m.Roomid))
}
l = len(m.Uname)
if l > 0 {
n += 1 + l + sovDemo(uint64(l))
}
l = len(m.LiveTime)
if l > 0 {
n += 1 + l + sovDemo(uint64(l))
}
if len(m.Amap) > 0 {
for k, v := range m.Amap {
_ = k
_ = v
mapEntrySize := 1 + sovDemo(uint64(k)) + 1 + len(v) + sovDemo(uint64(len(v)))
n += mapEntrySize + 1 + sovDemo(uint64(mapEntrySize))
}
}
if m.Rate != 0 {
n += 5
}
if m.Mid != 0 {
n += 1 + sovDemo(uint64(m.Mid))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovDemo(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozDemo(x uint64) (n int) {
return sovDemo(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Bar1Req) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Bar1Req: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Bar1Req: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Uid", wireType)
}
m.Uid = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Uid |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipDemo(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthDemo
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Bar1Resp) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Bar1Resp: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Bar1Resp: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Uname", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthDemo
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Uname = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType == 0 {
var v int32
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.Ids = append(m.Ids, v)
} else if wireType == 2 {
var packedLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
packedLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if packedLen < 0 {
return ErrInvalidLengthDemo
}
postIndex := iNdEx + packedLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
var elementCount int
var count int
for _, integer := range dAtA {
if integer < 128 {
count++
}
}
elementCount = count
if elementCount != 0 && len(m.Ids) == 0 {
m.Ids = make([]int32, 0, elementCount)
}
for iNdEx < postIndex {
var v int32
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.Ids = append(m.Ids, v)
}
} else {
return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType)
}
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field List", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthDemo
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.List = append(m.List, &Bar1Resp_List{})
if err := m.List[len(m.List)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Alist", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthDemo
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Alist == nil {
m.Alist = &Bar1Resp_List{}
}
if err := m.Alist.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Amap", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthDemo
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Amap == nil {
m.Amap = make(map[string]*Bar1Resp_List)
}
var mapkey string
var mapvalue *Bar1Resp_List
for iNdEx < postIndex {
entryPreIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
if fieldNum == 1 {
var stringLenmapkey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapkey |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapkey := int(stringLenmapkey)
if intStringLenmapkey < 0 {
return ErrInvalidLengthDemo
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
iNdEx = postStringIndexmapkey
} else if fieldNum == 2 {
var mapmsglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
mapmsglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if mapmsglen < 0 {
return ErrInvalidLengthDemo
}
postmsgIndex := iNdEx + mapmsglen
if mapmsglen < 0 {
return ErrInvalidLengthDemo
}
if postmsgIndex > l {
return io.ErrUnexpectedEOF
}
mapvalue = &Bar1Resp_List{}
if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
return err
}
iNdEx = postmsgIndex
} else {
iNdEx = entryPreIndex
skippy, err := skipDemo(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthDemo
}
if (iNdEx + skippy) > postIndex {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
m.Amap[mapkey] = mapvalue
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipDemo(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthDemo
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Bar1Resp_List) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: List: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: List: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Hello", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthDemo
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Hello = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field World", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthDemo
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.World = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipDemo(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthDemo
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *GetInfoReq) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: GetInfoReq: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: GetInfoReq: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field RoomId", wireType)
}
m.RoomId = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.RoomId |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType == 0 {
var v int64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.ManyIds = append(m.ManyIds, v)
} else if wireType == 2 {
var packedLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
packedLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if packedLen < 0 {
return ErrInvalidLengthDemo
}
postIndex := iNdEx + packedLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
var elementCount int
var count int
for _, integer := range dAtA {
if integer < 128 {
count++
}
}
elementCount = count
if elementCount != 0 && len(m.ManyIds) == 0 {
m.ManyIds = make([]int64, 0, elementCount)
}
for iNdEx < postIndex {
var v int64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.ManyIds = append(m.ManyIds, v)
}
} else {
return fmt.Errorf("proto: wrong wireType = %d for field ManyIds", wireType)
}
default:
iNdEx = preIndex
skippy, err := skipDemo(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthDemo
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *GetInfoResp) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: GetInfoResp: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: GetInfoResp: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Roomid", wireType)
}
m.Roomid = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Roomid |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Uname", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthDemo
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Uname = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field LiveTime", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthDemo
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.LiveTime = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Amap", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthDemo
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Amap == nil {
m.Amap = make(map[int32]string)
}
var mapkey int32
var mapvalue string
for iNdEx < postIndex {
entryPreIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
if fieldNum == 1 {
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
mapkey |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
} else if fieldNum == 2 {
var stringLenmapvalue uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapvalue |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapvalue := int(stringLenmapvalue)
if intStringLenmapvalue < 0 {
return ErrInvalidLengthDemo
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
iNdEx = postStringIndexmapvalue
} else {
iNdEx = entryPreIndex
skippy, err := skipDemo(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthDemo
}
if (iNdEx + skippy) > postIndex {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
m.Amap[mapkey] = mapvalue
iNdEx = postIndex
case 5:
if wireType != 5 {
return fmt.Errorf("proto: wrong wireType = %d for field Rate", wireType)
}
var v uint32
if (iNdEx + 4) > l {
return io.ErrUnexpectedEOF
}
v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:]))
iNdEx += 4
m.Rate = float32(math.Float32frombits(v))
case 6:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType)
}
m.Mid = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDemo
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Mid |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipDemo(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthDemo
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipDemo(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowDemo
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowDemo
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
return iNdEx, nil
case 1:
iNdEx += 8
return iNdEx, nil
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowDemo
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthDemo
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowDemo
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
innerWire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
innerWireType := int(innerWire & 0x7)
if innerWireType == 4 {
break
}
next, err := skipDemo(dAtA[start:])
if err != nil {
return 0, err
}
iNdEx = start + next
}
return iNdEx, nil
case 4:
return iNdEx, nil
case 5:
iNdEx += 4
return iNdEx, nil
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
}
panic("unreachable")
}
var (
ErrInvalidLengthDemo = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowDemo = fmt.Errorf("proto: integer overflow")
)
func init() { proto.RegisterFile("demo.proto", fileDescriptor_demo_4b2170f3d67b04fe) }
var fileDescriptor_demo_4b2170f3d67b04fe = []byte{
// 704 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4b, 0x6b, 0xdb, 0x4a,
0x14, 0x46, 0x96, 0x9f, 0x27, 0x37, 0xf7, 0x86, 0xb9, 0x77, 0xe1, 0x88, 0xdc, 0x48, 0x88, 0xd2,
0x9a, 0x3e, 0x24, 0xec, 0xa4, 0xb4, 0x04, 0xfa, 0x12, 0x8d, 0xd3, 0x40, 0x57, 0x43, 0x17, 0xa5,
0x1b, 0x31, 0xb6, 0xc6, 0xce, 0x50, 0x49, 0x63, 0xeb, 0xe1, 0xd6, 0x94, 0x6e, 0xfa, 0x17, 0xfa,
0x43, 0xba, 0xec, 0x5f, 0xe8, 0xb2, 0xd0, 0xbd, 0x28, 0xa1, 0x50, 0xf0, 0x32, 0xbf, 0xa0, 0xcc,
0x8c, 0x93, 0x9a, 0x14, 0x27, 0xc5, 0xdd, 0x9c, 0x33, 0x73, 0x1e, 0xdf, 0x99, 0x73, 0xbe, 0xc3,
0x00, 0x04, 0x34, 0xe2, 0xce, 0x28, 0xe1, 0x19, 0x47, 0x1b, 0x21, 0x9b, 0x50, 0x47, 0x08, 0x69,
0x9c, 0xb4, 0x8d, 0x5b, 0x43, 0x96, 0x1d, 0xe5, 0x3d, 0xa7, 0xcf, 0x23, 0x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