1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-07 21:47:02 +09:00
any-sync/commonfile/fileproto/file.pb.go
2023-01-05 15:34:09 +03:00

1738 lines
41 KiB
Go

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: commonfile/fileproto/protos/file.proto
package fileproto
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.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type ErrCodes int32
const (
ErrCodes_Unexpected ErrCodes = 0
ErrCodes_CIDNotFound ErrCodes = 1
ErrCodes_ErrorOffset ErrCodes = 200
)
var ErrCodes_name = map[int32]string{
0: "Unexpected",
1: "CIDNotFound",
200: "ErrorOffset",
}
var ErrCodes_value = map[string]int32{
"Unexpected": 0,
"CIDNotFound": 1,
"ErrorOffset": 200,
}
func (x ErrCodes) String() string {
return proto.EnumName(ErrCodes_name, int32(x))
}
func (ErrCodes) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_fd665a7e11c833d5, []int{0}
}
type CIDError int32
const (
CIDError_CIDErrorOk CIDError = 0
CIDError_CIDErrorNotFound CIDError = 1
CIDError_CIDErrorUnexpected CIDError = 2
)
var CIDError_name = map[int32]string{
0: "CIDErrorOk",
1: "CIDErrorNotFound",
2: "CIDErrorUnexpected",
}
var CIDError_value = map[string]int32{
"CIDErrorOk": 0,
"CIDErrorNotFound": 1,
"CIDErrorUnexpected": 2,
}
func (x CIDError) String() string {
return proto.EnumName(CIDError_name, int32(x))
}
func (CIDError) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_fd665a7e11c833d5, []int{1}
}
type GetBlockRequest struct {
SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"`
Cid []byte `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"`
}
func (m *GetBlockRequest) Reset() { *m = GetBlockRequest{} }
func (m *GetBlockRequest) String() string { return proto.CompactTextString(m) }
func (*GetBlockRequest) ProtoMessage() {}
func (*GetBlockRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_fd665a7e11c833d5, []int{0}
}
func (m *GetBlockRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *GetBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_GetBlockRequest.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 *GetBlockRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetBlockRequest.Merge(m, src)
}
func (m *GetBlockRequest) XXX_Size() int {
return m.Size()
}
func (m *GetBlockRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetBlockRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetBlockRequest proto.InternalMessageInfo
func (m *GetBlockRequest) GetSpaceId() string {
if m != nil {
return m.SpaceId
}
return ""
}
func (m *GetBlockRequest) GetCid() []byte {
if m != nil {
return m.Cid
}
return nil
}
type GetBlockResponse struct {
Cid []byte `protobuf:"bytes,1,opt,name=cid,proto3" json:"cid,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
Code CIDError `protobuf:"varint,3,opt,name=code,proto3,enum=anyFile.CIDError" json:"code,omitempty"`
}
func (m *GetBlockResponse) Reset() { *m = GetBlockResponse{} }
func (m *GetBlockResponse) String() string { return proto.CompactTextString(m) }
func (*GetBlockResponse) ProtoMessage() {}
func (*GetBlockResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_fd665a7e11c833d5, []int{1}
}
func (m *GetBlockResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *GetBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_GetBlockResponse.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 *GetBlockResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetBlockResponse.Merge(m, src)
}
func (m *GetBlockResponse) XXX_Size() int {
return m.Size()
}
func (m *GetBlockResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GetBlockResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GetBlockResponse proto.InternalMessageInfo
func (m *GetBlockResponse) GetCid() []byte {
if m != nil {
return m.Cid
}
return nil
}
func (m *GetBlockResponse) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
func (m *GetBlockResponse) GetCode() CIDError {
if m != nil {
return m.Code
}
return CIDError_CIDErrorOk
}
type PushBlockRequest struct {
SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"`
Cid []byte `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"`
Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
}
func (m *PushBlockRequest) Reset() { *m = PushBlockRequest{} }
func (m *PushBlockRequest) String() string { return proto.CompactTextString(m) }
func (*PushBlockRequest) ProtoMessage() {}
func (*PushBlockRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_fd665a7e11c833d5, []int{2}
}
func (m *PushBlockRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *PushBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_PushBlockRequest.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 *PushBlockRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_PushBlockRequest.Merge(m, src)
}
func (m *PushBlockRequest) XXX_Size() int {
return m.Size()
}
func (m *PushBlockRequest) XXX_DiscardUnknown() {
xxx_messageInfo_PushBlockRequest.DiscardUnknown(m)
}
var xxx_messageInfo_PushBlockRequest proto.InternalMessageInfo
func (m *PushBlockRequest) GetSpaceId() string {
if m != nil {
return m.SpaceId
}
return ""
}
func (m *PushBlockRequest) GetCid() []byte {
if m != nil {
return m.Cid
}
return nil
}
func (m *PushBlockRequest) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
type PushBlockResponse struct {
}
func (m *PushBlockResponse) Reset() { *m = PushBlockResponse{} }
func (m *PushBlockResponse) String() string { return proto.CompactTextString(m) }
func (*PushBlockResponse) ProtoMessage() {}
func (*PushBlockResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_fd665a7e11c833d5, []int{3}
}
func (m *PushBlockResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *PushBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_PushBlockResponse.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 *PushBlockResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_PushBlockResponse.Merge(m, src)
}
func (m *PushBlockResponse) XXX_Size() int {
return m.Size()
}
func (m *PushBlockResponse) XXX_DiscardUnknown() {
xxx_messageInfo_PushBlockResponse.DiscardUnknown(m)
}
var xxx_messageInfo_PushBlockResponse proto.InternalMessageInfo
type DeleteBlocksRequest struct {
SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"`
Cid [][]byte `protobuf:"bytes,2,rep,name=cid,proto3" json:"cid,omitempty"`
}
func (m *DeleteBlocksRequest) Reset() { *m = DeleteBlocksRequest{} }
func (m *DeleteBlocksRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteBlocksRequest) ProtoMessage() {}
func (*DeleteBlocksRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_fd665a7e11c833d5, []int{4}
}
func (m *DeleteBlocksRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *DeleteBlocksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_DeleteBlocksRequest.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 *DeleteBlocksRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeleteBlocksRequest.Merge(m, src)
}
func (m *DeleteBlocksRequest) XXX_Size() int {
return m.Size()
}
func (m *DeleteBlocksRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeleteBlocksRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeleteBlocksRequest proto.InternalMessageInfo
func (m *DeleteBlocksRequest) GetSpaceId() string {
if m != nil {
return m.SpaceId
}
return ""
}
func (m *DeleteBlocksRequest) GetCid() [][]byte {
if m != nil {
return m.Cid
}
return nil
}
type DeleteBlocksResponse struct {
}
func (m *DeleteBlocksResponse) Reset() { *m = DeleteBlocksResponse{} }
func (m *DeleteBlocksResponse) String() string { return proto.CompactTextString(m) }
func (*DeleteBlocksResponse) ProtoMessage() {}
func (*DeleteBlocksResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_fd665a7e11c833d5, []int{5}
}
func (m *DeleteBlocksResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *DeleteBlocksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_DeleteBlocksResponse.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 *DeleteBlocksResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeleteBlocksResponse.Merge(m, src)
}
func (m *DeleteBlocksResponse) XXX_Size() int {
return m.Size()
}
func (m *DeleteBlocksResponse) XXX_DiscardUnknown() {
xxx_messageInfo_DeleteBlocksResponse.DiscardUnknown(m)
}
var xxx_messageInfo_DeleteBlocksResponse proto.InternalMessageInfo
type CheckRequest struct {
}
func (m *CheckRequest) Reset() { *m = CheckRequest{} }
func (m *CheckRequest) String() string { return proto.CompactTextString(m) }
func (*CheckRequest) ProtoMessage() {}
func (*CheckRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_fd665a7e11c833d5, []int{6}
}
func (m *CheckRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *CheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_CheckRequest.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 *CheckRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CheckRequest.Merge(m, src)
}
func (m *CheckRequest) XXX_Size() int {
return m.Size()
}
func (m *CheckRequest) XXX_DiscardUnknown() {
xxx_messageInfo_CheckRequest.DiscardUnknown(m)
}
var xxx_messageInfo_CheckRequest proto.InternalMessageInfo
type CheckResponse struct {
SpaceIds []string `protobuf:"bytes,1,rep,name=spaceIds,proto3" json:"spaceIds,omitempty"`
}
func (m *CheckResponse) Reset() { *m = CheckResponse{} }
func (m *CheckResponse) String() string { return proto.CompactTextString(m) }
func (*CheckResponse) ProtoMessage() {}
func (*CheckResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_fd665a7e11c833d5, []int{7}
}
func (m *CheckResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *CheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_CheckResponse.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 *CheckResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_CheckResponse.Merge(m, src)
}
func (m *CheckResponse) XXX_Size() int {
return m.Size()
}
func (m *CheckResponse) XXX_DiscardUnknown() {
xxx_messageInfo_CheckResponse.DiscardUnknown(m)
}
var xxx_messageInfo_CheckResponse proto.InternalMessageInfo
func (m *CheckResponse) GetSpaceIds() []string {
if m != nil {
return m.SpaceIds
}
return nil
}
func init() {
proto.RegisterEnum("anyFile.ErrCodes", ErrCodes_name, ErrCodes_value)
proto.RegisterEnum("anyFile.CIDError", CIDError_name, CIDError_value)
proto.RegisterType((*GetBlockRequest)(nil), "anyFile.GetBlockRequest")
proto.RegisterType((*GetBlockResponse)(nil), "anyFile.GetBlockResponse")
proto.RegisterType((*PushBlockRequest)(nil), "anyFile.PushBlockRequest")
proto.RegisterType((*PushBlockResponse)(nil), "anyFile.PushBlockResponse")
proto.RegisterType((*DeleteBlocksRequest)(nil), "anyFile.DeleteBlocksRequest")
proto.RegisterType((*DeleteBlocksResponse)(nil), "anyFile.DeleteBlocksResponse")
proto.RegisterType((*CheckRequest)(nil), "anyFile.CheckRequest")
proto.RegisterType((*CheckResponse)(nil), "anyFile.CheckResponse")
}
func init() {
proto.RegisterFile("commonfile/fileproto/protos/file.proto", fileDescriptor_fd665a7e11c833d5)
}
var fileDescriptor_fd665a7e11c833d5 = []byte{
// 456 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0xcd, 0x6e, 0xd3, 0x40,
0x10, 0xf6, 0xc6, 0x81, 0x26, 0xd3, 0x90, 0x6e, 0xa7, 0x21, 0x32, 0x16, 0x58, 0x91, 0x25, 0x90,
0x55, 0xa4, 0x14, 0x15, 0x89, 0x5b, 0x0f, 0x24, 0x69, 0x21, 0x42, 0xa2, 0xc8, 0x12, 0x17, 0x2e,
0x28, 0xd8, 0x13, 0x35, 0x6a, 0xea, 0x0d, 0x5e, 0x47, 0x82, 0xb7, 0xe0, 0xc2, 0x3b, 0xf5, 0x98,
0x23, 0x47, 0x94, 0xbc, 0x08, 0xca, 0x66, 0xd7, 0x31, 0x91, 0x39, 0xd0, 0xcb, 0x7a, 0x7e, 0xbf,
0x19, 0x7f, 0xdf, 0x2e, 0x3c, 0x8b, 0xc4, 0xcd, 0x8d, 0x48, 0xc6, 0x93, 0x29, 0x9d, 0xac, 0x8f,
0x59, 0x2a, 0x32, 0x71, 0xa2, 0x4e, 0xa9, 0x02, 0x5d, 0x65, 0xe3, 0xde, 0x28, 0xf9, 0x7e, 0x31,
0x99, 0x92, 0x7f, 0x06, 0x07, 0x6f, 0x28, 0xeb, 0x4d, 0x45, 0x74, 0x1d, 0xd2, 0xd7, 0x39, 0xc9,
0x0c, 0x1d, 0xd8, 0x93, 0xb3, 0x51, 0x44, 0xc3, 0xd8, 0x61, 0x1d, 0x16, 0xd4, 0x43, 0xe3, 0x22,
0x07, 0x3b, 0x9a, 0xc4, 0x4e, 0xa5, 0xc3, 0x82, 0x46, 0xb8, 0x36, 0xfd, 0xcf, 0xc0, 0xb7, 0xed,
0x72, 0x26, 0x12, 0x49, 0xa6, 0x8a, 0xe5, 0x55, 0x88, 0x50, 0x8d, 0x47, 0xd9, 0x48, 0x37, 0x2a,
0x1b, 0x9f, 0x42, 0x35, 0x12, 0x31, 0x39, 0x76, 0x87, 0x05, 0xcd, 0xd3, 0xc3, 0xae, 0x5e, 0xa8,
0xdb, 0x1f, 0x0e, 0xce, 0xd3, 0x54, 0xa4, 0xa1, 0x4a, 0xfb, 0x21, 0xf0, 0x0f, 0x73, 0x79, 0x75,
0xd7, 0x05, 0xf3, 0xd1, 0xf6, 0x76, 0xb4, 0x7f, 0x04, 0x87, 0x05, 0xcc, 0xcd, 0xd6, 0xfe, 0x6b,
0x38, 0x1a, 0xd0, 0x94, 0x32, 0x52, 0x61, 0xf9, 0x1f, 0xb3, 0x6c, 0x43, 0x46, 0x1b, 0x5a, 0x7f,
0x43, 0x68, 0xe8, 0x26, 0x34, 0xfa, 0x57, 0x94, 0xef, 0xef, 0x3f, 0x87, 0x07, 0xda, 0xd7, 0x8c,
0xb9, 0x50, 0xd3, 0xa8, 0xd2, 0x61, 0x1d, 0x3b, 0xa8, 0x87, 0xb9, 0x7f, 0x7c, 0x06, 0xb5, 0xf3,
0x34, 0xed, 0x8b, 0x98, 0x24, 0x36, 0x01, 0x3e, 0x26, 0xf4, 0x6d, 0x46, 0x51, 0x46, 0x31, 0xb7,
0xf0, 0x00, 0xf6, 0xfb, 0xc3, 0xc1, 0x7b, 0x91, 0x5d, 0x88, 0x79, 0x12, 0x73, 0x86, 0x1c, 0xf6,
0x15, 0x79, 0x97, 0xe3, 0xb1, 0xa4, 0x8c, 0xdf, 0xb2, 0xe3, 0xb7, 0x50, 0x33, 0x8c, 0xae, 0xdb,
0x8d, 0x7d, 0x79, 0xcd, 0x2d, 0x6c, 0x01, 0x37, 0x7e, 0x01, 0xa3, 0x0d, 0x68, 0xa2, 0x85, 0x61,
0x95, 0xd3, 0x9f, 0x15, 0xa8, 0xae, 0x15, 0xc2, 0x01, 0xd4, 0x8d, 0xe6, 0x12, 0x9d, 0x5c, 0xb8,
0x9d, 0x6b, 0xe4, 0x3e, 0x2a, 0xc9, 0x6c, 0xfe, 0x37, 0x60, 0x2f, 0x18, 0xf6, 0xa0, 0x9e, 0x8b,
0x80, 0xdb, 0xda, 0x5d, 0xb1, 0x5d, 0xb7, 0x2c, 0xa5, 0x79, 0x7b, 0x07, 0x8d, 0x22, 0xe1, 0xf8,
0x38, 0xaf, 0x2d, 0x91, 0xd2, 0x7d, 0xf2, 0x8f, 0xac, 0x06, 0x7b, 0x05, 0xf7, 0x94, 0x2a, 0xf8,
0x70, 0x7b, 0x17, 0x0b, 0xaa, 0xb9, 0xed, 0xdd, 0xf0, 0xa6, 0xaf, 0xd7, 0xbd, 0x5d, 0x7a, 0x6c,
0xb1, 0xf4, 0xd8, 0xef, 0xa5, 0xc7, 0x7e, 0xac, 0x3c, 0x6b, 0xb1, 0xf2, 0xac, 0x5f, 0x2b, 0xcf,
0xfa, 0xd4, 0x2a, 0x7b, 0x8c, 0x5f, 0xee, 0xab, 0xcf, 0xcb, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff,
0x9e, 0xde, 0xba, 0xd7, 0xab, 0x03, 0x00, 0x00,
}
func (m *GetBlockRequest) 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 *GetBlockRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *GetBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Cid) > 0 {
i -= len(m.Cid)
copy(dAtA[i:], m.Cid)
i = encodeVarintFile(dAtA, i, uint64(len(m.Cid)))
i--
dAtA[i] = 0x12
}
if len(m.SpaceId) > 0 {
i -= len(m.SpaceId)
copy(dAtA[i:], m.SpaceId)
i = encodeVarintFile(dAtA, i, uint64(len(m.SpaceId)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *GetBlockResponse) 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 *GetBlockResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *GetBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Code != 0 {
i = encodeVarintFile(dAtA, i, uint64(m.Code))
i--
dAtA[i] = 0x18
}
if len(m.Data) > 0 {
i -= len(m.Data)
copy(dAtA[i:], m.Data)
i = encodeVarintFile(dAtA, i, uint64(len(m.Data)))
i--
dAtA[i] = 0x12
}
if len(m.Cid) > 0 {
i -= len(m.Cid)
copy(dAtA[i:], m.Cid)
i = encodeVarintFile(dAtA, i, uint64(len(m.Cid)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *PushBlockRequest) 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 *PushBlockRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *PushBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Data) > 0 {
i -= len(m.Data)
copy(dAtA[i:], m.Data)
i = encodeVarintFile(dAtA, i, uint64(len(m.Data)))
i--
dAtA[i] = 0x1a
}
if len(m.Cid) > 0 {
i -= len(m.Cid)
copy(dAtA[i:], m.Cid)
i = encodeVarintFile(dAtA, i, uint64(len(m.Cid)))
i--
dAtA[i] = 0x12
}
if len(m.SpaceId) > 0 {
i -= len(m.SpaceId)
copy(dAtA[i:], m.SpaceId)
i = encodeVarintFile(dAtA, i, uint64(len(m.SpaceId)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *PushBlockResponse) 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 *PushBlockResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *PushBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
return len(dAtA) - i, nil
}
func (m *DeleteBlocksRequest) 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 *DeleteBlocksRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *DeleteBlocksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Cid) > 0 {
for iNdEx := len(m.Cid) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Cid[iNdEx])
copy(dAtA[i:], m.Cid[iNdEx])
i = encodeVarintFile(dAtA, i, uint64(len(m.Cid[iNdEx])))
i--
dAtA[i] = 0x12
}
}
if len(m.SpaceId) > 0 {
i -= len(m.SpaceId)
copy(dAtA[i:], m.SpaceId)
i = encodeVarintFile(dAtA, i, uint64(len(m.SpaceId)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *DeleteBlocksResponse) 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 *DeleteBlocksResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *DeleteBlocksResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
return len(dAtA) - i, nil
}
func (m *CheckRequest) 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 *CheckRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *CheckRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
return len(dAtA) - i, nil
}
func (m *CheckResponse) 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 *CheckResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *CheckResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.SpaceIds) > 0 {
for iNdEx := len(m.SpaceIds) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.SpaceIds[iNdEx])
copy(dAtA[i:], m.SpaceIds[iNdEx])
i = encodeVarintFile(dAtA, i, uint64(len(m.SpaceIds[iNdEx])))
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func encodeVarintFile(dAtA []byte, offset int, v uint64) int {
offset -= sovFile(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *GetBlockRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.SpaceId)
if l > 0 {
n += 1 + l + sovFile(uint64(l))
}
l = len(m.Cid)
if l > 0 {
n += 1 + l + sovFile(uint64(l))
}
return n
}
func (m *GetBlockResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Cid)
if l > 0 {
n += 1 + l + sovFile(uint64(l))
}
l = len(m.Data)
if l > 0 {
n += 1 + l + sovFile(uint64(l))
}
if m.Code != 0 {
n += 1 + sovFile(uint64(m.Code))
}
return n
}
func (m *PushBlockRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.SpaceId)
if l > 0 {
n += 1 + l + sovFile(uint64(l))
}
l = len(m.Cid)
if l > 0 {
n += 1 + l + sovFile(uint64(l))
}
l = len(m.Data)
if l > 0 {
n += 1 + l + sovFile(uint64(l))
}
return n
}
func (m *PushBlockResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
return n
}
func (m *DeleteBlocksRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.SpaceId)
if l > 0 {
n += 1 + l + sovFile(uint64(l))
}
if len(m.Cid) > 0 {
for _, b := range m.Cid {
l = len(b)
n += 1 + l + sovFile(uint64(l))
}
}
return n
}
func (m *DeleteBlocksResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
return n
}
func (m *CheckRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
return n
}
func (m *CheckResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.SpaceIds) > 0 {
for _, s := range m.SpaceIds {
l = len(s)
n += 1 + l + sovFile(uint64(l))
}
}
return n
}
func sovFile(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozFile(x uint64) (n int) {
return sovFile(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *GetBlockRequest) 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 ErrIntOverflowFile
}
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: GetBlockRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: GetBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFile
}
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 ErrInvalidLengthFile
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthFile
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.SpaceId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFile
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthFile
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthFile
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Cid = append(m.Cid[:0], dAtA[iNdEx:postIndex]...)
if m.Cid == nil {
m.Cid = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipFile(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthFile
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *GetBlockResponse) 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 ErrIntOverflowFile
}
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: GetBlockResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: GetBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFile
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthFile
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthFile
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Cid = append(m.Cid[:0], dAtA[iNdEx:postIndex]...)
if m.Cid == nil {
m.Cid = []byte{}
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFile
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthFile
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthFile
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
if m.Data == nil {
m.Data = []byte{}
}
iNdEx = postIndex
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
}
m.Code = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFile
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Code |= CIDError(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipFile(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthFile
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *PushBlockRequest) 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 ErrIntOverflowFile
}
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: PushBlockRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: PushBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFile
}
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 ErrInvalidLengthFile
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthFile
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.SpaceId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFile
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthFile
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthFile
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Cid = append(m.Cid[:0], dAtA[iNdEx:postIndex]...)
if m.Cid == nil {
m.Cid = []byte{}
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFile
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthFile
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthFile
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
if m.Data == nil {
m.Data = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipFile(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthFile
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *PushBlockResponse) 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 ErrIntOverflowFile
}
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: PushBlockResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: PushBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default:
iNdEx = preIndex
skippy, err := skipFile(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthFile
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *DeleteBlocksRequest) 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 ErrIntOverflowFile
}
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: DeleteBlocksRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: DeleteBlocksRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFile
}
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 ErrInvalidLengthFile
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthFile
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.SpaceId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFile
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthFile
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthFile
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Cid = append(m.Cid, make([]byte, postIndex-iNdEx))
copy(m.Cid[len(m.Cid)-1], dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipFile(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthFile
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *DeleteBlocksResponse) 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 ErrIntOverflowFile
}
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: DeleteBlocksResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: DeleteBlocksResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default:
iNdEx = preIndex
skippy, err := skipFile(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthFile
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *CheckRequest) 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 ErrIntOverflowFile
}
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: CheckRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: CheckRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default:
iNdEx = preIndex
skippy, err := skipFile(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthFile
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *CheckResponse) 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 ErrIntOverflowFile
}
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: CheckResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: CheckResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SpaceIds", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFile
}
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 ErrInvalidLengthFile
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthFile
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.SpaceIds = append(m.SpaceIds, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipFile(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthFile
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipFile(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, ErrIntOverflowFile
}
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, ErrIntOverflowFile
}
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, ErrIntOverflowFile
}
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, ErrInvalidLengthFile
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupFile
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthFile
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthFile = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowFile = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupFile = fmt.Errorf("proto: unexpected end of group")
)