From 90e72d777bd785e5741519dc4a0317e45f6e16c6 Mon Sep 17 00:00:00 2001 From: Yuce Tekol Date: Wed, 8 Feb 2017 16:04:19 +0300 Subject: [PATCH 1/4] Moved timestamp from HTTP query to PQL --- executor.go | 18 +- executor_test.go | 48 + handler.go | 37 +- internal/internal.pb.go | 4049 ++++----------------------------------- internal/internal.proto | 5 +- pql/ast.go | 4 + 6 files changed, 447 insertions(+), 3714 deletions(-) diff --git a/executor.go b/executor.go index 53ecc3521..c6c058244 100644 --- a/executor.go +++ b/executor.go @@ -490,6 +490,16 @@ func (e *Executor) executeSetBit(ctx context.Context, db string, c *pql.Call, op return false, errors.New("SetBit() profileID required") } + var timestamp *time.Time + sTimestamp, ok := c.Args["timestamp"].(string) + if ok { + t, err := time.Parse("2006-01-02T15:04:05", sTimestamp) + if err != nil { + return false, fmt.Errorf("invalid date: %s", sTimestamp) + } + timestamp = &t + } + slice := profileID / SliceWidth ret := false @@ -500,7 +510,7 @@ func (e *Executor) executeSetBit(ctx context.Context, db string, c *pql.Call, op if err != nil { return false, fmt.Errorf("db: %s", err) } - val, err := db.SetBit(frame, id, profileID, opt.Timestamp) + val, err := db.SetBit(frame, id, profileID, timestamp) if err != nil { return false, err } else if val { @@ -711,9 +721,6 @@ func (e *Executor) exec(ctx context.Context, node *Node, db string, q *pql.Query Slices: slices, Remote: true, } - if opt.Timestamp != nil { - pbreq.Timestamp = opt.Timestamp.UnixNano() - } buf, err := proto.Marshal(pbreq) if err != nil { return nil, err @@ -960,8 +967,7 @@ type mapResponse struct { // ExecOptions represents an execution context for a single Execute() call. type ExecOptions struct { - Timestamp *time.Time - Remote bool + Remote bool } // decodeError returns an error representation of s if s is non-blank. diff --git a/executor_test.go b/executor_test.go index 2be36d561..2cea37d3d 100644 --- a/executor_test.go +++ b/executor_test.go @@ -384,6 +384,54 @@ func TestExecutor_Execute_Remote_SetBit(t *testing.T) { } } +// Ensure a remote query can set bits on multiple nodes. +func TestExecutor_Execute_Remote_SetBit_With_Timestamp(t *testing.T) { + c := NewCluster(2) + c.ReplicaN = 2 + + // Create secondary server and update second cluster node. + s := NewServer() + defer s.Close() + c.Nodes[1].Host = s.Host() + + // Mock secondary server's executor to verify arguments. + var remoteCalled bool + s.Handler.Executor.ExecuteFn = func(ctx context.Context, db string, query *pql.Query, slices []uint64, opt *pilosa.ExecOptions) ([]interface{}, error) { + if db != `d` { + t.Fatalf("unexpected db: %s", db) + } else if query.String() != `SetBit(frame="f", id=10, profileID=2, timestamp="2016-12-11T10:09:07")` { + t.Fatalf("unexpected query: %s", query.String()) + } + remoteCalled = true + return []interface{}{nil}, nil + } + + // Create local executor data. + idx := MustOpenIndex() + defer idx.Close() + idx.CreateDBIfNotExists("d") + oldQuantum := idx.DB("d").TimeQuantum() + defer func() { + // restore db quantum + idx.DB("d").SetTimeQuantum(oldQuantum) + }() + // need to set the quantum otherwise SetBit fails silently + idx.DB("d").SetTimeQuantum("Y") + + e := NewExecutor(idx.Index, c) + if _, err := e.Execute(context.Background(), "d", MustParse(`SetBit(id=10, frame=f, profileID=2, timestamp="2016-12-11T10:09:07")`), nil, nil); err != nil { + t.Fatal(err) + } + + // Verify that one bit is set on both node's index. + if n := idx.MustCreateFragmentIfNotExists("d", "f_2016", 0).Bitmap(10).Count(); n != 1 { + t.Fatalf("unexpected local count: %d", n) + } + if !remoteCalled { + t.Fatalf("expected remote execution") + } +} + // Ensure a remote query can return a top-n query. func TestExecutor_Execute_Remote_TopN(t *testing.T) { c := NewCluster(2) diff --git a/handler.go b/handler.go index dc7b87bd3..110b3892f 100644 --- a/handler.go +++ b/handler.go @@ -229,8 +229,7 @@ func (h *Handler) handlePostQuery(w http.ResponseWriter, r *http.Request) { // Build execution options. opt := &ExecOptions{ - Timestamp: req.Timestamp, - Remote: req.Remote, + Remote: req.Remote, } // Parse query string. @@ -629,21 +628,6 @@ func (h *Handler) readURLQueryRequest(r *http.Request) (*QueryRequest, error) { return nil, errors.New("invalid slice argument") } - // Parse timestamp, if available. - var timestamp *time.Time - if v := q.Get("timestamp"); v != "" { - layout := "2006-01-02 15:04:05" - if strings.Contains(v, "T") { - layout = "2006-01-02T15:04:05" - } - - t, err := time.Parse(layout, v) - if err != nil { - return nil, errors.New("invalid timestamp") - } - timestamp = &t - } - // Parse time granularity. quantum := TimeQuantum("YMDH") if s := q.Get("time_granularity"); s != "" { @@ -655,12 +639,11 @@ func (h *Handler) readURLQueryRequest(r *http.Request) (*QueryRequest, error) { } return &QueryRequest{ - DB: q.Get("db"), - Query: query, - Slices: slices, - Profiles: q.Get("profiles") == "true", - Timestamp: timestamp, - Quantum: quantum, + DB: q.Get("db"), + Query: query, + Slices: slices, + Profiles: q.Get("profiles") == "true", + Quantum: quantum, }, nil } @@ -1072,9 +1055,6 @@ type QueryRequest struct { // Return profile attributes, if true. Profiles bool - // Timestamp passed into the query. - Timestamp *time.Time - // Time granularity to use with the timestamp. Quantum TimeQuantum @@ -1093,11 +1073,6 @@ func decodeQueryRequest(pb *internal.QueryRequest) *QueryRequest { Remote: pb.Remote, } - if pb.Timestamp != 0 { - t := time.Unix(0, pb.Timestamp) - req.Timestamp = &t - } - return req } diff --git a/internal/internal.pb.go b/internal/internal.pb.go index 20796686b..6e50f97c4 100644 --- a/internal/internal.pb.go +++ b/internal/internal.pb.go @@ -1,31 +1,31 @@ -// Code generated by protoc-gen-gogo. +// Code generated by protoc-gen-go. // source: internal.proto // DO NOT EDIT! /* - Package internal is a generated protocol buffer package. +Package internal is a generated protocol buffer package. - It is generated from these files: - internal.proto +It is generated from these files: + internal.proto - It has these top-level messages: - DB - Frame - Bitmap - Pair - Bit - Profile - Attr - AttrMap - QueryRequest - QueryResponse - QueryResult - ImportRequest - ImportResponse - BlockDataRequest - BlockDataResponse - Cache - MaxSlicesResponse +It has these top-level messages: + DB + Frame + Bitmap + Pair + Bit + Profile + Attr + AttrMap + QueryRequest + QueryResponse + QueryResult + ImportRequest + ImportResponse + BlockDataRequest + BlockDataResponse + Cache + MaxSlicesResponse */ package internal @@ -33,8 +33,6 @@ import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import io "io" - // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf @@ -47,22 +45,36 @@ var _ = math.Inf const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type DB struct { - TimeQuantum string `protobuf:"bytes,1,opt,name=TimeQuantum,proto3" json:"TimeQuantum,omitempty"` + TimeQuantum string `protobuf:"bytes,1,opt,name=TimeQuantum" json:"TimeQuantum,omitempty"` } func (m *DB) Reset() { *m = DB{} } func (m *DB) String() string { return proto.CompactTextString(m) } func (*DB) ProtoMessage() {} -func (*DB) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{0} } +func (*DB) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +func (m *DB) GetTimeQuantum() string { + if m != nil { + return m.TimeQuantum + } + return "" +} type Frame struct { - TimeQuantum string `protobuf:"bytes,1,opt,name=TimeQuantum,proto3" json:"TimeQuantum,omitempty"` + TimeQuantum string `protobuf:"bytes,1,opt,name=TimeQuantum" json:"TimeQuantum,omitempty"` } func (m *Frame) Reset() { *m = Frame{} } func (m *Frame) String() string { return proto.CompactTextString(m) } func (*Frame) ProtoMessage() {} -func (*Frame) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{1} } +func (*Frame) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +func (m *Frame) GetTimeQuantum() string { + if m != nil { + return m.TimeQuantum + } + return "" +} type Bitmap struct { Bits []uint64 `protobuf:"varint,1,rep,packed,name=Bits" json:"Bits,omitempty"` @@ -72,7 +84,14 @@ type Bitmap struct { func (m *Bitmap) Reset() { *m = Bitmap{} } func (m *Bitmap) String() string { return proto.CompactTextString(m) } func (*Bitmap) ProtoMessage() {} -func (*Bitmap) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{2} } +func (*Bitmap) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } + +func (m *Bitmap) GetBits() []uint64 { + if m != nil { + return m.Bits + } + return nil +} func (m *Bitmap) GetAttrs() []*Attr { if m != nil { @@ -82,35 +101,77 @@ func (m *Bitmap) GetAttrs() []*Attr { } type Pair struct { - Key uint64 `protobuf:"varint,1,opt,name=Key,proto3" json:"Key,omitempty"` - Count uint64 `protobuf:"varint,2,opt,name=Count,proto3" json:"Count,omitempty"` + Key uint64 `protobuf:"varint,1,opt,name=Key" json:"Key,omitempty"` + Count uint64 `protobuf:"varint,2,opt,name=Count" json:"Count,omitempty"` } func (m *Pair) Reset() { *m = Pair{} } func (m *Pair) String() string { return proto.CompactTextString(m) } func (*Pair) ProtoMessage() {} -func (*Pair) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{3} } +func (*Pair) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } + +func (m *Pair) GetKey() uint64 { + if m != nil { + return m.Key + } + return 0 +} + +func (m *Pair) GetCount() uint64 { + if m != nil { + return m.Count + } + return 0 +} type Bit struct { - BitmapID uint64 `protobuf:"varint,1,opt,name=BitmapID,proto3" json:"BitmapID,omitempty"` - ProfileID uint64 `protobuf:"varint,2,opt,name=ProfileID,proto3" json:"ProfileID,omitempty"` - Timestamp int64 `protobuf:"varint,3,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` + BitmapID uint64 `protobuf:"varint,1,opt,name=BitmapID" json:"BitmapID,omitempty"` + ProfileID uint64 `protobuf:"varint,2,opt,name=ProfileID" json:"ProfileID,omitempty"` + Timestamp int64 `protobuf:"varint,3,opt,name=Timestamp" json:"Timestamp,omitempty"` } func (m *Bit) Reset() { *m = Bit{} } func (m *Bit) String() string { return proto.CompactTextString(m) } func (*Bit) ProtoMessage() {} -func (*Bit) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{4} } +func (*Bit) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } + +func (m *Bit) GetBitmapID() uint64 { + if m != nil { + return m.BitmapID + } + return 0 +} + +func (m *Bit) GetProfileID() uint64 { + if m != nil { + return m.ProfileID + } + return 0 +} + +func (m *Bit) GetTimestamp() int64 { + if m != nil { + return m.Timestamp + } + return 0 +} type Profile struct { - ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` + ID uint64 `protobuf:"varint,1,opt,name=ID" json:"ID,omitempty"` Attrs []*Attr `protobuf:"bytes,2,rep,name=Attrs" json:"Attrs,omitempty"` } func (m *Profile) Reset() { *m = Profile{} } func (m *Profile) String() string { return proto.CompactTextString(m) } func (*Profile) ProtoMessage() {} -func (*Profile) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{5} } +func (*Profile) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } + +func (m *Profile) GetID() uint64 { + if m != nil { + return m.ID + } + return 0 +} func (m *Profile) GetAttrs() []*Attr { if m != nil { @@ -120,17 +181,52 @@ func (m *Profile) GetAttrs() []*Attr { } type Attr struct { - Key string `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"` - Type uint64 `protobuf:"varint,2,opt,name=Type,proto3" json:"Type,omitempty"` - StringValue string `protobuf:"bytes,3,opt,name=StringValue,proto3" json:"StringValue,omitempty"` - UintValue uint64 `protobuf:"varint,4,opt,name=UintValue,proto3" json:"UintValue,omitempty"` - BoolValue bool `protobuf:"varint,5,opt,name=BoolValue,proto3" json:"BoolValue,omitempty"` + Key string `protobuf:"bytes,1,opt,name=Key" json:"Key,omitempty"` + Type uint64 `protobuf:"varint,2,opt,name=Type" json:"Type,omitempty"` + StringValue string `protobuf:"bytes,3,opt,name=StringValue" json:"StringValue,omitempty"` + UintValue uint64 `protobuf:"varint,4,opt,name=UintValue" json:"UintValue,omitempty"` + BoolValue bool `protobuf:"varint,5,opt,name=BoolValue" json:"BoolValue,omitempty"` } func (m *Attr) Reset() { *m = Attr{} } func (m *Attr) String() string { return proto.CompactTextString(m) } func (*Attr) ProtoMessage() {} -func (*Attr) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{6} } +func (*Attr) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } + +func (m *Attr) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *Attr) GetType() uint64 { + if m != nil { + return m.Type + } + return 0 +} + +func (m *Attr) GetStringValue() string { + if m != nil { + return m.StringValue + } + return "" +} + +func (m *Attr) GetUintValue() uint64 { + if m != nil { + return m.UintValue + } + return 0 +} + +func (m *Attr) GetBoolValue() bool { + if m != nil { + return m.BoolValue + } + return false +} type AttrMap struct { Attrs []*Attr `protobuf:"bytes,1,rep,name=Attrs" json:"Attrs,omitempty"` @@ -139,7 +235,7 @@ type AttrMap struct { func (m *AttrMap) Reset() { *m = AttrMap{} } func (m *AttrMap) String() string { return proto.CompactTextString(m) } func (*AttrMap) ProtoMessage() {} -func (*AttrMap) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{7} } +func (*AttrMap) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } func (m *AttrMap) GetAttrs() []*Attr { if m != nil { @@ -149,22 +245,63 @@ func (m *AttrMap) GetAttrs() []*Attr { } type QueryRequest struct { - DB string `protobuf:"bytes,1,opt,name=DB,proto3" json:"DB,omitempty"` - Query string `protobuf:"bytes,2,opt,name=Query,proto3" json:"Query,omitempty"` - Slices []uint64 `protobuf:"varint,3,rep,packed,name=Slices" json:"Slices,omitempty"` - Profiles bool `protobuf:"varint,4,opt,name=Profiles,proto3" json:"Profiles,omitempty"` - Timestamp int64 `protobuf:"varint,5,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` - Quantum string `protobuf:"bytes,6,opt,name=Quantum,proto3" json:"Quantum,omitempty"` - Remote bool `protobuf:"varint,7,opt,name=Remote,proto3" json:"Remote,omitempty"` + DB string `protobuf:"bytes,1,opt,name=DB" json:"DB,omitempty"` + Query string `protobuf:"bytes,2,opt,name=Query" json:"Query,omitempty"` + Slices []uint64 `protobuf:"varint,3,rep,packed,name=Slices" json:"Slices,omitempty"` + Profiles bool `protobuf:"varint,4,opt,name=Profiles" json:"Profiles,omitempty"` + Quantum string `protobuf:"bytes,5,opt,name=Quantum" json:"Quantum,omitempty"` + Remote bool `protobuf:"varint,6,opt,name=Remote" json:"Remote,omitempty"` } func (m *QueryRequest) Reset() { *m = QueryRequest{} } func (m *QueryRequest) String() string { return proto.CompactTextString(m) } func (*QueryRequest) ProtoMessage() {} -func (*QueryRequest) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{8} } +func (*QueryRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } + +func (m *QueryRequest) GetDB() string { + if m != nil { + return m.DB + } + return "" +} + +func (m *QueryRequest) GetQuery() string { + if m != nil { + return m.Query + } + return "" +} + +func (m *QueryRequest) GetSlices() []uint64 { + if m != nil { + return m.Slices + } + return nil +} + +func (m *QueryRequest) GetProfiles() bool { + if m != nil { + return m.Profiles + } + return false +} + +func (m *QueryRequest) GetQuantum() string { + if m != nil { + return m.Quantum + } + return "" +} + +func (m *QueryRequest) GetRemote() bool { + if m != nil { + return m.Remote + } + return false +} type QueryResponse struct { - Err string `protobuf:"bytes,1,opt,name=Err,proto3" json:"Err,omitempty"` + Err string `protobuf:"bytes,1,opt,name=Err" json:"Err,omitempty"` Results []*QueryResult `protobuf:"bytes,2,rep,name=Results" json:"Results,omitempty"` Profiles []*Profile `protobuf:"bytes,3,rep,name=Profiles" json:"Profiles,omitempty"` } @@ -172,7 +309,14 @@ type QueryResponse struct { func (m *QueryResponse) Reset() { *m = QueryResponse{} } func (m *QueryResponse) String() string { return proto.CompactTextString(m) } func (*QueryResponse) ProtoMessage() {} -func (*QueryResponse) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{9} } +func (*QueryResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } + +func (m *QueryResponse) GetErr() string { + if m != nil { + return m.Err + } + return "" +} func (m *QueryResponse) GetResults() []*QueryResult { if m != nil { @@ -190,15 +334,15 @@ func (m *QueryResponse) GetProfiles() []*Profile { type QueryResult struct { Bitmap *Bitmap `protobuf:"bytes,1,opt,name=Bitmap" json:"Bitmap,omitempty"` - N uint64 `protobuf:"varint,2,opt,name=N,proto3" json:"N,omitempty"` + N uint64 `protobuf:"varint,2,opt,name=N" json:"N,omitempty"` Pairs []*Pair `protobuf:"bytes,3,rep,name=Pairs" json:"Pairs,omitempty"` - Changed bool `protobuf:"varint,4,opt,name=Changed,proto3" json:"Changed,omitempty"` + Changed bool `protobuf:"varint,4,opt,name=Changed" json:"Changed,omitempty"` } func (m *QueryResult) Reset() { *m = QueryResult{} } func (m *QueryResult) String() string { return proto.CompactTextString(m) } func (*QueryResult) ProtoMessage() {} -func (*QueryResult) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{10} } +func (*QueryResult) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } func (m *QueryResult) GetBitmap() *Bitmap { if m != nil { @@ -207,6 +351,13 @@ func (m *QueryResult) GetBitmap() *Bitmap { return nil } +func (m *QueryResult) GetN() uint64 { + if m != nil { + return m.N + } + return 0 +} + func (m *QueryResult) GetPairs() []*Pair { if m != nil { return m.Pairs @@ -214,10 +365,17 @@ func (m *QueryResult) GetPairs() []*Pair { return nil } +func (m *QueryResult) GetChanged() bool { + if m != nil { + return m.Changed + } + return false +} + type ImportRequest struct { - DB string `protobuf:"bytes,1,opt,name=DB,proto3" json:"DB,omitempty"` - Frame string `protobuf:"bytes,2,opt,name=Frame,proto3" json:"Frame,omitempty"` - Slice uint64 `protobuf:"varint,3,opt,name=Slice,proto3" json:"Slice,omitempty"` + DB string `protobuf:"bytes,1,opt,name=DB" json:"DB,omitempty"` + Frame string `protobuf:"bytes,2,opt,name=Frame" json:"Frame,omitempty"` + Slice uint64 `protobuf:"varint,3,opt,name=Slice" json:"Slice,omitempty"` BitmapIDs []uint64 `protobuf:"varint,4,rep,packed,name=BitmapIDs" json:"BitmapIDs,omitempty"` ProfileIDs []uint64 `protobuf:"varint,5,rep,packed,name=ProfileIDs" json:"ProfileIDs,omitempty"` Timestamps []int64 `protobuf:"varint,6,rep,packed,name=Timestamps" json:"Timestamps,omitempty"` @@ -226,28 +384,105 @@ type ImportRequest struct { func (m *ImportRequest) Reset() { *m = ImportRequest{} } func (m *ImportRequest) String() string { return proto.CompactTextString(m) } func (*ImportRequest) ProtoMessage() {} -func (*ImportRequest) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{11} } +func (*ImportRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } + +func (m *ImportRequest) GetDB() string { + if m != nil { + return m.DB + } + return "" +} + +func (m *ImportRequest) GetFrame() string { + if m != nil { + return m.Frame + } + return "" +} + +func (m *ImportRequest) GetSlice() uint64 { + if m != nil { + return m.Slice + } + return 0 +} + +func (m *ImportRequest) GetBitmapIDs() []uint64 { + if m != nil { + return m.BitmapIDs + } + return nil +} + +func (m *ImportRequest) GetProfileIDs() []uint64 { + if m != nil { + return m.ProfileIDs + } + return nil +} + +func (m *ImportRequest) GetTimestamps() []int64 { + if m != nil { + return m.Timestamps + } + return nil +} type ImportResponse struct { - Err string `protobuf:"bytes,1,opt,name=Err,proto3" json:"Err,omitempty"` + Err string `protobuf:"bytes,1,opt,name=Err" json:"Err,omitempty"` } func (m *ImportResponse) Reset() { *m = ImportResponse{} } func (m *ImportResponse) String() string { return proto.CompactTextString(m) } func (*ImportResponse) ProtoMessage() {} -func (*ImportResponse) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{12} } +func (*ImportResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } + +func (m *ImportResponse) GetErr() string { + if m != nil { + return m.Err + } + return "" +} type BlockDataRequest struct { - DB string `protobuf:"bytes,1,opt,name=DB,proto3" json:"DB,omitempty"` - Frame string `protobuf:"bytes,2,opt,name=Frame,proto3" json:"Frame,omitempty"` - Slice uint64 `protobuf:"varint,3,opt,name=Slice,proto3" json:"Slice,omitempty"` - Block uint64 `protobuf:"varint,4,opt,name=Block,proto3" json:"Block,omitempty"` + DB string `protobuf:"bytes,1,opt,name=DB" json:"DB,omitempty"` + Frame string `protobuf:"bytes,2,opt,name=Frame" json:"Frame,omitempty"` + Slice uint64 `protobuf:"varint,3,opt,name=Slice" json:"Slice,omitempty"` + Block uint64 `protobuf:"varint,4,opt,name=Block" json:"Block,omitempty"` } func (m *BlockDataRequest) Reset() { *m = BlockDataRequest{} } func (m *BlockDataRequest) String() string { return proto.CompactTextString(m) } func (*BlockDataRequest) ProtoMessage() {} -func (*BlockDataRequest) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{13} } +func (*BlockDataRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } + +func (m *BlockDataRequest) GetDB() string { + if m != nil { + return m.DB + } + return "" +} + +func (m *BlockDataRequest) GetFrame() string { + if m != nil { + return m.Frame + } + return "" +} + +func (m *BlockDataRequest) GetSlice() uint64 { + if m != nil { + return m.Slice + } + return 0 +} + +func (m *BlockDataRequest) GetBlock() uint64 { + if m != nil { + return m.Block + } + return 0 +} type BlockDataResponse struct { BitmapIDs []uint64 `protobuf:"varint,1,rep,packed,name=BitmapIDs" json:"BitmapIDs,omitempty"` @@ -257,7 +492,21 @@ type BlockDataResponse struct { func (m *BlockDataResponse) Reset() { *m = BlockDataResponse{} } func (m *BlockDataResponse) String() string { return proto.CompactTextString(m) } func (*BlockDataResponse) ProtoMessage() {} -func (*BlockDataResponse) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{14} } +func (*BlockDataResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } + +func (m *BlockDataResponse) GetBitmapIDs() []uint64 { + if m != nil { + return m.BitmapIDs + } + return nil +} + +func (m *BlockDataResponse) GetProfileIDs() []uint64 { + if m != nil { + return m.ProfileIDs + } + return nil +} type Cache struct { BitmapIDs []uint64 `protobuf:"varint,1,rep,packed,name=BitmapIDs" json:"BitmapIDs,omitempty"` @@ -266,16 +515,23 @@ type Cache struct { func (m *Cache) Reset() { *m = Cache{} } func (m *Cache) String() string { return proto.CompactTextString(m) } func (*Cache) ProtoMessage() {} -func (*Cache) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{15} } +func (*Cache) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } + +func (m *Cache) GetBitmapIDs() []uint64 { + if m != nil { + return m.BitmapIDs + } + return nil +} type MaxSlicesResponse struct { - MaxSlices map[string]uint64 `protobuf:"bytes,1,rep,name=MaxSlices" json:"MaxSlices,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + MaxSlices map[string]uint64 `protobuf:"bytes,1,rep,name=MaxSlices" json:"MaxSlices,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` } func (m *MaxSlicesResponse) Reset() { *m = MaxSlicesResponse{} } func (m *MaxSlicesResponse) String() string { return proto.CompactTextString(m) } func (*MaxSlicesResponse) ProtoMessage() {} -func (*MaxSlicesResponse) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{16} } +func (*MaxSlicesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } func (m *MaxSlicesResponse) GetMaxSlices() map[string]uint64 { if m != nil { @@ -303,3606 +559,51 @@ func init() { proto.RegisterType((*Cache)(nil), "internal.Cache") proto.RegisterType((*MaxSlicesResponse)(nil), "internal.MaxSlicesResponse") } -func (m *DB) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DB) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.TimeQuantum) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintInternal(dAtA, i, uint64(len(m.TimeQuantum))) - i += copy(dAtA[i:], m.TimeQuantum) - } - return i, nil -} - -func (m *Frame) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Frame) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.TimeQuantum) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintInternal(dAtA, i, uint64(len(m.TimeQuantum))) - i += copy(dAtA[i:], m.TimeQuantum) - } - return i, nil -} - -func (m *Bitmap) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Bitmap) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Bits) > 0 { - dAtA2 := make([]byte, len(m.Bits)*10) - var j1 int - for _, num := range m.Bits { - for num >= 1<<7 { - dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA2[j1] = uint8(num) - j1++ - } - dAtA[i] = 0xa - i++ - i = encodeVarintInternal(dAtA, i, uint64(j1)) - i += copy(dAtA[i:], dAtA2[:j1]) - } - if len(m.Attrs) > 0 { - for _, msg := range m.Attrs { - dAtA[i] = 0x12 - i++ - i = encodeVarintInternal(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *Pair) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Pair) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Key != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintInternal(dAtA, i, uint64(m.Key)) - } - if m.Count != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintInternal(dAtA, i, uint64(m.Count)) - } - return i, nil -} - -func (m *Bit) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Bit) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.BitmapID != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintInternal(dAtA, i, uint64(m.BitmapID)) - } - if m.ProfileID != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintInternal(dAtA, i, uint64(m.ProfileID)) - } - if m.Timestamp != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintInternal(dAtA, i, uint64(m.Timestamp)) - } - return i, nil -} - -func (m *Profile) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Profile) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.ID != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintInternal(dAtA, i, uint64(m.ID)) - } - if len(m.Attrs) > 0 { - for _, msg := range m.Attrs { - dAtA[i] = 0x12 - i++ - i = encodeVarintInternal(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *Attr) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Attr) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Key) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintInternal(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) - } - if m.Type != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintInternal(dAtA, i, uint64(m.Type)) - } - if len(m.StringValue) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintInternal(dAtA, i, uint64(len(m.StringValue))) - i += copy(dAtA[i:], m.StringValue) - } - if m.UintValue != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintInternal(dAtA, i, uint64(m.UintValue)) - } - if m.BoolValue { - dAtA[i] = 0x28 - i++ - if m.BoolValue { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - return i, nil -} - -func (m *AttrMap) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AttrMap) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Attrs) > 0 { - for _, msg := range m.Attrs { - dAtA[i] = 0xa - i++ - i = encodeVarintInternal(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *QueryRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.DB) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintInternal(dAtA, i, uint64(len(m.DB))) - i += copy(dAtA[i:], m.DB) - } - if len(m.Query) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintInternal(dAtA, i, uint64(len(m.Query))) - i += copy(dAtA[i:], m.Query) - } - if len(m.Slices) > 0 { - dAtA4 := make([]byte, len(m.Slices)*10) - var j3 int - for _, num := range m.Slices { - for num >= 1<<7 { - dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j3++ - } - dAtA4[j3] = uint8(num) - j3++ - } - dAtA[i] = 0x1a - i++ - i = encodeVarintInternal(dAtA, i, uint64(j3)) - i += copy(dAtA[i:], dAtA4[:j3]) - } - if m.Profiles { - dAtA[i] = 0x20 - i++ - if m.Profiles { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.Timestamp != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintInternal(dAtA, i, uint64(m.Timestamp)) - } - if len(m.Quantum) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintInternal(dAtA, i, uint64(len(m.Quantum))) - i += copy(dAtA[i:], m.Quantum) - } - if m.Remote { - dAtA[i] = 0x38 - i++ - if m.Remote { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - return i, nil -} - -func (m *QueryResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Err) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintInternal(dAtA, i, uint64(len(m.Err))) - i += copy(dAtA[i:], m.Err) - } - if len(m.Results) > 0 { - for _, msg := range m.Results { - dAtA[i] = 0x12 - i++ - i = encodeVarintInternal(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Profiles) > 0 { - for _, msg := range m.Profiles { - dAtA[i] = 0x1a - i++ - i = encodeVarintInternal(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *QueryResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryResult) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Bitmap != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintInternal(dAtA, i, uint64(m.Bitmap.Size())) - n5, err := m.Bitmap.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if m.N != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintInternal(dAtA, i, uint64(m.N)) - } - if len(m.Pairs) > 0 { - for _, msg := range m.Pairs { - dAtA[i] = 0x1a - i++ - i = encodeVarintInternal(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Changed { - dAtA[i] = 0x20 - i++ - if m.Changed { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - return i, nil -} - -func (m *ImportRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImportRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.DB) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintInternal(dAtA, i, uint64(len(m.DB))) - i += copy(dAtA[i:], m.DB) - } - if len(m.Frame) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintInternal(dAtA, i, uint64(len(m.Frame))) - i += copy(dAtA[i:], m.Frame) - } - if m.Slice != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintInternal(dAtA, i, uint64(m.Slice)) - } - if len(m.BitmapIDs) > 0 { - dAtA7 := make([]byte, len(m.BitmapIDs)*10) - var j6 int - for _, num := range m.BitmapIDs { - for num >= 1<<7 { - dAtA7[j6] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j6++ - } - dAtA7[j6] = uint8(num) - j6++ - } - dAtA[i] = 0x22 - i++ - i = encodeVarintInternal(dAtA, i, uint64(j6)) - i += copy(dAtA[i:], dAtA7[:j6]) - } - if len(m.ProfileIDs) > 0 { - dAtA9 := make([]byte, len(m.ProfileIDs)*10) - var j8 int - for _, num := range m.ProfileIDs { - for num >= 1<<7 { - dAtA9[j8] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j8++ - } - dAtA9[j8] = uint8(num) - j8++ - } - dAtA[i] = 0x2a - i++ - i = encodeVarintInternal(dAtA, i, uint64(j8)) - i += copy(dAtA[i:], dAtA9[:j8]) - } - if len(m.Timestamps) > 0 { - dAtA11 := make([]byte, len(m.Timestamps)*10) - var j10 int - for _, num1 := range m.Timestamps { - num := uint64(num1) - for num >= 1<<7 { - dAtA11[j10] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j10++ - } - dAtA11[j10] = uint8(num) - j10++ - } - dAtA[i] = 0x32 - i++ - i = encodeVarintInternal(dAtA, i, uint64(j10)) - i += copy(dAtA[i:], dAtA11[:j10]) - } - return i, nil -} - -func (m *ImportResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImportResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Err) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintInternal(dAtA, i, uint64(len(m.Err))) - i += copy(dAtA[i:], m.Err) - } - return i, nil -} - -func (m *BlockDataRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockDataRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.DB) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintInternal(dAtA, i, uint64(len(m.DB))) - i += copy(dAtA[i:], m.DB) - } - if len(m.Frame) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintInternal(dAtA, i, uint64(len(m.Frame))) - i += copy(dAtA[i:], m.Frame) - } - if m.Slice != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintInternal(dAtA, i, uint64(m.Slice)) - } - if m.Block != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintInternal(dAtA, i, uint64(m.Block)) - } - return i, nil -} - -func (m *BlockDataResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockDataResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.BitmapIDs) > 0 { - dAtA13 := make([]byte, len(m.BitmapIDs)*10) - var j12 int - for _, num := range m.BitmapIDs { - for num >= 1<<7 { - dAtA13[j12] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j12++ - } - dAtA13[j12] = uint8(num) - j12++ - } - dAtA[i] = 0xa - i++ - i = encodeVarintInternal(dAtA, i, uint64(j12)) - i += copy(dAtA[i:], dAtA13[:j12]) - } - if len(m.ProfileIDs) > 0 { - dAtA15 := make([]byte, len(m.ProfileIDs)*10) - var j14 int - for _, num := range m.ProfileIDs { - for num >= 1<<7 { - dAtA15[j14] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j14++ - } - dAtA15[j14] = uint8(num) - j14++ - } - dAtA[i] = 0x12 - i++ - i = encodeVarintInternal(dAtA, i, uint64(j14)) - i += copy(dAtA[i:], dAtA15[:j14]) - } - return i, nil -} - -func (m *Cache) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Cache) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.BitmapIDs) > 0 { - dAtA17 := make([]byte, len(m.BitmapIDs)*10) - var j16 int - for _, num := range m.BitmapIDs { - for num >= 1<<7 { - dAtA17[j16] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j16++ - } - dAtA17[j16] = uint8(num) - j16++ - } - dAtA[i] = 0xa - i++ - i = encodeVarintInternal(dAtA, i, uint64(j16)) - i += copy(dAtA[i:], dAtA17[:j16]) - } - return i, nil -} - -func (m *MaxSlicesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MaxSlicesResponse) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.MaxSlices) > 0 { - for k, _ := range m.MaxSlices { - dAtA[i] = 0xa - i++ - v := m.MaxSlices[k] - mapSize := 1 + len(k) + sovInternal(uint64(len(k))) + 1 + sovInternal(uint64(v)) - i = encodeVarintInternal(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintInternal(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x10 - i++ - i = encodeVarintInternal(dAtA, i, uint64(v)) - } - } - return i, nil -} - -func encodeFixed64Internal(dAtA []byte, offset int, v uint64) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - dAtA[offset+4] = uint8(v >> 32) - dAtA[offset+5] = uint8(v >> 40) - dAtA[offset+6] = uint8(v >> 48) - dAtA[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Internal(dAtA []byte, offset int, v uint32) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintInternal(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *DB) Size() (n int) { - var l int - _ = l - l = len(m.TimeQuantum) - if l > 0 { - n += 1 + l + sovInternal(uint64(l)) - } - return n -} - -func (m *Frame) Size() (n int) { - var l int - _ = l - l = len(m.TimeQuantum) - if l > 0 { - n += 1 + l + sovInternal(uint64(l)) - } - return n -} - -func (m *Bitmap) Size() (n int) { - var l int - _ = l - if len(m.Bits) > 0 { - l = 0 - for _, e := range m.Bits { - l += sovInternal(uint64(e)) - } - n += 1 + sovInternal(uint64(l)) + l - } - if len(m.Attrs) > 0 { - for _, e := range m.Attrs { - l = e.Size() - n += 1 + l + sovInternal(uint64(l)) - } - } - return n -} - -func (m *Pair) Size() (n int) { - var l int - _ = l - if m.Key != 0 { - n += 1 + sovInternal(uint64(m.Key)) - } - if m.Count != 0 { - n += 1 + sovInternal(uint64(m.Count)) - } - return n -} - -func (m *Bit) Size() (n int) { - var l int - _ = l - if m.BitmapID != 0 { - n += 1 + sovInternal(uint64(m.BitmapID)) - } - if m.ProfileID != 0 { - n += 1 + sovInternal(uint64(m.ProfileID)) - } - if m.Timestamp != 0 { - n += 1 + sovInternal(uint64(m.Timestamp)) - } - return n -} - -func (m *Profile) Size() (n int) { - var l int - _ = l - if m.ID != 0 { - n += 1 + sovInternal(uint64(m.ID)) - } - if len(m.Attrs) > 0 { - for _, e := range m.Attrs { - l = e.Size() - n += 1 + l + sovInternal(uint64(l)) - } - } - return n -} - -func (m *Attr) Size() (n int) { - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovInternal(uint64(l)) - } - if m.Type != 0 { - n += 1 + sovInternal(uint64(m.Type)) - } - l = len(m.StringValue) - if l > 0 { - n += 1 + l + sovInternal(uint64(l)) - } - if m.UintValue != 0 { - n += 1 + sovInternal(uint64(m.UintValue)) - } - if m.BoolValue { - n += 2 - } - return n -} - -func (m *AttrMap) Size() (n int) { - var l int - _ = l - if len(m.Attrs) > 0 { - for _, e := range m.Attrs { - l = e.Size() - n += 1 + l + sovInternal(uint64(l)) - } - } - return n -} - -func (m *QueryRequest) Size() (n int) { - var l int - _ = l - l = len(m.DB) - if l > 0 { - n += 1 + l + sovInternal(uint64(l)) - } - l = len(m.Query) - if l > 0 { - n += 1 + l + sovInternal(uint64(l)) - } - if len(m.Slices) > 0 { - l = 0 - for _, e := range m.Slices { - l += sovInternal(uint64(e)) - } - n += 1 + sovInternal(uint64(l)) + l - } - if m.Profiles { - n += 2 - } - if m.Timestamp != 0 { - n += 1 + sovInternal(uint64(m.Timestamp)) - } - l = len(m.Quantum) - if l > 0 { - n += 1 + l + sovInternal(uint64(l)) - } - if m.Remote { - n += 2 - } - return n -} - -func (m *QueryResponse) Size() (n int) { - var l int - _ = l - l = len(m.Err) - if l > 0 { - n += 1 + l + sovInternal(uint64(l)) - } - if len(m.Results) > 0 { - for _, e := range m.Results { - l = e.Size() - n += 1 + l + sovInternal(uint64(l)) - } - } - if len(m.Profiles) > 0 { - for _, e := range m.Profiles { - l = e.Size() - n += 1 + l + sovInternal(uint64(l)) - } - } - return n -} - -func (m *QueryResult) Size() (n int) { - var l int - _ = l - if m.Bitmap != nil { - l = m.Bitmap.Size() - n += 1 + l + sovInternal(uint64(l)) - } - if m.N != 0 { - n += 1 + sovInternal(uint64(m.N)) - } - if len(m.Pairs) > 0 { - for _, e := range m.Pairs { - l = e.Size() - n += 1 + l + sovInternal(uint64(l)) - } - } - if m.Changed { - n += 2 - } - return n -} - -func (m *ImportRequest) Size() (n int) { - var l int - _ = l - l = len(m.DB) - if l > 0 { - n += 1 + l + sovInternal(uint64(l)) - } - l = len(m.Frame) - if l > 0 { - n += 1 + l + sovInternal(uint64(l)) - } - if m.Slice != 0 { - n += 1 + sovInternal(uint64(m.Slice)) - } - if len(m.BitmapIDs) > 0 { - l = 0 - for _, e := range m.BitmapIDs { - l += sovInternal(uint64(e)) - } - n += 1 + sovInternal(uint64(l)) + l - } - if len(m.ProfileIDs) > 0 { - l = 0 - for _, e := range m.ProfileIDs { - l += sovInternal(uint64(e)) - } - n += 1 + sovInternal(uint64(l)) + l - } - if len(m.Timestamps) > 0 { - l = 0 - for _, e := range m.Timestamps { - l += sovInternal(uint64(e)) - } - n += 1 + sovInternal(uint64(l)) + l - } - return n -} - -func (m *ImportResponse) Size() (n int) { - var l int - _ = l - l = len(m.Err) - if l > 0 { - n += 1 + l + sovInternal(uint64(l)) - } - return n -} - -func (m *BlockDataRequest) Size() (n int) { - var l int - _ = l - l = len(m.DB) - if l > 0 { - n += 1 + l + sovInternal(uint64(l)) - } - l = len(m.Frame) - if l > 0 { - n += 1 + l + sovInternal(uint64(l)) - } - if m.Slice != 0 { - n += 1 + sovInternal(uint64(m.Slice)) - } - if m.Block != 0 { - n += 1 + sovInternal(uint64(m.Block)) - } - return n -} - -func (m *BlockDataResponse) Size() (n int) { - var l int - _ = l - if len(m.BitmapIDs) > 0 { - l = 0 - for _, e := range m.BitmapIDs { - l += sovInternal(uint64(e)) - } - n += 1 + sovInternal(uint64(l)) + l - } - if len(m.ProfileIDs) > 0 { - l = 0 - for _, e := range m.ProfileIDs { - l += sovInternal(uint64(e)) - } - n += 1 + sovInternal(uint64(l)) + l - } - return n -} - -func (m *Cache) Size() (n int) { - var l int - _ = l - if len(m.BitmapIDs) > 0 { - l = 0 - for _, e := range m.BitmapIDs { - l += sovInternal(uint64(e)) - } - n += 1 + sovInternal(uint64(l)) + l - } - return n -} - -func (m *MaxSlicesResponse) Size() (n int) { - var l int - _ = l - if len(m.MaxSlices) > 0 { - for k, v := range m.MaxSlices { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovInternal(uint64(len(k))) + 1 + sovInternal(uint64(v)) - n += mapEntrySize + 1 + sovInternal(uint64(mapEntrySize)) - } - } - return n -} - -func sovInternal(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozInternal(x uint64) (n int) { - return sovInternal(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *DB) 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 ErrIntOverflowInternal - } - 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: DB: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DB: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeQuantum", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - 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 ErrInvalidLengthInternal - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TimeQuantum = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipInternal(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Frame) 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 ErrIntOverflowInternal - } - 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: Frame: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Frame: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeQuantum", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - 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 ErrInvalidLengthInternal - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TimeQuantum = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipInternal(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Bitmap) 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 ErrIntOverflowInternal - } - 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: Bitmap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Bitmap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthInternal - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Bits = append(m.Bits, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Bits = append(m.Bits, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Bits", wireType) - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attrs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthInternal - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attrs = append(m.Attrs, &Attr{}) - if err := m.Attrs[len(m.Attrs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipInternal(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Pair) 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 ErrIntOverflowInternal - } - 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: Pair: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Pair: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - m.Key = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Key |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) - } - m.Count = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Count |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipInternal(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Bit) 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 ErrIntOverflowInternal - } - 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: Bit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Bit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BitmapID", wireType) - } - m.BitmapID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BitmapID |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProfileID", wireType) - } - m.ProfileID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ProfileID |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - m.Timestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timestamp |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipInternal(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Profile) 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 ErrIntOverflowInternal - } - 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: Profile: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Profile: 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 ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ID |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attrs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthInternal - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attrs = append(m.Attrs, &Attr{}) - if err := m.Attrs[len(m.Attrs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipInternal(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Attr) 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 ErrIntOverflowInternal - } - 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: Attr: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Attr: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - 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 ErrInvalidLengthInternal - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - 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 ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - 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 ErrInvalidLengthInternal - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StringValue = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UintValue", wireType) - } - m.UintValue = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UintValue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.BoolValue = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipInternal(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AttrMap) 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 ErrIntOverflowInternal - } - 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: AttrMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AttrMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attrs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthInternal - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attrs = append(m.Attrs, &Attr{}) - if err := m.Attrs[len(m.Attrs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipInternal(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryRequest) 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 ErrIntOverflowInternal - } - 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: QueryRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DB", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - 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 ErrInvalidLengthInternal - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DB = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - 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 ErrInvalidLengthInternal - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Query = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthInternal - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Slices = append(m.Slices, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Slices = append(m.Slices, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Slices", wireType) - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Profiles", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Profiles = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - m.Timestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timestamp |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Quantum", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - 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 ErrInvalidLengthInternal - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Quantum = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Remote", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Remote = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipInternal(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryResponse) 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 ErrIntOverflowInternal - } - 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: QueryResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Err", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - 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 ErrInvalidLengthInternal - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Err = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthInternal - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Results = append(m.Results, &QueryResult{}) - if err := m.Results[len(m.Results)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Profiles", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthInternal - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Profiles = append(m.Profiles, &Profile{}) - if err := m.Profiles[len(m.Profiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipInternal(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryResult) 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 ErrIntOverflowInternal - } - 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: QueryResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bitmap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthInternal - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Bitmap == nil { - m.Bitmap = &Bitmap{} - } - if err := m.Bitmap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field N", wireType) - } - m.N = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.N |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pairs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthInternal - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Pairs = append(m.Pairs, &Pair{}) - if err := m.Pairs[len(m.Pairs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Changed", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Changed = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipInternal(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImportRequest) 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 ErrIntOverflowInternal - } - 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: ImportRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImportRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DB", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - 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 ErrInvalidLengthInternal - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DB = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Frame", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - 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 ErrInvalidLengthInternal - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Frame = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Slice", wireType) - } - m.Slice = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Slice |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthInternal - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.BitmapIDs = append(m.BitmapIDs, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.BitmapIDs = append(m.BitmapIDs, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field BitmapIDs", wireType) - } - case 5: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthInternal - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.ProfileIDs = append(m.ProfileIDs, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.ProfileIDs = append(m.ProfileIDs, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field ProfileIDs", wireType) - } - case 6: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthInternal - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Timestamps = append(m.Timestamps, v) - } - } else if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Timestamps = append(m.Timestamps, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamps", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipInternal(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImportResponse) 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 ErrIntOverflowInternal - } - 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: ImportResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImportResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Err", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - 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 ErrInvalidLengthInternal - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Err = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipInternal(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockDataRequest) 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 ErrIntOverflowInternal - } - 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: BlockDataRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockDataRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DB", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - 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 ErrInvalidLengthInternal - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DB = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Frame", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - 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 ErrInvalidLengthInternal - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Frame = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Slice", wireType) - } - m.Slice = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Slice |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) - } - m.Block = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Block |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipInternal(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockDataResponse) 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 ErrIntOverflowInternal - } - 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: BlockDataResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockDataResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthInternal - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.BitmapIDs = append(m.BitmapIDs, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.BitmapIDs = append(m.BitmapIDs, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field BitmapIDs", wireType) - } - case 2: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthInternal - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.ProfileIDs = append(m.ProfileIDs, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.ProfileIDs = append(m.ProfileIDs, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field ProfileIDs", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipInternal(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Cache) 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 ErrIntOverflowInternal - } - 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: Cache: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Cache: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthInternal - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.BitmapIDs = append(m.BitmapIDs, v) - } - } else if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.BitmapIDs = append(m.BitmapIDs, v) - } else { - return fmt.Errorf("proto: wrong wireType = %d for field BitmapIDs", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipInternal(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MaxSlicesResponse) 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 ErrIntOverflowInternal - } - 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: MaxSlicesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MaxSlicesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxSlices", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthInternal - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthInternal - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.MaxSlices == nil { - m.MaxSlices = make(map[string]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MaxSlices[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.MaxSlices[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipInternal(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipInternal(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowInternal - } - 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, ErrIntOverflowInternal - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowInternal - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthInternal - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowInternal - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipInternal(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthInternal = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowInternal = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("internal.proto", fileDescriptorInternal) } -var fileDescriptorInternal = []byte{ - // 706 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x55, 0xcd, 0x6a, 0x14, 0x4f, - 0x10, 0xff, 0xf7, 0xce, 0xcc, 0x7e, 0xd4, 0x26, 0xcb, 0xa6, 0xd9, 0xbf, 0x0c, 0x41, 0x96, 0xa1, - 0x51, 0x19, 0x05, 0x13, 0x88, 0x17, 0x11, 0x41, 0x9c, 0x6c, 0xc4, 0x45, 0x12, 0x92, 0x4e, 0xf4, - 0xe6, 0x61, 0x4c, 0xda, 0x64, 0xc8, 0x7c, 0xd9, 0xd3, 0x23, 0xee, 0xd1, 0x83, 0x17, 0x9f, 0x40, - 0xf0, 0x09, 0x7c, 0x03, 0x1f, 0xc1, 0xa3, 0x8f, 0x20, 0xf1, 0x45, 0xa4, 0x3f, 0xe6, 0x23, 0x11, - 0x63, 0x0e, 0xde, 0xa6, 0x7e, 0xd5, 0xd5, 0x55, 0xbf, 0xfa, 0x55, 0xf5, 0xc0, 0x28, 0x4a, 0x05, - 0xe3, 0x69, 0x18, 0xaf, 0xe5, 0x3c, 0x13, 0x19, 0xee, 0x57, 0x36, 0xb9, 0x05, 0x9d, 0x59, 0x80, - 0x3d, 0x18, 0x1e, 0x44, 0x09, 0xdb, 0x2b, 0xc3, 0x54, 0x94, 0x89, 0x8b, 0x3c, 0xe4, 0x0f, 0x68, - 0x1b, 0x22, 0xb7, 0xc1, 0x79, 0xc2, 0xc3, 0x84, 0x5d, 0xe1, 0x68, 0x00, 0xdd, 0x20, 0x12, 0x49, - 0x98, 0x63, 0x0c, 0x76, 0x10, 0x89, 0xc2, 0x45, 0x9e, 0xe5, 0xdb, 0x54, 0x7d, 0xe3, 0x1b, 0xe0, - 0x3c, 0x16, 0x82, 0x17, 0x6e, 0xc7, 0xb3, 0xfc, 0xe1, 0xc6, 0x68, 0xad, 0x2e, 0x4d, 0xc2, 0x54, - 0x3b, 0xc9, 0x1a, 0xd8, 0xbb, 0x61, 0xc4, 0xf1, 0x18, 0xac, 0x67, 0x6c, 0xa1, 0xb2, 0xd8, 0x54, - 0x7e, 0xe2, 0x09, 0x38, 0x9b, 0x59, 0x99, 0x0a, 0xb7, 0xa3, 0x30, 0x6d, 0x90, 0x97, 0x60, 0x05, - 0x91, 0xc0, 0xab, 0xd0, 0xd7, 0xa9, 0xe7, 0x33, 0x13, 0x53, 0xdb, 0xf8, 0x3a, 0x0c, 0x76, 0x79, - 0xf6, 0x3a, 0x8a, 0xd9, 0x7c, 0x66, 0x82, 0x1b, 0x40, 0x7a, 0x25, 0x87, 0x42, 0x84, 0x49, 0xee, - 0x5a, 0x1e, 0xf2, 0x2d, 0xda, 0x00, 0xe4, 0x11, 0xf4, 0xcc, 0x51, 0x3c, 0x82, 0x4e, 0x7d, 0x79, - 0x67, 0x3e, 0xbb, 0x22, 0x9f, 0x8f, 0x08, 0x6c, 0xf9, 0xd5, 0x26, 0x34, 0xd0, 0x84, 0x30, 0xd8, - 0x07, 0x8b, 0x9c, 0x99, 0x92, 0xd4, 0xb7, 0x6c, 0xf2, 0xbe, 0xe0, 0x51, 0x7a, 0xfc, 0x22, 0x8c, - 0x4b, 0xa6, 0xea, 0x19, 0xd0, 0x36, 0x24, 0xeb, 0x7d, 0x1e, 0xa5, 0x42, 0xfb, 0x6d, 0xcd, 0xa6, - 0x06, 0xa4, 0x37, 0xc8, 0xb2, 0x58, 0x7b, 0x1d, 0x0f, 0xf9, 0x7d, 0xda, 0x00, 0x64, 0x1d, 0x7a, - 0xb2, 0x96, 0xed, 0x30, 0x6f, 0xaa, 0x47, 0x97, 0x55, 0xff, 0x15, 0xc1, 0xd2, 0x5e, 0xc9, 0xf8, - 0x82, 0xb2, 0x37, 0x25, 0x2b, 0x84, 0x6c, 0xc2, 0x2c, 0x30, 0x24, 0xe4, 0xfc, 0x4c, 0xc0, 0x51, - 0x7e, 0x45, 0x62, 0x40, 0xb5, 0x81, 0xaf, 0x41, 0x77, 0x3f, 0x8e, 0x0e, 0x59, 0xe1, 0x5a, 0x6a, - 0x00, 0x8c, 0x25, 0x55, 0x32, 0xdd, 0x2c, 0x54, 0xe9, 0x7d, 0x5a, 0xdb, 0xe7, 0x75, 0x70, 0x2e, - 0xe8, 0x80, 0x5d, 0xe8, 0x55, 0x83, 0xd7, 0x55, 0x99, 0x2a, 0x53, 0xe6, 0xa2, 0x2c, 0xc9, 0x04, - 0x73, 0x7b, 0xea, 0x46, 0x63, 0x91, 0xf7, 0x08, 0x96, 0x4d, 0xe9, 0x45, 0x9e, 0xa5, 0x05, 0x93, - 0x0a, 0x6c, 0x71, 0x5e, 0x29, 0xb0, 0xc5, 0x39, 0x5e, 0x87, 0x1e, 0x65, 0x45, 0x19, 0x8b, 0x4a, - 0xc4, 0xff, 0x9b, 0x36, 0x54, 0xb1, 0x65, 0x2c, 0x68, 0x75, 0x0a, 0xdf, 0x6d, 0x11, 0xb0, 0x54, - 0xc4, 0x4a, 0x13, 0x61, 0x3c, 0x0d, 0x27, 0xf2, 0x01, 0xc1, 0xb0, 0x75, 0x0f, 0xf6, 0xab, 0x05, - 0x51, 0x45, 0x0c, 0x37, 0xc6, 0x4d, 0xb0, 0xc6, 0x69, 0xb5, 0x40, 0x4b, 0x80, 0x76, 0xcc, 0x60, - 0xa0, 0x1d, 0x29, 0x96, 0x5c, 0x8a, 0x2a, 0x67, 0x4b, 0x2c, 0x09, 0x53, 0xed, 0x94, 0x3d, 0xda, - 0x3c, 0x09, 0xd3, 0x63, 0x76, 0x64, 0x9a, 0x5b, 0x99, 0xe4, 0x0b, 0x82, 0xe5, 0x79, 0x92, 0x67, - 0x5c, 0x5c, 0xa2, 0xa3, 0xda, 0xf2, 0x4a, 0x47, 0xbd, 0xf2, 0x13, 0x70, 0x94, 0x72, 0x6a, 0x0e, - 0x6d, 0xaa, 0x0d, 0x35, 0x63, 0x66, 0xb7, 0xa4, 0x8c, 0x52, 0xe0, 0x06, 0xc0, 0x53, 0x80, 0x7a, - 0xb9, 0x0a, 0xd7, 0x51, 0xee, 0x16, 0x22, 0xfd, 0xb5, 0xac, 0x85, 0xdb, 0xf5, 0x2c, 0xdf, 0xa2, - 0x2d, 0x84, 0x10, 0x18, 0x55, 0xa5, 0xfe, 0x49, 0x37, 0x72, 0x04, 0xe3, 0x20, 0xce, 0x0e, 0x4f, - 0x67, 0xa1, 0x08, 0xff, 0x05, 0xa3, 0x09, 0x38, 0xea, 0x3e, 0xb3, 0x4f, 0xda, 0x20, 0x7b, 0xb0, - 0xd2, 0xca, 0x62, 0x8a, 0x39, 0x47, 0x1e, 0x5d, 0x4e, 0xbe, 0x73, 0x91, 0x3c, 0xb9, 0x09, 0xce, - 0x66, 0x78, 0x78, 0xf2, 0x97, 0x6b, 0xc8, 0x67, 0x04, 0x2b, 0xdb, 0xe1, 0x3b, 0xbd, 0x35, 0x75, - 0xea, 0xa7, 0x30, 0xa8, 0x41, 0xb3, 0xb6, 0x77, 0x9a, 0x49, 0xf8, 0xed, 0x7c, 0x83, 0x6c, 0xa5, - 0x82, 0x2f, 0x68, 0x13, 0xbc, 0xfa, 0x10, 0x46, 0xe7, 0x9d, 0xb2, 0xc7, 0xa7, 0xcd, 0xeb, 0x74, - 0xaa, 0x9f, 0xdb, 0xb7, 0xea, 0x15, 0x31, 0xcf, 0xad, 0x32, 0x1e, 0x74, 0xee, 0xa3, 0x60, 0xfc, - 0xed, 0x6c, 0x8a, 0xbe, 0x9f, 0x4d, 0xd1, 0x8f, 0xb3, 0x29, 0xfa, 0xf4, 0x73, 0xfa, 0xdf, 0xab, - 0xae, 0xfa, 0xb9, 0xdc, 0xfb, 0x15, 0x00, 0x00, 0xff, 0xff, 0xe9, 0x7d, 0x09, 0xe4, 0x6e, 0x06, - 0x00, 0x00, +func init() { proto.RegisterFile("internal.proto", fileDescriptor0) } + +var fileDescriptor0 = []byte{ + // 672 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x55, 0xcb, 0x6a, 0x14, 0x4d, + 0x14, 0xa6, 0xfa, 0x32, 0x97, 0x33, 0xc9, 0x90, 0x14, 0xf3, 0xff, 0x34, 0x41, 0xa4, 0x29, 0x54, + 0x5a, 0xc1, 0x04, 0xe2, 0x46, 0x44, 0x10, 0x3b, 0x13, 0x71, 0x90, 0x84, 0xa4, 0x12, 0xdd, 0xb9, + 0x68, 0x93, 0x32, 0x69, 0xd2, 0x37, 0xab, 0xab, 0xc5, 0x59, 0xba, 0x70, 0xe3, 0x23, 0xe8, 0x13, + 0xf8, 0x96, 0x52, 0x97, 0xee, 0xea, 0x28, 0x8e, 0x59, 0xb8, 0xeb, 0xf3, 0x9d, 0x3a, 0xa7, 0xbe, + 0xef, 0x5c, 0xaa, 0x61, 0x9a, 0x16, 0x82, 0xf1, 0x22, 0xc9, 0xb6, 0x2b, 0x5e, 0x8a, 0x12, 0x8f, + 0x5a, 0x9b, 0xdc, 0x03, 0x67, 0x1e, 0xe3, 0x10, 0x26, 0xa7, 0x69, 0xce, 0x8e, 0x9b, 0xa4, 0x10, + 0x4d, 0x1e, 0xa0, 0x10, 0x45, 0x63, 0xda, 0x87, 0xc8, 0x7d, 0xf0, 0x5f, 0xf0, 0x24, 0x67, 0x37, + 0x38, 0x1a, 0xc3, 0x20, 0x4e, 0x45, 0x9e, 0x54, 0x18, 0x83, 0x17, 0xa7, 0xa2, 0x0e, 0x50, 0xe8, + 0x46, 0x1e, 0x55, 0xdf, 0xf8, 0x0e, 0xf8, 0xcf, 0x85, 0xe0, 0x75, 0xe0, 0x84, 0x6e, 0x34, 0xd9, + 0x9d, 0x6e, 0x77, 0xd4, 0x24, 0x4c, 0xb5, 0x93, 0x6c, 0x83, 0x77, 0x94, 0xa4, 0x1c, 0x6f, 0x80, + 0xfb, 0x8a, 0x2d, 0xd5, 0x2d, 0x1e, 0x95, 0x9f, 0x78, 0x06, 0xfe, 0x5e, 0xd9, 0x14, 0x22, 0x70, + 0x14, 0xa6, 0x0d, 0xf2, 0x16, 0xdc, 0x38, 0x15, 0x78, 0x0b, 0x46, 0xfa, 0xea, 0xc5, 0xdc, 0xc4, + 0x74, 0x36, 0xbe, 0x05, 0xe3, 0x23, 0x5e, 0xbe, 0x4f, 0x33, 0xb6, 0x98, 0x9b, 0x60, 0x0b, 0x48, + 0xaf, 0xd4, 0x50, 0x8b, 0x24, 0xaf, 0x02, 0x37, 0x44, 0x91, 0x4b, 0x2d, 0x40, 0x9e, 0xc1, 0xd0, + 0x1c, 0xc5, 0x53, 0x70, 0xba, 0xe4, 0xce, 0x62, 0x7e, 0x43, 0x3d, 0x5f, 0x11, 0x78, 0xf2, 0xab, + 0x2f, 0x68, 0xac, 0x05, 0x61, 0xf0, 0x4e, 0x97, 0x15, 0x33, 0x94, 0xd4, 0xb7, 0x2c, 0xf2, 0x89, + 0xe0, 0x69, 0x71, 0xf1, 0x26, 0xc9, 0x1a, 0xa6, 0xf8, 0x8c, 0x69, 0x1f, 0x92, 0x7c, 0x5f, 0xa7, + 0x85, 0xd0, 0x7e, 0x4f, 0xab, 0xe9, 0x00, 0xe9, 0x8d, 0xcb, 0x32, 0xd3, 0x5e, 0x3f, 0x44, 0xd1, + 0x88, 0x5a, 0x80, 0xec, 0xc0, 0x50, 0x72, 0x39, 0x48, 0x2a, 0xcb, 0x1e, 0xad, 0x62, 0xff, 0x0d, + 0xc1, 0xda, 0x71, 0xc3, 0xf8, 0x92, 0xb2, 0x0f, 0x0d, 0xab, 0x85, 0x2c, 0xc2, 0x3c, 0x36, 0x22, + 0xe4, 0xfc, 0xcc, 0xc0, 0x57, 0x7e, 0x25, 0x62, 0x4c, 0xb5, 0x81, 0xff, 0x87, 0xc1, 0x49, 0x96, + 0x9e, 0xb1, 0x3a, 0x70, 0xd5, 0x00, 0x18, 0x4b, 0x76, 0xc9, 0x54, 0xb3, 0x56, 0xd4, 0x47, 0xb4, + 0xb3, 0x71, 0x00, 0xc3, 0x76, 0xb4, 0x7c, 0x95, 0xab, 0x35, 0x65, 0x36, 0xca, 0xf2, 0x52, 0xb0, + 0x60, 0xa0, 0x62, 0x8c, 0x45, 0x3e, 0x23, 0x58, 0x37, 0xe4, 0xea, 0xaa, 0x2c, 0x6a, 0x26, 0x6b, + 0xbc, 0xcf, 0x79, 0x5b, 0xe3, 0x7d, 0xce, 0xf1, 0x0e, 0x0c, 0x29, 0xab, 0x9b, 0x4c, 0xb4, 0x6d, + 0xfa, 0xcf, 0x0a, 0x6d, 0x63, 0x9b, 0x4c, 0xd0, 0xf6, 0x14, 0x7e, 0xd8, 0xa3, 0xe8, 0xaa, 0x88, + 0x4d, 0x1b, 0x61, 0x3c, 0x96, 0x35, 0xf9, 0x82, 0x60, 0xd2, 0xcb, 0x83, 0xa3, 0x76, 0x05, 0x14, + 0x89, 0xc9, 0xee, 0x86, 0x0d, 0xd6, 0x38, 0x6d, 0x57, 0x64, 0x0d, 0xd0, 0xa1, 0x69, 0x3d, 0x3a, + 0x94, 0xed, 0x90, 0x63, 0xdf, 0xde, 0xd9, 0x6b, 0x87, 0x84, 0xa9, 0x76, 0xca, 0x1a, 0xed, 0x5d, + 0x26, 0xc5, 0x05, 0x3b, 0x37, 0xe5, 0x6b, 0x4d, 0xf2, 0x03, 0xc1, 0xfa, 0x22, 0xaf, 0x4a, 0x2e, + 0x56, 0x74, 0x4a, 0xed, 0x71, 0xdb, 0x29, 0xbd, 0xd4, 0x33, 0xf0, 0x55, 0x6f, 0xd4, 0xa4, 0x79, + 0x54, 0x1b, 0x6a, 0x8a, 0xcc, 0xf6, 0xc8, 0x46, 0xc9, 0x16, 0x5a, 0x00, 0xdf, 0x06, 0xe8, 0xd6, + 0xa7, 0x0e, 0x7c, 0xe5, 0xee, 0x21, 0xd2, 0xdf, 0x2d, 0x50, 0x1d, 0x0c, 0x42, 0x37, 0x72, 0x69, + 0x0f, 0x21, 0x04, 0xa6, 0x2d, 0xd5, 0x3f, 0xf5, 0x8d, 0x9c, 0xc3, 0x46, 0x9c, 0x95, 0x67, 0x57, + 0xf3, 0x44, 0x24, 0xff, 0x42, 0xd1, 0x0c, 0x7c, 0x95, 0xcf, 0x6c, 0x8c, 0x36, 0xc8, 0x31, 0x6c, + 0xf6, 0x6e, 0x31, 0x64, 0xae, 0x89, 0x47, 0xab, 0xc5, 0x3b, 0xbf, 0x8a, 0x27, 0x77, 0xc1, 0xdf, + 0x4b, 0xce, 0x2e, 0xff, 0x92, 0x86, 0x7c, 0x47, 0xb0, 0x79, 0x90, 0x7c, 0xd2, 0x7b, 0xd1, 0x5d, + 0xfd, 0x12, 0xc6, 0x1d, 0x68, 0x16, 0xf3, 0x81, 0x9d, 0x84, 0xdf, 0xce, 0x5b, 0x64, 0xbf, 0x10, + 0x7c, 0x49, 0x6d, 0xf0, 0xd6, 0x53, 0x98, 0x5e, 0x77, 0xca, 0x1a, 0x5f, 0xd9, 0xf7, 0xe7, 0x4a, + 0x3f, 0xa8, 0x1f, 0xd5, 0x3b, 0x61, 0x1e, 0x54, 0x65, 0x3c, 0x71, 0x1e, 0xa3, 0x77, 0x03, 0xf5, + 0xb3, 0x78, 0xf4, 0x33, 0x00, 0x00, 0xff, 0xff, 0x52, 0x09, 0x63, 0x99, 0x3e, 0x06, 0x00, 0x00, } diff --git a/internal/internal.proto b/internal/internal.proto index bab66e6bf..eaffe7307 100644 --- a/internal/internal.proto +++ b/internal/internal.proto @@ -48,9 +48,8 @@ message QueryRequest { string Query = 2; repeated uint64 Slices = 3; bool Profiles = 4; - int64 Timestamp = 5; - string Quantum = 6; - bool Remote = 7; + string Quantum = 5; + bool Remote = 6; } message QueryResponse { diff --git a/pql/ast.go b/pql/ast.go index 300ebe8f9..dec73ac2b 100644 --- a/pql/ast.go +++ b/pql/ast.go @@ -6,6 +6,7 @@ import ( "sort" "strconv" "strings" + "time" ) // Query represents a PQL query. @@ -98,6 +99,9 @@ func (c *Call) String() string { fmt.Fprintf(&buf, "%v=%s", key, joinInterfaceSlice(v)) case []uint64: fmt.Fprintf(&buf, "%v=%s", key, joinUint64Slice(v)) + case time.Time: + layout := "2006-01-02T15:04:05" + fmt.Fprintf(&buf, "%v=\"%s\"", key, v.Format(layout)) default: fmt.Fprintf(&buf, "%v=%v", key, v) } From 20c78627b0ac5a1e7ab0925bcc51f3d0e1a2723a Mon Sep 17 00:00:00 2001 From: Yuce Tekol Date: Wed, 8 Feb 2017 21:29:42 +0300 Subject: [PATCH 2/4] Using gogo protobuf v0.3 --- internal/internal.pb.go | 3603 ++++++++++++++++++++++++++++++++++----- 1 file changed, 3220 insertions(+), 383 deletions(-) diff --git a/internal/internal.pb.go b/internal/internal.pb.go index 6e50f97c4..4371b3891 100644 --- a/internal/internal.pb.go +++ b/internal/internal.pb.go @@ -1,31 +1,31 @@ -// Code generated by protoc-gen-go. +// Code generated by protoc-gen-gogo. // source: internal.proto // DO NOT EDIT! /* -Package internal is a generated protocol buffer package. + Package internal is a generated protocol buffer package. -It is generated from these files: - internal.proto + It is generated from these files: + internal.proto -It has these top-level messages: - DB - Frame - Bitmap - Pair - Bit - Profile - Attr - AttrMap - QueryRequest - QueryResponse - QueryResult - ImportRequest - ImportResponse - BlockDataRequest - BlockDataResponse - Cache - MaxSlicesResponse + It has these top-level messages: + DB + Frame + Bitmap + Pair + Bit + Profile + Attr + AttrMap + QueryRequest + QueryResponse + QueryResult + ImportRequest + ImportResponse + BlockDataRequest + BlockDataResponse + Cache + MaxSlicesResponse */ package internal @@ -33,6 +33,8 @@ import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" +import io "io" + // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf @@ -45,53 +47,32 @@ var _ = math.Inf const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type DB struct { - TimeQuantum string `protobuf:"bytes,1,opt,name=TimeQuantum" json:"TimeQuantum,omitempty"` + TimeQuantum string `protobuf:"bytes,1,opt,name=TimeQuantum,proto3" json:"TimeQuantum,omitempty"` } func (m *DB) Reset() { *m = DB{} } func (m *DB) String() string { return proto.CompactTextString(m) } func (*DB) ProtoMessage() {} -func (*DB) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } - -func (m *DB) GetTimeQuantum() string { - if m != nil { - return m.TimeQuantum - } - return "" -} +func (*DB) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{0} } type Frame struct { - TimeQuantum string `protobuf:"bytes,1,opt,name=TimeQuantum" json:"TimeQuantum,omitempty"` + TimeQuantum string `protobuf:"bytes,1,opt,name=TimeQuantum,proto3" json:"TimeQuantum,omitempty"` } func (m *Frame) Reset() { *m = Frame{} } func (m *Frame) String() string { return proto.CompactTextString(m) } func (*Frame) ProtoMessage() {} -func (*Frame) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } - -func (m *Frame) GetTimeQuantum() string { - if m != nil { - return m.TimeQuantum - } - return "" -} +func (*Frame) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{1} } type Bitmap struct { - Bits []uint64 `protobuf:"varint,1,rep,packed,name=Bits" json:"Bits,omitempty"` + Bits []uint64 `protobuf:"varint,1,rep,name=Bits" json:"Bits,omitempty"` Attrs []*Attr `protobuf:"bytes,2,rep,name=Attrs" json:"Attrs,omitempty"` } func (m *Bitmap) Reset() { *m = Bitmap{} } func (m *Bitmap) String() string { return proto.CompactTextString(m) } func (*Bitmap) ProtoMessage() {} -func (*Bitmap) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } - -func (m *Bitmap) GetBits() []uint64 { - if m != nil { - return m.Bits - } - return nil -} +func (*Bitmap) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{2} } func (m *Bitmap) GetAttrs() []*Attr { if m != nil { @@ -101,77 +82,35 @@ func (m *Bitmap) GetAttrs() []*Attr { } type Pair struct { - Key uint64 `protobuf:"varint,1,opt,name=Key" json:"Key,omitempty"` - Count uint64 `protobuf:"varint,2,opt,name=Count" json:"Count,omitempty"` + Key uint64 `protobuf:"varint,1,opt,name=Key,proto3" json:"Key,omitempty"` + Count uint64 `protobuf:"varint,2,opt,name=Count,proto3" json:"Count,omitempty"` } func (m *Pair) Reset() { *m = Pair{} } func (m *Pair) String() string { return proto.CompactTextString(m) } func (*Pair) ProtoMessage() {} -func (*Pair) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } - -func (m *Pair) GetKey() uint64 { - if m != nil { - return m.Key - } - return 0 -} - -func (m *Pair) GetCount() uint64 { - if m != nil { - return m.Count - } - return 0 -} +func (*Pair) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{3} } type Bit struct { - BitmapID uint64 `protobuf:"varint,1,opt,name=BitmapID" json:"BitmapID,omitempty"` - ProfileID uint64 `protobuf:"varint,2,opt,name=ProfileID" json:"ProfileID,omitempty"` - Timestamp int64 `protobuf:"varint,3,opt,name=Timestamp" json:"Timestamp,omitempty"` + BitmapID uint64 `protobuf:"varint,1,opt,name=BitmapID,proto3" json:"BitmapID,omitempty"` + ProfileID uint64 `protobuf:"varint,2,opt,name=ProfileID,proto3" json:"ProfileID,omitempty"` + Timestamp int64 `protobuf:"varint,3,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` } func (m *Bit) Reset() { *m = Bit{} } func (m *Bit) String() string { return proto.CompactTextString(m) } func (*Bit) ProtoMessage() {} -func (*Bit) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } - -func (m *Bit) GetBitmapID() uint64 { - if m != nil { - return m.BitmapID - } - return 0 -} - -func (m *Bit) GetProfileID() uint64 { - if m != nil { - return m.ProfileID - } - return 0 -} - -func (m *Bit) GetTimestamp() int64 { - if m != nil { - return m.Timestamp - } - return 0 -} +func (*Bit) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{4} } type Profile struct { - ID uint64 `protobuf:"varint,1,opt,name=ID" json:"ID,omitempty"` + ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` Attrs []*Attr `protobuf:"bytes,2,rep,name=Attrs" json:"Attrs,omitempty"` } func (m *Profile) Reset() { *m = Profile{} } func (m *Profile) String() string { return proto.CompactTextString(m) } func (*Profile) ProtoMessage() {} -func (*Profile) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } - -func (m *Profile) GetID() uint64 { - if m != nil { - return m.ID - } - return 0 -} +func (*Profile) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{5} } func (m *Profile) GetAttrs() []*Attr { if m != nil { @@ -181,52 +120,17 @@ func (m *Profile) GetAttrs() []*Attr { } type Attr struct { - Key string `protobuf:"bytes,1,opt,name=Key" json:"Key,omitempty"` - Type uint64 `protobuf:"varint,2,opt,name=Type" json:"Type,omitempty"` - StringValue string `protobuf:"bytes,3,opt,name=StringValue" json:"StringValue,omitempty"` - UintValue uint64 `protobuf:"varint,4,opt,name=UintValue" json:"UintValue,omitempty"` - BoolValue bool `protobuf:"varint,5,opt,name=BoolValue" json:"BoolValue,omitempty"` + Key string `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"` + Type uint64 `protobuf:"varint,2,opt,name=Type,proto3" json:"Type,omitempty"` + StringValue string `protobuf:"bytes,3,opt,name=StringValue,proto3" json:"StringValue,omitempty"` + UintValue uint64 `protobuf:"varint,4,opt,name=UintValue,proto3" json:"UintValue,omitempty"` + BoolValue bool `protobuf:"varint,5,opt,name=BoolValue,proto3" json:"BoolValue,omitempty"` } func (m *Attr) Reset() { *m = Attr{} } func (m *Attr) String() string { return proto.CompactTextString(m) } func (*Attr) ProtoMessage() {} -func (*Attr) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } - -func (m *Attr) GetKey() string { - if m != nil { - return m.Key - } - return "" -} - -func (m *Attr) GetType() uint64 { - if m != nil { - return m.Type - } - return 0 -} - -func (m *Attr) GetStringValue() string { - if m != nil { - return m.StringValue - } - return "" -} - -func (m *Attr) GetUintValue() uint64 { - if m != nil { - return m.UintValue - } - return 0 -} - -func (m *Attr) GetBoolValue() bool { - if m != nil { - return m.BoolValue - } - return false -} +func (*Attr) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{6} } type AttrMap struct { Attrs []*Attr `protobuf:"bytes,1,rep,name=Attrs" json:"Attrs,omitempty"` @@ -235,7 +139,7 @@ type AttrMap struct { func (m *AttrMap) Reset() { *m = AttrMap{} } func (m *AttrMap) String() string { return proto.CompactTextString(m) } func (*AttrMap) ProtoMessage() {} -func (*AttrMap) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } +func (*AttrMap) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{7} } func (m *AttrMap) GetAttrs() []*Attr { if m != nil { @@ -245,63 +149,21 @@ func (m *AttrMap) GetAttrs() []*Attr { } type QueryRequest struct { - DB string `protobuf:"bytes,1,opt,name=DB" json:"DB,omitempty"` - Query string `protobuf:"bytes,2,opt,name=Query" json:"Query,omitempty"` - Slices []uint64 `protobuf:"varint,3,rep,packed,name=Slices" json:"Slices,omitempty"` - Profiles bool `protobuf:"varint,4,opt,name=Profiles" json:"Profiles,omitempty"` - Quantum string `protobuf:"bytes,5,opt,name=Quantum" json:"Quantum,omitempty"` - Remote bool `protobuf:"varint,6,opt,name=Remote" json:"Remote,omitempty"` + DB string `protobuf:"bytes,1,opt,name=DB,proto3" json:"DB,omitempty"` + Query string `protobuf:"bytes,2,opt,name=Query,proto3" json:"Query,omitempty"` + Slices []uint64 `protobuf:"varint,3,rep,name=Slices" json:"Slices,omitempty"` + Profiles bool `protobuf:"varint,4,opt,name=Profiles,proto3" json:"Profiles,omitempty"` + Quantum string `protobuf:"bytes,5,opt,name=Quantum,proto3" json:"Quantum,omitempty"` + Remote bool `protobuf:"varint,6,opt,name=Remote,proto3" json:"Remote,omitempty"` } func (m *QueryRequest) Reset() { *m = QueryRequest{} } func (m *QueryRequest) String() string { return proto.CompactTextString(m) } func (*QueryRequest) ProtoMessage() {} -func (*QueryRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } - -func (m *QueryRequest) GetDB() string { - if m != nil { - return m.DB - } - return "" -} - -func (m *QueryRequest) GetQuery() string { - if m != nil { - return m.Query - } - return "" -} - -func (m *QueryRequest) GetSlices() []uint64 { - if m != nil { - return m.Slices - } - return nil -} - -func (m *QueryRequest) GetProfiles() bool { - if m != nil { - return m.Profiles - } - return false -} - -func (m *QueryRequest) GetQuantum() string { - if m != nil { - return m.Quantum - } - return "" -} - -func (m *QueryRequest) GetRemote() bool { - if m != nil { - return m.Remote - } - return false -} +func (*QueryRequest) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{8} } type QueryResponse struct { - Err string `protobuf:"bytes,1,opt,name=Err" json:"Err,omitempty"` + Err string `protobuf:"bytes,1,opt,name=Err,proto3" json:"Err,omitempty"` Results []*QueryResult `protobuf:"bytes,2,rep,name=Results" json:"Results,omitempty"` Profiles []*Profile `protobuf:"bytes,3,rep,name=Profiles" json:"Profiles,omitempty"` } @@ -309,14 +171,7 @@ type QueryResponse struct { func (m *QueryResponse) Reset() { *m = QueryResponse{} } func (m *QueryResponse) String() string { return proto.CompactTextString(m) } func (*QueryResponse) ProtoMessage() {} -func (*QueryResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } - -func (m *QueryResponse) GetErr() string { - if m != nil { - return m.Err - } - return "" -} +func (*QueryResponse) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{9} } func (m *QueryResponse) GetResults() []*QueryResult { if m != nil { @@ -334,15 +189,15 @@ func (m *QueryResponse) GetProfiles() []*Profile { type QueryResult struct { Bitmap *Bitmap `protobuf:"bytes,1,opt,name=Bitmap" json:"Bitmap,omitempty"` - N uint64 `protobuf:"varint,2,opt,name=N" json:"N,omitempty"` + N uint64 `protobuf:"varint,2,opt,name=N,proto3" json:"N,omitempty"` Pairs []*Pair `protobuf:"bytes,3,rep,name=Pairs" json:"Pairs,omitempty"` - Changed bool `protobuf:"varint,4,opt,name=Changed" json:"Changed,omitempty"` + Changed bool `protobuf:"varint,4,opt,name=Changed,proto3" json:"Changed,omitempty"` } func (m *QueryResult) Reset() { *m = QueryResult{} } func (m *QueryResult) String() string { return proto.CompactTextString(m) } func (*QueryResult) ProtoMessage() {} -func (*QueryResult) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } +func (*QueryResult) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{10} } func (m *QueryResult) GetBitmap() *Bitmap { if m != nil { @@ -351,13 +206,6 @@ func (m *QueryResult) GetBitmap() *Bitmap { return nil } -func (m *QueryResult) GetN() uint64 { - if m != nil { - return m.N - } - return 0 -} - func (m *QueryResult) GetPairs() []*Pair { if m != nil { return m.Pairs @@ -365,173 +213,68 @@ func (m *QueryResult) GetPairs() []*Pair { return nil } -func (m *QueryResult) GetChanged() bool { - if m != nil { - return m.Changed - } - return false -} - type ImportRequest struct { - DB string `protobuf:"bytes,1,opt,name=DB" json:"DB,omitempty"` - Frame string `protobuf:"bytes,2,opt,name=Frame" json:"Frame,omitempty"` - Slice uint64 `protobuf:"varint,3,opt,name=Slice" json:"Slice,omitempty"` - BitmapIDs []uint64 `protobuf:"varint,4,rep,packed,name=BitmapIDs" json:"BitmapIDs,omitempty"` - ProfileIDs []uint64 `protobuf:"varint,5,rep,packed,name=ProfileIDs" json:"ProfileIDs,omitempty"` - Timestamps []int64 `protobuf:"varint,6,rep,packed,name=Timestamps" json:"Timestamps,omitempty"` + DB string `protobuf:"bytes,1,opt,name=DB,proto3" json:"DB,omitempty"` + Frame string `protobuf:"bytes,2,opt,name=Frame,proto3" json:"Frame,omitempty"` + Slice uint64 `protobuf:"varint,3,opt,name=Slice,proto3" json:"Slice,omitempty"` + BitmapIDs []uint64 `protobuf:"varint,4,rep,name=BitmapIDs" json:"BitmapIDs,omitempty"` + ProfileIDs []uint64 `protobuf:"varint,5,rep,name=ProfileIDs" json:"ProfileIDs,omitempty"` + Timestamps []int64 `protobuf:"varint,6,rep,name=Timestamps" json:"Timestamps,omitempty"` } func (m *ImportRequest) Reset() { *m = ImportRequest{} } func (m *ImportRequest) String() string { return proto.CompactTextString(m) } func (*ImportRequest) ProtoMessage() {} -func (*ImportRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } - -func (m *ImportRequest) GetDB() string { - if m != nil { - return m.DB - } - return "" -} - -func (m *ImportRequest) GetFrame() string { - if m != nil { - return m.Frame - } - return "" -} - -func (m *ImportRequest) GetSlice() uint64 { - if m != nil { - return m.Slice - } - return 0 -} - -func (m *ImportRequest) GetBitmapIDs() []uint64 { - if m != nil { - return m.BitmapIDs - } - return nil -} - -func (m *ImportRequest) GetProfileIDs() []uint64 { - if m != nil { - return m.ProfileIDs - } - return nil -} - -func (m *ImportRequest) GetTimestamps() []int64 { - if m != nil { - return m.Timestamps - } - return nil -} +func (*ImportRequest) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{11} } type ImportResponse struct { - Err string `protobuf:"bytes,1,opt,name=Err" json:"Err,omitempty"` + Err string `protobuf:"bytes,1,opt,name=Err,proto3" json:"Err,omitempty"` } func (m *ImportResponse) Reset() { *m = ImportResponse{} } func (m *ImportResponse) String() string { return proto.CompactTextString(m) } func (*ImportResponse) ProtoMessage() {} -func (*ImportResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } - -func (m *ImportResponse) GetErr() string { - if m != nil { - return m.Err - } - return "" -} +func (*ImportResponse) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{12} } type BlockDataRequest struct { - DB string `protobuf:"bytes,1,opt,name=DB" json:"DB,omitempty"` - Frame string `protobuf:"bytes,2,opt,name=Frame" json:"Frame,omitempty"` - Slice uint64 `protobuf:"varint,3,opt,name=Slice" json:"Slice,omitempty"` - Block uint64 `protobuf:"varint,4,opt,name=Block" json:"Block,omitempty"` + DB string `protobuf:"bytes,1,opt,name=DB,proto3" json:"DB,omitempty"` + Frame string `protobuf:"bytes,2,opt,name=Frame,proto3" json:"Frame,omitempty"` + Slice uint64 `protobuf:"varint,3,opt,name=Slice,proto3" json:"Slice,omitempty"` + Block uint64 `protobuf:"varint,4,opt,name=Block,proto3" json:"Block,omitempty"` } func (m *BlockDataRequest) Reset() { *m = BlockDataRequest{} } func (m *BlockDataRequest) String() string { return proto.CompactTextString(m) } func (*BlockDataRequest) ProtoMessage() {} -func (*BlockDataRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } - -func (m *BlockDataRequest) GetDB() string { - if m != nil { - return m.DB - } - return "" -} - -func (m *BlockDataRequest) GetFrame() string { - if m != nil { - return m.Frame - } - return "" -} - -func (m *BlockDataRequest) GetSlice() uint64 { - if m != nil { - return m.Slice - } - return 0 -} - -func (m *BlockDataRequest) GetBlock() uint64 { - if m != nil { - return m.Block - } - return 0 -} +func (*BlockDataRequest) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{13} } type BlockDataResponse struct { - BitmapIDs []uint64 `protobuf:"varint,1,rep,packed,name=BitmapIDs" json:"BitmapIDs,omitempty"` - ProfileIDs []uint64 `protobuf:"varint,2,rep,packed,name=ProfileIDs" json:"ProfileIDs,omitempty"` + BitmapIDs []uint64 `protobuf:"varint,1,rep,name=BitmapIDs" json:"BitmapIDs,omitempty"` + ProfileIDs []uint64 `protobuf:"varint,2,rep,name=ProfileIDs" json:"ProfileIDs,omitempty"` } func (m *BlockDataResponse) Reset() { *m = BlockDataResponse{} } func (m *BlockDataResponse) String() string { return proto.CompactTextString(m) } func (*BlockDataResponse) ProtoMessage() {} -func (*BlockDataResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } - -func (m *BlockDataResponse) GetBitmapIDs() []uint64 { - if m != nil { - return m.BitmapIDs - } - return nil -} - -func (m *BlockDataResponse) GetProfileIDs() []uint64 { - if m != nil { - return m.ProfileIDs - } - return nil -} +func (*BlockDataResponse) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{14} } type Cache struct { - BitmapIDs []uint64 `protobuf:"varint,1,rep,packed,name=BitmapIDs" json:"BitmapIDs,omitempty"` + BitmapIDs []uint64 `protobuf:"varint,1,rep,name=BitmapIDs" json:"BitmapIDs,omitempty"` } func (m *Cache) Reset() { *m = Cache{} } func (m *Cache) String() string { return proto.CompactTextString(m) } func (*Cache) ProtoMessage() {} -func (*Cache) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } - -func (m *Cache) GetBitmapIDs() []uint64 { - if m != nil { - return m.BitmapIDs - } - return nil -} +func (*Cache) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{15} } type MaxSlicesResponse struct { - MaxSlices map[string]uint64 `protobuf:"bytes,1,rep,name=MaxSlices" json:"MaxSlices,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MaxSlices map[string]uint64 `protobuf:"bytes,1,rep,name=MaxSlices" json:"MaxSlices,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` } func (m *MaxSlicesResponse) Reset() { *m = MaxSlicesResponse{} } func (m *MaxSlicesResponse) String() string { return proto.CompactTextString(m) } func (*MaxSlicesResponse) ProtoMessage() {} -func (*MaxSlicesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } +func (*MaxSlicesResponse) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{16} } func (m *MaxSlicesResponse) GetMaxSlices() map[string]uint64 { if m != nil { @@ -559,51 +302,3145 @@ func init() { proto.RegisterType((*Cache)(nil), "internal.Cache") proto.RegisterType((*MaxSlicesResponse)(nil), "internal.MaxSlicesResponse") } - -func init() { proto.RegisterFile("internal.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 672 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x55, 0xcb, 0x6a, 0x14, 0x4d, - 0x14, 0xa6, 0xfa, 0x32, 0x97, 0x33, 0xc9, 0x90, 0x14, 0xf3, 0xff, 0x34, 0x41, 0xa4, 0x29, 0x54, - 0x5a, 0xc1, 0x04, 0xe2, 0x46, 0x44, 0x10, 0x3b, 0x13, 0x71, 0x90, 0x84, 0xa4, 0x12, 0xdd, 0xb9, - 0x68, 0x93, 0x32, 0x69, 0xd2, 0x37, 0xab, 0xab, 0xc5, 0x59, 0xba, 0x70, 0xe3, 0x23, 0xe8, 0x13, - 0xf8, 0x96, 0x52, 0x97, 0xee, 0xea, 0x28, 0x8e, 0x59, 0xb8, 0xeb, 0xf3, 0x9d, 0x3a, 0xa7, 0xbe, - 0xef, 0x5c, 0xaa, 0x61, 0x9a, 0x16, 0x82, 0xf1, 0x22, 0xc9, 0xb6, 0x2b, 0x5e, 0x8a, 0x12, 0x8f, - 0x5a, 0x9b, 0xdc, 0x03, 0x67, 0x1e, 0xe3, 0x10, 0x26, 0xa7, 0x69, 0xce, 0x8e, 0x9b, 0xa4, 0x10, - 0x4d, 0x1e, 0xa0, 0x10, 0x45, 0x63, 0xda, 0x87, 0xc8, 0x7d, 0xf0, 0x5f, 0xf0, 0x24, 0x67, 0x37, - 0x38, 0x1a, 0xc3, 0x20, 0x4e, 0x45, 0x9e, 0x54, 0x18, 0x83, 0x17, 0xa7, 0xa2, 0x0e, 0x50, 0xe8, - 0x46, 0x1e, 0x55, 0xdf, 0xf8, 0x0e, 0xf8, 0xcf, 0x85, 0xe0, 0x75, 0xe0, 0x84, 0x6e, 0x34, 0xd9, - 0x9d, 0x6e, 0x77, 0xd4, 0x24, 0x4c, 0xb5, 0x93, 0x6c, 0x83, 0x77, 0x94, 0xa4, 0x1c, 0x6f, 0x80, - 0xfb, 0x8a, 0x2d, 0xd5, 0x2d, 0x1e, 0x95, 0x9f, 0x78, 0x06, 0xfe, 0x5e, 0xd9, 0x14, 0x22, 0x70, - 0x14, 0xa6, 0x0d, 0xf2, 0x16, 0xdc, 0x38, 0x15, 0x78, 0x0b, 0x46, 0xfa, 0xea, 0xc5, 0xdc, 0xc4, - 0x74, 0x36, 0xbe, 0x05, 0xe3, 0x23, 0x5e, 0xbe, 0x4f, 0x33, 0xb6, 0x98, 0x9b, 0x60, 0x0b, 0x48, - 0xaf, 0xd4, 0x50, 0x8b, 0x24, 0xaf, 0x02, 0x37, 0x44, 0x91, 0x4b, 0x2d, 0x40, 0x9e, 0xc1, 0xd0, - 0x1c, 0xc5, 0x53, 0x70, 0xba, 0xe4, 0xce, 0x62, 0x7e, 0x43, 0x3d, 0x5f, 0x11, 0x78, 0xf2, 0xab, - 0x2f, 0x68, 0xac, 0x05, 0x61, 0xf0, 0x4e, 0x97, 0x15, 0x33, 0x94, 0xd4, 0xb7, 0x2c, 0xf2, 0x89, - 0xe0, 0x69, 0x71, 0xf1, 0x26, 0xc9, 0x1a, 0xa6, 0xf8, 0x8c, 0x69, 0x1f, 0x92, 0x7c, 0x5f, 0xa7, - 0x85, 0xd0, 0x7e, 0x4f, 0xab, 0xe9, 0x00, 0xe9, 0x8d, 0xcb, 0x32, 0xd3, 0x5e, 0x3f, 0x44, 0xd1, - 0x88, 0x5a, 0x80, 0xec, 0xc0, 0x50, 0x72, 0x39, 0x48, 0x2a, 0xcb, 0x1e, 0xad, 0x62, 0xff, 0x0d, - 0xc1, 0xda, 0x71, 0xc3, 0xf8, 0x92, 0xb2, 0x0f, 0x0d, 0xab, 0x85, 0x2c, 0xc2, 0x3c, 0x36, 0x22, - 0xe4, 0xfc, 0xcc, 0xc0, 0x57, 0x7e, 0x25, 0x62, 0x4c, 0xb5, 0x81, 0xff, 0x87, 0xc1, 0x49, 0x96, - 0x9e, 0xb1, 0x3a, 0x70, 0xd5, 0x00, 0x18, 0x4b, 0x76, 0xc9, 0x54, 0xb3, 0x56, 0xd4, 0x47, 0xb4, - 0xb3, 0x71, 0x00, 0xc3, 0x76, 0xb4, 0x7c, 0x95, 0xab, 0x35, 0x65, 0x36, 0xca, 0xf2, 0x52, 0xb0, - 0x60, 0xa0, 0x62, 0x8c, 0x45, 0x3e, 0x23, 0x58, 0x37, 0xe4, 0xea, 0xaa, 0x2c, 0x6a, 0x26, 0x6b, - 0xbc, 0xcf, 0x79, 0x5b, 0xe3, 0x7d, 0xce, 0xf1, 0x0e, 0x0c, 0x29, 0xab, 0x9b, 0x4c, 0xb4, 0x6d, - 0xfa, 0xcf, 0x0a, 0x6d, 0x63, 0x9b, 0x4c, 0xd0, 0xf6, 0x14, 0x7e, 0xd8, 0xa3, 0xe8, 0xaa, 0x88, - 0x4d, 0x1b, 0x61, 0x3c, 0x96, 0x35, 0xf9, 0x82, 0x60, 0xd2, 0xcb, 0x83, 0xa3, 0x76, 0x05, 0x14, - 0x89, 0xc9, 0xee, 0x86, 0x0d, 0xd6, 0x38, 0x6d, 0x57, 0x64, 0x0d, 0xd0, 0xa1, 0x69, 0x3d, 0x3a, - 0x94, 0xed, 0x90, 0x63, 0xdf, 0xde, 0xd9, 0x6b, 0x87, 0x84, 0xa9, 0x76, 0xca, 0x1a, 0xed, 0x5d, - 0x26, 0xc5, 0x05, 0x3b, 0x37, 0xe5, 0x6b, 0x4d, 0xf2, 0x03, 0xc1, 0xfa, 0x22, 0xaf, 0x4a, 0x2e, - 0x56, 0x74, 0x4a, 0xed, 0x71, 0xdb, 0x29, 0xbd, 0xd4, 0x33, 0xf0, 0x55, 0x6f, 0xd4, 0xa4, 0x79, - 0x54, 0x1b, 0x6a, 0x8a, 0xcc, 0xf6, 0xc8, 0x46, 0xc9, 0x16, 0x5a, 0x00, 0xdf, 0x06, 0xe8, 0xd6, - 0xa7, 0x0e, 0x7c, 0xe5, 0xee, 0x21, 0xd2, 0xdf, 0x2d, 0x50, 0x1d, 0x0c, 0x42, 0x37, 0x72, 0x69, - 0x0f, 0x21, 0x04, 0xa6, 0x2d, 0xd5, 0x3f, 0xf5, 0x8d, 0x9c, 0xc3, 0x46, 0x9c, 0x95, 0x67, 0x57, - 0xf3, 0x44, 0x24, 0xff, 0x42, 0xd1, 0x0c, 0x7c, 0x95, 0xcf, 0x6c, 0x8c, 0x36, 0xc8, 0x31, 0x6c, - 0xf6, 0x6e, 0x31, 0x64, 0xae, 0x89, 0x47, 0xab, 0xc5, 0x3b, 0xbf, 0x8a, 0x27, 0x77, 0xc1, 0xdf, - 0x4b, 0xce, 0x2e, 0xff, 0x92, 0x86, 0x7c, 0x47, 0xb0, 0x79, 0x90, 0x7c, 0xd2, 0x7b, 0xd1, 0x5d, - 0xfd, 0x12, 0xc6, 0x1d, 0x68, 0x16, 0xf3, 0x81, 0x9d, 0x84, 0xdf, 0xce, 0x5b, 0x64, 0xbf, 0x10, - 0x7c, 0x49, 0x6d, 0xf0, 0xd6, 0x53, 0x98, 0x5e, 0x77, 0xca, 0x1a, 0x5f, 0xd9, 0xf7, 0xe7, 0x4a, - 0x3f, 0xa8, 0x1f, 0xd5, 0x3b, 0x61, 0x1e, 0x54, 0x65, 0x3c, 0x71, 0x1e, 0xa3, 0x77, 0x03, 0xf5, - 0xb3, 0x78, 0xf4, 0x33, 0x00, 0x00, 0xff, 0xff, 0x52, 0x09, 0x63, 0x99, 0x3e, 0x06, 0x00, 0x00, +func (m *DB) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *DB) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.TimeQuantum) > 0 { + data[i] = 0xa + i++ + i = encodeVarintInternal(data, i, uint64(len(m.TimeQuantum))) + i += copy(data[i:], m.TimeQuantum) + } + return i, nil +} + +func (m *Frame) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Frame) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.TimeQuantum) > 0 { + data[i] = 0xa + i++ + i = encodeVarintInternal(data, i, uint64(len(m.TimeQuantum))) + i += copy(data[i:], m.TimeQuantum) + } + return i, nil +} + +func (m *Bitmap) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Bitmap) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Bits) > 0 { + for _, num := range m.Bits { + data[i] = 0x8 + i++ + i = encodeVarintInternal(data, i, uint64(num)) + } + } + if len(m.Attrs) > 0 { + for _, msg := range m.Attrs { + data[i] = 0x12 + i++ + i = encodeVarintInternal(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Pair) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Pair) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Key != 0 { + data[i] = 0x8 + i++ + i = encodeVarintInternal(data, i, uint64(m.Key)) + } + if m.Count != 0 { + data[i] = 0x10 + i++ + i = encodeVarintInternal(data, i, uint64(m.Count)) + } + return i, nil +} + +func (m *Bit) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Bit) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.BitmapID != 0 { + data[i] = 0x8 + i++ + i = encodeVarintInternal(data, i, uint64(m.BitmapID)) + } + if m.ProfileID != 0 { + data[i] = 0x10 + i++ + i = encodeVarintInternal(data, i, uint64(m.ProfileID)) + } + if m.Timestamp != 0 { + data[i] = 0x18 + i++ + i = encodeVarintInternal(data, i, uint64(m.Timestamp)) + } + return i, nil +} + +func (m *Profile) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Profile) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ID != 0 { + data[i] = 0x8 + i++ + i = encodeVarintInternal(data, i, uint64(m.ID)) + } + if len(m.Attrs) > 0 { + for _, msg := range m.Attrs { + data[i] = 0x12 + i++ + i = encodeVarintInternal(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Attr) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Attr) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Key) > 0 { + data[i] = 0xa + i++ + i = encodeVarintInternal(data, i, uint64(len(m.Key))) + i += copy(data[i:], m.Key) + } + if m.Type != 0 { + data[i] = 0x10 + i++ + i = encodeVarintInternal(data, i, uint64(m.Type)) + } + if len(m.StringValue) > 0 { + data[i] = 0x1a + i++ + i = encodeVarintInternal(data, i, uint64(len(m.StringValue))) + i += copy(data[i:], m.StringValue) + } + if m.UintValue != 0 { + data[i] = 0x20 + i++ + i = encodeVarintInternal(data, i, uint64(m.UintValue)) + } + if m.BoolValue { + data[i] = 0x28 + i++ + if m.BoolValue { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + return i, nil +} + +func (m *AttrMap) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AttrMap) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Attrs) > 0 { + for _, msg := range m.Attrs { + data[i] = 0xa + i++ + i = encodeVarintInternal(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *QueryRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *QueryRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.DB) > 0 { + data[i] = 0xa + i++ + i = encodeVarintInternal(data, i, uint64(len(m.DB))) + i += copy(data[i:], m.DB) + } + if len(m.Query) > 0 { + data[i] = 0x12 + i++ + i = encodeVarintInternal(data, i, uint64(len(m.Query))) + i += copy(data[i:], m.Query) + } + if len(m.Slices) > 0 { + for _, num := range m.Slices { + data[i] = 0x18 + i++ + i = encodeVarintInternal(data, i, uint64(num)) + } + } + if m.Profiles { + data[i] = 0x20 + i++ + if m.Profiles { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if len(m.Quantum) > 0 { + data[i] = 0x2a + i++ + i = encodeVarintInternal(data, i, uint64(len(m.Quantum))) + i += copy(data[i:], m.Quantum) + } + if m.Remote { + data[i] = 0x30 + i++ + if m.Remote { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + return i, nil +} + +func (m *QueryResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *QueryResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Err) > 0 { + data[i] = 0xa + i++ + i = encodeVarintInternal(data, i, uint64(len(m.Err))) + i += copy(data[i:], m.Err) + } + if len(m.Results) > 0 { + for _, msg := range m.Results { + data[i] = 0x12 + i++ + i = encodeVarintInternal(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Profiles) > 0 { + for _, msg := range m.Profiles { + data[i] = 0x1a + i++ + i = encodeVarintInternal(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *QueryResult) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *QueryResult) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Bitmap != nil { + data[i] = 0xa + i++ + i = encodeVarintInternal(data, i, uint64(m.Bitmap.Size())) + n1, err := m.Bitmap.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.N != 0 { + data[i] = 0x10 + i++ + i = encodeVarintInternal(data, i, uint64(m.N)) + } + if len(m.Pairs) > 0 { + for _, msg := range m.Pairs { + data[i] = 0x1a + i++ + i = encodeVarintInternal(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Changed { + data[i] = 0x20 + i++ + if m.Changed { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + return i, nil +} + +func (m *ImportRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ImportRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.DB) > 0 { + data[i] = 0xa + i++ + i = encodeVarintInternal(data, i, uint64(len(m.DB))) + i += copy(data[i:], m.DB) + } + if len(m.Frame) > 0 { + data[i] = 0x12 + i++ + i = encodeVarintInternal(data, i, uint64(len(m.Frame))) + i += copy(data[i:], m.Frame) + } + if m.Slice != 0 { + data[i] = 0x18 + i++ + i = encodeVarintInternal(data, i, uint64(m.Slice)) + } + if len(m.BitmapIDs) > 0 { + for _, num := range m.BitmapIDs { + data[i] = 0x20 + i++ + i = encodeVarintInternal(data, i, uint64(num)) + } + } + if len(m.ProfileIDs) > 0 { + for _, num := range m.ProfileIDs { + data[i] = 0x28 + i++ + i = encodeVarintInternal(data, i, uint64(num)) + } + } + if len(m.Timestamps) > 0 { + for _, num := range m.Timestamps { + data[i] = 0x30 + i++ + i = encodeVarintInternal(data, i, uint64(num)) + } + } + return i, nil +} + +func (m *ImportResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ImportResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Err) > 0 { + data[i] = 0xa + i++ + i = encodeVarintInternal(data, i, uint64(len(m.Err))) + i += copy(data[i:], m.Err) + } + return i, nil +} + +func (m *BlockDataRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *BlockDataRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.DB) > 0 { + data[i] = 0xa + i++ + i = encodeVarintInternal(data, i, uint64(len(m.DB))) + i += copy(data[i:], m.DB) + } + if len(m.Frame) > 0 { + data[i] = 0x12 + i++ + i = encodeVarintInternal(data, i, uint64(len(m.Frame))) + i += copy(data[i:], m.Frame) + } + if m.Slice != 0 { + data[i] = 0x18 + i++ + i = encodeVarintInternal(data, i, uint64(m.Slice)) + } + if m.Block != 0 { + data[i] = 0x20 + i++ + i = encodeVarintInternal(data, i, uint64(m.Block)) + } + return i, nil +} + +func (m *BlockDataResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *BlockDataResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.BitmapIDs) > 0 { + for _, num := range m.BitmapIDs { + data[i] = 0x8 + i++ + i = encodeVarintInternal(data, i, uint64(num)) + } + } + if len(m.ProfileIDs) > 0 { + for _, num := range m.ProfileIDs { + data[i] = 0x10 + i++ + i = encodeVarintInternal(data, i, uint64(num)) + } + } + return i, nil +} + +func (m *Cache) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Cache) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.BitmapIDs) > 0 { + for _, num := range m.BitmapIDs { + data[i] = 0x8 + i++ + i = encodeVarintInternal(data, i, uint64(num)) + } + } + return i, nil +} + +func (m *MaxSlicesResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *MaxSlicesResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.MaxSlices) > 0 { + for k, _ := range m.MaxSlices { + data[i] = 0xa + i++ + v := m.MaxSlices[k] + mapSize := 1 + len(k) + sovInternal(uint64(len(k))) + 1 + sovInternal(uint64(v)) + i = encodeVarintInternal(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintInternal(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x10 + i++ + i = encodeVarintInternal(data, i, uint64(v)) + } + } + return i, nil +} + +func encodeFixed64Internal(data []byte, offset int, v uint64) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + data[offset+4] = uint8(v >> 32) + data[offset+5] = uint8(v >> 40) + data[offset+6] = uint8(v >> 48) + data[offset+7] = uint8(v >> 56) + return offset + 8 +} +func encodeFixed32Internal(data []byte, offset int, v uint32) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + return offset + 4 +} +func encodeVarintInternal(data []byte, offset int, v uint64) int { + for v >= 1<<7 { + data[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + data[offset] = uint8(v) + return offset + 1 +} +func (m *DB) Size() (n int) { + var l int + _ = l + l = len(m.TimeQuantum) + if l > 0 { + n += 1 + l + sovInternal(uint64(l)) + } + return n +} + +func (m *Frame) Size() (n int) { + var l int + _ = l + l = len(m.TimeQuantum) + if l > 0 { + n += 1 + l + sovInternal(uint64(l)) + } + return n +} + +func (m *Bitmap) Size() (n int) { + var l int + _ = l + if len(m.Bits) > 0 { + for _, e := range m.Bits { + n += 1 + sovInternal(uint64(e)) + } + } + if len(m.Attrs) > 0 { + for _, e := range m.Attrs { + l = e.Size() + n += 1 + l + sovInternal(uint64(l)) + } + } + return n +} + +func (m *Pair) Size() (n int) { + var l int + _ = l + if m.Key != 0 { + n += 1 + sovInternal(uint64(m.Key)) + } + if m.Count != 0 { + n += 1 + sovInternal(uint64(m.Count)) + } + return n +} + +func (m *Bit) Size() (n int) { + var l int + _ = l + if m.BitmapID != 0 { + n += 1 + sovInternal(uint64(m.BitmapID)) + } + if m.ProfileID != 0 { + n += 1 + sovInternal(uint64(m.ProfileID)) + } + if m.Timestamp != 0 { + n += 1 + sovInternal(uint64(m.Timestamp)) + } + return n +} + +func (m *Profile) Size() (n int) { + var l int + _ = l + if m.ID != 0 { + n += 1 + sovInternal(uint64(m.ID)) + } + if len(m.Attrs) > 0 { + for _, e := range m.Attrs { + l = e.Size() + n += 1 + l + sovInternal(uint64(l)) + } + } + return n +} + +func (m *Attr) Size() (n int) { + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovInternal(uint64(l)) + } + if m.Type != 0 { + n += 1 + sovInternal(uint64(m.Type)) + } + l = len(m.StringValue) + if l > 0 { + n += 1 + l + sovInternal(uint64(l)) + } + if m.UintValue != 0 { + n += 1 + sovInternal(uint64(m.UintValue)) + } + if m.BoolValue { + n += 2 + } + return n +} + +func (m *AttrMap) Size() (n int) { + var l int + _ = l + if len(m.Attrs) > 0 { + for _, e := range m.Attrs { + l = e.Size() + n += 1 + l + sovInternal(uint64(l)) + } + } + return n +} + +func (m *QueryRequest) Size() (n int) { + var l int + _ = l + l = len(m.DB) + if l > 0 { + n += 1 + l + sovInternal(uint64(l)) + } + l = len(m.Query) + if l > 0 { + n += 1 + l + sovInternal(uint64(l)) + } + if len(m.Slices) > 0 { + for _, e := range m.Slices { + n += 1 + sovInternal(uint64(e)) + } + } + if m.Profiles { + n += 2 + } + l = len(m.Quantum) + if l > 0 { + n += 1 + l + sovInternal(uint64(l)) + } + if m.Remote { + n += 2 + } + return n +} + +func (m *QueryResponse) Size() (n int) { + var l int + _ = l + l = len(m.Err) + if l > 0 { + n += 1 + l + sovInternal(uint64(l)) + } + if len(m.Results) > 0 { + for _, e := range m.Results { + l = e.Size() + n += 1 + l + sovInternal(uint64(l)) + } + } + if len(m.Profiles) > 0 { + for _, e := range m.Profiles { + l = e.Size() + n += 1 + l + sovInternal(uint64(l)) + } + } + return n +} + +func (m *QueryResult) Size() (n int) { + var l int + _ = l + if m.Bitmap != nil { + l = m.Bitmap.Size() + n += 1 + l + sovInternal(uint64(l)) + } + if m.N != 0 { + n += 1 + sovInternal(uint64(m.N)) + } + if len(m.Pairs) > 0 { + for _, e := range m.Pairs { + l = e.Size() + n += 1 + l + sovInternal(uint64(l)) + } + } + if m.Changed { + n += 2 + } + return n +} + +func (m *ImportRequest) Size() (n int) { + var l int + _ = l + l = len(m.DB) + if l > 0 { + n += 1 + l + sovInternal(uint64(l)) + } + l = len(m.Frame) + if l > 0 { + n += 1 + l + sovInternal(uint64(l)) + } + if m.Slice != 0 { + n += 1 + sovInternal(uint64(m.Slice)) + } + if len(m.BitmapIDs) > 0 { + for _, e := range m.BitmapIDs { + n += 1 + sovInternal(uint64(e)) + } + } + if len(m.ProfileIDs) > 0 { + for _, e := range m.ProfileIDs { + n += 1 + sovInternal(uint64(e)) + } + } + if len(m.Timestamps) > 0 { + for _, e := range m.Timestamps { + n += 1 + sovInternal(uint64(e)) + } + } + return n +} + +func (m *ImportResponse) Size() (n int) { + var l int + _ = l + l = len(m.Err) + if l > 0 { + n += 1 + l + sovInternal(uint64(l)) + } + return n +} + +func (m *BlockDataRequest) Size() (n int) { + var l int + _ = l + l = len(m.DB) + if l > 0 { + n += 1 + l + sovInternal(uint64(l)) + } + l = len(m.Frame) + if l > 0 { + n += 1 + l + sovInternal(uint64(l)) + } + if m.Slice != 0 { + n += 1 + sovInternal(uint64(m.Slice)) + } + if m.Block != 0 { + n += 1 + sovInternal(uint64(m.Block)) + } + return n +} + +func (m *BlockDataResponse) Size() (n int) { + var l int + _ = l + if len(m.BitmapIDs) > 0 { + for _, e := range m.BitmapIDs { + n += 1 + sovInternal(uint64(e)) + } + } + if len(m.ProfileIDs) > 0 { + for _, e := range m.ProfileIDs { + n += 1 + sovInternal(uint64(e)) + } + } + return n +} + +func (m *Cache) Size() (n int) { + var l int + _ = l + if len(m.BitmapIDs) > 0 { + for _, e := range m.BitmapIDs { + n += 1 + sovInternal(uint64(e)) + } + } + return n +} + +func (m *MaxSlicesResponse) Size() (n int) { + var l int + _ = l + if len(m.MaxSlices) > 0 { + for k, v := range m.MaxSlices { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovInternal(uint64(len(k))) + 1 + sovInternal(uint64(v)) + n += mapEntrySize + 1 + sovInternal(uint64(mapEntrySize)) + } + } + return n +} + +func sovInternal(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozInternal(x uint64) (n int) { + return sovInternal(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *DB) 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 ErrIntOverflowInternal + } + 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: DB: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DB: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeQuantum", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + 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 ErrInvalidLengthInternal + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TimeQuantum = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipInternal(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Frame) 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 ErrIntOverflowInternal + } + 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: Frame: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Frame: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeQuantum", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + 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 ErrInvalidLengthInternal + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TimeQuantum = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipInternal(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Bitmap) 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 ErrIntOverflowInternal + } + 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: Bitmap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Bitmap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Bits", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Bits = append(m.Bits, v) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attrs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthInternal + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attrs = append(m.Attrs, &Attr{}) + if err := m.Attrs[len(m.Attrs)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipInternal(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Pair) 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 ErrIntOverflowInternal + } + 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: Pair: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Pair: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + m.Key = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Key |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) + } + m.Count = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Count |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipInternal(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Bit) 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 ErrIntOverflowInternal + } + 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: Bit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Bit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BitmapID", wireType) + } + m.BitmapID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.BitmapID |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProfileID", wireType) + } + m.ProfileID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.ProfileID |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Timestamp |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipInternal(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Profile) 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 ErrIntOverflowInternal + } + 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: Profile: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Profile: 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 ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.ID |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attrs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthInternal + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attrs = append(m.Attrs, &Attr{}) + if err := m.Attrs[len(m.Attrs)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipInternal(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Attr) 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 ErrIntOverflowInternal + } + 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: Attr: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Attr: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + 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 ErrInvalidLengthInternal + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + 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 ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Type |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + 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 ErrInvalidLengthInternal + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StringValue = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UintValue", wireType) + } + m.UintValue = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.UintValue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.BoolValue = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipInternal(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AttrMap) 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 ErrIntOverflowInternal + } + 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: AttrMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AttrMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attrs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthInternal + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attrs = append(m.Attrs, &Attr{}) + if err := m.Attrs[len(m.Attrs)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipInternal(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryRequest) 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 ErrIntOverflowInternal + } + 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: QueryRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DB", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + 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 ErrInvalidLengthInternal + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DB = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + 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 ErrInvalidLengthInternal + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Query = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Slices", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Slices = append(m.Slices, v) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Profiles", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Profiles = bool(v != 0) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quantum", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + 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 ErrInvalidLengthInternal + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Quantum = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Remote", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Remote = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipInternal(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryResponse) 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 ErrIntOverflowInternal + } + 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: QueryResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Err", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + 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 ErrInvalidLengthInternal + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Err = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthInternal + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Results = append(m.Results, &QueryResult{}) + if err := m.Results[len(m.Results)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Profiles", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthInternal + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Profiles = append(m.Profiles, &Profile{}) + if err := m.Profiles[len(m.Profiles)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipInternal(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryResult) 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 ErrIntOverflowInternal + } + 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: QueryResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bitmap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthInternal + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Bitmap == nil { + m.Bitmap = &Bitmap{} + } + if err := m.Bitmap.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field N", wireType) + } + m.N = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.N |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pairs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthInternal + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pairs = append(m.Pairs, &Pair{}) + if err := m.Pairs[len(m.Pairs)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Changed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Changed = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipInternal(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImportRequest) 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 ErrIntOverflowInternal + } + 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: ImportRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImportRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DB", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + 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 ErrInvalidLengthInternal + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DB = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Frame", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + 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 ErrInvalidLengthInternal + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Frame = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Slice", wireType) + } + m.Slice = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Slice |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BitmapIDs", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.BitmapIDs = append(m.BitmapIDs, v) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProfileIDs", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ProfileIDs = append(m.ProfileIDs, v) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamps", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Timestamps = append(m.Timestamps, v) + default: + iNdEx = preIndex + skippy, err := skipInternal(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImportResponse) 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 ErrIntOverflowInternal + } + 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: ImportResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImportResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Err", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + 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 ErrInvalidLengthInternal + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Err = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipInternal(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BlockDataRequest) 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 ErrIntOverflowInternal + } + 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: BlockDataRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BlockDataRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DB", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + 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 ErrInvalidLengthInternal + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DB = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Frame", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + 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 ErrInvalidLengthInternal + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Frame = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Slice", wireType) + } + m.Slice = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Slice |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) + } + m.Block = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Block |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipInternal(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BlockDataResponse) 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 ErrIntOverflowInternal + } + 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: BlockDataResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BlockDataResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BitmapIDs", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.BitmapIDs = append(m.BitmapIDs, v) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProfileIDs", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ProfileIDs = append(m.ProfileIDs, v) + default: + iNdEx = preIndex + skippy, err := skipInternal(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Cache) 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 ErrIntOverflowInternal + } + 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: Cache: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Cache: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BitmapIDs", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.BitmapIDs = append(m.BitmapIDs, v) + default: + iNdEx = preIndex + skippy, err := skipInternal(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MaxSlicesResponse) 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 ErrIntOverflowInternal + } + 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: MaxSlicesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MaxSlicesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxSlices", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthInternal + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthInternal + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.MaxSlices == nil { + m.MaxSlices = make(map[string]uint64) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MaxSlices[mapkey] = mapvalue + } else { + var mapvalue uint64 + m.MaxSlices[mapkey] = mapvalue + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipInternal(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipInternal(data []byte) (n int, err error) { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowInternal + } + 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, ErrIntOverflowInternal + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if data[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowInternal + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthInternal + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowInternal + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipInternal(data[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthInternal = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowInternal = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("internal.proto", fileDescriptorInternal) } + +var fileDescriptorInternal = []byte{ + // 696 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x55, 0xcb, 0x6a, 0x14, 0x41, + 0x14, 0xb5, 0xa6, 0xbb, 0xe7, 0x71, 0x27, 0x19, 0x26, 0xc5, 0x28, 0x4d, 0x90, 0xa1, 0x29, 0x54, + 0x5a, 0xc1, 0x04, 0xe2, 0x46, 0x44, 0x10, 0x3b, 0x13, 0x71, 0x90, 0x84, 0xa4, 0x12, 0xdd, 0xb9, + 0x68, 0x93, 0x32, 0x69, 0xd2, 0x2f, 0xab, 0xab, 0xc5, 0x59, 0xba, 0x70, 0xe3, 0x17, 0x88, 0x7e, + 0x81, 0x7f, 0xe2, 0xd2, 0x4f, 0x90, 0xf8, 0x23, 0x52, 0x8f, 0x7e, 0x44, 0x31, 0x66, 0xe1, 0xae, + 0xef, 0xb9, 0x75, 0x6f, 0x9d, 0x73, 0x1f, 0xd5, 0x30, 0x8a, 0x52, 0xc1, 0x78, 0x1a, 0xc6, 0x6b, + 0x39, 0xcf, 0x44, 0x86, 0xfb, 0x95, 0x4d, 0x6e, 0x41, 0x67, 0x16, 0x60, 0x0f, 0x86, 0x07, 0x51, + 0xc2, 0xf6, 0xca, 0x30, 0x15, 0x65, 0xe2, 0x22, 0x0f, 0xf9, 0x03, 0xda, 0x86, 0xc8, 0x6d, 0x70, + 0x9e, 0xf0, 0x30, 0x61, 0x97, 0x38, 0x1a, 0x40, 0x37, 0x88, 0x44, 0x12, 0xe6, 0x18, 0x83, 0x1d, + 0x44, 0xa2, 0x70, 0x91, 0x67, 0xf9, 0x36, 0x55, 0xdf, 0xf8, 0x06, 0x38, 0x8f, 0x85, 0xe0, 0x85, + 0xdb, 0xf1, 0x2c, 0x7f, 0xb8, 0x31, 0x5a, 0xab, 0xa9, 0x49, 0x98, 0x6a, 0x27, 0x59, 0x03, 0x7b, + 0x37, 0x8c, 0x38, 0x1e, 0x83, 0xf5, 0x8c, 0x2d, 0xd4, 0x2d, 0x36, 0x95, 0x9f, 0x78, 0x02, 0xce, + 0x66, 0x56, 0xa6, 0xc2, 0xed, 0x28, 0x4c, 0x1b, 0xe4, 0x25, 0x58, 0x41, 0x24, 0xf0, 0x2a, 0xf4, + 0xf5, 0xd5, 0xf3, 0x99, 0x89, 0xa9, 0x6d, 0x7c, 0x1d, 0x06, 0xbb, 0x3c, 0x7b, 0x1d, 0xc5, 0x6c, + 0x3e, 0x33, 0xc1, 0x0d, 0x20, 0xbd, 0x52, 0x43, 0x21, 0xc2, 0x24, 0x77, 0x2d, 0x0f, 0xf9, 0x16, + 0x6d, 0x00, 0xf2, 0x08, 0x7a, 0xe6, 0x28, 0x1e, 0x41, 0xa7, 0x4e, 0xde, 0x99, 0xcf, 0x2e, 0xa9, + 0xe7, 0x23, 0x02, 0x5b, 0x7e, 0xb5, 0x05, 0x0d, 0xb4, 0x20, 0x0c, 0xf6, 0xc1, 0x22, 0x67, 0x86, + 0x92, 0xfa, 0x96, 0x45, 0xde, 0x17, 0x3c, 0x4a, 0x8f, 0x5f, 0x84, 0x71, 0xc9, 0x14, 0x9f, 0x01, + 0x6d, 0x43, 0x92, 0xef, 0xf3, 0x28, 0x15, 0xda, 0x6f, 0x6b, 0x35, 0x35, 0x20, 0xbd, 0x41, 0x96, + 0xc5, 0xda, 0xeb, 0x78, 0xc8, 0xef, 0xd3, 0x06, 0x20, 0xeb, 0xd0, 0x93, 0x5c, 0xb6, 0xc3, 0xbc, + 0x61, 0x8f, 0x2e, 0x62, 0xff, 0x19, 0xc1, 0xd2, 0x5e, 0xc9, 0xf8, 0x82, 0xb2, 0x37, 0x25, 0x2b, + 0x84, 0x2c, 0xc2, 0x2c, 0x30, 0x22, 0xe4, 0xfc, 0x4c, 0xc0, 0x51, 0x7e, 0x25, 0x62, 0x40, 0xb5, + 0x81, 0xaf, 0x41, 0x77, 0x3f, 0x8e, 0x0e, 0x59, 0xe1, 0x5a, 0x6a, 0x00, 0x8c, 0x25, 0xbb, 0x64, + 0xaa, 0x59, 0x28, 0xea, 0x7d, 0x5a, 0xdb, 0xd8, 0x85, 0x5e, 0x35, 0x5a, 0x8e, 0xca, 0x55, 0x99, + 0x32, 0x1b, 0x65, 0x49, 0x26, 0x98, 0xdb, 0x55, 0x31, 0xc6, 0x22, 0xef, 0x11, 0x2c, 0x1b, 0x72, + 0x45, 0x9e, 0xa5, 0x05, 0x93, 0x35, 0xde, 0xe2, 0xbc, 0xaa, 0xf1, 0x16, 0xe7, 0x78, 0x1d, 0x7a, + 0x94, 0x15, 0x65, 0x2c, 0xaa, 0x36, 0x5d, 0x6d, 0x84, 0x56, 0xb1, 0x65, 0x2c, 0x68, 0x75, 0x0a, + 0xdf, 0x6d, 0x51, 0xb4, 0x54, 0xc4, 0x4a, 0x13, 0x61, 0x3c, 0x0d, 0x6b, 0xf2, 0x01, 0xc1, 0xb0, + 0x95, 0x07, 0xfb, 0xd5, 0x0a, 0x28, 0x12, 0xc3, 0x8d, 0x71, 0x13, 0xac, 0x71, 0x5a, 0xad, 0xc8, + 0x12, 0xa0, 0x1d, 0xd3, 0x7a, 0xb4, 0x23, 0xdb, 0x21, 0xc7, 0xbe, 0xba, 0xb3, 0xd5, 0x0e, 0x09, + 0x53, 0xed, 0x94, 0x35, 0xda, 0x3c, 0x09, 0xd3, 0x63, 0x76, 0x64, 0xca, 0x57, 0x99, 0xe4, 0x2b, + 0x82, 0xe5, 0x79, 0x92, 0x67, 0x5c, 0x5c, 0xd0, 0x29, 0xb5, 0xc7, 0x55, 0xa7, 0xf4, 0x52, 0x4f, + 0xc0, 0x51, 0xbd, 0x51, 0x93, 0x66, 0x53, 0x6d, 0xa8, 0x29, 0x32, 0xdb, 0x23, 0x1b, 0x25, 0x5b, + 0xd8, 0x00, 0x78, 0x0a, 0x50, 0xaf, 0x4f, 0xe1, 0x3a, 0xca, 0xdd, 0x42, 0xa4, 0xbf, 0x5e, 0xa0, + 0xc2, 0xed, 0x7a, 0x96, 0x6f, 0xd1, 0x16, 0x42, 0x08, 0x8c, 0x2a, 0xaa, 0x7f, 0xeb, 0x1b, 0x39, + 0x82, 0x71, 0x10, 0x67, 0x87, 0xa7, 0xb3, 0x50, 0x84, 0xff, 0x43, 0xd1, 0x04, 0x1c, 0x95, 0xcf, + 0x6c, 0x8c, 0x36, 0xc8, 0x1e, 0xac, 0xb4, 0x6e, 0x31, 0x64, 0xce, 0x89, 0x47, 0x17, 0x8b, 0xef, + 0xfc, 0x2e, 0x9e, 0xdc, 0x04, 0x67, 0x33, 0x3c, 0x3c, 0xf9, 0x47, 0x1a, 0xf2, 0x05, 0xc1, 0xca, + 0x76, 0xf8, 0x4e, 0xef, 0x45, 0x7d, 0xf5, 0x53, 0x18, 0xd4, 0xa0, 0x59, 0xcc, 0x3b, 0xcd, 0x24, + 0xfc, 0x71, 0xbe, 0x41, 0xb6, 0x52, 0xc1, 0x17, 0xb4, 0x09, 0x5e, 0x7d, 0x08, 0xa3, 0xf3, 0x4e, + 0x59, 0xe3, 0xd3, 0xe6, 0xfd, 0x39, 0xd5, 0x0f, 0xea, 0x5b, 0xf5, 0x4e, 0x98, 0x07, 0x55, 0x19, + 0x0f, 0x3a, 0xf7, 0x51, 0x30, 0xfe, 0x76, 0x36, 0x45, 0xdf, 0xcf, 0xa6, 0xe8, 0xc7, 0xd9, 0x14, + 0x7d, 0xfa, 0x39, 0xbd, 0xf2, 0xaa, 0xab, 0x7e, 0x1f, 0xf7, 0x7e, 0x05, 0x00, 0x00, 0xff, 0xff, + 0x04, 0xa0, 0xe3, 0x0c, 0x50, 0x06, 0x00, 0x00, } From 391941782d2f2d9c0ad6426ddc87cec455ef4a23 Mon Sep 17 00:00:00 2001 From: Yuce Tekol Date: Wed, 8 Feb 2017 21:50:03 +0300 Subject: [PATCH 3/4] Temporarily removing internal.pb.go --- internal/internal.pb.go | 3446 --------------------------------------- 1 file changed, 3446 deletions(-) delete mode 100644 internal/internal.pb.go diff --git a/internal/internal.pb.go b/internal/internal.pb.go deleted file mode 100644 index 4371b3891..000000000 --- a/internal/internal.pb.go +++ /dev/null @@ -1,3446 +0,0 @@ -// Code generated by protoc-gen-gogo. -// source: internal.proto -// DO NOT EDIT! - -/* - Package internal is a generated protocol buffer package. - - It is generated from these files: - internal.proto - - It has these top-level messages: - DB - Frame - Bitmap - Pair - Bit - Profile - Attr - AttrMap - QueryRequest - QueryResponse - QueryResult - ImportRequest - ImportResponse - BlockDataRequest - BlockDataResponse - Cache - MaxSlicesResponse -*/ -package internal - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type DB struct { - TimeQuantum string `protobuf:"bytes,1,opt,name=TimeQuantum,proto3" json:"TimeQuantum,omitempty"` -} - -func (m *DB) Reset() { *m = DB{} } -func (m *DB) String() string { return proto.CompactTextString(m) } -func (*DB) ProtoMessage() {} -func (*DB) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{0} } - -type Frame struct { - TimeQuantum string `protobuf:"bytes,1,opt,name=TimeQuantum,proto3" json:"TimeQuantum,omitempty"` -} - -func (m *Frame) Reset() { *m = Frame{} } -func (m *Frame) String() string { return proto.CompactTextString(m) } -func (*Frame) ProtoMessage() {} -func (*Frame) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{1} } - -type Bitmap struct { - Bits []uint64 `protobuf:"varint,1,rep,name=Bits" json:"Bits,omitempty"` - Attrs []*Attr `protobuf:"bytes,2,rep,name=Attrs" json:"Attrs,omitempty"` -} - -func (m *Bitmap) Reset() { *m = Bitmap{} } -func (m *Bitmap) String() string { return proto.CompactTextString(m) } -func (*Bitmap) ProtoMessage() {} -func (*Bitmap) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{2} } - -func (m *Bitmap) GetAttrs() []*Attr { - if m != nil { - return m.Attrs - } - return nil -} - -type Pair struct { - Key uint64 `protobuf:"varint,1,opt,name=Key,proto3" json:"Key,omitempty"` - Count uint64 `protobuf:"varint,2,opt,name=Count,proto3" json:"Count,omitempty"` -} - -func (m *Pair) Reset() { *m = Pair{} } -func (m *Pair) String() string { return proto.CompactTextString(m) } -func (*Pair) ProtoMessage() {} -func (*Pair) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{3} } - -type Bit struct { - BitmapID uint64 `protobuf:"varint,1,opt,name=BitmapID,proto3" json:"BitmapID,omitempty"` - ProfileID uint64 `protobuf:"varint,2,opt,name=ProfileID,proto3" json:"ProfileID,omitempty"` - Timestamp int64 `protobuf:"varint,3,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` -} - -func (m *Bit) Reset() { *m = Bit{} } -func (m *Bit) String() string { return proto.CompactTextString(m) } -func (*Bit) ProtoMessage() {} -func (*Bit) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{4} } - -type Profile struct { - ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` - Attrs []*Attr `protobuf:"bytes,2,rep,name=Attrs" json:"Attrs,omitempty"` -} - -func (m *Profile) Reset() { *m = Profile{} } -func (m *Profile) String() string { return proto.CompactTextString(m) } -func (*Profile) ProtoMessage() {} -func (*Profile) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{5} } - -func (m *Profile) GetAttrs() []*Attr { - if m != nil { - return m.Attrs - } - return nil -} - -type Attr struct { - Key string `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"` - Type uint64 `protobuf:"varint,2,opt,name=Type,proto3" json:"Type,omitempty"` - StringValue string `protobuf:"bytes,3,opt,name=StringValue,proto3" json:"StringValue,omitempty"` - UintValue uint64 `protobuf:"varint,4,opt,name=UintValue,proto3" json:"UintValue,omitempty"` - BoolValue bool `protobuf:"varint,5,opt,name=BoolValue,proto3" json:"BoolValue,omitempty"` -} - -func (m *Attr) Reset() { *m = Attr{} } -func (m *Attr) String() string { return proto.CompactTextString(m) } -func (*Attr) ProtoMessage() {} -func (*Attr) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{6} } - -type AttrMap struct { - Attrs []*Attr `protobuf:"bytes,1,rep,name=Attrs" json:"Attrs,omitempty"` -} - -func (m *AttrMap) Reset() { *m = AttrMap{} } -func (m *AttrMap) String() string { return proto.CompactTextString(m) } -func (*AttrMap) ProtoMessage() {} -func (*AttrMap) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{7} } - -func (m *AttrMap) GetAttrs() []*Attr { - if m != nil { - return m.Attrs - } - return nil -} - -type QueryRequest struct { - DB string `protobuf:"bytes,1,opt,name=DB,proto3" json:"DB,omitempty"` - Query string `protobuf:"bytes,2,opt,name=Query,proto3" json:"Query,omitempty"` - Slices []uint64 `protobuf:"varint,3,rep,name=Slices" json:"Slices,omitempty"` - Profiles bool `protobuf:"varint,4,opt,name=Profiles,proto3" json:"Profiles,omitempty"` - Quantum string `protobuf:"bytes,5,opt,name=Quantum,proto3" json:"Quantum,omitempty"` - Remote bool `protobuf:"varint,6,opt,name=Remote,proto3" json:"Remote,omitempty"` -} - -func (m *QueryRequest) Reset() { *m = QueryRequest{} } -func (m *QueryRequest) String() string { return proto.CompactTextString(m) } -func (*QueryRequest) ProtoMessage() {} -func (*QueryRequest) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{8} } - -type QueryResponse struct { - Err string `protobuf:"bytes,1,opt,name=Err,proto3" json:"Err,omitempty"` - Results []*QueryResult `protobuf:"bytes,2,rep,name=Results" json:"Results,omitempty"` - Profiles []*Profile `protobuf:"bytes,3,rep,name=Profiles" json:"Profiles,omitempty"` -} - -func (m *QueryResponse) Reset() { *m = QueryResponse{} } -func (m *QueryResponse) String() string { return proto.CompactTextString(m) } -func (*QueryResponse) ProtoMessage() {} -func (*QueryResponse) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{9} } - -func (m *QueryResponse) GetResults() []*QueryResult { - if m != nil { - return m.Results - } - return nil -} - -func (m *QueryResponse) GetProfiles() []*Profile { - if m != nil { - return m.Profiles - } - return nil -} - -type QueryResult struct { - Bitmap *Bitmap `protobuf:"bytes,1,opt,name=Bitmap" json:"Bitmap,omitempty"` - N uint64 `protobuf:"varint,2,opt,name=N,proto3" json:"N,omitempty"` - Pairs []*Pair `protobuf:"bytes,3,rep,name=Pairs" json:"Pairs,omitempty"` - Changed bool `protobuf:"varint,4,opt,name=Changed,proto3" json:"Changed,omitempty"` -} - -func (m *QueryResult) Reset() { *m = QueryResult{} } -func (m *QueryResult) String() string { return proto.CompactTextString(m) } -func (*QueryResult) ProtoMessage() {} -func (*QueryResult) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{10} } - -func (m *QueryResult) GetBitmap() *Bitmap { - if m != nil { - return m.Bitmap - } - return nil -} - -func (m *QueryResult) GetPairs() []*Pair { - if m != nil { - return m.Pairs - } - return nil -} - -type ImportRequest struct { - DB string `protobuf:"bytes,1,opt,name=DB,proto3" json:"DB,omitempty"` - Frame string `protobuf:"bytes,2,opt,name=Frame,proto3" json:"Frame,omitempty"` - Slice uint64 `protobuf:"varint,3,opt,name=Slice,proto3" json:"Slice,omitempty"` - BitmapIDs []uint64 `protobuf:"varint,4,rep,name=BitmapIDs" json:"BitmapIDs,omitempty"` - ProfileIDs []uint64 `protobuf:"varint,5,rep,name=ProfileIDs" json:"ProfileIDs,omitempty"` - Timestamps []int64 `protobuf:"varint,6,rep,name=Timestamps" json:"Timestamps,omitempty"` -} - -func (m *ImportRequest) Reset() { *m = ImportRequest{} } -func (m *ImportRequest) String() string { return proto.CompactTextString(m) } -func (*ImportRequest) ProtoMessage() {} -func (*ImportRequest) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{11} } - -type ImportResponse struct { - Err string `protobuf:"bytes,1,opt,name=Err,proto3" json:"Err,omitempty"` -} - -func (m *ImportResponse) Reset() { *m = ImportResponse{} } -func (m *ImportResponse) String() string { return proto.CompactTextString(m) } -func (*ImportResponse) ProtoMessage() {} -func (*ImportResponse) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{12} } - -type BlockDataRequest struct { - DB string `protobuf:"bytes,1,opt,name=DB,proto3" json:"DB,omitempty"` - Frame string `protobuf:"bytes,2,opt,name=Frame,proto3" json:"Frame,omitempty"` - Slice uint64 `protobuf:"varint,3,opt,name=Slice,proto3" json:"Slice,omitempty"` - Block uint64 `protobuf:"varint,4,opt,name=Block,proto3" json:"Block,omitempty"` -} - -func (m *BlockDataRequest) Reset() { *m = BlockDataRequest{} } -func (m *BlockDataRequest) String() string { return proto.CompactTextString(m) } -func (*BlockDataRequest) ProtoMessage() {} -func (*BlockDataRequest) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{13} } - -type BlockDataResponse struct { - BitmapIDs []uint64 `protobuf:"varint,1,rep,name=BitmapIDs" json:"BitmapIDs,omitempty"` - ProfileIDs []uint64 `protobuf:"varint,2,rep,name=ProfileIDs" json:"ProfileIDs,omitempty"` -} - -func (m *BlockDataResponse) Reset() { *m = BlockDataResponse{} } -func (m *BlockDataResponse) String() string { return proto.CompactTextString(m) } -func (*BlockDataResponse) ProtoMessage() {} -func (*BlockDataResponse) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{14} } - -type Cache struct { - BitmapIDs []uint64 `protobuf:"varint,1,rep,name=BitmapIDs" json:"BitmapIDs,omitempty"` -} - -func (m *Cache) Reset() { *m = Cache{} } -func (m *Cache) String() string { return proto.CompactTextString(m) } -func (*Cache) ProtoMessage() {} -func (*Cache) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{15} } - -type MaxSlicesResponse struct { - MaxSlices map[string]uint64 `protobuf:"bytes,1,rep,name=MaxSlices" json:"MaxSlices,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` -} - -func (m *MaxSlicesResponse) Reset() { *m = MaxSlicesResponse{} } -func (m *MaxSlicesResponse) String() string { return proto.CompactTextString(m) } -func (*MaxSlicesResponse) ProtoMessage() {} -func (*MaxSlicesResponse) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{16} } - -func (m *MaxSlicesResponse) GetMaxSlices() map[string]uint64 { - if m != nil { - return m.MaxSlices - } - return nil -} - -func init() { - proto.RegisterType((*DB)(nil), "internal.DB") - proto.RegisterType((*Frame)(nil), "internal.Frame") - proto.RegisterType((*Bitmap)(nil), "internal.Bitmap") - proto.RegisterType((*Pair)(nil), "internal.Pair") - proto.RegisterType((*Bit)(nil), "internal.Bit") - proto.RegisterType((*Profile)(nil), "internal.Profile") - proto.RegisterType((*Attr)(nil), "internal.Attr") - proto.RegisterType((*AttrMap)(nil), "internal.AttrMap") - proto.RegisterType((*QueryRequest)(nil), "internal.QueryRequest") - proto.RegisterType((*QueryResponse)(nil), "internal.QueryResponse") - proto.RegisterType((*QueryResult)(nil), "internal.QueryResult") - proto.RegisterType((*ImportRequest)(nil), "internal.ImportRequest") - proto.RegisterType((*ImportResponse)(nil), "internal.ImportResponse") - proto.RegisterType((*BlockDataRequest)(nil), "internal.BlockDataRequest") - proto.RegisterType((*BlockDataResponse)(nil), "internal.BlockDataResponse") - proto.RegisterType((*Cache)(nil), "internal.Cache") - proto.RegisterType((*MaxSlicesResponse)(nil), "internal.MaxSlicesResponse") -} -func (m *DB) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *DB) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.TimeQuantum) > 0 { - data[i] = 0xa - i++ - i = encodeVarintInternal(data, i, uint64(len(m.TimeQuantum))) - i += copy(data[i:], m.TimeQuantum) - } - return i, nil -} - -func (m *Frame) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Frame) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.TimeQuantum) > 0 { - data[i] = 0xa - i++ - i = encodeVarintInternal(data, i, uint64(len(m.TimeQuantum))) - i += copy(data[i:], m.TimeQuantum) - } - return i, nil -} - -func (m *Bitmap) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Bitmap) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Bits) > 0 { - for _, num := range m.Bits { - data[i] = 0x8 - i++ - i = encodeVarintInternal(data, i, uint64(num)) - } - } - if len(m.Attrs) > 0 { - for _, msg := range m.Attrs { - data[i] = 0x12 - i++ - i = encodeVarintInternal(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *Pair) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Pair) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Key != 0 { - data[i] = 0x8 - i++ - i = encodeVarintInternal(data, i, uint64(m.Key)) - } - if m.Count != 0 { - data[i] = 0x10 - i++ - i = encodeVarintInternal(data, i, uint64(m.Count)) - } - return i, nil -} - -func (m *Bit) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Bit) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.BitmapID != 0 { - data[i] = 0x8 - i++ - i = encodeVarintInternal(data, i, uint64(m.BitmapID)) - } - if m.ProfileID != 0 { - data[i] = 0x10 - i++ - i = encodeVarintInternal(data, i, uint64(m.ProfileID)) - } - if m.Timestamp != 0 { - data[i] = 0x18 - i++ - i = encodeVarintInternal(data, i, uint64(m.Timestamp)) - } - return i, nil -} - -func (m *Profile) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Profile) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.ID != 0 { - data[i] = 0x8 - i++ - i = encodeVarintInternal(data, i, uint64(m.ID)) - } - if len(m.Attrs) > 0 { - for _, msg := range m.Attrs { - data[i] = 0x12 - i++ - i = encodeVarintInternal(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *Attr) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Attr) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Key) > 0 { - data[i] = 0xa - i++ - i = encodeVarintInternal(data, i, uint64(len(m.Key))) - i += copy(data[i:], m.Key) - } - if m.Type != 0 { - data[i] = 0x10 - i++ - i = encodeVarintInternal(data, i, uint64(m.Type)) - } - if len(m.StringValue) > 0 { - data[i] = 0x1a - i++ - i = encodeVarintInternal(data, i, uint64(len(m.StringValue))) - i += copy(data[i:], m.StringValue) - } - if m.UintValue != 0 { - data[i] = 0x20 - i++ - i = encodeVarintInternal(data, i, uint64(m.UintValue)) - } - if m.BoolValue { - data[i] = 0x28 - i++ - if m.BoolValue { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - return i, nil -} - -func (m *AttrMap) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *AttrMap) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Attrs) > 0 { - for _, msg := range m.Attrs { - data[i] = 0xa - i++ - i = encodeVarintInternal(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *QueryRequest) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *QueryRequest) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.DB) > 0 { - data[i] = 0xa - i++ - i = encodeVarintInternal(data, i, uint64(len(m.DB))) - i += copy(data[i:], m.DB) - } - if len(m.Query) > 0 { - data[i] = 0x12 - i++ - i = encodeVarintInternal(data, i, uint64(len(m.Query))) - i += copy(data[i:], m.Query) - } - if len(m.Slices) > 0 { - for _, num := range m.Slices { - data[i] = 0x18 - i++ - i = encodeVarintInternal(data, i, uint64(num)) - } - } - if m.Profiles { - data[i] = 0x20 - i++ - if m.Profiles { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - if len(m.Quantum) > 0 { - data[i] = 0x2a - i++ - i = encodeVarintInternal(data, i, uint64(len(m.Quantum))) - i += copy(data[i:], m.Quantum) - } - if m.Remote { - data[i] = 0x30 - i++ - if m.Remote { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - return i, nil -} - -func (m *QueryResponse) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *QueryResponse) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Err) > 0 { - data[i] = 0xa - i++ - i = encodeVarintInternal(data, i, uint64(len(m.Err))) - i += copy(data[i:], m.Err) - } - if len(m.Results) > 0 { - for _, msg := range m.Results { - data[i] = 0x12 - i++ - i = encodeVarintInternal(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Profiles) > 0 { - for _, msg := range m.Profiles { - data[i] = 0x1a - i++ - i = encodeVarintInternal(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *QueryResult) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *QueryResult) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Bitmap != nil { - data[i] = 0xa - i++ - i = encodeVarintInternal(data, i, uint64(m.Bitmap.Size())) - n1, err := m.Bitmap.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.N != 0 { - data[i] = 0x10 - i++ - i = encodeVarintInternal(data, i, uint64(m.N)) - } - if len(m.Pairs) > 0 { - for _, msg := range m.Pairs { - data[i] = 0x1a - i++ - i = encodeVarintInternal(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Changed { - data[i] = 0x20 - i++ - if m.Changed { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - return i, nil -} - -func (m *ImportRequest) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *ImportRequest) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.DB) > 0 { - data[i] = 0xa - i++ - i = encodeVarintInternal(data, i, uint64(len(m.DB))) - i += copy(data[i:], m.DB) - } - if len(m.Frame) > 0 { - data[i] = 0x12 - i++ - i = encodeVarintInternal(data, i, uint64(len(m.Frame))) - i += copy(data[i:], m.Frame) - } - if m.Slice != 0 { - data[i] = 0x18 - i++ - i = encodeVarintInternal(data, i, uint64(m.Slice)) - } - if len(m.BitmapIDs) > 0 { - for _, num := range m.BitmapIDs { - data[i] = 0x20 - i++ - i = encodeVarintInternal(data, i, uint64(num)) - } - } - if len(m.ProfileIDs) > 0 { - for _, num := range m.ProfileIDs { - data[i] = 0x28 - i++ - i = encodeVarintInternal(data, i, uint64(num)) - } - } - if len(m.Timestamps) > 0 { - for _, num := range m.Timestamps { - data[i] = 0x30 - i++ - i = encodeVarintInternal(data, i, uint64(num)) - } - } - return i, nil -} - -func (m *ImportResponse) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *ImportResponse) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Err) > 0 { - data[i] = 0xa - i++ - i = encodeVarintInternal(data, i, uint64(len(m.Err))) - i += copy(data[i:], m.Err) - } - return i, nil -} - -func (m *BlockDataRequest) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *BlockDataRequest) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.DB) > 0 { - data[i] = 0xa - i++ - i = encodeVarintInternal(data, i, uint64(len(m.DB))) - i += copy(data[i:], m.DB) - } - if len(m.Frame) > 0 { - data[i] = 0x12 - i++ - i = encodeVarintInternal(data, i, uint64(len(m.Frame))) - i += copy(data[i:], m.Frame) - } - if m.Slice != 0 { - data[i] = 0x18 - i++ - i = encodeVarintInternal(data, i, uint64(m.Slice)) - } - if m.Block != 0 { - data[i] = 0x20 - i++ - i = encodeVarintInternal(data, i, uint64(m.Block)) - } - return i, nil -} - -func (m *BlockDataResponse) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *BlockDataResponse) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.BitmapIDs) > 0 { - for _, num := range m.BitmapIDs { - data[i] = 0x8 - i++ - i = encodeVarintInternal(data, i, uint64(num)) - } - } - if len(m.ProfileIDs) > 0 { - for _, num := range m.ProfileIDs { - data[i] = 0x10 - i++ - i = encodeVarintInternal(data, i, uint64(num)) - } - } - return i, nil -} - -func (m *Cache) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Cache) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.BitmapIDs) > 0 { - for _, num := range m.BitmapIDs { - data[i] = 0x8 - i++ - i = encodeVarintInternal(data, i, uint64(num)) - } - } - return i, nil -} - -func (m *MaxSlicesResponse) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *MaxSlicesResponse) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.MaxSlices) > 0 { - for k, _ := range m.MaxSlices { - data[i] = 0xa - i++ - v := m.MaxSlices[k] - mapSize := 1 + len(k) + sovInternal(uint64(len(k))) + 1 + sovInternal(uint64(v)) - i = encodeVarintInternal(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintInternal(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x10 - i++ - i = encodeVarintInternal(data, i, uint64(v)) - } - } - return i, nil -} - -func encodeFixed64Internal(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Internal(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintInternal(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *DB) Size() (n int) { - var l int - _ = l - l = len(m.TimeQuantum) - if l > 0 { - n += 1 + l + sovInternal(uint64(l)) - } - return n -} - -func (m *Frame) Size() (n int) { - var l int - _ = l - l = len(m.TimeQuantum) - if l > 0 { - n += 1 + l + sovInternal(uint64(l)) - } - return n -} - -func (m *Bitmap) Size() (n int) { - var l int - _ = l - if len(m.Bits) > 0 { - for _, e := range m.Bits { - n += 1 + sovInternal(uint64(e)) - } - } - if len(m.Attrs) > 0 { - for _, e := range m.Attrs { - l = e.Size() - n += 1 + l + sovInternal(uint64(l)) - } - } - return n -} - -func (m *Pair) Size() (n int) { - var l int - _ = l - if m.Key != 0 { - n += 1 + sovInternal(uint64(m.Key)) - } - if m.Count != 0 { - n += 1 + sovInternal(uint64(m.Count)) - } - return n -} - -func (m *Bit) Size() (n int) { - var l int - _ = l - if m.BitmapID != 0 { - n += 1 + sovInternal(uint64(m.BitmapID)) - } - if m.ProfileID != 0 { - n += 1 + sovInternal(uint64(m.ProfileID)) - } - if m.Timestamp != 0 { - n += 1 + sovInternal(uint64(m.Timestamp)) - } - return n -} - -func (m *Profile) Size() (n int) { - var l int - _ = l - if m.ID != 0 { - n += 1 + sovInternal(uint64(m.ID)) - } - if len(m.Attrs) > 0 { - for _, e := range m.Attrs { - l = e.Size() - n += 1 + l + sovInternal(uint64(l)) - } - } - return n -} - -func (m *Attr) Size() (n int) { - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovInternal(uint64(l)) - } - if m.Type != 0 { - n += 1 + sovInternal(uint64(m.Type)) - } - l = len(m.StringValue) - if l > 0 { - n += 1 + l + sovInternal(uint64(l)) - } - if m.UintValue != 0 { - n += 1 + sovInternal(uint64(m.UintValue)) - } - if m.BoolValue { - n += 2 - } - return n -} - -func (m *AttrMap) Size() (n int) { - var l int - _ = l - if len(m.Attrs) > 0 { - for _, e := range m.Attrs { - l = e.Size() - n += 1 + l + sovInternal(uint64(l)) - } - } - return n -} - -func (m *QueryRequest) Size() (n int) { - var l int - _ = l - l = len(m.DB) - if l > 0 { - n += 1 + l + sovInternal(uint64(l)) - } - l = len(m.Query) - if l > 0 { - n += 1 + l + sovInternal(uint64(l)) - } - if len(m.Slices) > 0 { - for _, e := range m.Slices { - n += 1 + sovInternal(uint64(e)) - } - } - if m.Profiles { - n += 2 - } - l = len(m.Quantum) - if l > 0 { - n += 1 + l + sovInternal(uint64(l)) - } - if m.Remote { - n += 2 - } - return n -} - -func (m *QueryResponse) Size() (n int) { - var l int - _ = l - l = len(m.Err) - if l > 0 { - n += 1 + l + sovInternal(uint64(l)) - } - if len(m.Results) > 0 { - for _, e := range m.Results { - l = e.Size() - n += 1 + l + sovInternal(uint64(l)) - } - } - if len(m.Profiles) > 0 { - for _, e := range m.Profiles { - l = e.Size() - n += 1 + l + sovInternal(uint64(l)) - } - } - return n -} - -func (m *QueryResult) Size() (n int) { - var l int - _ = l - if m.Bitmap != nil { - l = m.Bitmap.Size() - n += 1 + l + sovInternal(uint64(l)) - } - if m.N != 0 { - n += 1 + sovInternal(uint64(m.N)) - } - if len(m.Pairs) > 0 { - for _, e := range m.Pairs { - l = e.Size() - n += 1 + l + sovInternal(uint64(l)) - } - } - if m.Changed { - n += 2 - } - return n -} - -func (m *ImportRequest) Size() (n int) { - var l int - _ = l - l = len(m.DB) - if l > 0 { - n += 1 + l + sovInternal(uint64(l)) - } - l = len(m.Frame) - if l > 0 { - n += 1 + l + sovInternal(uint64(l)) - } - if m.Slice != 0 { - n += 1 + sovInternal(uint64(m.Slice)) - } - if len(m.BitmapIDs) > 0 { - for _, e := range m.BitmapIDs { - n += 1 + sovInternal(uint64(e)) - } - } - if len(m.ProfileIDs) > 0 { - for _, e := range m.ProfileIDs { - n += 1 + sovInternal(uint64(e)) - } - } - if len(m.Timestamps) > 0 { - for _, e := range m.Timestamps { - n += 1 + sovInternal(uint64(e)) - } - } - return n -} - -func (m *ImportResponse) Size() (n int) { - var l int - _ = l - l = len(m.Err) - if l > 0 { - n += 1 + l + sovInternal(uint64(l)) - } - return n -} - -func (m *BlockDataRequest) Size() (n int) { - var l int - _ = l - l = len(m.DB) - if l > 0 { - n += 1 + l + sovInternal(uint64(l)) - } - l = len(m.Frame) - if l > 0 { - n += 1 + l + sovInternal(uint64(l)) - } - if m.Slice != 0 { - n += 1 + sovInternal(uint64(m.Slice)) - } - if m.Block != 0 { - n += 1 + sovInternal(uint64(m.Block)) - } - return n -} - -func (m *BlockDataResponse) Size() (n int) { - var l int - _ = l - if len(m.BitmapIDs) > 0 { - for _, e := range m.BitmapIDs { - n += 1 + sovInternal(uint64(e)) - } - } - if len(m.ProfileIDs) > 0 { - for _, e := range m.ProfileIDs { - n += 1 + sovInternal(uint64(e)) - } - } - return n -} - -func (m *Cache) Size() (n int) { - var l int - _ = l - if len(m.BitmapIDs) > 0 { - for _, e := range m.BitmapIDs { - n += 1 + sovInternal(uint64(e)) - } - } - return n -} - -func (m *MaxSlicesResponse) Size() (n int) { - var l int - _ = l - if len(m.MaxSlices) > 0 { - for k, v := range m.MaxSlices { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovInternal(uint64(len(k))) + 1 + sovInternal(uint64(v)) - n += mapEntrySize + 1 + sovInternal(uint64(mapEntrySize)) - } - } - return n -} - -func sovInternal(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozInternal(x uint64) (n int) { - return sovInternal(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *DB) 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 ErrIntOverflowInternal - } - 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: DB: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DB: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeQuantum", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - 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 ErrInvalidLengthInternal - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TimeQuantum = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipInternal(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Frame) 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 ErrIntOverflowInternal - } - 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: Frame: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Frame: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeQuantum", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - 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 ErrInvalidLengthInternal - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TimeQuantum = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipInternal(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Bitmap) 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 ErrIntOverflowInternal - } - 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: Bitmap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Bitmap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Bits", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Bits = append(m.Bits, v) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attrs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthInternal - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attrs = append(m.Attrs, &Attr{}) - if err := m.Attrs[len(m.Attrs)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipInternal(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Pair) 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 ErrIntOverflowInternal - } - 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: Pair: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Pair: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - m.Key = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Key |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) - } - m.Count = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Count |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipInternal(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Bit) 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 ErrIntOverflowInternal - } - 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: Bit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Bit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BitmapID", wireType) - } - m.BitmapID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.BitmapID |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProfileID", wireType) - } - m.ProfileID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.ProfileID |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - m.Timestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Timestamp |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipInternal(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Profile) 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 ErrIntOverflowInternal - } - 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: Profile: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Profile: 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 ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.ID |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attrs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthInternal - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attrs = append(m.Attrs, &Attr{}) - if err := m.Attrs[len(m.Attrs)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipInternal(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Attr) 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 ErrIntOverflowInternal - } - 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: Attr: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Attr: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - 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 ErrInvalidLengthInternal - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - 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 ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Type |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - 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 ErrInvalidLengthInternal - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StringValue = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UintValue", wireType) - } - m.UintValue = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.UintValue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.BoolValue = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipInternal(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AttrMap) 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 ErrIntOverflowInternal - } - 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: AttrMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AttrMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attrs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthInternal - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attrs = append(m.Attrs, &Attr{}) - if err := m.Attrs[len(m.Attrs)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipInternal(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryRequest) 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 ErrIntOverflowInternal - } - 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: QueryRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DB", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - 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 ErrInvalidLengthInternal - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DB = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - 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 ErrInvalidLengthInternal - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Query = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Slices", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Slices = append(m.Slices, v) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Profiles", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Profiles = bool(v != 0) - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Quantum", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - 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 ErrInvalidLengthInternal - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Quantum = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Remote", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Remote = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipInternal(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryResponse) 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 ErrIntOverflowInternal - } - 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: QueryResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Err", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - 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 ErrInvalidLengthInternal - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Err = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthInternal - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Results = append(m.Results, &QueryResult{}) - if err := m.Results[len(m.Results)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Profiles", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthInternal - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Profiles = append(m.Profiles, &Profile{}) - if err := m.Profiles[len(m.Profiles)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipInternal(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryResult) 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 ErrIntOverflowInternal - } - 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: QueryResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bitmap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthInternal - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Bitmap == nil { - m.Bitmap = &Bitmap{} - } - if err := m.Bitmap.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field N", wireType) - } - m.N = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.N |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pairs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthInternal - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Pairs = append(m.Pairs, &Pair{}) - if err := m.Pairs[len(m.Pairs)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Changed", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Changed = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipInternal(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImportRequest) 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 ErrIntOverflowInternal - } - 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: ImportRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImportRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DB", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - 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 ErrInvalidLengthInternal - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DB = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Frame", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - 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 ErrInvalidLengthInternal - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Frame = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Slice", wireType) - } - m.Slice = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Slice |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BitmapIDs", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.BitmapIDs = append(m.BitmapIDs, v) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProfileIDs", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.ProfileIDs = append(m.ProfileIDs, v) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamps", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Timestamps = append(m.Timestamps, v) - default: - iNdEx = preIndex - skippy, err := skipInternal(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImportResponse) 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 ErrIntOverflowInternal - } - 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: ImportResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImportResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Err", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - 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 ErrInvalidLengthInternal - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Err = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipInternal(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockDataRequest) 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 ErrIntOverflowInternal - } - 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: BlockDataRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockDataRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DB", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - 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 ErrInvalidLengthInternal - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DB = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Frame", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - 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 ErrInvalidLengthInternal - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Frame = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Slice", wireType) - } - m.Slice = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Slice |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) - } - m.Block = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Block |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipInternal(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockDataResponse) 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 ErrIntOverflowInternal - } - 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: BlockDataResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockDataResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BitmapIDs", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.BitmapIDs = append(m.BitmapIDs, v) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProfileIDs", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.ProfileIDs = append(m.ProfileIDs, v) - default: - iNdEx = preIndex - skippy, err := skipInternal(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Cache) 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 ErrIntOverflowInternal - } - 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: Cache: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Cache: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BitmapIDs", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.BitmapIDs = append(m.BitmapIDs, v) - default: - iNdEx = preIndex - skippy, err := skipInternal(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MaxSlicesResponse) 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 ErrIntOverflowInternal - } - 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: MaxSlicesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MaxSlicesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxSlices", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthInternal - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthInternal - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.MaxSlices == nil { - m.MaxSlices = make(map[string]uint64) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowInternal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.MaxSlices[mapkey] = mapvalue - } else { - var mapvalue uint64 - m.MaxSlices[mapkey] = mapvalue - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipInternal(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthInternal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipInternal(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowInternal - } - 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, ErrIntOverflowInternal - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowInternal - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthInternal - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowInternal - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipInternal(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthInternal = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowInternal = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("internal.proto", fileDescriptorInternal) } - -var fileDescriptorInternal = []byte{ - // 696 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x55, 0xcb, 0x6a, 0x14, 0x41, - 0x14, 0xb5, 0xa6, 0xbb, 0xe7, 0x71, 0x27, 0x19, 0x26, 0xc5, 0x28, 0x4d, 0x90, 0xa1, 0x29, 0x54, - 0x5a, 0xc1, 0x04, 0xe2, 0x46, 0x44, 0x10, 0x3b, 0x13, 0x71, 0x90, 0x84, 0xa4, 0x12, 0xdd, 0xb9, - 0x68, 0x93, 0x32, 0x69, 0xd2, 0x2f, 0xab, 0xab, 0xc5, 0x59, 0xba, 0x70, 0xe3, 0x17, 0x88, 0x7e, - 0x81, 0x7f, 0xe2, 0xd2, 0x4f, 0x90, 0xf8, 0x23, 0x52, 0x8f, 0x7e, 0x44, 0x31, 0x66, 0xe1, 0xae, - 0xef, 0xb9, 0x75, 0x6f, 0x9d, 0x73, 0x1f, 0xd5, 0x30, 0x8a, 0x52, 0xc1, 0x78, 0x1a, 0xc6, 0x6b, - 0x39, 0xcf, 0x44, 0x86, 0xfb, 0x95, 0x4d, 0x6e, 0x41, 0x67, 0x16, 0x60, 0x0f, 0x86, 0x07, 0x51, - 0xc2, 0xf6, 0xca, 0x30, 0x15, 0x65, 0xe2, 0x22, 0x0f, 0xf9, 0x03, 0xda, 0x86, 0xc8, 0x6d, 0x70, - 0x9e, 0xf0, 0x30, 0x61, 0x97, 0x38, 0x1a, 0x40, 0x37, 0x88, 0x44, 0x12, 0xe6, 0x18, 0x83, 0x1d, - 0x44, 0xa2, 0x70, 0x91, 0x67, 0xf9, 0x36, 0x55, 0xdf, 0xf8, 0x06, 0x38, 0x8f, 0x85, 0xe0, 0x85, - 0xdb, 0xf1, 0x2c, 0x7f, 0xb8, 0x31, 0x5a, 0xab, 0xa9, 0x49, 0x98, 0x6a, 0x27, 0x59, 0x03, 0x7b, - 0x37, 0x8c, 0x38, 0x1e, 0x83, 0xf5, 0x8c, 0x2d, 0xd4, 0x2d, 0x36, 0x95, 0x9f, 0x78, 0x02, 0xce, - 0x66, 0x56, 0xa6, 0xc2, 0xed, 0x28, 0x4c, 0x1b, 0xe4, 0x25, 0x58, 0x41, 0x24, 0xf0, 0x2a, 0xf4, - 0xf5, 0xd5, 0xf3, 0x99, 0x89, 0xa9, 0x6d, 0x7c, 0x1d, 0x06, 0xbb, 0x3c, 0x7b, 0x1d, 0xc5, 0x6c, - 0x3e, 0x33, 0xc1, 0x0d, 0x20, 0xbd, 0x52, 0x43, 0x21, 0xc2, 0x24, 0x77, 0x2d, 0x0f, 0xf9, 0x16, - 0x6d, 0x00, 0xf2, 0x08, 0x7a, 0xe6, 0x28, 0x1e, 0x41, 0xa7, 0x4e, 0xde, 0x99, 0xcf, 0x2e, 0xa9, - 0xe7, 0x23, 0x02, 0x5b, 0x7e, 0xb5, 0x05, 0x0d, 0xb4, 0x20, 0x0c, 0xf6, 0xc1, 0x22, 0x67, 0x86, - 0x92, 0xfa, 0x96, 0x45, 0xde, 0x17, 0x3c, 0x4a, 0x8f, 0x5f, 0x84, 0x71, 0xc9, 0x14, 0x9f, 0x01, - 0x6d, 0x43, 0x92, 0xef, 0xf3, 0x28, 0x15, 0xda, 0x6f, 0x6b, 0x35, 0x35, 0x20, 0xbd, 0x41, 0x96, - 0xc5, 0xda, 0xeb, 0x78, 0xc8, 0xef, 0xd3, 0x06, 0x20, 0xeb, 0xd0, 0x93, 0x5c, 0xb6, 0xc3, 0xbc, - 0x61, 0x8f, 0x2e, 0x62, 0xff, 0x19, 0xc1, 0xd2, 0x5e, 0xc9, 0xf8, 0x82, 0xb2, 0x37, 0x25, 0x2b, - 0x84, 0x2c, 0xc2, 0x2c, 0x30, 0x22, 0xe4, 0xfc, 0x4c, 0xc0, 0x51, 0x7e, 0x25, 0x62, 0x40, 0xb5, - 0x81, 0xaf, 0x41, 0x77, 0x3f, 0x8e, 0x0e, 0x59, 0xe1, 0x5a, 0x6a, 0x00, 0x8c, 0x25, 0xbb, 0x64, - 0xaa, 0x59, 0x28, 0xea, 0x7d, 0x5a, 0xdb, 0xd8, 0x85, 0x5e, 0x35, 0x5a, 0x8e, 0xca, 0x55, 0x99, - 0x32, 0x1b, 0x65, 0x49, 0x26, 0x98, 0xdb, 0x55, 0x31, 0xc6, 0x22, 0xef, 0x11, 0x2c, 0x1b, 0x72, - 0x45, 0x9e, 0xa5, 0x05, 0x93, 0x35, 0xde, 0xe2, 0xbc, 0xaa, 0xf1, 0x16, 0xe7, 0x78, 0x1d, 0x7a, - 0x94, 0x15, 0x65, 0x2c, 0xaa, 0x36, 0x5d, 0x6d, 0x84, 0x56, 0xb1, 0x65, 0x2c, 0x68, 0x75, 0x0a, - 0xdf, 0x6d, 0x51, 0xb4, 0x54, 0xc4, 0x4a, 0x13, 0x61, 0x3c, 0x0d, 0x6b, 0xf2, 0x01, 0xc1, 0xb0, - 0x95, 0x07, 0xfb, 0xd5, 0x0a, 0x28, 0x12, 0xc3, 0x8d, 0x71, 0x13, 0xac, 0x71, 0x5a, 0xad, 0xc8, - 0x12, 0xa0, 0x1d, 0xd3, 0x7a, 0xb4, 0x23, 0xdb, 0x21, 0xc7, 0xbe, 0xba, 0xb3, 0xd5, 0x0e, 0x09, - 0x53, 0xed, 0x94, 0x35, 0xda, 0x3c, 0x09, 0xd3, 0x63, 0x76, 0x64, 0xca, 0x57, 0x99, 0xe4, 0x2b, - 0x82, 0xe5, 0x79, 0x92, 0x67, 0x5c, 0x5c, 0xd0, 0x29, 0xb5, 0xc7, 0x55, 0xa7, 0xf4, 0x52, 0x4f, - 0xc0, 0x51, 0xbd, 0x51, 0x93, 0x66, 0x53, 0x6d, 0xa8, 0x29, 0x32, 0xdb, 0x23, 0x1b, 0x25, 0x5b, - 0xd8, 0x00, 0x78, 0x0a, 0x50, 0xaf, 0x4f, 0xe1, 0x3a, 0xca, 0xdd, 0x42, 0xa4, 0xbf, 0x5e, 0xa0, - 0xc2, 0xed, 0x7a, 0x96, 0x6f, 0xd1, 0x16, 0x42, 0x08, 0x8c, 0x2a, 0xaa, 0x7f, 0xeb, 0x1b, 0x39, - 0x82, 0x71, 0x10, 0x67, 0x87, 0xa7, 0xb3, 0x50, 0x84, 0xff, 0x43, 0xd1, 0x04, 0x1c, 0x95, 0xcf, - 0x6c, 0x8c, 0x36, 0xc8, 0x1e, 0xac, 0xb4, 0x6e, 0x31, 0x64, 0xce, 0x89, 0x47, 0x17, 0x8b, 0xef, - 0xfc, 0x2e, 0x9e, 0xdc, 0x04, 0x67, 0x33, 0x3c, 0x3c, 0xf9, 0x47, 0x1a, 0xf2, 0x05, 0xc1, 0xca, - 0x76, 0xf8, 0x4e, 0xef, 0x45, 0x7d, 0xf5, 0x53, 0x18, 0xd4, 0xa0, 0x59, 0xcc, 0x3b, 0xcd, 0x24, - 0xfc, 0x71, 0xbe, 0x41, 0xb6, 0x52, 0xc1, 0x17, 0xb4, 0x09, 0x5e, 0x7d, 0x08, 0xa3, 0xf3, 0x4e, - 0x59, 0xe3, 0xd3, 0xe6, 0xfd, 0x39, 0xd5, 0x0f, 0xea, 0x5b, 0xf5, 0x4e, 0x98, 0x07, 0x55, 0x19, - 0x0f, 0x3a, 0xf7, 0x51, 0x30, 0xfe, 0x76, 0x36, 0x45, 0xdf, 0xcf, 0xa6, 0xe8, 0xc7, 0xd9, 0x14, - 0x7d, 0xfa, 0x39, 0xbd, 0xf2, 0xaa, 0xab, 0x7e, 0x1f, 0xf7, 0x7e, 0x05, 0x00, 0x00, 0xff, 0xff, - 0x04, 0xa0, 0xe3, 0x0c, 0x50, 0x06, 0x00, 0x00, -} From 56406566a84c28ea751d8d6389ac091bd724d9e6 Mon Sep 17 00:00:00 2001 From: Travis Date: Wed, 8 Feb 2017 13:02:14 -0600 Subject: [PATCH 4/4] generate `internal.pb.go` using standard version of `protoc-gen-gofast` --- internal/internal.pb.go | 3879 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 3879 insertions(+) create mode 100644 internal/internal.pb.go diff --git a/internal/internal.pb.go b/internal/internal.pb.go new file mode 100644 index 000000000..6239845ed --- /dev/null +++ b/internal/internal.pb.go @@ -0,0 +1,3879 @@ +// Code generated by protoc-gen-gogo. +// source: internal.proto +// DO NOT EDIT! + +/* + Package internal is a generated protocol buffer package. + + It is generated from these files: + internal.proto + + It has these top-level messages: + DB + Frame + Bitmap + Pair + Bit + Profile + Attr + AttrMap + QueryRequest + QueryResponse + QueryResult + ImportRequest + ImportResponse + BlockDataRequest + BlockDataResponse + Cache + MaxSlicesResponse +*/ +package internal + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + +type DB struct { + TimeQuantum string `protobuf:"bytes,1,opt,name=TimeQuantum,proto3" json:"TimeQuantum,omitempty"` +} + +func (m *DB) Reset() { *m = DB{} } +func (m *DB) String() string { return proto.CompactTextString(m) } +func (*DB) ProtoMessage() {} +func (*DB) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{0} } + +type Frame struct { + TimeQuantum string `protobuf:"bytes,1,opt,name=TimeQuantum,proto3" json:"TimeQuantum,omitempty"` +} + +func (m *Frame) Reset() { *m = Frame{} } +func (m *Frame) String() string { return proto.CompactTextString(m) } +func (*Frame) ProtoMessage() {} +func (*Frame) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{1} } + +type Bitmap struct { + Bits []uint64 `protobuf:"varint,1,rep,packed,name=Bits" json:"Bits,omitempty"` + Attrs []*Attr `protobuf:"bytes,2,rep,name=Attrs" json:"Attrs,omitempty"` +} + +func (m *Bitmap) Reset() { *m = Bitmap{} } +func (m *Bitmap) String() string { return proto.CompactTextString(m) } +func (*Bitmap) ProtoMessage() {} +func (*Bitmap) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{2} } + +func (m *Bitmap) GetAttrs() []*Attr { + if m != nil { + return m.Attrs + } + return nil +} + +type Pair struct { + Key uint64 `protobuf:"varint,1,opt,name=Key,proto3" json:"Key,omitempty"` + Count uint64 `protobuf:"varint,2,opt,name=Count,proto3" json:"Count,omitempty"` +} + +func (m *Pair) Reset() { *m = Pair{} } +func (m *Pair) String() string { return proto.CompactTextString(m) } +func (*Pair) ProtoMessage() {} +func (*Pair) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{3} } + +type Bit struct { + BitmapID uint64 `protobuf:"varint,1,opt,name=BitmapID,proto3" json:"BitmapID,omitempty"` + ProfileID uint64 `protobuf:"varint,2,opt,name=ProfileID,proto3" json:"ProfileID,omitempty"` + Timestamp int64 `protobuf:"varint,3,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` +} + +func (m *Bit) Reset() { *m = Bit{} } +func (m *Bit) String() string { return proto.CompactTextString(m) } +func (*Bit) ProtoMessage() {} +func (*Bit) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{4} } + +type Profile struct { + ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` + Attrs []*Attr `protobuf:"bytes,2,rep,name=Attrs" json:"Attrs,omitempty"` +} + +func (m *Profile) Reset() { *m = Profile{} } +func (m *Profile) String() string { return proto.CompactTextString(m) } +func (*Profile) ProtoMessage() {} +func (*Profile) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{5} } + +func (m *Profile) GetAttrs() []*Attr { + if m != nil { + return m.Attrs + } + return nil +} + +type Attr struct { + Key string `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"` + Type uint64 `protobuf:"varint,2,opt,name=Type,proto3" json:"Type,omitempty"` + StringValue string `protobuf:"bytes,3,opt,name=StringValue,proto3" json:"StringValue,omitempty"` + UintValue uint64 `protobuf:"varint,4,opt,name=UintValue,proto3" json:"UintValue,omitempty"` + BoolValue bool `protobuf:"varint,5,opt,name=BoolValue,proto3" json:"BoolValue,omitempty"` +} + +func (m *Attr) Reset() { *m = Attr{} } +func (m *Attr) String() string { return proto.CompactTextString(m) } +func (*Attr) ProtoMessage() {} +func (*Attr) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{6} } + +type AttrMap struct { + Attrs []*Attr `protobuf:"bytes,1,rep,name=Attrs" json:"Attrs,omitempty"` +} + +func (m *AttrMap) Reset() { *m = AttrMap{} } +func (m *AttrMap) String() string { return proto.CompactTextString(m) } +func (*AttrMap) ProtoMessage() {} +func (*AttrMap) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{7} } + +func (m *AttrMap) GetAttrs() []*Attr { + if m != nil { + return m.Attrs + } + return nil +} + +type QueryRequest struct { + DB string `protobuf:"bytes,1,opt,name=DB,proto3" json:"DB,omitempty"` + Query string `protobuf:"bytes,2,opt,name=Query,proto3" json:"Query,omitempty"` + Slices []uint64 `protobuf:"varint,3,rep,packed,name=Slices" json:"Slices,omitempty"` + Profiles bool `protobuf:"varint,4,opt,name=Profiles,proto3" json:"Profiles,omitempty"` + Quantum string `protobuf:"bytes,5,opt,name=Quantum,proto3" json:"Quantum,omitempty"` + Remote bool `protobuf:"varint,6,opt,name=Remote,proto3" json:"Remote,omitempty"` +} + +func (m *QueryRequest) Reset() { *m = QueryRequest{} } +func (m *QueryRequest) String() string { return proto.CompactTextString(m) } +func (*QueryRequest) ProtoMessage() {} +func (*QueryRequest) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{8} } + +type QueryResponse struct { + Err string `protobuf:"bytes,1,opt,name=Err,proto3" json:"Err,omitempty"` + Results []*QueryResult `protobuf:"bytes,2,rep,name=Results" json:"Results,omitempty"` + Profiles []*Profile `protobuf:"bytes,3,rep,name=Profiles" json:"Profiles,omitempty"` +} + +func (m *QueryResponse) Reset() { *m = QueryResponse{} } +func (m *QueryResponse) String() string { return proto.CompactTextString(m) } +func (*QueryResponse) ProtoMessage() {} +func (*QueryResponse) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{9} } + +func (m *QueryResponse) GetResults() []*QueryResult { + if m != nil { + return m.Results + } + return nil +} + +func (m *QueryResponse) GetProfiles() []*Profile { + if m != nil { + return m.Profiles + } + return nil +} + +type QueryResult struct { + Bitmap *Bitmap `protobuf:"bytes,1,opt,name=Bitmap" json:"Bitmap,omitempty"` + N uint64 `protobuf:"varint,2,opt,name=N,proto3" json:"N,omitempty"` + Pairs []*Pair `protobuf:"bytes,3,rep,name=Pairs" json:"Pairs,omitempty"` + Changed bool `protobuf:"varint,4,opt,name=Changed,proto3" json:"Changed,omitempty"` +} + +func (m *QueryResult) Reset() { *m = QueryResult{} } +func (m *QueryResult) String() string { return proto.CompactTextString(m) } +func (*QueryResult) ProtoMessage() {} +func (*QueryResult) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{10} } + +func (m *QueryResult) GetBitmap() *Bitmap { + if m != nil { + return m.Bitmap + } + return nil +} + +func (m *QueryResult) GetPairs() []*Pair { + if m != nil { + return m.Pairs + } + return nil +} + +type ImportRequest struct { + DB string `protobuf:"bytes,1,opt,name=DB,proto3" json:"DB,omitempty"` + Frame string `protobuf:"bytes,2,opt,name=Frame,proto3" json:"Frame,omitempty"` + Slice uint64 `protobuf:"varint,3,opt,name=Slice,proto3" json:"Slice,omitempty"` + BitmapIDs []uint64 `protobuf:"varint,4,rep,packed,name=BitmapIDs" json:"BitmapIDs,omitempty"` + ProfileIDs []uint64 `protobuf:"varint,5,rep,packed,name=ProfileIDs" json:"ProfileIDs,omitempty"` + Timestamps []int64 `protobuf:"varint,6,rep,packed,name=Timestamps" json:"Timestamps,omitempty"` +} + +func (m *ImportRequest) Reset() { *m = ImportRequest{} } +func (m *ImportRequest) String() string { return proto.CompactTextString(m) } +func (*ImportRequest) ProtoMessage() {} +func (*ImportRequest) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{11} } + +type ImportResponse struct { + Err string `protobuf:"bytes,1,opt,name=Err,proto3" json:"Err,omitempty"` +} + +func (m *ImportResponse) Reset() { *m = ImportResponse{} } +func (m *ImportResponse) String() string { return proto.CompactTextString(m) } +func (*ImportResponse) ProtoMessage() {} +func (*ImportResponse) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{12} } + +type BlockDataRequest struct { + DB string `protobuf:"bytes,1,opt,name=DB,proto3" json:"DB,omitempty"` + Frame string `protobuf:"bytes,2,opt,name=Frame,proto3" json:"Frame,omitempty"` + Slice uint64 `protobuf:"varint,3,opt,name=Slice,proto3" json:"Slice,omitempty"` + Block uint64 `protobuf:"varint,4,opt,name=Block,proto3" json:"Block,omitempty"` +} + +func (m *BlockDataRequest) Reset() { *m = BlockDataRequest{} } +func (m *BlockDataRequest) String() string { return proto.CompactTextString(m) } +func (*BlockDataRequest) ProtoMessage() {} +func (*BlockDataRequest) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{13} } + +type BlockDataResponse struct { + BitmapIDs []uint64 `protobuf:"varint,1,rep,packed,name=BitmapIDs" json:"BitmapIDs,omitempty"` + ProfileIDs []uint64 `protobuf:"varint,2,rep,packed,name=ProfileIDs" json:"ProfileIDs,omitempty"` +} + +func (m *BlockDataResponse) Reset() { *m = BlockDataResponse{} } +func (m *BlockDataResponse) String() string { return proto.CompactTextString(m) } +func (*BlockDataResponse) ProtoMessage() {} +func (*BlockDataResponse) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{14} } + +type Cache struct { + BitmapIDs []uint64 `protobuf:"varint,1,rep,packed,name=BitmapIDs" json:"BitmapIDs,omitempty"` +} + +func (m *Cache) Reset() { *m = Cache{} } +func (m *Cache) String() string { return proto.CompactTextString(m) } +func (*Cache) ProtoMessage() {} +func (*Cache) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{15} } + +type MaxSlicesResponse struct { + MaxSlices map[string]uint64 `protobuf:"bytes,1,rep,name=MaxSlices" json:"MaxSlices,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` +} + +func (m *MaxSlicesResponse) Reset() { *m = MaxSlicesResponse{} } +func (m *MaxSlicesResponse) String() string { return proto.CompactTextString(m) } +func (*MaxSlicesResponse) ProtoMessage() {} +func (*MaxSlicesResponse) Descriptor() ([]byte, []int) { return fileDescriptorInternal, []int{16} } + +func (m *MaxSlicesResponse) GetMaxSlices() map[string]uint64 { + if m != nil { + return m.MaxSlices + } + return nil +} + +func init() { + proto.RegisterType((*DB)(nil), "internal.DB") + proto.RegisterType((*Frame)(nil), "internal.Frame") + proto.RegisterType((*Bitmap)(nil), "internal.Bitmap") + proto.RegisterType((*Pair)(nil), "internal.Pair") + proto.RegisterType((*Bit)(nil), "internal.Bit") + proto.RegisterType((*Profile)(nil), "internal.Profile") + proto.RegisterType((*Attr)(nil), "internal.Attr") + proto.RegisterType((*AttrMap)(nil), "internal.AttrMap") + proto.RegisterType((*QueryRequest)(nil), "internal.QueryRequest") + proto.RegisterType((*QueryResponse)(nil), "internal.QueryResponse") + proto.RegisterType((*QueryResult)(nil), "internal.QueryResult") + proto.RegisterType((*ImportRequest)(nil), "internal.ImportRequest") + proto.RegisterType((*ImportResponse)(nil), "internal.ImportResponse") + proto.RegisterType((*BlockDataRequest)(nil), "internal.BlockDataRequest") + proto.RegisterType((*BlockDataResponse)(nil), "internal.BlockDataResponse") + proto.RegisterType((*Cache)(nil), "internal.Cache") + proto.RegisterType((*MaxSlicesResponse)(nil), "internal.MaxSlicesResponse") +} +func (m *DB) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DB) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.TimeQuantum) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintInternal(dAtA, i, uint64(len(m.TimeQuantum))) + i += copy(dAtA[i:], m.TimeQuantum) + } + return i, nil +} + +func (m *Frame) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Frame) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.TimeQuantum) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintInternal(dAtA, i, uint64(len(m.TimeQuantum))) + i += copy(dAtA[i:], m.TimeQuantum) + } + return i, nil +} + +func (m *Bitmap) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Bitmap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Bits) > 0 { + dAtA2 := make([]byte, len(m.Bits)*10) + var j1 int + for _, num := range m.Bits { + for num >= 1<<7 { + dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA2[j1] = uint8(num) + j1++ + } + dAtA[i] = 0xa + i++ + i = encodeVarintInternal(dAtA, i, uint64(j1)) + i += copy(dAtA[i:], dAtA2[:j1]) + } + if len(m.Attrs) > 0 { + for _, msg := range m.Attrs { + dAtA[i] = 0x12 + i++ + i = encodeVarintInternal(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Pair) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Pair) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Key != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintInternal(dAtA, i, uint64(m.Key)) + } + if m.Count != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintInternal(dAtA, i, uint64(m.Count)) + } + return i, nil +} + +func (m *Bit) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Bit) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.BitmapID != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintInternal(dAtA, i, uint64(m.BitmapID)) + } + if m.ProfileID != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintInternal(dAtA, i, uint64(m.ProfileID)) + } + if m.Timestamp != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintInternal(dAtA, i, uint64(m.Timestamp)) + } + return i, nil +} + +func (m *Profile) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Profile) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ID != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintInternal(dAtA, i, uint64(m.ID)) + } + if len(m.Attrs) > 0 { + for _, msg := range m.Attrs { + dAtA[i] = 0x12 + i++ + i = encodeVarintInternal(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Attr) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Attr) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Key) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintInternal(dAtA, i, uint64(len(m.Key))) + i += copy(dAtA[i:], m.Key) + } + if m.Type != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintInternal(dAtA, i, uint64(m.Type)) + } + if len(m.StringValue) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintInternal(dAtA, i, uint64(len(m.StringValue))) + i += copy(dAtA[i:], m.StringValue) + } + if m.UintValue != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintInternal(dAtA, i, uint64(m.UintValue)) + } + if m.BoolValue { + dAtA[i] = 0x28 + i++ + if m.BoolValue { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *AttrMap) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AttrMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Attrs) > 0 { + for _, msg := range m.Attrs { + dAtA[i] = 0xa + i++ + i = encodeVarintInternal(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *QueryRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.DB) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintInternal(dAtA, i, uint64(len(m.DB))) + i += copy(dAtA[i:], m.DB) + } + if len(m.Query) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintInternal(dAtA, i, uint64(len(m.Query))) + i += copy(dAtA[i:], m.Query) + } + if len(m.Slices) > 0 { + dAtA4 := make([]byte, len(m.Slices)*10) + var j3 int + for _, num := range m.Slices { + for num >= 1<<7 { + dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j3++ + } + dAtA4[j3] = uint8(num) + j3++ + } + dAtA[i] = 0x1a + i++ + i = encodeVarintInternal(dAtA, i, uint64(j3)) + i += copy(dAtA[i:], dAtA4[:j3]) + } + if m.Profiles { + dAtA[i] = 0x20 + i++ + if m.Profiles { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if len(m.Quantum) > 0 { + dAtA[i] = 0x2a + i++ + i = encodeVarintInternal(dAtA, i, uint64(len(m.Quantum))) + i += copy(dAtA[i:], m.Quantum) + } + if m.Remote { + dAtA[i] = 0x30 + i++ + if m.Remote { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *QueryResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Err) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintInternal(dAtA, i, uint64(len(m.Err))) + i += copy(dAtA[i:], m.Err) + } + if len(m.Results) > 0 { + for _, msg := range m.Results { + dAtA[i] = 0x12 + i++ + i = encodeVarintInternal(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Profiles) > 0 { + for _, msg := range m.Profiles { + dAtA[i] = 0x1a + i++ + i = encodeVarintInternal(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *QueryResult) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryResult) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Bitmap != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintInternal(dAtA, i, uint64(m.Bitmap.Size())) + n5, err := m.Bitmap.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + if m.N != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintInternal(dAtA, i, uint64(m.N)) + } + if len(m.Pairs) > 0 { + for _, msg := range m.Pairs { + dAtA[i] = 0x1a + i++ + i = encodeVarintInternal(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Changed { + dAtA[i] = 0x20 + i++ + if m.Changed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *ImportRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ImportRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.DB) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintInternal(dAtA, i, uint64(len(m.DB))) + i += copy(dAtA[i:], m.DB) + } + if len(m.Frame) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintInternal(dAtA, i, uint64(len(m.Frame))) + i += copy(dAtA[i:], m.Frame) + } + if m.Slice != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintInternal(dAtA, i, uint64(m.Slice)) + } + if len(m.BitmapIDs) > 0 { + dAtA7 := make([]byte, len(m.BitmapIDs)*10) + var j6 int + for _, num := range m.BitmapIDs { + for num >= 1<<7 { + dAtA7[j6] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j6++ + } + dAtA7[j6] = uint8(num) + j6++ + } + dAtA[i] = 0x22 + i++ + i = encodeVarintInternal(dAtA, i, uint64(j6)) + i += copy(dAtA[i:], dAtA7[:j6]) + } + if len(m.ProfileIDs) > 0 { + dAtA9 := make([]byte, len(m.ProfileIDs)*10) + var j8 int + for _, num := range m.ProfileIDs { + for num >= 1<<7 { + dAtA9[j8] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j8++ + } + dAtA9[j8] = uint8(num) + j8++ + } + dAtA[i] = 0x2a + i++ + i = encodeVarintInternal(dAtA, i, uint64(j8)) + i += copy(dAtA[i:], dAtA9[:j8]) + } + if len(m.Timestamps) > 0 { + dAtA11 := make([]byte, len(m.Timestamps)*10) + var j10 int + for _, num1 := range m.Timestamps { + num := uint64(num1) + for num >= 1<<7 { + dAtA11[j10] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j10++ + } + dAtA11[j10] = uint8(num) + j10++ + } + dAtA[i] = 0x32 + i++ + i = encodeVarintInternal(dAtA, i, uint64(j10)) + i += copy(dAtA[i:], dAtA11[:j10]) + } + return i, nil +} + +func (m *ImportResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ImportResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Err) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintInternal(dAtA, i, uint64(len(m.Err))) + i += copy(dAtA[i:], m.Err) + } + return i, nil +} + +func (m *BlockDataRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BlockDataRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.DB) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintInternal(dAtA, i, uint64(len(m.DB))) + i += copy(dAtA[i:], m.DB) + } + if len(m.Frame) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintInternal(dAtA, i, uint64(len(m.Frame))) + i += copy(dAtA[i:], m.Frame) + } + if m.Slice != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintInternal(dAtA, i, uint64(m.Slice)) + } + if m.Block != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintInternal(dAtA, i, uint64(m.Block)) + } + return i, nil +} + +func (m *BlockDataResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BlockDataResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.BitmapIDs) > 0 { + dAtA13 := make([]byte, len(m.BitmapIDs)*10) + var j12 int + for _, num := range m.BitmapIDs { + for num >= 1<<7 { + dAtA13[j12] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j12++ + } + dAtA13[j12] = uint8(num) + j12++ + } + dAtA[i] = 0xa + i++ + i = encodeVarintInternal(dAtA, i, uint64(j12)) + i += copy(dAtA[i:], dAtA13[:j12]) + } + if len(m.ProfileIDs) > 0 { + dAtA15 := make([]byte, len(m.ProfileIDs)*10) + var j14 int + for _, num := range m.ProfileIDs { + for num >= 1<<7 { + dAtA15[j14] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j14++ + } + dAtA15[j14] = uint8(num) + j14++ + } + dAtA[i] = 0x12 + i++ + i = encodeVarintInternal(dAtA, i, uint64(j14)) + i += copy(dAtA[i:], dAtA15[:j14]) + } + return i, nil +} + +func (m *Cache) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Cache) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.BitmapIDs) > 0 { + dAtA17 := make([]byte, len(m.BitmapIDs)*10) + var j16 int + for _, num := range m.BitmapIDs { + for num >= 1<<7 { + dAtA17[j16] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j16++ + } + dAtA17[j16] = uint8(num) + j16++ + } + dAtA[i] = 0xa + i++ + i = encodeVarintInternal(dAtA, i, uint64(j16)) + i += copy(dAtA[i:], dAtA17[:j16]) + } + return i, nil +} + +func (m *MaxSlicesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MaxSlicesResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.MaxSlices) > 0 { + for k, _ := range m.MaxSlices { + dAtA[i] = 0xa + i++ + v := m.MaxSlices[k] + mapSize := 1 + len(k) + sovInternal(uint64(len(k))) + 1 + sovInternal(uint64(v)) + i = encodeVarintInternal(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintInternal(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintInternal(dAtA, i, uint64(v)) + } + } + return i, nil +} + +func encodeFixed64Internal(dAtA []byte, offset int, v uint64) int { + dAtA[offset] = uint8(v) + dAtA[offset+1] = uint8(v >> 8) + dAtA[offset+2] = uint8(v >> 16) + dAtA[offset+3] = uint8(v >> 24) + dAtA[offset+4] = uint8(v >> 32) + dAtA[offset+5] = uint8(v >> 40) + dAtA[offset+6] = uint8(v >> 48) + dAtA[offset+7] = uint8(v >> 56) + return offset + 8 +} +func encodeFixed32Internal(dAtA []byte, offset int, v uint32) int { + dAtA[offset] = uint8(v) + dAtA[offset+1] = uint8(v >> 8) + dAtA[offset+2] = uint8(v >> 16) + dAtA[offset+3] = uint8(v >> 24) + return offset + 4 +} +func encodeVarintInternal(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *DB) Size() (n int) { + var l int + _ = l + l = len(m.TimeQuantum) + if l > 0 { + n += 1 + l + sovInternal(uint64(l)) + } + return n +} + +func (m *Frame) Size() (n int) { + var l int + _ = l + l = len(m.TimeQuantum) + if l > 0 { + n += 1 + l + sovInternal(uint64(l)) + } + return n +} + +func (m *Bitmap) Size() (n int) { + var l int + _ = l + if len(m.Bits) > 0 { + l = 0 + for _, e := range m.Bits { + l += sovInternal(uint64(e)) + } + n += 1 + sovInternal(uint64(l)) + l + } + if len(m.Attrs) > 0 { + for _, e := range m.Attrs { + l = e.Size() + n += 1 + l + sovInternal(uint64(l)) + } + } + return n +} + +func (m *Pair) Size() (n int) { + var l int + _ = l + if m.Key != 0 { + n += 1 + sovInternal(uint64(m.Key)) + } + if m.Count != 0 { + n += 1 + sovInternal(uint64(m.Count)) + } + return n +} + +func (m *Bit) Size() (n int) { + var l int + _ = l + if m.BitmapID != 0 { + n += 1 + sovInternal(uint64(m.BitmapID)) + } + if m.ProfileID != 0 { + n += 1 + sovInternal(uint64(m.ProfileID)) + } + if m.Timestamp != 0 { + n += 1 + sovInternal(uint64(m.Timestamp)) + } + return n +} + +func (m *Profile) Size() (n int) { + var l int + _ = l + if m.ID != 0 { + n += 1 + sovInternal(uint64(m.ID)) + } + if len(m.Attrs) > 0 { + for _, e := range m.Attrs { + l = e.Size() + n += 1 + l + sovInternal(uint64(l)) + } + } + return n +} + +func (m *Attr) Size() (n int) { + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovInternal(uint64(l)) + } + if m.Type != 0 { + n += 1 + sovInternal(uint64(m.Type)) + } + l = len(m.StringValue) + if l > 0 { + n += 1 + l + sovInternal(uint64(l)) + } + if m.UintValue != 0 { + n += 1 + sovInternal(uint64(m.UintValue)) + } + if m.BoolValue { + n += 2 + } + return n +} + +func (m *AttrMap) Size() (n int) { + var l int + _ = l + if len(m.Attrs) > 0 { + for _, e := range m.Attrs { + l = e.Size() + n += 1 + l + sovInternal(uint64(l)) + } + } + return n +} + +func (m *QueryRequest) Size() (n int) { + var l int + _ = l + l = len(m.DB) + if l > 0 { + n += 1 + l + sovInternal(uint64(l)) + } + l = len(m.Query) + if l > 0 { + n += 1 + l + sovInternal(uint64(l)) + } + if len(m.Slices) > 0 { + l = 0 + for _, e := range m.Slices { + l += sovInternal(uint64(e)) + } + n += 1 + sovInternal(uint64(l)) + l + } + if m.Profiles { + n += 2 + } + l = len(m.Quantum) + if l > 0 { + n += 1 + l + sovInternal(uint64(l)) + } + if m.Remote { + n += 2 + } + return n +} + +func (m *QueryResponse) Size() (n int) { + var l int + _ = l + l = len(m.Err) + if l > 0 { + n += 1 + l + sovInternal(uint64(l)) + } + if len(m.Results) > 0 { + for _, e := range m.Results { + l = e.Size() + n += 1 + l + sovInternal(uint64(l)) + } + } + if len(m.Profiles) > 0 { + for _, e := range m.Profiles { + l = e.Size() + n += 1 + l + sovInternal(uint64(l)) + } + } + return n +} + +func (m *QueryResult) Size() (n int) { + var l int + _ = l + if m.Bitmap != nil { + l = m.Bitmap.Size() + n += 1 + l + sovInternal(uint64(l)) + } + if m.N != 0 { + n += 1 + sovInternal(uint64(m.N)) + } + if len(m.Pairs) > 0 { + for _, e := range m.Pairs { + l = e.Size() + n += 1 + l + sovInternal(uint64(l)) + } + } + if m.Changed { + n += 2 + } + return n +} + +func (m *ImportRequest) Size() (n int) { + var l int + _ = l + l = len(m.DB) + if l > 0 { + n += 1 + l + sovInternal(uint64(l)) + } + l = len(m.Frame) + if l > 0 { + n += 1 + l + sovInternal(uint64(l)) + } + if m.Slice != 0 { + n += 1 + sovInternal(uint64(m.Slice)) + } + if len(m.BitmapIDs) > 0 { + l = 0 + for _, e := range m.BitmapIDs { + l += sovInternal(uint64(e)) + } + n += 1 + sovInternal(uint64(l)) + l + } + if len(m.ProfileIDs) > 0 { + l = 0 + for _, e := range m.ProfileIDs { + l += sovInternal(uint64(e)) + } + n += 1 + sovInternal(uint64(l)) + l + } + if len(m.Timestamps) > 0 { + l = 0 + for _, e := range m.Timestamps { + l += sovInternal(uint64(e)) + } + n += 1 + sovInternal(uint64(l)) + l + } + return n +} + +func (m *ImportResponse) Size() (n int) { + var l int + _ = l + l = len(m.Err) + if l > 0 { + n += 1 + l + sovInternal(uint64(l)) + } + return n +} + +func (m *BlockDataRequest) Size() (n int) { + var l int + _ = l + l = len(m.DB) + if l > 0 { + n += 1 + l + sovInternal(uint64(l)) + } + l = len(m.Frame) + if l > 0 { + n += 1 + l + sovInternal(uint64(l)) + } + if m.Slice != 0 { + n += 1 + sovInternal(uint64(m.Slice)) + } + if m.Block != 0 { + n += 1 + sovInternal(uint64(m.Block)) + } + return n +} + +func (m *BlockDataResponse) Size() (n int) { + var l int + _ = l + if len(m.BitmapIDs) > 0 { + l = 0 + for _, e := range m.BitmapIDs { + l += sovInternal(uint64(e)) + } + n += 1 + sovInternal(uint64(l)) + l + } + if len(m.ProfileIDs) > 0 { + l = 0 + for _, e := range m.ProfileIDs { + l += sovInternal(uint64(e)) + } + n += 1 + sovInternal(uint64(l)) + l + } + return n +} + +func (m *Cache) Size() (n int) { + var l int + _ = l + if len(m.BitmapIDs) > 0 { + l = 0 + for _, e := range m.BitmapIDs { + l += sovInternal(uint64(e)) + } + n += 1 + sovInternal(uint64(l)) + l + } + return n +} + +func (m *MaxSlicesResponse) Size() (n int) { + var l int + _ = l + if len(m.MaxSlices) > 0 { + for k, v := range m.MaxSlices { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovInternal(uint64(len(k))) + 1 + sovInternal(uint64(v)) + n += mapEntrySize + 1 + sovInternal(uint64(mapEntrySize)) + } + } + return n +} + +func sovInternal(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozInternal(x uint64) (n int) { + return sovInternal(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *DB) 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 ErrIntOverflowInternal + } + 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: DB: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DB: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeQuantum", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + 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 ErrInvalidLengthInternal + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TimeQuantum = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipInternal(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Frame) 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 ErrIntOverflowInternal + } + 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: Frame: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Frame: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeQuantum", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + 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 ErrInvalidLengthInternal + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TimeQuantum = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipInternal(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Bitmap) 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 ErrIntOverflowInternal + } + 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: Bitmap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Bitmap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthInternal + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Bits = append(m.Bits, v) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Bits = append(m.Bits, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Bits", wireType) + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attrs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthInternal + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attrs = append(m.Attrs, &Attr{}) + if err := m.Attrs[len(m.Attrs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipInternal(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Pair) 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 ErrIntOverflowInternal + } + 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: Pair: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Pair: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + m.Key = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Key |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) + } + m.Count = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Count |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipInternal(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Bit) 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 ErrIntOverflowInternal + } + 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: Bit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Bit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BitmapID", wireType) + } + m.BitmapID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BitmapID |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProfileID", wireType) + } + m.ProfileID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProfileID |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipInternal(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Profile) 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 ErrIntOverflowInternal + } + 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: Profile: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Profile: 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 ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ID |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attrs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthInternal + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attrs = append(m.Attrs, &Attr{}) + if err := m.Attrs[len(m.Attrs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipInternal(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Attr) 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 ErrIntOverflowInternal + } + 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: Attr: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Attr: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + 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 ErrInvalidLengthInternal + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + 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 ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + 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 ErrInvalidLengthInternal + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StringValue = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UintValue", wireType) + } + m.UintValue = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UintValue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.BoolValue = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipInternal(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AttrMap) 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 ErrIntOverflowInternal + } + 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: AttrMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AttrMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attrs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthInternal + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attrs = append(m.Attrs, &Attr{}) + if err := m.Attrs[len(m.Attrs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipInternal(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryRequest) 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 ErrIntOverflowInternal + } + 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: QueryRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DB", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + 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 ErrInvalidLengthInternal + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DB = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + 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 ErrInvalidLengthInternal + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Query = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthInternal + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Slices = append(m.Slices, v) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Slices = append(m.Slices, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Slices", wireType) + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Profiles", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Profiles = bool(v != 0) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quantum", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + 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 ErrInvalidLengthInternal + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Quantum = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Remote", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Remote = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipInternal(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryResponse) 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 ErrIntOverflowInternal + } + 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: QueryResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Err", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + 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 ErrInvalidLengthInternal + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Err = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthInternal + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Results = append(m.Results, &QueryResult{}) + if err := m.Results[len(m.Results)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Profiles", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthInternal + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Profiles = append(m.Profiles, &Profile{}) + if err := m.Profiles[len(m.Profiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipInternal(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryResult) 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 ErrIntOverflowInternal + } + 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: QueryResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bitmap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthInternal + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Bitmap == nil { + m.Bitmap = &Bitmap{} + } + if err := m.Bitmap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field N", wireType) + } + m.N = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.N |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pairs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthInternal + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pairs = append(m.Pairs, &Pair{}) + if err := m.Pairs[len(m.Pairs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Changed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Changed = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipInternal(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImportRequest) 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 ErrIntOverflowInternal + } + 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: ImportRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImportRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DB", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + 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 ErrInvalidLengthInternal + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DB = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Frame", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + 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 ErrInvalidLengthInternal + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Frame = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Slice", wireType) + } + m.Slice = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Slice |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthInternal + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.BitmapIDs = append(m.BitmapIDs, v) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.BitmapIDs = append(m.BitmapIDs, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field BitmapIDs", wireType) + } + case 5: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthInternal + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ProfileIDs = append(m.ProfileIDs, v) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ProfileIDs = append(m.ProfileIDs, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field ProfileIDs", wireType) + } + case 6: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthInternal + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Timestamps = append(m.Timestamps, v) + } + } else if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Timestamps = append(m.Timestamps, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamps", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipInternal(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImportResponse) 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 ErrIntOverflowInternal + } + 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: ImportResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImportResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Err", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + 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 ErrInvalidLengthInternal + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Err = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipInternal(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BlockDataRequest) 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 ErrIntOverflowInternal + } + 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: BlockDataRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BlockDataRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DB", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + 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 ErrInvalidLengthInternal + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DB = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Frame", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + 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 ErrInvalidLengthInternal + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Frame = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Slice", wireType) + } + m.Slice = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Slice |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) + } + m.Block = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Block |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipInternal(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BlockDataResponse) 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 ErrIntOverflowInternal + } + 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: BlockDataResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BlockDataResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthInternal + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.BitmapIDs = append(m.BitmapIDs, v) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.BitmapIDs = append(m.BitmapIDs, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field BitmapIDs", wireType) + } + case 2: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthInternal + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ProfileIDs = append(m.ProfileIDs, v) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ProfileIDs = append(m.ProfileIDs, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field ProfileIDs", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipInternal(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Cache) 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 ErrIntOverflowInternal + } + 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: Cache: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Cache: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthInternal + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.BitmapIDs = append(m.BitmapIDs, v) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.BitmapIDs = append(m.BitmapIDs, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field BitmapIDs", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipInternal(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MaxSlicesResponse) 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 ErrIntOverflowInternal + } + 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: MaxSlicesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MaxSlicesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxSlices", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthInternal + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthInternal + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.MaxSlices == nil { + m.MaxSlices = make(map[string]uint64) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowInternal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MaxSlices[mapkey] = mapvalue + } else { + var mapvalue uint64 + m.MaxSlices[mapkey] = mapvalue + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipInternal(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthInternal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipInternal(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowInternal + } + 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, ErrIntOverflowInternal + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowInternal + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthInternal + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowInternal + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipInternal(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthInternal = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowInternal = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("internal.proto", fileDescriptorInternal) } + +var fileDescriptorInternal = []byte{ + // 696 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x55, 0xcb, 0x6a, 0x14, 0x41, + 0x14, 0xb5, 0xa6, 0xbb, 0xe7, 0x71, 0x27, 0x19, 0x26, 0xc5, 0x28, 0x4d, 0x90, 0xa1, 0x29, 0x54, + 0x5a, 0xc1, 0x04, 0xe2, 0x46, 0x44, 0x10, 0x3b, 0x13, 0x71, 0x90, 0x84, 0xa4, 0x12, 0xdd, 0xb9, + 0x68, 0x93, 0x32, 0x69, 0xd2, 0x2f, 0xab, 0xab, 0xc5, 0x59, 0xba, 0x70, 0xe3, 0x17, 0x88, 0x7e, + 0x81, 0x7f, 0xe2, 0xd2, 0x4f, 0x90, 0xf8, 0x23, 0x52, 0x8f, 0x7e, 0x44, 0x31, 0x66, 0xe1, 0xae, + 0xef, 0xb9, 0x75, 0x6f, 0x9d, 0x73, 0x1f, 0xd5, 0x30, 0x8a, 0x52, 0xc1, 0x78, 0x1a, 0xc6, 0x6b, + 0x39, 0xcf, 0x44, 0x86, 0xfb, 0x95, 0x4d, 0x6e, 0x41, 0x67, 0x16, 0x60, 0x0f, 0x86, 0x07, 0x51, + 0xc2, 0xf6, 0xca, 0x30, 0x15, 0x65, 0xe2, 0x22, 0x0f, 0xf9, 0x03, 0xda, 0x86, 0xc8, 0x6d, 0x70, + 0x9e, 0xf0, 0x30, 0x61, 0x97, 0x38, 0x1a, 0x40, 0x37, 0x88, 0x44, 0x12, 0xe6, 0x18, 0x83, 0x1d, + 0x44, 0xa2, 0x70, 0x91, 0x67, 0xf9, 0x36, 0x55, 0xdf, 0xf8, 0x06, 0x38, 0x8f, 0x85, 0xe0, 0x85, + 0xdb, 0xf1, 0x2c, 0x7f, 0xb8, 0x31, 0x5a, 0xab, 0xa9, 0x49, 0x98, 0x6a, 0x27, 0x59, 0x03, 0x7b, + 0x37, 0x8c, 0x38, 0x1e, 0x83, 0xf5, 0x8c, 0x2d, 0xd4, 0x2d, 0x36, 0x95, 0x9f, 0x78, 0x02, 0xce, + 0x66, 0x56, 0xa6, 0xc2, 0xed, 0x28, 0x4c, 0x1b, 0xe4, 0x25, 0x58, 0x41, 0x24, 0xf0, 0x2a, 0xf4, + 0xf5, 0xd5, 0xf3, 0x99, 0x89, 0xa9, 0x6d, 0x7c, 0x1d, 0x06, 0xbb, 0x3c, 0x7b, 0x1d, 0xc5, 0x6c, + 0x3e, 0x33, 0xc1, 0x0d, 0x20, 0xbd, 0x52, 0x43, 0x21, 0xc2, 0x24, 0x77, 0x2d, 0x0f, 0xf9, 0x16, + 0x6d, 0x00, 0xf2, 0x08, 0x7a, 0xe6, 0x28, 0x1e, 0x41, 0xa7, 0x4e, 0xde, 0x99, 0xcf, 0x2e, 0xa9, + 0xe7, 0x23, 0x02, 0x5b, 0x7e, 0xb5, 0x05, 0x0d, 0xb4, 0x20, 0x0c, 0xf6, 0xc1, 0x22, 0x67, 0x86, + 0x92, 0xfa, 0x96, 0x45, 0xde, 0x17, 0x3c, 0x4a, 0x8f, 0x5f, 0x84, 0x71, 0xc9, 0x14, 0x9f, 0x01, + 0x6d, 0x43, 0x92, 0xef, 0xf3, 0x28, 0x15, 0xda, 0x6f, 0x6b, 0x35, 0x35, 0x20, 0xbd, 0x41, 0x96, + 0xc5, 0xda, 0xeb, 0x78, 0xc8, 0xef, 0xd3, 0x06, 0x20, 0xeb, 0xd0, 0x93, 0x5c, 0xb6, 0xc3, 0xbc, + 0x61, 0x8f, 0x2e, 0x62, 0xff, 0x19, 0xc1, 0xd2, 0x5e, 0xc9, 0xf8, 0x82, 0xb2, 0x37, 0x25, 0x2b, + 0x84, 0x2c, 0xc2, 0x2c, 0x30, 0x22, 0xe4, 0xfc, 0x4c, 0xc0, 0x51, 0x7e, 0x25, 0x62, 0x40, 0xb5, + 0x81, 0xaf, 0x41, 0x77, 0x3f, 0x8e, 0x0e, 0x59, 0xe1, 0x5a, 0x6a, 0x00, 0x8c, 0x25, 0xbb, 0x64, + 0xaa, 0x59, 0x28, 0xea, 0x7d, 0x5a, 0xdb, 0xd8, 0x85, 0x5e, 0x35, 0x5a, 0x8e, 0xca, 0x55, 0x99, + 0x32, 0x1b, 0x65, 0x49, 0x26, 0x98, 0xdb, 0x55, 0x31, 0xc6, 0x22, 0xef, 0x11, 0x2c, 0x1b, 0x72, + 0x45, 0x9e, 0xa5, 0x05, 0x93, 0x35, 0xde, 0xe2, 0xbc, 0xaa, 0xf1, 0x16, 0xe7, 0x78, 0x1d, 0x7a, + 0x94, 0x15, 0x65, 0x2c, 0xaa, 0x36, 0x5d, 0x6d, 0x84, 0x56, 0xb1, 0x65, 0x2c, 0x68, 0x75, 0x0a, + 0xdf, 0x6d, 0x51, 0xb4, 0x54, 0xc4, 0x4a, 0x13, 0x61, 0x3c, 0x0d, 0x6b, 0xf2, 0x01, 0xc1, 0xb0, + 0x95, 0x07, 0xfb, 0xd5, 0x0a, 0x28, 0x12, 0xc3, 0x8d, 0x71, 0x13, 0xac, 0x71, 0x5a, 0xad, 0xc8, + 0x12, 0xa0, 0x1d, 0xd3, 0x7a, 0xb4, 0x23, 0xdb, 0x21, 0xc7, 0xbe, 0xba, 0xb3, 0xd5, 0x0e, 0x09, + 0x53, 0xed, 0x94, 0x35, 0xda, 0x3c, 0x09, 0xd3, 0x63, 0x76, 0x64, 0xca, 0x57, 0x99, 0xe4, 0x2b, + 0x82, 0xe5, 0x79, 0x92, 0x67, 0x5c, 0x5c, 0xd0, 0x29, 0xb5, 0xc7, 0x55, 0xa7, 0xf4, 0x52, 0x4f, + 0xc0, 0x51, 0xbd, 0x51, 0x93, 0x66, 0x53, 0x6d, 0xa8, 0x29, 0x32, 0xdb, 0x23, 0x1b, 0x25, 0x5b, + 0xd8, 0x00, 0x78, 0x0a, 0x50, 0xaf, 0x4f, 0xe1, 0x3a, 0xca, 0xdd, 0x42, 0xa4, 0xbf, 0x5e, 0xa0, + 0xc2, 0xed, 0x7a, 0x96, 0x6f, 0xd1, 0x16, 0x42, 0x08, 0x8c, 0x2a, 0xaa, 0x7f, 0xeb, 0x1b, 0x39, + 0x82, 0x71, 0x10, 0x67, 0x87, 0xa7, 0xb3, 0x50, 0x84, 0xff, 0x43, 0xd1, 0x04, 0x1c, 0x95, 0xcf, + 0x6c, 0x8c, 0x36, 0xc8, 0x1e, 0xac, 0xb4, 0x6e, 0x31, 0x64, 0xce, 0x89, 0x47, 0x17, 0x8b, 0xef, + 0xfc, 0x2e, 0x9e, 0xdc, 0x04, 0x67, 0x33, 0x3c, 0x3c, 0xf9, 0x47, 0x1a, 0xf2, 0x05, 0xc1, 0xca, + 0x76, 0xf8, 0x4e, 0xef, 0x45, 0x7d, 0xf5, 0x53, 0x18, 0xd4, 0xa0, 0x59, 0xcc, 0x3b, 0xcd, 0x24, + 0xfc, 0x71, 0xbe, 0x41, 0xb6, 0x52, 0xc1, 0x17, 0xb4, 0x09, 0x5e, 0x7d, 0x08, 0xa3, 0xf3, 0x4e, + 0x59, 0xe3, 0xd3, 0xe6, 0xfd, 0x39, 0xd5, 0x0f, 0xea, 0x5b, 0xf5, 0x4e, 0x98, 0x07, 0x55, 0x19, + 0x0f, 0x3a, 0xf7, 0x51, 0x30, 0xfe, 0x76, 0x36, 0x45, 0xdf, 0xcf, 0xa6, 0xe8, 0xc7, 0xd9, 0x14, + 0x7d, 0xfa, 0x39, 0xbd, 0xf2, 0xaa, 0xab, 0x7e, 0x1f, 0xf7, 0x7e, 0x05, 0x00, 0x00, 0xff, 0xff, + 0x04, 0xa0, 0xe3, 0x0c, 0x50, 0x06, 0x00, 0x00, +}