From b52aad505888888a097925052880b5dbceebe32d Mon Sep 17 00:00:00 2001 From: liuxiaolong <liuxiaolong@aiotlink.com> Date: 星期四, 24 十二月 2020 10:18:37 +0800 Subject: [PATCH] add app.proto --- app.proto | 22 + app.pb.go | 1058 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1,080 insertions(+), 0 deletions(-) diff --git a/app.pb.go b/app.pb.go new file mode 100644 index 0000000..262b8e3 --- /dev/null +++ b/app.pb.go @@ -0,0 +1,1058 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: app.proto + +package protomsg + +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// 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 App struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Package string `protobuf:"bytes,3,opt,name=package,proto3" json:"package,omitempty"` + Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` + Url string `protobuf:"bytes,5,opt,name=url,proto3" json:"url,omitempty"` + Title string `protobuf:"bytes,6,opt,name=title,proto3" json:"title,omitempty"` + Width int32 `protobuf:"varint,7,opt,name=width,proto3" json:"width,omitempty"` + Height int32 `protobuf:"varint,8,opt,name=height,proto3" json:"height,omitempty"` + IconBlob string `protobuf:"bytes,9,opt,name=iconBlob,proto3" json:"iconBlob,omitempty"` + Icon string `protobuf:"bytes,10,opt,name=icon,proto3" json:"icon,omitempty"` + Version string `protobuf:"bytes,11,opt,name=version,proto3" json:"version,omitempty"` + CreateTime string `protobuf:"bytes,12,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + CreateBy string `protobuf:"bytes,13,opt,name=create_by,json=createBy,proto3" json:"create_by,omitempty"` + UpdateTime string `protobuf:"bytes,14,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + UpdateBy string `protobuf:"bytes,15,opt,name=update_by,json=updateBy,proto3" json:"update_by,omitempty"` + IsDefault bool `protobuf:"varint,16,opt,name=isDefault,proto3" json:"isDefault,omitempty"` +} + +func (m *App) Reset() { *m = App{} } +func (m *App) String() string { return proto.CompactTextString(m) } +func (*App) ProtoMessage() {} +func (*App) Descriptor() ([]byte, []int) { + return fileDescriptor_e0f9056a14b86d47, []int{0} +} +func (m *App) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *App) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_App.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 *App) XXX_Merge(src proto.Message) { + xxx_messageInfo_App.Merge(m, src) +} +func (m *App) XXX_Size() int { + return m.Size() +} +func (m *App) XXX_DiscardUnknown() { + xxx_messageInfo_App.DiscardUnknown(m) +} + +var xxx_messageInfo_App proto.InternalMessageInfo + +func (m *App) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *App) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *App) GetPackage() string { + if m != nil { + return m.Package + } + return "" +} + +func (m *App) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *App) GetUrl() string { + if m != nil { + return m.Url + } + return "" +} + +func (m *App) GetTitle() string { + if m != nil { + return m.Title + } + return "" +} + +func (m *App) GetWidth() int32 { + if m != nil { + return m.Width + } + return 0 +} + +func (m *App) GetHeight() int32 { + if m != nil { + return m.Height + } + return 0 +} + +func (m *App) GetIconBlob() string { + if m != nil { + return m.IconBlob + } + return "" +} + +func (m *App) GetIcon() string { + if m != nil { + return m.Icon + } + return "" +} + +func (m *App) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *App) GetCreateTime() string { + if m != nil { + return m.CreateTime + } + return "" +} + +func (m *App) GetCreateBy() string { + if m != nil { + return m.CreateBy + } + return "" +} + +func (m *App) GetUpdateTime() string { + if m != nil { + return m.UpdateTime + } + return "" +} + +func (m *App) GetUpdateBy() string { + if m != nil { + return m.UpdateBy + } + return "" +} + +func (m *App) GetIsDefault() bool { + if m != nil { + return m.IsDefault + } + return false +} + +func init() { + proto.RegisterType((*App)(nil), "protomsg.App") +} + +func init() { proto.RegisterFile("app.proto", fileDescriptor_e0f9056a14b86d47) } + +var fileDescriptor_e0f9056a14b86d47 = []byte{ + // 309 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x91, 0x4f, 0x4e, 0xf3, 0x30, + 0x14, 0xc4, 0xeb, 0xa6, 0x7f, 0x92, 0xd7, 0xef, 0x2b, 0xd5, 0x13, 0x42, 0x4f, 0x80, 0x4c, 0xc5, + 0xaa, 0x2b, 0x36, 0x9c, 0x80, 0x88, 0x13, 0x54, 0xec, 0x91, 0xd3, 0x98, 0xd6, 0x22, 0x69, 0xac, + 0xd4, 0x05, 0xe5, 0x16, 0x70, 0x2b, 0x96, 0x5d, 0xb2, 0x44, 0xed, 0x45, 0x90, 0xfd, 0xd2, 0xb2, + 0xca, 0xcc, 0x2f, 0x33, 0xf6, 0x48, 0x86, 0x44, 0x59, 0x7b, 0x67, 0xeb, 0xca, 0x55, 0x18, 0x87, + 0x4f, 0xb9, 0x59, 0xde, 0x7e, 0x46, 0x10, 0x3d, 0x58, 0x8b, 0x63, 0xe8, 0x9a, 0x9c, 0xc4, 0x54, + 0xcc, 0x92, 0x79, 0xd7, 0xe4, 0x88, 0xd0, 0x5b, 0xab, 0x52, 0x53, 0x37, 0x90, 0xa0, 0x91, 0x60, + 0x68, 0xd5, 0xe2, 0x55, 0x2d, 0x35, 0x45, 0x01, 0x1f, 0xad, 0x4f, 0xbb, 0xc6, 0x6a, 0xea, 0x71, + 0xda, 0x6b, 0x9c, 0x40, 0xb4, 0xad, 0x0b, 0xea, 0x07, 0xe4, 0x25, 0x9e, 0x43, 0xdf, 0x19, 0x57, + 0x68, 0x1a, 0x04, 0xc6, 0xc6, 0xd3, 0x77, 0x93, 0xbb, 0x15, 0x0d, 0xa7, 0x62, 0xd6, 0x9f, 0xb3, + 0xc1, 0x0b, 0x18, 0xac, 0xb4, 0x59, 0xae, 0x1c, 0xc5, 0x01, 0xb7, 0x0e, 0x2f, 0x21, 0x36, 0x8b, + 0x6a, 0x9d, 0x16, 0x55, 0x46, 0x49, 0x38, 0xe6, 0xe4, 0xfd, 0x0a, 0xaf, 0x09, 0x78, 0x85, 0xd7, + 0x7e, 0xf3, 0x9b, 0xae, 0x37, 0xa6, 0x5a, 0xd3, 0x88, 0x37, 0xb7, 0x16, 0x6f, 0x60, 0xb4, 0xa8, + 0xb5, 0x72, 0xfa, 0xd9, 0x99, 0x52, 0xd3, 0xbf, 0xf0, 0x17, 0x18, 0x3d, 0x99, 0x52, 0xe3, 0x15, + 0x24, 0x6d, 0x20, 0x6b, 0xe8, 0x3f, 0xdf, 0xc5, 0x20, 0x6d, 0x7c, 0x7b, 0x6b, 0xf3, 0x53, 0x7b, + 0xcc, 0x6d, 0x46, 0xc7, 0x76, 0x1b, 0xc8, 0x1a, 0x3a, 0xe3, 0x36, 0x83, 0xb4, 0xc1, 0x6b, 0x48, + 0xcc, 0xe6, 0x51, 0xbf, 0xa8, 0x6d, 0xe1, 0x68, 0x32, 0x15, 0xb3, 0x78, 0xfe, 0x07, 0x52, 0xfa, + 0xda, 0x4b, 0xb1, 0xdb, 0x4b, 0xf1, 0xb3, 0x97, 0xe2, 0xe3, 0x20, 0x3b, 0xbb, 0x83, 0xec, 0x7c, + 0x1f, 0x64, 0x27, 0x1b, 0x84, 0x77, 0xbb, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xb6, 0xee, 0x43, + 0xa7, 0xcb, 0x01, 0x00, 0x00, +} + +func (m *App) 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 *App) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApp(dAtA, i, uint64(len(m.Id))) + i += copy(dAtA[i:], m.Id) + } + if len(m.Name) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintApp(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if len(m.Package) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintApp(dAtA, i, uint64(len(m.Package))) + i += copy(dAtA[i:], m.Package) + } + if len(m.Type) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintApp(dAtA, i, uint64(len(m.Type))) + i += copy(dAtA[i:], m.Type) + } + if len(m.Url) > 0 { + dAtA[i] = 0x2a + i++ + i = encodeVarintApp(dAtA, i, uint64(len(m.Url))) + i += copy(dAtA[i:], m.Url) + } + if len(m.Title) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintApp(dAtA, i, uint64(len(m.Title))) + i += copy(dAtA[i:], m.Title) + } + if m.Width != 0 { + dAtA[i] = 0x38 + i++ + i = encodeVarintApp(dAtA, i, uint64(m.Width)) + } + if m.Height != 0 { + dAtA[i] = 0x40 + i++ + i = encodeVarintApp(dAtA, i, uint64(m.Height)) + } + if len(m.IconBlob) > 0 { + dAtA[i] = 0x4a + i++ + i = encodeVarintApp(dAtA, i, uint64(len(m.IconBlob))) + i += copy(dAtA[i:], m.IconBlob) + } + if len(m.Icon) > 0 { + dAtA[i] = 0x52 + i++ + i = encodeVarintApp(dAtA, i, uint64(len(m.Icon))) + i += copy(dAtA[i:], m.Icon) + } + if len(m.Version) > 0 { + dAtA[i] = 0x5a + i++ + i = encodeVarintApp(dAtA, i, uint64(len(m.Version))) + i += copy(dAtA[i:], m.Version) + } + if len(m.CreateTime) > 0 { + dAtA[i] = 0x62 + i++ + i = encodeVarintApp(dAtA, i, uint64(len(m.CreateTime))) + i += copy(dAtA[i:], m.CreateTime) + } + if len(m.CreateBy) > 0 { + dAtA[i] = 0x6a + i++ + i = encodeVarintApp(dAtA, i, uint64(len(m.CreateBy))) + i += copy(dAtA[i:], m.CreateBy) + } + if len(m.UpdateTime) > 0 { + dAtA[i] = 0x72 + i++ + i = encodeVarintApp(dAtA, i, uint64(len(m.UpdateTime))) + i += copy(dAtA[i:], m.UpdateTime) + } + if len(m.UpdateBy) > 0 { + dAtA[i] = 0x7a + i++ + i = encodeVarintApp(dAtA, i, uint64(len(m.UpdateBy))) + i += copy(dAtA[i:], m.UpdateBy) + } + if m.IsDefault { + dAtA[i] = 0x80 + i++ + dAtA[i] = 0x1 + i++ + if m.IsDefault { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func encodeVarintApp(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 *App) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovApp(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovApp(uint64(l)) + } + l = len(m.Package) + if l > 0 { + n += 1 + l + sovApp(uint64(l)) + } + l = len(m.Type) + if l > 0 { + n += 1 + l + sovApp(uint64(l)) + } + l = len(m.Url) + if l > 0 { + n += 1 + l + sovApp(uint64(l)) + } + l = len(m.Title) + if l > 0 { + n += 1 + l + sovApp(uint64(l)) + } + if m.Width != 0 { + n += 1 + sovApp(uint64(m.Width)) + } + if m.Height != 0 { + n += 1 + sovApp(uint64(m.Height)) + } + l = len(m.IconBlob) + if l > 0 { + n += 1 + l + sovApp(uint64(l)) + } + l = len(m.Icon) + if l > 0 { + n += 1 + l + sovApp(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovApp(uint64(l)) + } + l = len(m.CreateTime) + if l > 0 { + n += 1 + l + sovApp(uint64(l)) + } + l = len(m.CreateBy) + if l > 0 { + n += 1 + l + sovApp(uint64(l)) + } + l = len(m.UpdateTime) + if l > 0 { + n += 1 + l + sovApp(uint64(l)) + } + l = len(m.UpdateBy) + if l > 0 { + n += 1 + l + sovApp(uint64(l)) + } + if m.IsDefault { + n += 3 + } + return n +} + +func sovApp(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozApp(x uint64) (n int) { + return sovApp(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *App) 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 ErrIntOverflowApp + } + 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: App: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: App: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApp + } + 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 ErrInvalidLengthApp + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApp + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApp + } + 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 ErrInvalidLengthApp + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApp + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Package", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApp + } + 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 ErrInvalidLengthApp + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApp + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Package = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApp + } + 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 ErrInvalidLengthApp + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApp + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApp + } + 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 ErrInvalidLengthApp + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApp + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Url = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApp + } + 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 ErrInvalidLengthApp + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApp + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Width", wireType) + } + m.Width = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Width |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IconBlob", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApp + } + 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 ErrInvalidLengthApp + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApp + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IconBlob = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Icon", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApp + } + 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 ErrInvalidLengthApp + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApp + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Icon = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApp + } + 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 ErrInvalidLengthApp + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApp + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreateTime", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApp + } + 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 ErrInvalidLengthApp + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApp + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CreateTime = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreateBy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApp + } + 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 ErrInvalidLengthApp + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApp + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CreateBy = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdateTime", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApp + } + 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 ErrInvalidLengthApp + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApp + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UpdateTime = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdateBy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApp + } + 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 ErrInvalidLengthApp + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApp + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UpdateBy = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 16: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsDefault", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsDefault = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipApp(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApp + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthApp + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipApp(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, ErrIntOverflowApp + } + 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, ErrIntOverflowApp + } + 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, ErrIntOverflowApp + } + 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, ErrInvalidLengthApp + } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthApp + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowApp + } + 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 := skipApp(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthApp + } + } + 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 ( + ErrInvalidLengthApp = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowApp = fmt.Errorf("proto: integer overflow") +) diff --git a/app.proto b/app.proto new file mode 100644 index 0000000..d698581 --- /dev/null +++ b/app.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; +package protomsg; + +message App { + string id = 1; + string name = 2; + string package = 3; + string type = 4; + string url = 5; + string title = 6; + int32 width = 7; + int32 height = 8; + string iconBlob = 9; + string icon = 10; + string version = 11; + + string create_time = 12; + string create_by = 13; + string update_time = 14; + string update_by = 15; + bool isDefault = 16; +} \ No newline at end of file -- Gitblit v1.8.0