1 Star 0 Fork 0

nggs/micro

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
version.pb.go 14.27 KB
一键复制 编辑 原始数据 按行查看 历史
李文建 提交于 2020-04-05 00:11 +08:00 . 整合其他模块代码
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: version.proto
package msg
import (
encoding_binary "encoding/binary"
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
io "io"
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.GoGoProtoPackageIsVersion2 // please upgrade the proto package
/// 版本信息
type VersionInfo struct {
/// 测试协议5字段1
Content string `protobuf:"bytes,1,opt,name=Content,proto3" json:"Content,omitempty"`
/// 测试协议5字段2
D float64 `protobuf:"fixed64,2,opt,name=D,proto3" json:"D,omitempty"`
/// 测试协议5字段3
F float32 `protobuf:"fixed32,3,opt,name=F,proto3" json:"F,omitempty"`
/// 测试协议5字段4
I32 int32 `protobuf:"varint,4,opt,name=I32,proto3" json:"I32,omitempty"`
/// 测试协议5字段5
I64 int64 `protobuf:"varint,5,opt,name=I64,proto3" json:"I64,omitempty"`
/// 测试协议5字段6
Ui32 uint32 `protobuf:"varint,6,opt,name=Ui32,proto3" json:"Ui32,omitempty"`
/// 测试协议5字段7
Ui64 uint64 `protobuf:"varint,7,opt,name=Ui64,proto3" json:"Ui64,omitempty"`
/// 测试协议5字段8
B bool `protobuf:"varint,8,opt,name=B,proto3" json:"B,omitempty"`
/// 测试协议5字段9
Bytes []byte `protobuf:"bytes,9,opt,name=Bytes,proto3" json:"Bytes,omitempty"`
}
func (m *VersionInfo) Reset() { *m = VersionInfo{} }
func (m *VersionInfo) String() string { return proto.CompactTextString(m) }
func (*VersionInfo) ProtoMessage() {}
func (*VersionInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_7d2c07d79758f814, []int{0}
}
func (m *VersionInfo) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *VersionInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_VersionInfo.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 (m *VersionInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_VersionInfo.Merge(m, src)
}
func (m *VersionInfo) XXX_Size() int {
return m.Size()
}
func (m *VersionInfo) XXX_DiscardUnknown() {
xxx_messageInfo_VersionInfo.DiscardUnknown(m)
}
var xxx_messageInfo_VersionInfo proto.InternalMessageInfo
func (m *VersionInfo) GetContent() string {
if m != nil {
return m.Content
}
return ""
}
func (m *VersionInfo) GetD() float64 {
if m != nil {
return m.D
}
return 0
}
func (m *VersionInfo) GetF() float32 {
if m != nil {
return m.F
}
return 0
}
func (m *VersionInfo) GetI32() int32 {
if m != nil {
return m.I32
}
return 0
}
func (m *VersionInfo) GetI64() int64 {
if m != nil {
return m.I64
}
return 0
}
func (m *VersionInfo) GetUi32() uint32 {
if m != nil {
return m.Ui32
}
return 0
}
func (m *VersionInfo) GetUi64() uint64 {
if m != nil {
return m.Ui64
}
return 0
}
func (m *VersionInfo) GetB() bool {
if m != nil {
return m.B
}
return false
}
func (m *VersionInfo) GetBytes() []byte {
if m != nil {
return m.Bytes
}
return nil
}
func init() {
proto.RegisterType((*VersionInfo)(nil), "msg.VersionInfo")
}
func init() { proto.RegisterFile("version.proto", fileDescriptor_7d2c07d79758f814) }
var fileDescriptor_7d2c07d79758f814 = []byte{
// 218 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x34, 0x8f, 0xbd, 0x4a, 0xc4, 0x40,
0x14, 0x85, 0x73, 0x36, 0xc9, 0xfe, 0x8c, 0xbb, 0x20, 0x83, 0xc5, 0xad, 0x86, 0x8b, 0xd5, 0xad,
0x2c, 0x36, 0xcb, 0x3e, 0x40, 0x5c, 0x16, 0xb6, 0xbd, 0xa0, 0x0f, 0x20, 0x44, 0xd9, 0xc2, 0x8c,
0x6c, 0x06, 0xc1, 0xb7, 0xf0, 0x5d, 0x7c, 0x09, 0xcb, 0x94, 0x96, 0x92, 0xbc, 0x88, 0xcc, 0x04,
0xbb, 0xef, 0xfb, 0x8a, 0x03, 0xc7, 0x6c, 0xde, 0x9b, 0x4b, 0x77, 0xf6, 0xed, 0xdd, 0xdb, 0xc5,
0x07, 0x6f, 0xf3, 0xd7, 0xee, 0xe5, 0xf6, 0x0b, 0xe6, 0xea, 0x71, 0xca, 0xa7, 0xf6, 0xd9, 0x5b,
0x32, 0x8b, 0x7b, 0xdf, 0x86, 0xa6, 0x0d, 0x04, 0x86, 0xac, 0xf4, 0x5f, 0xed, 0xda, 0xe0, 0x40,
0x33, 0x86, 0x40, 0x71, 0x88, 0x76, 0xa4, 0x9c, 0x21, 0x33, 0xc5, 0xd1, 0x5e, 0x9b, 0xfc, 0x54,
0x6d, 0xa9, 0x60, 0x48, 0xa9, 0x11, 0x53, 0xd9, 0xef, 0xa8, 0x64, 0x48, 0xae, 0x11, 0xad, 0x35,
0xc5, 0xc3, 0xb9, 0xda, 0xd2, 0x9c, 0x21, 0x1b, 0x4d, 0x3c, 0xb5, 0xfd, 0x8e, 0x16, 0x0c, 0x29,
0x34, 0x71, 0x5c, 0xae, 0x69, 0xc9, 0x90, 0xa5, 0xa2, 0xb6, 0x37, 0xa6, 0xac, 0x3f, 0x42, 0xd3,
0xd1, 0x8a, 0x21, 0x6b, 0x9d, 0xa4, 0xa6, 0xef, 0xc1, 0xa1, 0x1f, 0x1c, 0x7e, 0x07, 0x87, 0xcf,
0xd1, 0x65, 0xfd, 0xe8, 0xb2, 0x9f, 0xd1, 0x65, 0x4f, 0xf3, 0xf4, 0xad, 0xfa, 0x0b, 0x00, 0x00,
0xff, 0xff, 0x91, 0xf4, 0xd7, 0x0a, 0xec, 0x00, 0x00, 0x00,
}
func (m *VersionInfo) 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 *VersionInfo) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Content) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintVersion(dAtA, i, uint64(len(m.Content)))
i += copy(dAtA[i:], m.Content)
}
if m.D != 0 {
dAtA[i] = 0x11
i++
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.D))))
i += 8
}
if m.F != 0 {
dAtA[i] = 0x1d
i++
encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.F))))
i += 4
}
if m.I32 != 0 {
dAtA[i] = 0x20
i++
i = encodeVarintVersion(dAtA, i, uint64(m.I32))
}
if m.I64 != 0 {
dAtA[i] = 0x28
i++
i = encodeVarintVersion(dAtA, i, uint64(m.I64))
}
if m.Ui32 != 0 {
dAtA[i] = 0x30
i++
i = encodeVarintVersion(dAtA, i, uint64(m.Ui32))
}
if m.Ui64 != 0 {
dAtA[i] = 0x38
i++
i = encodeVarintVersion(dAtA, i, uint64(m.Ui64))
}
if m.B {
dAtA[i] = 0x40
i++
if m.B {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i++
}
if len(m.Bytes) > 0 {
dAtA[i] = 0x4a
i++
i = encodeVarintVersion(dAtA, i, uint64(len(m.Bytes)))
i += copy(dAtA[i:], m.Bytes)
}
return i, nil
}
func encodeVarintVersion(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 *VersionInfo) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Content)
if l > 0 {
n += 1 + l + sovVersion(uint64(l))
}
if m.D != 0 {
n += 9
}
if m.F != 0 {
n += 5
}
if m.I32 != 0 {
n += 1 + sovVersion(uint64(m.I32))
}
if m.I64 != 0 {
n += 1 + sovVersion(uint64(m.I64))
}
if m.Ui32 != 0 {
n += 1 + sovVersion(uint64(m.Ui32))
}
if m.Ui64 != 0 {
n += 1 + sovVersion(uint64(m.Ui64))
}
if m.B {
n += 2
}
l = len(m.Bytes)
if l > 0 {
n += 1 + l + sovVersion(uint64(l))
}
return n
}
func sovVersion(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozVersion(x uint64) (n int) {
return sovVersion(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *VersionInfo) 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 ErrIntOverflowVersion
}
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: VersionInfo: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: VersionInfo: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowVersion
}
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 ErrInvalidLengthVersion
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthVersion
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Content = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 1 {
return fmt.Errorf("proto: wrong wireType = %d for field D", wireType)
}
var v uint64
if (iNdEx + 8) > l {
return io.ErrUnexpectedEOF
}
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
iNdEx += 8
m.D = float64(math.Float64frombits(v))
case 3:
if wireType != 5 {
return fmt.Errorf("proto: wrong wireType = %d for field F", wireType)
}
var v uint32
if (iNdEx + 4) > l {
return io.ErrUnexpectedEOF
}
v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:]))
iNdEx += 4
m.F = float32(math.Float32frombits(v))
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field I32", wireType)
}
m.I32 = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowVersion
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.I32 |= int32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field I64", wireType)
}
m.I64 = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowVersion
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.I64 |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 6:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Ui32", wireType)
}
m.Ui32 = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowVersion
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Ui32 |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 7:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Ui64", wireType)
}
m.Ui64 = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowVersion
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Ui64 |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 8:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field B", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowVersion
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.B = bool(v != 0)
case 9:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowVersion
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthVersion
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthVersion
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Bytes = append(m.Bytes[:0], dAtA[iNdEx:postIndex]...)
if m.Bytes == nil {
m.Bytes = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipVersion(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthVersion
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthVersion
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipVersion(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, ErrIntOverflowVersion
}
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, ErrIntOverflowVersion
}
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, ErrIntOverflowVersion
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthVersion
}
iNdEx += length
if iNdEx < 0 {
return 0, ErrInvalidLengthVersion
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowVersion
}
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 := skipVersion(dAtA[start:])
if err != nil {
return 0, err
}
iNdEx = start + next
if iNdEx < 0 {
return 0, ErrInvalidLengthVersion
}
}
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 (
ErrInvalidLengthVersion = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowVersion = fmt.Errorf("proto: integer overflow")
)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/nggs/micro.git
git@gitee.com:nggs/micro.git
nggs
micro
micro
bac99dff65eb

搜索帮助