You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2517 lines
62 KiB
2517 lines
62 KiB
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: api/v1/attachment.proto
|
|
|
|
package v1
|
|
|
|
import (
|
|
context "context"
|
|
fmt "fmt"
|
|
_ "github.com/gogo/protobuf/gogoproto"
|
|
proto "github.com/gogo/protobuf/proto"
|
|
github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
|
|
_ "google.golang.org/genproto/googleapis/api/annotations"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
|
_ "google.golang.org/protobuf/types/known/timestamppb"
|
|
io "io"
|
|
math "math"
|
|
math_bits "math/bits"
|
|
time "time"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
var _ = time.Kitchen
|
|
|
|
// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
type Attachment struct {
|
|
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
|
|
UserId int64 `protobuf:"varint,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
|
TypeId int64 `protobuf:"varint,4,opt,name=type_id,json=typeId,proto3" json:"type_id,omitempty"`
|
|
Type int32 `protobuf:"varint,5,opt,name=type,proto3" json:"type,omitempty"`
|
|
Enable bool `protobuf:"varint,6,opt,name=enable,proto3" json:"enable,omitempty"`
|
|
Path string `protobuf:"bytes,7,opt,name=path,proto3" json:"path,omitempty"`
|
|
Name string `protobuf:"bytes,8,opt,name=name,proto3" json:"name,omitempty"`
|
|
Size_ int64 `protobuf:"varint,9,opt,name=size,proto3" json:"size,omitempty"`
|
|
Width int64 `protobuf:"varint,10,opt,name=width,proto3" json:"width,omitempty"`
|
|
Height int64 `protobuf:"varint,11,opt,name=height,proto3" json:"height,omitempty"`
|
|
Ext string `protobuf:"bytes,12,opt,name=ext,proto3" json:"ext,omitempty"`
|
|
Ip string `protobuf:"bytes,13,opt,name=ip,proto3" json:"ip,omitempty"`
|
|
Username string `protobuf:"bytes,16,opt,name=username,proto3" json:"username,omitempty"`
|
|
TypeName string `protobuf:"bytes,17,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
|
|
Description string `protobuf:"bytes,18,opt,name=description,proto3" json:"description,omitempty"`
|
|
CreatedAt *time.Time `protobuf:"bytes,14,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at,omitempty"`
|
|
UpdatedAt *time.Time `protobuf:"bytes,15,opt,name=updated_at,json=updatedAt,proto3,stdtime" json:"updated_at,omitempty"`
|
|
}
|
|
|
|
func (m *Attachment) Reset() { *m = Attachment{} }
|
|
func (m *Attachment) String() string { return proto.CompactTextString(m) }
|
|
func (*Attachment) ProtoMessage() {}
|
|
func (*Attachment) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_f8e66484a389ac80, []int{0}
|
|
}
|
|
func (m *Attachment) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Attachment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Attachment.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Attachment) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Attachment.Merge(m, src)
|
|
}
|
|
func (m *Attachment) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Attachment) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Attachment.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Attachment proto.InternalMessageInfo
|
|
|
|
func (m *Attachment) GetId() int64 {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Attachment) GetHash() string {
|
|
if m != nil {
|
|
return m.Hash
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Attachment) GetUserId() int64 {
|
|
if m != nil {
|
|
return m.UserId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Attachment) GetTypeId() int64 {
|
|
if m != nil {
|
|
return m.TypeId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Attachment) GetType() int32 {
|
|
if m != nil {
|
|
return m.Type
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Attachment) GetEnable() bool {
|
|
if m != nil {
|
|
return m.Enable
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (m *Attachment) GetPath() string {
|
|
if m != nil {
|
|
return m.Path
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Attachment) GetName() string {
|
|
if m != nil {
|
|
return m.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Attachment) GetSize_() int64 {
|
|
if m != nil {
|
|
return m.Size_
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Attachment) GetWidth() int64 {
|
|
if m != nil {
|
|
return m.Width
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Attachment) GetHeight() int64 {
|
|
if m != nil {
|
|
return m.Height
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Attachment) GetExt() string {
|
|
if m != nil {
|
|
return m.Ext
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Attachment) GetIp() string {
|
|
if m != nil {
|
|
return m.Ip
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Attachment) GetUsername() string {
|
|
if m != nil {
|
|
return m.Username
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Attachment) GetTypeName() string {
|
|
if m != nil {
|
|
return m.TypeName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Attachment) GetDescription() string {
|
|
if m != nil {
|
|
return m.Description
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Attachment) GetCreatedAt() *time.Time {
|
|
if m != nil {
|
|
return m.CreatedAt
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Attachment) GetUpdatedAt() *time.Time {
|
|
if m != nil {
|
|
return m.UpdatedAt
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type DeleteAttachmentRequest struct {
|
|
Id []int64 `protobuf:"varint,1,rep,packed,name=id,proto3" json:"id,omitempty"`
|
|
}
|
|
|
|
func (m *DeleteAttachmentRequest) Reset() { *m = DeleteAttachmentRequest{} }
|
|
func (m *DeleteAttachmentRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*DeleteAttachmentRequest) ProtoMessage() {}
|
|
func (*DeleteAttachmentRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_f8e66484a389ac80, []int{1}
|
|
}
|
|
func (m *DeleteAttachmentRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *DeleteAttachmentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_DeleteAttachmentRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *DeleteAttachmentRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_DeleteAttachmentRequest.Merge(m, src)
|
|
}
|
|
func (m *DeleteAttachmentRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *DeleteAttachmentRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_DeleteAttachmentRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_DeleteAttachmentRequest proto.InternalMessageInfo
|
|
|
|
func (m *DeleteAttachmentRequest) GetId() []int64 {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type GetAttachmentRequest struct {
|
|
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
}
|
|
|
|
func (m *GetAttachmentRequest) Reset() { *m = GetAttachmentRequest{} }
|
|
func (m *GetAttachmentRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*GetAttachmentRequest) ProtoMessage() {}
|
|
func (*GetAttachmentRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_f8e66484a389ac80, []int{2}
|
|
}
|
|
func (m *GetAttachmentRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *GetAttachmentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_GetAttachmentRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *GetAttachmentRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_GetAttachmentRequest.Merge(m, src)
|
|
}
|
|
func (m *GetAttachmentRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *GetAttachmentRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_GetAttachmentRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_GetAttachmentRequest proto.InternalMessageInfo
|
|
|
|
func (m *GetAttachmentRequest) GetId() int64 {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type ListAttachmentRequest struct {
|
|
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
|
|
Size_ int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
|
|
Wd string `protobuf:"bytes,3,opt,name=wd,proto3" json:"wd,omitempty"`
|
|
Enable []bool `protobuf:"varint,4,rep,packed,name=enable,proto3" json:"enable,omitempty"`
|
|
UserId []int64 `protobuf:"varint,5,rep,packed,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
|
Type []int64 `protobuf:"varint,6,rep,packed,name=type,proto3" json:"type,omitempty"`
|
|
Ext string `protobuf:"bytes,7,opt,name=ext,proto3" json:"ext,omitempty"`
|
|
}
|
|
|
|
func (m *ListAttachmentRequest) Reset() { *m = ListAttachmentRequest{} }
|
|
func (m *ListAttachmentRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*ListAttachmentRequest) ProtoMessage() {}
|
|
func (*ListAttachmentRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_f8e66484a389ac80, []int{3}
|
|
}
|
|
func (m *ListAttachmentRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ListAttachmentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ListAttachmentRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *ListAttachmentRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ListAttachmentRequest.Merge(m, src)
|
|
}
|
|
func (m *ListAttachmentRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ListAttachmentRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ListAttachmentRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ListAttachmentRequest proto.InternalMessageInfo
|
|
|
|
func (m *ListAttachmentRequest) GetPage() int64 {
|
|
if m != nil {
|
|
return m.Page
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *ListAttachmentRequest) GetSize_() int64 {
|
|
if m != nil {
|
|
return m.Size_
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *ListAttachmentRequest) GetWd() string {
|
|
if m != nil {
|
|
return m.Wd
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *ListAttachmentRequest) GetEnable() []bool {
|
|
if m != nil {
|
|
return m.Enable
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ListAttachmentRequest) GetUserId() []int64 {
|
|
if m != nil {
|
|
return m.UserId
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ListAttachmentRequest) GetType() []int64 {
|
|
if m != nil {
|
|
return m.Type
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ListAttachmentRequest) GetExt() string {
|
|
if m != nil {
|
|
return m.Ext
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListAttachmentReply struct {
|
|
Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
|
|
Attachment []*Attachment `protobuf:"bytes,2,rep,name=attachment,proto3" json:"attachment,omitempty"`
|
|
}
|
|
|
|
func (m *ListAttachmentReply) Reset() { *m = ListAttachmentReply{} }
|
|
func (m *ListAttachmentReply) String() string { return proto.CompactTextString(m) }
|
|
func (*ListAttachmentReply) ProtoMessage() {}
|
|
func (*ListAttachmentReply) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_f8e66484a389ac80, []int{4}
|
|
}
|
|
func (m *ListAttachmentReply) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ListAttachmentReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ListAttachmentReply.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *ListAttachmentReply) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ListAttachmentReply.Merge(m, src)
|
|
}
|
|
func (m *ListAttachmentReply) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ListAttachmentReply) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ListAttachmentReply.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ListAttachmentReply proto.InternalMessageInfo
|
|
|
|
func (m *ListAttachmentReply) GetTotal() int64 {
|
|
if m != nil {
|
|
return m.Total
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *ListAttachmentReply) GetAttachment() []*Attachment {
|
|
if m != nil {
|
|
return m.Attachment
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*Attachment)(nil), "api.v1.Attachment")
|
|
proto.RegisterType((*DeleteAttachmentRequest)(nil), "api.v1.DeleteAttachmentRequest")
|
|
proto.RegisterType((*GetAttachmentRequest)(nil), "api.v1.GetAttachmentRequest")
|
|
proto.RegisterType((*ListAttachmentRequest)(nil), "api.v1.ListAttachmentRequest")
|
|
proto.RegisterType((*ListAttachmentReply)(nil), "api.v1.ListAttachmentReply")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("api/v1/attachment.proto", fileDescriptor_f8e66484a389ac80) }
|
|
|
|
var fileDescriptor_f8e66484a389ac80 = []byte{
|
|
// 695 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xc1, 0x6e, 0xd3, 0x4c,
|
|
0x10, 0xae, 0xed, 0x24, 0x6d, 0x26, 0x7f, 0xf3, 0xa7, 0x4b, 0x68, 0x16, 0xb7, 0x4d, 0xac, 0x1c,
|
|
0x50, 0xe8, 0x21, 0x56, 0x83, 0xb8, 0xc0, 0x01, 0xa5, 0x02, 0xa1, 0x4a, 0x08, 0x55, 0x16, 0x5c,
|
|
0x90, 0xaa, 0x6a, 0x1b, 0x2f, 0xf6, 0x4a, 0x76, 0x6c, 0xe2, 0x4d, 0x4b, 0x38, 0xf2, 0x04, 0x95,
|
|
0x78, 0x06, 0x78, 0x16, 0x8e, 0x95, 0xb8, 0x70, 0x03, 0xb5, 0xbc, 0x03, 0x57, 0xb4, 0xbb, 0x76,
|
|
0xe2, 0xb6, 0x8e, 0xc4, 0x6d, 0x66, 0xbe, 0xd9, 0x6f, 0x66, 0xfd, 0x7d, 0x6b, 0x68, 0x91, 0x98,
|
|
0xd9, 0xa7, 0x7b, 0x36, 0xe1, 0x9c, 0x8c, 0xfc, 0x90, 0x8e, 0x79, 0x3f, 0x9e, 0x44, 0x3c, 0x42,
|
|
0x15, 0x12, 0xb3, 0xfe, 0xe9, 0x9e, 0xd9, 0xf1, 0xa2, 0xc8, 0x0b, 0xa8, 0x2d, 0xab, 0x27, 0xd3,
|
|
0x77, 0x36, 0x67, 0x21, 0x4d, 0x38, 0x09, 0x63, 0xd5, 0x68, 0x36, 0xbd, 0xc8, 0x8b, 0x64, 0x68,
|
|
0x8b, 0x28, 0xad, 0x6e, 0xa7, 0xc7, 0x04, 0x3d, 0x19, 0x8f, 0x23, 0x4e, 0x38, 0x8b, 0xc6, 0x49,
|
|
0x8a, 0x6e, 0xdd, 0x24, 0xa5, 0x61, 0xcc, 0x67, 0x0a, 0xec, 0xfe, 0x31, 0x00, 0x86, 0xf3, 0x75,
|
|
0x50, 0x1d, 0x74, 0xe6, 0x62, 0xcd, 0xd2, 0x7a, 0x86, 0xa3, 0x33, 0x17, 0x21, 0x28, 0xf9, 0x24,
|
|
0xf1, 0xb1, 0x6e, 0x69, 0xbd, 0xaa, 0x23, 0x63, 0xd4, 0x82, 0xd5, 0x69, 0x42, 0x27, 0xc7, 0xcc,
|
|
0xc5, 0x86, 0x6c, 0xac, 0x88, 0xf4, 0xc0, 0x15, 0x00, 0x9f, 0xc5, 0x54, 0x00, 0x25, 0x05, 0x88,
|
|
0xf4, 0x40, 0xb2, 0x88, 0x08, 0x97, 0x2d, 0xad, 0x57, 0x76, 0x64, 0x8c, 0x36, 0xa1, 0x42, 0xc7,
|
|
0xe4, 0x24, 0xa0, 0xb8, 0x62, 0x69, 0xbd, 0x35, 0x27, 0xcd, 0x44, 0x6f, 0x4c, 0xb8, 0x8f, 0x57,
|
|
0xd5, 0x44, 0x11, 0x8b, 0xda, 0x98, 0x84, 0x14, 0xaf, 0xa9, 0x9a, 0x88, 0x45, 0x2d, 0x61, 0x1f,
|
|
0x29, 0xae, 0xca, 0x49, 0x32, 0x46, 0x4d, 0x28, 0x9f, 0x31, 0x97, 0xfb, 0x18, 0x64, 0x51, 0x25,
|
|
0x62, 0x92, 0x4f, 0x99, 0xe7, 0x73, 0x5c, 0x53, 0x5b, 0xa9, 0x0c, 0x35, 0xc0, 0xa0, 0x1f, 0x38,
|
|
0xfe, 0x4f, 0x92, 0x8a, 0x50, 0xde, 0x3e, 0xc6, 0xeb, 0xb2, 0xa0, 0xb3, 0x18, 0x99, 0xb0, 0x26,
|
|
0xae, 0x26, 0x67, 0x37, 0x64, 0x75, 0x9e, 0xa3, 0x2d, 0xa8, 0xca, 0xcb, 0x4a, 0x70, 0x43, 0x81,
|
|
0xa2, 0xf0, 0x4a, 0x80, 0x16, 0xd4, 0x5c, 0x9a, 0x8c, 0x26, 0x2c, 0x16, 0x42, 0x60, 0x24, 0xe1,
|
|
0x7c, 0x09, 0x3d, 0x05, 0x18, 0x4d, 0x28, 0xe1, 0xd4, 0x3d, 0x26, 0x1c, 0xd7, 0x2d, 0xad, 0x57,
|
|
0x1b, 0x98, 0x7d, 0xa5, 0x54, 0x3f, 0x53, 0xaa, 0xff, 0x3a, 0x93, 0x7f, 0xbf, 0x74, 0xfe, 0xb3,
|
|
0xa3, 0x39, 0xd5, 0xf4, 0xcc, 0x90, 0x0b, 0x82, 0x69, 0xec, 0x66, 0x04, 0xff, 0xff, 0x2b, 0x41,
|
|
0x7a, 0x66, 0xc8, 0xbb, 0x0f, 0xa0, 0xf5, 0x8c, 0x06, 0x94, 0xd3, 0x85, 0xfc, 0x0e, 0x7d, 0x3f,
|
|
0xa5, 0xc9, 0xc2, 0x05, 0x86, 0x72, 0x41, 0xf7, 0x3e, 0x34, 0x5f, 0x50, 0xbe, 0xbc, 0x2f, 0x75,
|
|
0x4b, 0xf7, 0xab, 0x06, 0x77, 0x5f, 0xb2, 0xa4, 0xa0, 0x53, 0xaa, 0xea, 0xd1, 0xb4, 0x57, 0xc6,
|
|
0x73, 0x05, 0xf5, 0x9c, 0x82, 0x75, 0xd0, 0xcf, 0x94, 0xad, 0xaa, 0x8e, 0x7e, 0xe6, 0xe6, 0x5c,
|
|
0x52, 0xb2, 0x8c, 0x9c, 0x4b, 0x72, 0x1e, 0x2c, 0xcb, 0x35, 0x33, 0x0f, 0x66, 0x56, 0xab, 0xc8,
|
|
0xaa, 0xb2, 0x5a, 0x2a, 0xf4, 0xea, 0x5c, 0xe8, 0xee, 0x31, 0xdc, 0xb9, 0xb9, 0x67, 0x1c, 0xcc,
|
|
0x84, 0x7f, 0x78, 0xc4, 0x49, 0x90, 0xae, 0xa9, 0x12, 0x34, 0x00, 0x58, 0x3c, 0x58, 0xac, 0x5b,
|
|
0x46, 0xaf, 0x36, 0x40, 0x7d, 0xf5, 0x62, 0xfb, 0x39, 0x8a, 0x5c, 0xd7, 0xe0, 0x8b, 0x01, 0xeb,
|
|
0x0b, 0x68, 0x78, 0x78, 0x80, 0x8e, 0xa0, 0xf1, 0x46, 0x7e, 0xfb, 0xdc, 0x6b, 0x2b, 0x60, 0x31,
|
|
0x37, 0x6f, 0x69, 0xf8, 0x5c, 0x3c, 0xd7, 0xee, 0xce, 0xa7, 0xef, 0xbf, 0x3f, 0xeb, 0x2d, 0x13,
|
|
0xd9, 0xb7, 0x7e, 0x22, 0x8f, 0xb5, 0x5d, 0xe4, 0x41, 0xe3, 0xa6, 0x9a, 0xa8, 0x93, 0xd1, 0x2f,
|
|
0xd1, 0x79, 0xe9, 0x2c, 0x53, 0xce, 0x6a, 0xee, 0x16, 0xcc, 0x42, 0x47, 0xb0, 0x7e, 0xcd, 0x0b,
|
|
0x68, 0x3b, 0x9b, 0x52, 0x64, 0x11, 0xb3, 0xe0, 0x8a, 0x19, 0x3d, 0x2a, 0xa2, 0x0f, 0xa1, 0x7e,
|
|
0x5d, 0x19, 0xb4, 0x93, 0x31, 0x14, 0x3a, 0xcb, 0xdc, 0x5a, 0x06, 0xc7, 0xc1, 0xac, 0xdb, 0x91,
|
|
0x93, 0xee, 0xa1, 0xd6, 0xed, 0x49, 0x76, 0xc0, 0x12, 0xbe, 0xff, 0xe8, 0xdb, 0x65, 0x5b, 0xbb,
|
|
0xb8, 0x6c, 0x6b, 0xbf, 0x2e, 0xdb, 0xda, 0xf9, 0x55, 0x7b, 0xe5, 0xe2, 0xaa, 0xbd, 0xf2, 0xe3,
|
|
0xaa, 0xbd, 0x02, 0xe9, 0x2f, 0xf9, 0x50, 0x7b, 0xbb, 0x11, 0x46, 0x13, 0xea, 0x46, 0xa3, 0x94,
|
|
0xe3, 0xc9, 0xe9, 0xde, 0x49, 0x45, 0x7e, 0xb0, 0x87, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x19,
|
|
0xf0, 0xa5, 0xd4, 0xd1, 0x05, 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
|
|
|
|
// AttachmentAPIClient is the client API for AttachmentAPI service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
type AttachmentAPIClient interface {
|
|
UpdateAttachment(ctx context.Context, in *Attachment, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
DeleteAttachment(ctx context.Context, in *DeleteAttachmentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
GetAttachment(ctx context.Context, in *GetAttachmentRequest, opts ...grpc.CallOption) (*Attachment, error)
|
|
ListAttachment(ctx context.Context, in *ListAttachmentRequest, opts ...grpc.CallOption) (*ListAttachmentReply, error)
|
|
}
|
|
|
|
type attachmentAPIClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewAttachmentAPIClient(cc *grpc.ClientConn) AttachmentAPIClient {
|
|
return &attachmentAPIClient{cc}
|
|
}
|
|
|
|
func (c *attachmentAPIClient) UpdateAttachment(ctx context.Context, in *Attachment, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, "/api.v1.AttachmentAPI/UpdateAttachment", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *attachmentAPIClient) DeleteAttachment(ctx context.Context, in *DeleteAttachmentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, "/api.v1.AttachmentAPI/DeleteAttachment", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *attachmentAPIClient) GetAttachment(ctx context.Context, in *GetAttachmentRequest, opts ...grpc.CallOption) (*Attachment, error) {
|
|
out := new(Attachment)
|
|
err := c.cc.Invoke(ctx, "/api.v1.AttachmentAPI/GetAttachment", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *attachmentAPIClient) ListAttachment(ctx context.Context, in *ListAttachmentRequest, opts ...grpc.CallOption) (*ListAttachmentReply, error) {
|
|
out := new(ListAttachmentReply)
|
|
err := c.cc.Invoke(ctx, "/api.v1.AttachmentAPI/ListAttachment", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// AttachmentAPIServer is the server API for AttachmentAPI service.
|
|
type AttachmentAPIServer interface {
|
|
UpdateAttachment(context.Context, *Attachment) (*emptypb.Empty, error)
|
|
DeleteAttachment(context.Context, *DeleteAttachmentRequest) (*emptypb.Empty, error)
|
|
GetAttachment(context.Context, *GetAttachmentRequest) (*Attachment, error)
|
|
ListAttachment(context.Context, *ListAttachmentRequest) (*ListAttachmentReply, error)
|
|
}
|
|
|
|
// UnimplementedAttachmentAPIServer can be embedded to have forward compatible implementations.
|
|
type UnimplementedAttachmentAPIServer struct {
|
|
}
|
|
|
|
func (*UnimplementedAttachmentAPIServer) UpdateAttachment(ctx context.Context, req *Attachment) (*emptypb.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateAttachment not implemented")
|
|
}
|
|
func (*UnimplementedAttachmentAPIServer) DeleteAttachment(ctx context.Context, req *DeleteAttachmentRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeleteAttachment not implemented")
|
|
}
|
|
func (*UnimplementedAttachmentAPIServer) GetAttachment(ctx context.Context, req *GetAttachmentRequest) (*Attachment, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetAttachment not implemented")
|
|
}
|
|
func (*UnimplementedAttachmentAPIServer) ListAttachment(ctx context.Context, req *ListAttachmentRequest) (*ListAttachmentReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListAttachment not implemented")
|
|
}
|
|
|
|
func RegisterAttachmentAPIServer(s *grpc.Server, srv AttachmentAPIServer) {
|
|
s.RegisterService(&_AttachmentAPI_serviceDesc, srv)
|
|
}
|
|
|
|
func _AttachmentAPI_UpdateAttachment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(Attachment)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AttachmentAPIServer).UpdateAttachment(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/api.v1.AttachmentAPI/UpdateAttachment",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AttachmentAPIServer).UpdateAttachment(ctx, req.(*Attachment))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AttachmentAPI_DeleteAttachment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteAttachmentRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AttachmentAPIServer).DeleteAttachment(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/api.v1.AttachmentAPI/DeleteAttachment",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AttachmentAPIServer).DeleteAttachment(ctx, req.(*DeleteAttachmentRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AttachmentAPI_GetAttachment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetAttachmentRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AttachmentAPIServer).GetAttachment(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/api.v1.AttachmentAPI/GetAttachment",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AttachmentAPIServer).GetAttachment(ctx, req.(*GetAttachmentRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AttachmentAPI_ListAttachment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListAttachmentRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AttachmentAPIServer).ListAttachment(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/api.v1.AttachmentAPI/ListAttachment",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AttachmentAPIServer).ListAttachment(ctx, req.(*ListAttachmentRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _AttachmentAPI_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "api.v1.AttachmentAPI",
|
|
HandlerType: (*AttachmentAPIServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "UpdateAttachment",
|
|
Handler: _AttachmentAPI_UpdateAttachment_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteAttachment",
|
|
Handler: _AttachmentAPI_DeleteAttachment_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetAttachment",
|
|
Handler: _AttachmentAPI_GetAttachment_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListAttachment",
|
|
Handler: _AttachmentAPI_ListAttachment_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "api/v1/attachment.proto",
|
|
}
|
|
|
|
func (m *Attachment) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Attachment) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Attachment) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Description) > 0 {
|
|
i -= len(m.Description)
|
|
copy(dAtA[i:], m.Description)
|
|
i = encodeVarintAttachment(dAtA, i, uint64(len(m.Description)))
|
|
i--
|
|
dAtA[i] = 0x1
|
|
i--
|
|
dAtA[i] = 0x92
|
|
}
|
|
if len(m.TypeName) > 0 {
|
|
i -= len(m.TypeName)
|
|
copy(dAtA[i:], m.TypeName)
|
|
i = encodeVarintAttachment(dAtA, i, uint64(len(m.TypeName)))
|
|
i--
|
|
dAtA[i] = 0x1
|
|
i--
|
|
dAtA[i] = 0x8a
|
|
}
|
|
if len(m.Username) > 0 {
|
|
i -= len(m.Username)
|
|
copy(dAtA[i:], m.Username)
|
|
i = encodeVarintAttachment(dAtA, i, uint64(len(m.Username)))
|
|
i--
|
|
dAtA[i] = 0x1
|
|
i--
|
|
dAtA[i] = 0x82
|
|
}
|
|
if m.UpdatedAt != nil {
|
|
n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.UpdatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.UpdatedAt):])
|
|
if err1 != nil {
|
|
return 0, err1
|
|
}
|
|
i -= n1
|
|
i = encodeVarintAttachment(dAtA, i, uint64(n1))
|
|
i--
|
|
dAtA[i] = 0x7a
|
|
}
|
|
if m.CreatedAt != nil {
|
|
n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.CreatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.CreatedAt):])
|
|
if err2 != nil {
|
|
return 0, err2
|
|
}
|
|
i -= n2
|
|
i = encodeVarintAttachment(dAtA, i, uint64(n2))
|
|
i--
|
|
dAtA[i] = 0x72
|
|
}
|
|
if len(m.Ip) > 0 {
|
|
i -= len(m.Ip)
|
|
copy(dAtA[i:], m.Ip)
|
|
i = encodeVarintAttachment(dAtA, i, uint64(len(m.Ip)))
|
|
i--
|
|
dAtA[i] = 0x6a
|
|
}
|
|
if len(m.Ext) > 0 {
|
|
i -= len(m.Ext)
|
|
copy(dAtA[i:], m.Ext)
|
|
i = encodeVarintAttachment(dAtA, i, uint64(len(m.Ext)))
|
|
i--
|
|
dAtA[i] = 0x62
|
|
}
|
|
if m.Height != 0 {
|
|
i = encodeVarintAttachment(dAtA, i, uint64(m.Height))
|
|
i--
|
|
dAtA[i] = 0x58
|
|
}
|
|
if m.Width != 0 {
|
|
i = encodeVarintAttachment(dAtA, i, uint64(m.Width))
|
|
i--
|
|
dAtA[i] = 0x50
|
|
}
|
|
if m.Size_ != 0 {
|
|
i = encodeVarintAttachment(dAtA, i, uint64(m.Size_))
|
|
i--
|
|
dAtA[i] = 0x48
|
|
}
|
|
if len(m.Name) > 0 {
|
|
i -= len(m.Name)
|
|
copy(dAtA[i:], m.Name)
|
|
i = encodeVarintAttachment(dAtA, i, uint64(len(m.Name)))
|
|
i--
|
|
dAtA[i] = 0x42
|
|
}
|
|
if len(m.Path) > 0 {
|
|
i -= len(m.Path)
|
|
copy(dAtA[i:], m.Path)
|
|
i = encodeVarintAttachment(dAtA, i, uint64(len(m.Path)))
|
|
i--
|
|
dAtA[i] = 0x3a
|
|
}
|
|
if m.Enable {
|
|
i--
|
|
if m.Enable {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i--
|
|
dAtA[i] = 0x30
|
|
}
|
|
if m.Type != 0 {
|
|
i = encodeVarintAttachment(dAtA, i, uint64(m.Type))
|
|
i--
|
|
dAtA[i] = 0x28
|
|
}
|
|
if m.TypeId != 0 {
|
|
i = encodeVarintAttachment(dAtA, i, uint64(m.TypeId))
|
|
i--
|
|
dAtA[i] = 0x20
|
|
}
|
|
if m.UserId != 0 {
|
|
i = encodeVarintAttachment(dAtA, i, uint64(m.UserId))
|
|
i--
|
|
dAtA[i] = 0x18
|
|
}
|
|
if len(m.Hash) > 0 {
|
|
i -= len(m.Hash)
|
|
copy(dAtA[i:], m.Hash)
|
|
i = encodeVarintAttachment(dAtA, i, uint64(len(m.Hash)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if m.Id != 0 {
|
|
i = encodeVarintAttachment(dAtA, i, uint64(m.Id))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *DeleteAttachmentRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *DeleteAttachmentRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *DeleteAttachmentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Id) > 0 {
|
|
dAtA4 := make([]byte, len(m.Id)*10)
|
|
var j3 int
|
|
for _, num1 := range m.Id {
|
|
num := uint64(num1)
|
|
for num >= 1<<7 {
|
|
dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80)
|
|
num >>= 7
|
|
j3++
|
|
}
|
|
dAtA4[j3] = uint8(num)
|
|
j3++
|
|
}
|
|
i -= j3
|
|
copy(dAtA[i:], dAtA4[:j3])
|
|
i = encodeVarintAttachment(dAtA, i, uint64(j3))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *GetAttachmentRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *GetAttachmentRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *GetAttachmentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Id != 0 {
|
|
i = encodeVarintAttachment(dAtA, i, uint64(m.Id))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *ListAttachmentRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *ListAttachmentRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *ListAttachmentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Ext) > 0 {
|
|
i -= len(m.Ext)
|
|
copy(dAtA[i:], m.Ext)
|
|
i = encodeVarintAttachment(dAtA, i, uint64(len(m.Ext)))
|
|
i--
|
|
dAtA[i] = 0x3a
|
|
}
|
|
if len(m.Type) > 0 {
|
|
dAtA6 := make([]byte, len(m.Type)*10)
|
|
var j5 int
|
|
for _, num1 := range m.Type {
|
|
num := uint64(num1)
|
|
for num >= 1<<7 {
|
|
dAtA6[j5] = uint8(uint64(num)&0x7f | 0x80)
|
|
num >>= 7
|
|
j5++
|
|
}
|
|
dAtA6[j5] = uint8(num)
|
|
j5++
|
|
}
|
|
i -= j5
|
|
copy(dAtA[i:], dAtA6[:j5])
|
|
i = encodeVarintAttachment(dAtA, i, uint64(j5))
|
|
i--
|
|
dAtA[i] = 0x32
|
|
}
|
|
if len(m.UserId) > 0 {
|
|
dAtA8 := make([]byte, len(m.UserId)*10)
|
|
var j7 int
|
|
for _, num1 := range m.UserId {
|
|
num := uint64(num1)
|
|
for num >= 1<<7 {
|
|
dAtA8[j7] = uint8(uint64(num)&0x7f | 0x80)
|
|
num >>= 7
|
|
j7++
|
|
}
|
|
dAtA8[j7] = uint8(num)
|
|
j7++
|
|
}
|
|
i -= j7
|
|
copy(dAtA[i:], dAtA8[:j7])
|
|
i = encodeVarintAttachment(dAtA, i, uint64(j7))
|
|
i--
|
|
dAtA[i] = 0x2a
|
|
}
|
|
if len(m.Enable) > 0 {
|
|
for iNdEx := len(m.Enable) - 1; iNdEx >= 0; iNdEx-- {
|
|
i--
|
|
if m.Enable[iNdEx] {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
}
|
|
i = encodeVarintAttachment(dAtA, i, uint64(len(m.Enable)))
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
if len(m.Wd) > 0 {
|
|
i -= len(m.Wd)
|
|
copy(dAtA[i:], m.Wd)
|
|
i = encodeVarintAttachment(dAtA, i, uint64(len(m.Wd)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if m.Size_ != 0 {
|
|
i = encodeVarintAttachment(dAtA, i, uint64(m.Size_))
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if m.Page != 0 {
|
|
i = encodeVarintAttachment(dAtA, i, uint64(m.Page))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *ListAttachmentReply) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *ListAttachmentReply) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *ListAttachmentReply) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Attachment) > 0 {
|
|
for iNdEx := len(m.Attachment) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Attachment[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintAttachment(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
}
|
|
if m.Total != 0 {
|
|
i = encodeVarintAttachment(dAtA, i, uint64(m.Total))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func encodeVarintAttachment(dAtA []byte, offset int, v uint64) int {
|
|
offset -= sovAttachment(v)
|
|
base := offset
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return base
|
|
}
|
|
func (m *Attachment) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Id != 0 {
|
|
n += 1 + sovAttachment(uint64(m.Id))
|
|
}
|
|
l = len(m.Hash)
|
|
if l > 0 {
|
|
n += 1 + l + sovAttachment(uint64(l))
|
|
}
|
|
if m.UserId != 0 {
|
|
n += 1 + sovAttachment(uint64(m.UserId))
|
|
}
|
|
if m.TypeId != 0 {
|
|
n += 1 + sovAttachment(uint64(m.TypeId))
|
|
}
|
|
if m.Type != 0 {
|
|
n += 1 + sovAttachment(uint64(m.Type))
|
|
}
|
|
if m.Enable {
|
|
n += 2
|
|
}
|
|
l = len(m.Path)
|
|
if l > 0 {
|
|
n += 1 + l + sovAttachment(uint64(l))
|
|
}
|
|
l = len(m.Name)
|
|
if l > 0 {
|
|
n += 1 + l + sovAttachment(uint64(l))
|
|
}
|
|
if m.Size_ != 0 {
|
|
n += 1 + sovAttachment(uint64(m.Size_))
|
|
}
|
|
if m.Width != 0 {
|
|
n += 1 + sovAttachment(uint64(m.Width))
|
|
}
|
|
if m.Height != 0 {
|
|
n += 1 + sovAttachment(uint64(m.Height))
|
|
}
|
|
l = len(m.Ext)
|
|
if l > 0 {
|
|
n += 1 + l + sovAttachment(uint64(l))
|
|
}
|
|
l = len(m.Ip)
|
|
if l > 0 {
|
|
n += 1 + l + sovAttachment(uint64(l))
|
|
}
|
|
if m.CreatedAt != nil {
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.CreatedAt)
|
|
n += 1 + l + sovAttachment(uint64(l))
|
|
}
|
|
if m.UpdatedAt != nil {
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.UpdatedAt)
|
|
n += 1 + l + sovAttachment(uint64(l))
|
|
}
|
|
l = len(m.Username)
|
|
if l > 0 {
|
|
n += 2 + l + sovAttachment(uint64(l))
|
|
}
|
|
l = len(m.TypeName)
|
|
if l > 0 {
|
|
n += 2 + l + sovAttachment(uint64(l))
|
|
}
|
|
l = len(m.Description)
|
|
if l > 0 {
|
|
n += 2 + l + sovAttachment(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *DeleteAttachmentRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.Id) > 0 {
|
|
l = 0
|
|
for _, e := range m.Id {
|
|
l += sovAttachment(uint64(e))
|
|
}
|
|
n += 1 + sovAttachment(uint64(l)) + l
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *GetAttachmentRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Id != 0 {
|
|
n += 1 + sovAttachment(uint64(m.Id))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ListAttachmentRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Page != 0 {
|
|
n += 1 + sovAttachment(uint64(m.Page))
|
|
}
|
|
if m.Size_ != 0 {
|
|
n += 1 + sovAttachment(uint64(m.Size_))
|
|
}
|
|
l = len(m.Wd)
|
|
if l > 0 {
|
|
n += 1 + l + sovAttachment(uint64(l))
|
|
}
|
|
if len(m.Enable) > 0 {
|
|
n += 1 + sovAttachment(uint64(len(m.Enable))) + len(m.Enable)*1
|
|
}
|
|
if len(m.UserId) > 0 {
|
|
l = 0
|
|
for _, e := range m.UserId {
|
|
l += sovAttachment(uint64(e))
|
|
}
|
|
n += 1 + sovAttachment(uint64(l)) + l
|
|
}
|
|
if len(m.Type) > 0 {
|
|
l = 0
|
|
for _, e := range m.Type {
|
|
l += sovAttachment(uint64(e))
|
|
}
|
|
n += 1 + sovAttachment(uint64(l)) + l
|
|
}
|
|
l = len(m.Ext)
|
|
if l > 0 {
|
|
n += 1 + l + sovAttachment(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ListAttachmentReply) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Total != 0 {
|
|
n += 1 + sovAttachment(uint64(m.Total))
|
|
}
|
|
if len(m.Attachment) > 0 {
|
|
for _, e := range m.Attachment {
|
|
l = e.Size()
|
|
n += 1 + l + sovAttachment(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovAttachment(x uint64) (n int) {
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
}
|
|
func sozAttachment(x uint64) (n int) {
|
|
return sovAttachment(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *Attachment) 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 ErrIntOverflowAttachment
|
|
}
|
|
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: Attachment: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Attachment: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
|
}
|
|
m.Id = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Id |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
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 ErrInvalidLengthAttachment
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Hash = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field UserId", wireType)
|
|
}
|
|
m.UserId = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.UserId |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 4:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field TypeId", wireType)
|
|
}
|
|
m.TypeId = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.TypeId |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 5:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
|
|
}
|
|
m.Type = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Type |= int32(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 6:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Enable", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Enable = bool(v != 0)
|
|
case 7:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
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 ErrInvalidLengthAttachment
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Path = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 8:
|
|
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 ErrIntOverflowAttachment
|
|
}
|
|
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 ErrInvalidLengthAttachment
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Name = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 9:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType)
|
|
}
|
|
m.Size_ = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Size_ |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 10:
|
|
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 ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Width |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 11:
|
|
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 ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Height |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 12:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Ext", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
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 ErrInvalidLengthAttachment
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Ext = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 13:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Ip", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
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 ErrInvalidLengthAttachment
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Ip = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 14:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.CreatedAt == nil {
|
|
m.CreatedAt = new(time.Time)
|
|
}
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 15:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.UpdatedAt == nil {
|
|
m.UpdatedAt = new(time.Time)
|
|
}
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.UpdatedAt, dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 16:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
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 ErrInvalidLengthAttachment
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Username = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 17:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field TypeName", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
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 ErrInvalidLengthAttachment
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.TypeName = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 18:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
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 ErrInvalidLengthAttachment
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Description = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAttachment(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *DeleteAttachmentRequest) 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 ErrIntOverflowAttachment
|
|
}
|
|
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: DeleteAttachmentRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: DeleteAttachmentRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType == 0 {
|
|
var v int64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Id = append(m.Id, v)
|
|
} else if wireType == 2 {
|
|
var packedLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
packedLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if packedLen < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
postIndex := iNdEx + packedLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
var elementCount int
|
|
var count int
|
|
for _, integer := range dAtA[iNdEx:postIndex] {
|
|
if integer < 128 {
|
|
count++
|
|
}
|
|
}
|
|
elementCount = count
|
|
if elementCount != 0 && len(m.Id) == 0 {
|
|
m.Id = make([]int64, 0, elementCount)
|
|
}
|
|
for iNdEx < postIndex {
|
|
var v int64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Id = append(m.Id, v)
|
|
}
|
|
} else {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAttachment(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *GetAttachmentRequest) 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 ErrIntOverflowAttachment
|
|
}
|
|
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: GetAttachmentRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GetAttachmentRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
|
}
|
|
m.Id = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Id |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAttachment(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ListAttachmentRequest) 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 ErrIntOverflowAttachment
|
|
}
|
|
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: ListAttachmentRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ListAttachmentRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Page", wireType)
|
|
}
|
|
m.Page = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Page |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType)
|
|
}
|
|
m.Size_ = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Size_ |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Wd", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
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 ErrInvalidLengthAttachment
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Wd = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType == 0 {
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Enable = append(m.Enable, bool(v != 0))
|
|
} else if wireType == 2 {
|
|
var packedLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
packedLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if packedLen < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
postIndex := iNdEx + packedLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
var elementCount int
|
|
elementCount = packedLen
|
|
if elementCount != 0 && len(m.Enable) == 0 {
|
|
m.Enable = make([]bool, 0, elementCount)
|
|
}
|
|
for iNdEx < postIndex {
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Enable = append(m.Enable, bool(v != 0))
|
|
}
|
|
} else {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Enable", wireType)
|
|
}
|
|
case 5:
|
|
if wireType == 0 {
|
|
var v int64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.UserId = append(m.UserId, v)
|
|
} else if wireType == 2 {
|
|
var packedLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
packedLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if packedLen < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
postIndex := iNdEx + packedLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
var elementCount int
|
|
var count int
|
|
for _, integer := range dAtA[iNdEx:postIndex] {
|
|
if integer < 128 {
|
|
count++
|
|
}
|
|
}
|
|
elementCount = count
|
|
if elementCount != 0 && len(m.UserId) == 0 {
|
|
m.UserId = make([]int64, 0, elementCount)
|
|
}
|
|
for iNdEx < postIndex {
|
|
var v int64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.UserId = append(m.UserId, v)
|
|
}
|
|
} else {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field UserId", wireType)
|
|
}
|
|
case 6:
|
|
if wireType == 0 {
|
|
var v int64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Type = append(m.Type, v)
|
|
} else if wireType == 2 {
|
|
var packedLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
packedLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if packedLen < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
postIndex := iNdEx + packedLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
var elementCount int
|
|
var count int
|
|
for _, integer := range dAtA[iNdEx:postIndex] {
|
|
if integer < 128 {
|
|
count++
|
|
}
|
|
}
|
|
elementCount = count
|
|
if elementCount != 0 && len(m.Type) == 0 {
|
|
m.Type = make([]int64, 0, elementCount)
|
|
}
|
|
for iNdEx < postIndex {
|
|
var v int64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Type = append(m.Type, v)
|
|
}
|
|
} else {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
|
|
}
|
|
case 7:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Ext", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
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 ErrInvalidLengthAttachment
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Ext = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAttachment(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ListAttachmentReply) 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 ErrIntOverflowAttachment
|
|
}
|
|
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: ListAttachmentReply: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ListAttachmentReply: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType)
|
|
}
|
|
m.Total = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Total |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Attachment", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Attachment = append(m.Attachment, &Attachment{})
|
|
if err := m.Attachment[len(m.Attachment)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAttachment(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthAttachment
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipAttachment(dAtA []byte) (n int, err error) {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
depth := 0
|
|
for iNdEx < l {
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowAttachment
|
|
}
|
|
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, ErrIntOverflowAttachment
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx++
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 1:
|
|
iNdEx += 8
|
|
case 2:
|
|
var length int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowAttachment
|
|
}
|
|
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, ErrInvalidLengthAttachment
|
|
}
|
|
iNdEx += length
|
|
case 3:
|
|
depth++
|
|
case 4:
|
|
if depth == 0 {
|
|
return 0, ErrUnexpectedEndOfGroupAttachment
|
|
}
|
|
depth--
|
|
case 5:
|
|
iNdEx += 4
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthAttachment
|
|
}
|
|
if depth == 0 {
|
|
return iNdEx, nil
|
|
}
|
|
}
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthAttachment = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowAttachment = fmt.Errorf("proto: integer overflow")
|
|
ErrUnexpectedEndOfGroupAttachment = fmt.Errorf("proto: unexpected end of group")
|
|
)
|