diff --git a/backup.go b/backup.go index f9629064f..dfd069665 100644 --- a/backup.go +++ b/backup.go @@ -23,8 +23,8 @@ import ( "encoding/binary" "io" - "github.com/golang/protobuf/proto" "github.com/pkg/errors" + "google.golang.org/protobuf/proto" "github.com/dgraph-io/badger/v4/pb" "github.com/dgraph-io/badger/v4/y" diff --git a/go.mod b/go.mod index 54d3cabee..950ef69c4 100644 --- a/go.mod +++ b/go.mod @@ -6,8 +6,6 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 github.com/dgraph-io/ristretto v0.1.1 github.com/dustin/go-humanize v1.0.0 - github.com/gogo/protobuf v1.3.2 - github.com/golang/protobuf v1.5.2 github.com/google/flatbuffers v1.12.1 github.com/klauspost/compress v1.15.15 github.com/pkg/errors v0.9.1 @@ -16,18 +14,20 @@ require ( go.opencensus.io v0.22.5 golang.org/x/net v0.17.0 golang.org/x/sys v0.13.0 + google.golang.org/protobuf v1.33.0 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect - github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb // indirect - google.golang.org/grpc v1.20.1 // indirect - google.golang.org/protobuf v1.31.0 // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect + google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect + google.golang.org/grpc v1.33.2 // indirect gopkg.in/yaml.v2 v2.2.2 // indirect ) diff --git a/go.sum b/go.sum index e26df0263..41054423e 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,11 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -14,33 +16,47 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczC github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/flatbuffers v1.12.1 h1:MVlul7pQNoDzWRLTw5imwYsl+usrS1TXG2H4jg6ImGw= github.com/google/flatbuffers v1.12.1/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.15.15 h1:EF27CXIuDsYJ6mmvtBRlEuB2UVOqHG1tAXgZ7yIO+lw= github.com/klauspost/compress v1.15.15/go.mod h1:ZcK2JAFqKOpnBlxcLsJzYfrS9X1akm9fHZNnD9+Vo/4= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= @@ -49,27 +65,18 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.opencensus.io v0.22.5 h1:dntmOdLpSpHlVqbW5Eay97DelsZHe+55D+xC6i0dDS0= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -77,13 +84,9 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -94,29 +97,40 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb h1:i1Ppqkc3WQXikh8bXiwHqAN5Rv3/qDCcRk0/Otx73BY= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1 h1:Hz2g2wirWK7H0qIIhGIqRGTuMwTE8HEKFnDZZ7lm9NU= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/manifest.go b/manifest.go index e681ae0a0..0ec74ef29 100644 --- a/manifest.go +++ b/manifest.go @@ -28,8 +28,8 @@ import ( "path/filepath" "sync" - "github.com/golang/protobuf/proto" "github.com/pkg/errors" + "google.golang.org/protobuf/proto" "github.com/dgraph-io/badger/v4/options" "github.com/dgraph-io/badger/v4/pb" diff --git a/pb/badgerpb4.go b/pb/badgerpb4.go new file mode 100644 index 000000000..d7d96cd99 --- /dev/null +++ b/pb/badgerpb4.go @@ -0,0 +1,224 @@ +package pb + +import ( + "io" + + "google.golang.org/protobuf/proto" +) + +func (c *Checksum) Size() int { + return proto.Size(c) +} + +func (c *Checksum) Marshal() ([]byte, error) { + return proto.Marshal(c) +} + +func (c *Checksum) MarshalTo(dst []byte) (int, error) { + size := c.Size() + if len(dst) < size { + return 0, io.ErrShortWrite + } + + return c.MarshalToSizedBuffer(dst[:size]) +} + +func (c *Checksum) MarshalToSizedBuffer(dst []byte) (int, error) { + size := c.Size() + if len(dst) < size { + return 0, io.ErrShortWrite + } + + _, err := proto.MarshalOptions{}.MarshalAppend(dst[:0], c) + return size, err +} + +func (c *Checksum) Unmarshal(b []byte) error { + return proto.Unmarshal(b, c) +} + +func (dk *DataKey) Size() int { + return proto.Size(dk) +} + +func (dk *DataKey) Marshal() ([]byte, error) { + return proto.Marshal(dk) +} + +func (dk *DataKey) MarshalTo(dst []byte) (int, error) { + size := dk.Size() + if len(dst) < size { + return 0, io.ErrShortWrite + } + + return dk.MarshalToSizedBuffer(dst[:size]) +} + +func (dk *DataKey) MarshalToSizedBuffer(dst []byte) (int, error) { + size := dk.Size() + if len(dst) < size { + return 0, io.ErrShortWrite + } + + _, err := proto.MarshalOptions{}.MarshalAppend(dst[:0], dk) + return size, err +} + +func (dk *DataKey) Unmarshal(b []byte) error { + return proto.Unmarshal(b, dk) +} + +func (kv *KV) Size() int { + return proto.Size(kv) +} + +func (kv *KV) Marshal() ([]byte, error) { + return proto.Marshal(kv) +} + +func (kv *KV) MarshalTo(dst []byte) (int, error) { + size := kv.Size() + if len(dst) < size { + return 0, io.ErrShortWrite + } + + return kv.MarshalToSizedBuffer(dst[:size]) +} + +func (kv *KV) MarshalToSizedBuffer(dst []byte) (int, error) { + size := kv.Size() + if len(dst) < size { + return 0, io.ErrShortWrite + } + + _, err := proto.MarshalOptions{}.MarshalAppend(dst[:0], kv) + return size, err +} + +func (kv *KV) Unmarshal(b []byte) error { + return proto.Unmarshal(b, kv) +} + +func (kvl *KVList) Size() int { + return proto.Size(kvl) +} + +func (kvl *KVList) Marshal() ([]byte, error) { + return proto.Marshal(kvl) +} + +func (kvl *KVList) MarshalTo(dst []byte) (int, error) { + size := kvl.Size() + if len(dst) < size { + return 0, io.ErrShortWrite + } + + return kvl.MarshalToSizedBuffer(dst[:size]) +} + +func (kvl *KVList) MarshalToSizedBuffer(dst []byte) (int, error) { + size := kvl.Size() + if len(dst) < size { + return 0, io.ErrShortWrite + } + + _, err := proto.MarshalOptions{}.MarshalAppend(dst[:0], kvl) + return size, err +} + +func (kvl *KVList) Unmarshal(b []byte) error { + return proto.Unmarshal(b, kvl) +} + +func (mc *ManifestChange) Size() int { + return proto.Size(mc) +} + +func (mc *ManifestChange) Marshal() ([]byte, error) { + return proto.Marshal(mc) +} + +func (mc *ManifestChange) MarshalTo(dst []byte) (int, error) { + size := mc.Size() + if len(dst) < size { + return 0, io.ErrShortWrite + } + + return mc.MarshalToSizedBuffer(dst[:size]) +} + +func (mc *ManifestChange) MarshalToSizedBuffer(dst []byte) (int, error) { + size := mc.Size() + if len(dst) < size { + return 0, io.ErrShortWrite + } + + _, err := proto.MarshalOptions{}.MarshalAppend(dst[:0], mc) + return size, err +} + +func (mc *ManifestChange) Unmarshal(b []byte) error { + return proto.Unmarshal(b, mc) +} + +func (mcs *ManifestChangeSet) Size() int { + return proto.Size(mcs) +} + +func (mcs *ManifestChangeSet) Marshal() ([]byte, error) { + return proto.Marshal(mcs) +} + +func (mcs *ManifestChangeSet) MarshalTo(dst []byte) (int, error) { + size := mcs.Size() + if len(dst) < size { + return 0, io.ErrShortWrite + } + + return mcs.MarshalToSizedBuffer(dst[:size]) +} + +func (mcs *ManifestChangeSet) MarshalToSizedBuffer(dst []byte) (int, error) { + size := mcs.Size() + if len(dst) < size { + return 0, io.ErrShortWrite + } + + _, err := proto.MarshalOptions{}.MarshalAppend(dst[:0], mcs) + return size, err +} + +func (mcs *ManifestChangeSet) Unmarshal(b []byte) error { + return proto.Unmarshal(b, mcs) +} + +func (m *Match) Size() int { + return proto.Size(m) +} + +func (m *Match) Marshal() ([]byte, error) { + return proto.Marshal(m) +} + +func (m *Match) MarshalTo(dst []byte) (int, error) { + size := m.Size() + if len(dst) < size { + return 0, io.ErrShortWrite + } + + return m.MarshalToSizedBuffer(dst[:size]) +} + +func (m *Match) MarshalToSizedBuffer(dst []byte) (int, error) { + size := m.Size() + if len(dst) < size { + return 0, io.ErrShortWrite + } + + _, err := proto.MarshalOptions{}.MarshalAppend(dst[:0], m) + return size, err +} + +func (m *Match) Unmarshal(b []byte) error { + return proto.Unmarshal(b, m) +} diff --git a/pb/badgerpb4.pb.go b/pb/badgerpb4.pb.go index 521f99293..a3c96a262 100644 --- a/pb/badgerpb4.pb.go +++ b/pb/badgerpb4.pb.go @@ -1,26 +1,40 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// +// Copyright (C) 2017 Dgraph Labs, Inc. and Contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Use protos/gen.sh to generate .pb.go files. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.33.0 // source: badgerpb4.proto package pb import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type EncryptionAlgo int32 @@ -28,20 +42,41 @@ const ( EncryptionAlgo_aes EncryptionAlgo = 0 ) -var EncryptionAlgo_name = map[int32]string{ - 0: "aes", -} +// Enum value maps for EncryptionAlgo. +var ( + EncryptionAlgo_name = map[int32]string{ + 0: "aes", + } + EncryptionAlgo_value = map[string]int32{ + "aes": 0, + } +) -var EncryptionAlgo_value = map[string]int32{ - "aes": 0, +func (x EncryptionAlgo) Enum() *EncryptionAlgo { + p := new(EncryptionAlgo) + *p = x + return p } func (x EncryptionAlgo) String() string { - return proto.EnumName(EncryptionAlgo_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (EncryptionAlgo) Descriptor() protoreflect.EnumDescriptor { + return file_badgerpb4_proto_enumTypes[0].Descriptor() +} + +func (EncryptionAlgo) Type() protoreflect.EnumType { + return &file_badgerpb4_proto_enumTypes[0] +} + +func (x EncryptionAlgo) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } +// Deprecated: Use EncryptionAlgo.Descriptor instead. func (EncryptionAlgo) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_452c1d780baa15ef, []int{0} + return file_badgerpb4_proto_rawDescGZIP(), []int{0} } type ManifestChange_Operation int32 @@ -51,22 +86,43 @@ const ( ManifestChange_DELETE ManifestChange_Operation = 1 ) -var ManifestChange_Operation_name = map[int32]string{ - 0: "CREATE", - 1: "DELETE", -} +// Enum value maps for ManifestChange_Operation. +var ( + ManifestChange_Operation_name = map[int32]string{ + 0: "CREATE", + 1: "DELETE", + } + ManifestChange_Operation_value = map[string]int32{ + "CREATE": 0, + "DELETE": 1, + } +) -var ManifestChange_Operation_value = map[string]int32{ - "CREATE": 0, - "DELETE": 1, +func (x ManifestChange_Operation) Enum() *ManifestChange_Operation { + p := new(ManifestChange_Operation) + *p = x + return p } func (x ManifestChange_Operation) String() string { - return proto.EnumName(ManifestChange_Operation_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ManifestChange_Operation) Descriptor() protoreflect.EnumDescriptor { + return file_badgerpb4_proto_enumTypes[1].Descriptor() } +func (ManifestChange_Operation) Type() protoreflect.EnumType { + return &file_badgerpb4_proto_enumTypes[1] +} + +func (x ManifestChange_Operation) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ManifestChange_Operation.Descriptor instead. func (ManifestChange_Operation) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_452c1d780baa15ef, []int{3, 0} + return file_badgerpb4_proto_rawDescGZIP(), []int{3, 0} } type Checksum_Algorithm int32 @@ -76,25 +132,50 @@ const ( Checksum_XXHash64 Checksum_Algorithm = 1 ) -var Checksum_Algorithm_name = map[int32]string{ - 0: "CRC32C", - 1: "XXHash64", -} +// Enum value maps for Checksum_Algorithm. +var ( + Checksum_Algorithm_name = map[int32]string{ + 0: "CRC32C", + 1: "XXHash64", + } + Checksum_Algorithm_value = map[string]int32{ + "CRC32C": 0, + "XXHash64": 1, + } +) -var Checksum_Algorithm_value = map[string]int32{ - "CRC32C": 0, - "XXHash64": 1, +func (x Checksum_Algorithm) Enum() *Checksum_Algorithm { + p := new(Checksum_Algorithm) + *p = x + return p } func (x Checksum_Algorithm) String() string { - return proto.EnumName(Checksum_Algorithm_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Checksum_Algorithm) Descriptor() protoreflect.EnumDescriptor { + return file_badgerpb4_proto_enumTypes[2].Descriptor() +} + +func (Checksum_Algorithm) Type() protoreflect.EnumType { + return &file_badgerpb4_proto_enumTypes[2] } +func (x Checksum_Algorithm) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Checksum_Algorithm.Descriptor instead. func (Checksum_Algorithm) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_452c1d780baa15ef, []int{4, 0} + return file_badgerpb4_proto_rawDescGZIP(), []int{4, 0} } type KV struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` UserMeta []byte `protobuf:"bytes,3,opt,name=user_meta,json=userMeta,proto3" json:"user_meta,omitempty"` @@ -107,2058 +188,682 @@ type KV struct { StreamDone bool `protobuf:"varint,11,opt,name=stream_done,json=streamDone,proto3" json:"stream_done,omitempty"` } -func (m *KV) Reset() { *m = KV{} } -func (m *KV) String() string { return proto.CompactTextString(m) } -func (*KV) ProtoMessage() {} -func (*KV) Descriptor() ([]byte, []int) { - return fileDescriptor_452c1d780baa15ef, []int{0} -} -func (m *KV) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *KV) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_KV.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *KV) Reset() { + *x = KV{} + if protoimpl.UnsafeEnabled { + mi := &file_badgerpb4_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *KV) XXX_Merge(src proto.Message) { - xxx_messageInfo_KV.Merge(m, src) -} -func (m *KV) XXX_Size() int { - return m.Size() + +func (x *KV) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *KV) XXX_DiscardUnknown() { - xxx_messageInfo_KV.DiscardUnknown(m) + +func (*KV) ProtoMessage() {} + +func (x *KV) ProtoReflect() protoreflect.Message { + mi := &file_badgerpb4_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_KV proto.InternalMessageInfo +// Deprecated: Use KV.ProtoReflect.Descriptor instead. +func (*KV) Descriptor() ([]byte, []int) { + return file_badgerpb4_proto_rawDescGZIP(), []int{0} +} -func (m *KV) GetKey() []byte { - if m != nil { - return m.Key +func (x *KV) GetKey() []byte { + if x != nil { + return x.Key } return nil } -func (m *KV) GetValue() []byte { - if m != nil { - return m.Value +func (x *KV) GetValue() []byte { + if x != nil { + return x.Value } return nil } -func (m *KV) GetUserMeta() []byte { - if m != nil { - return m.UserMeta +func (x *KV) GetUserMeta() []byte { + if x != nil { + return x.UserMeta } return nil } -func (m *KV) GetVersion() uint64 { - if m != nil { - return m.Version +func (x *KV) GetVersion() uint64 { + if x != nil { + return x.Version } return 0 } -func (m *KV) GetExpiresAt() uint64 { - if m != nil { - return m.ExpiresAt +func (x *KV) GetExpiresAt() uint64 { + if x != nil { + return x.ExpiresAt } return 0 } -func (m *KV) GetMeta() []byte { - if m != nil { - return m.Meta +func (x *KV) GetMeta() []byte { + if x != nil { + return x.Meta } return nil } -func (m *KV) GetStreamId() uint32 { - if m != nil { - return m.StreamId +func (x *KV) GetStreamId() uint32 { + if x != nil { + return x.StreamId } return 0 } -func (m *KV) GetStreamDone() bool { - if m != nil { - return m.StreamDone +func (x *KV) GetStreamDone() bool { + if x != nil { + return x.StreamDone } return false } type KVList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Kv []*KV `protobuf:"bytes,1,rep,name=kv,proto3" json:"kv,omitempty"` // alloc_ref used internally for memory management. AllocRef uint64 `protobuf:"varint,10,opt,name=alloc_ref,json=allocRef,proto3" json:"alloc_ref,omitempty"` } -func (m *KVList) Reset() { *m = KVList{} } -func (m *KVList) String() string { return proto.CompactTextString(m) } -func (*KVList) ProtoMessage() {} -func (*KVList) Descriptor() ([]byte, []int) { - return fileDescriptor_452c1d780baa15ef, []int{1} -} -func (m *KVList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *KVList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_KVList.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *KVList) Reset() { + *x = KVList{} + if protoimpl.UnsafeEnabled { + mi := &file_badgerpb4_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *KVList) XXX_Merge(src proto.Message) { - xxx_messageInfo_KVList.Merge(m, src) -} -func (m *KVList) XXX_Size() int { - return m.Size() + +func (x *KVList) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *KVList) XXX_DiscardUnknown() { - xxx_messageInfo_KVList.DiscardUnknown(m) + +func (*KVList) ProtoMessage() {} + +func (x *KVList) ProtoReflect() protoreflect.Message { + mi := &file_badgerpb4_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_KVList proto.InternalMessageInfo +// Deprecated: Use KVList.ProtoReflect.Descriptor instead. +func (*KVList) Descriptor() ([]byte, []int) { + return file_badgerpb4_proto_rawDescGZIP(), []int{1} +} -func (m *KVList) GetKv() []*KV { - if m != nil { - return m.Kv +func (x *KVList) GetKv() []*KV { + if x != nil { + return x.Kv } return nil } -func (m *KVList) GetAllocRef() uint64 { - if m != nil { - return m.AllocRef +func (x *KVList) GetAllocRef() uint64 { + if x != nil { + return x.AllocRef } return 0 } type ManifestChangeSet struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // A set of changes that are applied atomically. Changes []*ManifestChange `protobuf:"bytes,1,rep,name=changes,proto3" json:"changes,omitempty"` } -func (m *ManifestChangeSet) Reset() { *m = ManifestChangeSet{} } -func (m *ManifestChangeSet) String() string { return proto.CompactTextString(m) } -func (*ManifestChangeSet) ProtoMessage() {} -func (*ManifestChangeSet) Descriptor() ([]byte, []int) { - return fileDescriptor_452c1d780baa15ef, []int{2} -} -func (m *ManifestChangeSet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ManifestChangeSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ManifestChangeSet.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *ManifestChangeSet) Reset() { + *x = ManifestChangeSet{} + if protoimpl.UnsafeEnabled { + mi := &file_badgerpb4_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *ManifestChangeSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_ManifestChangeSet.Merge(m, src) -} -func (m *ManifestChangeSet) XXX_Size() int { - return m.Size() -} -func (m *ManifestChangeSet) XXX_DiscardUnknown() { - xxx_messageInfo_ManifestChangeSet.DiscardUnknown(m) -} - -var xxx_messageInfo_ManifestChangeSet proto.InternalMessageInfo -func (m *ManifestChangeSet) GetChanges() []*ManifestChange { - if m != nil { - return m.Changes - } - return nil +func (x *ManifestChangeSet) String() string { + return protoimpl.X.MessageStringOf(x) } -type ManifestChange struct { - Id uint64 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"` - Op ManifestChange_Operation `protobuf:"varint,2,opt,name=Op,proto3,enum=badgerpb4.ManifestChange_Operation" json:"Op,omitempty"` - Level uint32 `protobuf:"varint,3,opt,name=Level,proto3" json:"Level,omitempty"` - KeyId uint64 `protobuf:"varint,4,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` - EncryptionAlgo EncryptionAlgo `protobuf:"varint,5,opt,name=encryption_algo,json=encryptionAlgo,proto3,enum=badgerpb4.EncryptionAlgo" json:"encryption_algo,omitempty"` - Compression uint32 `protobuf:"varint,6,opt,name=compression,proto3" json:"compression,omitempty"` -} +func (*ManifestChangeSet) ProtoMessage() {} -func (m *ManifestChange) Reset() { *m = ManifestChange{} } -func (m *ManifestChange) String() string { return proto.CompactTextString(m) } -func (*ManifestChange) ProtoMessage() {} -func (*ManifestChange) Descriptor() ([]byte, []int) { - return fileDescriptor_452c1d780baa15ef, []int{3} -} -func (m *ManifestChange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ManifestChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ManifestChange.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (x *ManifestChangeSet) ProtoReflect() protoreflect.Message { + mi := &file_badgerpb4_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } + return mi.MessageOf(x) } -func (m *ManifestChange) XXX_Merge(src proto.Message) { - xxx_messageInfo_ManifestChange.Merge(m, src) -} -func (m *ManifestChange) XXX_Size() int { - return m.Size() -} -func (m *ManifestChange) XXX_DiscardUnknown() { - xxx_messageInfo_ManifestChange.DiscardUnknown(m) -} - -var xxx_messageInfo_ManifestChange proto.InternalMessageInfo -func (m *ManifestChange) GetId() uint64 { - if m != nil { - return m.Id - } - return 0 +// Deprecated: Use ManifestChangeSet.ProtoReflect.Descriptor instead. +func (*ManifestChangeSet) Descriptor() ([]byte, []int) { + return file_badgerpb4_proto_rawDescGZIP(), []int{2} } -func (m *ManifestChange) GetOp() ManifestChange_Operation { - if m != nil { - return m.Op +func (x *ManifestChangeSet) GetChanges() []*ManifestChange { + if x != nil { + return x.Changes } - return ManifestChange_CREATE + return nil } -func (m *ManifestChange) GetLevel() uint32 { - if m != nil { - return m.Level - } - return 0 -} +type ManifestChange struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *ManifestChange) GetKeyId() uint64 { - if m != nil { - return m.KeyId - } - return 0 + Id uint64 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"` // Table ID. + Op ManifestChange_Operation `protobuf:"varint,2,opt,name=Op,proto3,enum=badgerpb4.ManifestChange_Operation" json:"Op,omitempty"` + Level uint32 `protobuf:"varint,3,opt,name=Level,proto3" json:"Level,omitempty"` // Only used for CREATE. + KeyId uint64 `protobuf:"varint,4,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` + EncryptionAlgo EncryptionAlgo `protobuf:"varint,5,opt,name=encryption_algo,json=encryptionAlgo,proto3,enum=badgerpb4.EncryptionAlgo" json:"encryption_algo,omitempty"` + Compression uint32 `protobuf:"varint,6,opt,name=compression,proto3" json:"compression,omitempty"` // Only used for CREATE Op. } -func (m *ManifestChange) GetEncryptionAlgo() EncryptionAlgo { - if m != nil { - return m.EncryptionAlgo +func (x *ManifestChange) Reset() { + *x = ManifestChange{} + if protoimpl.UnsafeEnabled { + mi := &file_badgerpb4_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return EncryptionAlgo_aes } -func (m *ManifestChange) GetCompression() uint32 { - if m != nil { - return m.Compression - } - return 0 +func (x *ManifestChange) String() string { + return protoimpl.X.MessageStringOf(x) } -type Checksum struct { - Algo Checksum_Algorithm `protobuf:"varint,1,opt,name=algo,proto3,enum=badgerpb4.Checksum_Algorithm" json:"algo,omitempty"` - Sum uint64 `protobuf:"varint,2,opt,name=sum,proto3" json:"sum,omitempty"` -} +func (*ManifestChange) ProtoMessage() {} -func (m *Checksum) Reset() { *m = Checksum{} } -func (m *Checksum) String() string { return proto.CompactTextString(m) } -func (*Checksum) ProtoMessage() {} -func (*Checksum) Descriptor() ([]byte, []int) { - return fileDescriptor_452c1d780baa15ef, []int{4} -} -func (m *Checksum) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Checksum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Checksum.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (x *ManifestChange) ProtoReflect() protoreflect.Message { + mi := &file_badgerpb4_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } + return mi.MessageOf(x) } -func (m *Checksum) XXX_Merge(src proto.Message) { - xxx_messageInfo_Checksum.Merge(m, src) -} -func (m *Checksum) XXX_Size() int { - return m.Size() -} -func (m *Checksum) XXX_DiscardUnknown() { - xxx_messageInfo_Checksum.DiscardUnknown(m) -} - -var xxx_messageInfo_Checksum proto.InternalMessageInfo -func (m *Checksum) GetAlgo() Checksum_Algorithm { - if m != nil { - return m.Algo - } - return Checksum_CRC32C +// Deprecated: Use ManifestChange.ProtoReflect.Descriptor instead. +func (*ManifestChange) Descriptor() ([]byte, []int) { + return file_badgerpb4_proto_rawDescGZIP(), []int{3} } -func (m *Checksum) GetSum() uint64 { - if m != nil { - return m.Sum +func (x *ManifestChange) GetId() uint64 { + if x != nil { + return x.Id } return 0 } -type DataKey struct { - KeyId uint64 `protobuf:"varint,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Iv []byte `protobuf:"bytes,3,opt,name=iv,proto3" json:"iv,omitempty"` - CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` -} - -func (m *DataKey) Reset() { *m = DataKey{} } -func (m *DataKey) String() string { return proto.CompactTextString(m) } -func (*DataKey) ProtoMessage() {} -func (*DataKey) Descriptor() ([]byte, []int) { - return fileDescriptor_452c1d780baa15ef, []int{5} -} -func (m *DataKey) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DataKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DataKey.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *ManifestChange) GetOp() ManifestChange_Operation { + if x != nil { + return x.Op } + return ManifestChange_CREATE } -func (m *DataKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_DataKey.Merge(m, src) -} -func (m *DataKey) XXX_Size() int { - return m.Size() -} -func (m *DataKey) XXX_DiscardUnknown() { - xxx_messageInfo_DataKey.DiscardUnknown(m) -} - -var xxx_messageInfo_DataKey proto.InternalMessageInfo -func (m *DataKey) GetKeyId() uint64 { - if m != nil { - return m.KeyId +func (x *ManifestChange) GetLevel() uint32 { + if x != nil { + return x.Level } return 0 } -func (m *DataKey) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -func (m *DataKey) GetIv() []byte { - if m != nil { - return m.Iv - } - return nil -} - -func (m *DataKey) GetCreatedAt() int64 { - if m != nil { - return m.CreatedAt +func (x *ManifestChange) GetKeyId() uint64 { + if x != nil { + return x.KeyId } return 0 } -type Match struct { - Prefix []byte `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` - IgnoreBytes string `protobuf:"bytes,2,opt,name=ignore_bytes,json=ignoreBytes,proto3" json:"ignore_bytes,omitempty"` -} - -func (m *Match) Reset() { *m = Match{} } -func (m *Match) String() string { return proto.CompactTextString(m) } -func (*Match) ProtoMessage() {} -func (*Match) Descriptor() ([]byte, []int) { - return fileDescriptor_452c1d780baa15ef, []int{6} -} -func (m *Match) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Match) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Match.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Match) XXX_Merge(src proto.Message) { - xxx_messageInfo_Match.Merge(m, src) -} -func (m *Match) XXX_Size() int { - return m.Size() -} -func (m *Match) XXX_DiscardUnknown() { - xxx_messageInfo_Match.DiscardUnknown(m) -} - -var xxx_messageInfo_Match proto.InternalMessageInfo - -func (m *Match) GetPrefix() []byte { - if m != nil { - return m.Prefix +func (x *ManifestChange) GetEncryptionAlgo() EncryptionAlgo { + if x != nil { + return x.EncryptionAlgo } - return nil + return EncryptionAlgo_aes } -func (m *Match) GetIgnoreBytes() string { - if m != nil { - return m.IgnoreBytes +func (x *ManifestChange) GetCompression() uint32 { + if x != nil { + return x.Compression } - return "" + return 0 } -func init() { - proto.RegisterEnum("badgerpb4.EncryptionAlgo", EncryptionAlgo_name, EncryptionAlgo_value) - proto.RegisterEnum("badgerpb4.ManifestChange_Operation", ManifestChange_Operation_name, ManifestChange_Operation_value) - proto.RegisterEnum("badgerpb4.Checksum_Algorithm", Checksum_Algorithm_name, Checksum_Algorithm_value) - proto.RegisterType((*KV)(nil), "badgerpb4.KV") - proto.RegisterType((*KVList)(nil), "badgerpb4.KVList") - proto.RegisterType((*ManifestChangeSet)(nil), "badgerpb4.ManifestChangeSet") - proto.RegisterType((*ManifestChange)(nil), "badgerpb4.ManifestChange") - proto.RegisterType((*Checksum)(nil), "badgerpb4.Checksum") - proto.RegisterType((*DataKey)(nil), "badgerpb4.DataKey") - proto.RegisterType((*Match)(nil), "badgerpb4.Match") -} - -func init() { proto.RegisterFile("badgerpb4.proto", fileDescriptor_452c1d780baa15ef) } - -var fileDescriptor_452c1d780baa15ef = []byte{ - // 653 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x54, 0x4f, 0x6b, 0xdb, 0x4e, - 0x10, 0xf5, 0xca, 0xf2, 0xbf, 0x71, 0xe2, 0xf8, 0xb7, 0xfc, 0x5a, 0x14, 0x4a, 0x5c, 0x47, 0xa1, - 0x60, 0x0a, 0xb5, 0x69, 0x1c, 0x7a, 0xe9, 0xc9, 0xff, 0x20, 0xc6, 0x09, 0x81, 0x6d, 0x08, 0xa1, - 0x17, 0xb3, 0x96, 0xc6, 0xb6, 0xb0, 0x2d, 0x89, 0xd5, 0x5a, 0xc4, 0x1f, 0xa2, 0xd0, 0x8f, 0xd5, - 0x63, 0x0e, 0x3d, 0xf4, 0x58, 0x92, 0x2f, 0x52, 0x76, 0xa5, 0xb8, 0xf6, 0xa1, 0xb7, 0x99, 0x37, - 0xa3, 0x79, 0xa3, 0xf7, 0x46, 0x82, 0xa3, 0x09, 0x77, 0x67, 0x28, 0xc2, 0xc9, 0x45, 0x33, 0x14, - 0x81, 0x0c, 0x68, 0x69, 0x0b, 0xd8, 0x3f, 0x09, 0x18, 0xa3, 0x3b, 0x5a, 0x85, 0xec, 0x02, 0x37, - 0x16, 0xa9, 0x93, 0xc6, 0x01, 0x53, 0x21, 0xfd, 0x1f, 0x72, 0x31, 0x5f, 0xae, 0xd1, 0x32, 0x34, - 0x96, 0x24, 0xf4, 0x0d, 0x94, 0xd6, 0x11, 0x8a, 0xf1, 0x0a, 0x25, 0xb7, 0xb2, 0xba, 0x52, 0x54, - 0xc0, 0x35, 0x4a, 0x4e, 0x2d, 0x28, 0xc4, 0x28, 0x22, 0x2f, 0xf0, 0x2d, 0xb3, 0x4e, 0x1a, 0x26, - 0x7b, 0x49, 0xe9, 0x09, 0x00, 0x3e, 0x84, 0x9e, 0xc0, 0x68, 0xcc, 0xa5, 0x95, 0xd3, 0xc5, 0x52, - 0x8a, 0x74, 0x24, 0xa5, 0x60, 0xea, 0x81, 0x79, 0x3d, 0x50, 0xc7, 0x8a, 0x29, 0x92, 0x02, 0xf9, - 0x6a, 0xec, 0xb9, 0x16, 0xd4, 0x49, 0xe3, 0x90, 0x15, 0x13, 0x60, 0xe8, 0xd2, 0xb7, 0x50, 0x4e, - 0x8b, 0x6e, 0xe0, 0xa3, 0x55, 0xae, 0x93, 0x46, 0x91, 0x41, 0x02, 0xf5, 0x03, 0x1f, 0xed, 0x3e, - 0xe4, 0x47, 0x77, 0x57, 0x5e, 0x24, 0xe9, 0x09, 0x18, 0x8b, 0xd8, 0x22, 0xf5, 0x6c, 0xa3, 0x7c, - 0x7e, 0xd8, 0xfc, 0xab, 0xc4, 0xe8, 0x8e, 0x19, 0x8b, 0x58, 0xd1, 0xf0, 0xe5, 0x32, 0x70, 0xc6, - 0x02, 0xa7, 0x9a, 0xc6, 0x64, 0x45, 0x0d, 0x30, 0x9c, 0xda, 0x97, 0xf0, 0xdf, 0x35, 0xf7, 0xbd, - 0x29, 0x46, 0xb2, 0x37, 0xe7, 0xfe, 0x0c, 0xbf, 0xa0, 0xa4, 0x6d, 0x28, 0x38, 0x3a, 0x89, 0xd2, - 0xa9, 0xc7, 0x3b, 0x53, 0xf7, 0xdb, 0xd9, 0x4b, 0xa7, 0xfd, 0xcd, 0x80, 0xca, 0x7e, 0x8d, 0x56, - 0xc0, 0x18, 0xba, 0x5a, 0x71, 0x93, 0x19, 0x43, 0x97, 0xb6, 0xc1, 0xb8, 0x09, 0xb5, 0xda, 0x95, - 0xf3, 0xb3, 0x7f, 0x8e, 0x6c, 0xde, 0x84, 0x28, 0xb8, 0xf4, 0x02, 0x9f, 0x19, 0x37, 0xa1, 0x72, - 0xe9, 0x0a, 0x63, 0x5c, 0x6a, 0x2f, 0x0e, 0x59, 0x92, 0xd0, 0x57, 0x90, 0x5f, 0xe0, 0x46, 0x09, - 0x97, 0xf8, 0x90, 0x5b, 0xe0, 0x66, 0xe8, 0xd2, 0x2e, 0x1c, 0xa1, 0xef, 0x88, 0x4d, 0xa8, 0x1e, - 0x1f, 0xf3, 0xe5, 0x2c, 0xd0, 0x56, 0x54, 0xf6, 0xde, 0x60, 0xb0, 0xed, 0xe8, 0x2c, 0x67, 0x01, - 0xab, 0xe0, 0x5e, 0x4e, 0xeb, 0x50, 0x76, 0x82, 0x55, 0x28, 0x30, 0xd2, 0x3e, 0xe7, 0x35, 0xed, - 0x2e, 0x64, 0x9f, 0x41, 0x69, 0xbb, 0x23, 0x05, 0xc8, 0xf7, 0xd8, 0xa0, 0x73, 0x3b, 0xa8, 0x66, - 0x54, 0xdc, 0x1f, 0x5c, 0x0d, 0x6e, 0x07, 0x55, 0x62, 0xc7, 0x50, 0xec, 0xcd, 0xd1, 0x59, 0x44, - 0xeb, 0x15, 0xfd, 0x08, 0xa6, 0xde, 0x85, 0xe8, 0x5d, 0x4e, 0x76, 0x76, 0x79, 0x69, 0x69, 0x2a, - 0x6a, 0xe1, 0xc9, 0xf9, 0x8a, 0xe9, 0x56, 0x75, 0xae, 0xd1, 0x7a, 0xa5, 0xc5, 0x32, 0x99, 0x0a, - 0xed, 0x77, 0x50, 0xda, 0x36, 0x25, 0xac, 0xbd, 0xf6, 0x79, 0xaf, 0x9a, 0xa1, 0x07, 0x50, 0xbc, - 0xbf, 0xbf, 0xe4, 0xd1, 0xfc, 0xd3, 0x45, 0x95, 0xd8, 0x0e, 0x14, 0xfa, 0x5c, 0xf2, 0x11, 0x6e, - 0x76, 0x44, 0x22, 0xbb, 0x22, 0x51, 0x30, 0x5d, 0x2e, 0x79, 0x7a, 0xf6, 0x3a, 0x56, 0x56, 0x79, - 0x71, 0x7a, 0xee, 0x86, 0x17, 0xab, 0x73, 0x76, 0x04, 0x72, 0x89, 0xae, 0x3a, 0x67, 0xa5, 0x71, - 0x96, 0x95, 0x52, 0xa4, 0x23, 0xed, 0x2e, 0xe4, 0xae, 0xb9, 0x74, 0xe6, 0xf4, 0x35, 0xe4, 0x43, - 0x81, 0x53, 0xef, 0x21, 0xfd, 0xb0, 0xd2, 0x8c, 0x9e, 0xc2, 0x81, 0x37, 0xf3, 0x03, 0x81, 0xe3, - 0xc9, 0x46, 0x62, 0xa4, 0xb9, 0x4a, 0xac, 0x9c, 0x60, 0x5d, 0x05, 0xbd, 0x3f, 0x86, 0xca, 0xbe, - 0x13, 0xb4, 0x00, 0x59, 0x8e, 0x51, 0x35, 0xd3, 0xfd, 0xfc, 0xe3, 0xa9, 0x46, 0x1e, 0x9f, 0x6a, - 0xe4, 0xf7, 0x53, 0x8d, 0x7c, 0x7f, 0xae, 0x65, 0x1e, 0x9f, 0x6b, 0x99, 0x5f, 0xcf, 0xb5, 0xcc, - 0xd7, 0xd3, 0x99, 0x27, 0xe7, 0xeb, 0x49, 0xd3, 0x09, 0x56, 0x2d, 0x77, 0x26, 0x78, 0x38, 0xff, - 0xe0, 0x05, 0xad, 0x44, 0xcf, 0x56, 0x7c, 0xd1, 0x0a, 0x27, 0x93, 0xbc, 0xfe, 0x03, 0xb4, 0xff, - 0x04, 0x00, 0x00, 0xff, 0xff, 0xec, 0x26, 0x3b, 0x76, 0x14, 0x04, 0x00, 0x00, -} - -func (m *KV) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} +type Checksum struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *KV) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + Algo Checksum_Algorithm `protobuf:"varint,1,opt,name=algo,proto3,enum=badgerpb4.Checksum_Algorithm" json:"algo,omitempty"` // For storing type of Checksum algorithm used + Sum uint64 `protobuf:"varint,2,opt,name=sum,proto3" json:"sum,omitempty"` } -func (m *KV) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.StreamDone { - i-- - if m.StreamDone { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 +func (x *Checksum) Reset() { + *x = Checksum{} + if protoimpl.UnsafeEnabled { + mi := &file_badgerpb4_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - if m.StreamId != 0 { - i = encodeVarintBadgerpb4(dAtA, i, uint64(m.StreamId)) - i-- - dAtA[i] = 0x50 - } - if len(m.Meta) > 0 { - i -= len(m.Meta) - copy(dAtA[i:], m.Meta) - i = encodeVarintBadgerpb4(dAtA, i, uint64(len(m.Meta))) - i-- - dAtA[i] = 0x32 - } - if m.ExpiresAt != 0 { - i = encodeVarintBadgerpb4(dAtA, i, uint64(m.ExpiresAt)) - i-- - dAtA[i] = 0x28 - } - if m.Version != 0 { - i = encodeVarintBadgerpb4(dAtA, i, uint64(m.Version)) - i-- - dAtA[i] = 0x20 - } - if len(m.UserMeta) > 0 { - i -= len(m.UserMeta) - copy(dAtA[i:], m.UserMeta) - i = encodeVarintBadgerpb4(dAtA, i, uint64(len(m.UserMeta))) - i-- - dAtA[i] = 0x1a - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintBadgerpb4(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintBadgerpb4(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil } -func (m *KVList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (x *Checksum) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *KVList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} +func (*Checksum) ProtoMessage() {} -func (m *KVList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AllocRef != 0 { - i = encodeVarintBadgerpb4(dAtA, i, uint64(m.AllocRef)) - i-- - dAtA[i] = 0x50 - } - if len(m.Kv) > 0 { - for iNdEx := len(m.Kv) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Kv[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBadgerpb4(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa +func (x *Checksum) ProtoReflect() protoreflect.Message { + mi := &file_badgerpb4_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } + return ms } - return len(dAtA) - i, nil + return mi.MessageOf(x) } -func (m *ManifestChangeSet) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ManifestChangeSet) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ManifestChangeSet) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Changes) > 0 { - for iNdEx := len(m.Changes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Changes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintBadgerpb4(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil +// Deprecated: Use Checksum.ProtoReflect.Descriptor instead. +func (*Checksum) Descriptor() ([]byte, []int) { + return file_badgerpb4_proto_rawDescGZIP(), []int{4} } -func (m *ManifestChange) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *Checksum) GetAlgo() Checksum_Algorithm { + if x != nil { + return x.Algo } - return dAtA[:n], nil -} - -func (m *ManifestChange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return Checksum_CRC32C } -func (m *ManifestChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Compression != 0 { - i = encodeVarintBadgerpb4(dAtA, i, uint64(m.Compression)) - i-- - dAtA[i] = 0x30 - } - if m.EncryptionAlgo != 0 { - i = encodeVarintBadgerpb4(dAtA, i, uint64(m.EncryptionAlgo)) - i-- - dAtA[i] = 0x28 +func (x *Checksum) GetSum() uint64 { + if x != nil { + return x.Sum } - if m.KeyId != 0 { - i = encodeVarintBadgerpb4(dAtA, i, uint64(m.KeyId)) - i-- - dAtA[i] = 0x20 - } - if m.Level != 0 { - i = encodeVarintBadgerpb4(dAtA, i, uint64(m.Level)) - i-- - dAtA[i] = 0x18 - } - if m.Op != 0 { - i = encodeVarintBadgerpb4(dAtA, i, uint64(m.Op)) - i-- - dAtA[i] = 0x10 - } - if m.Id != 0 { - i = encodeVarintBadgerpb4(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil + return 0 } -func (m *Checksum) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} +type DataKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *Checksum) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + KeyId uint64 `protobuf:"varint,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + Iv []byte `protobuf:"bytes,3,opt,name=iv,proto3" json:"iv,omitempty"` + CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` } -func (m *Checksum) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Sum != 0 { - i = encodeVarintBadgerpb4(dAtA, i, uint64(m.Sum)) - i-- - dAtA[i] = 0x10 - } - if m.Algo != 0 { - i = encodeVarintBadgerpb4(dAtA, i, uint64(m.Algo)) - i-- - dAtA[i] = 0x8 +func (x *DataKey) Reset() { + *x = DataKey{} + if protoimpl.UnsafeEnabled { + mi := &file_badgerpb4_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return len(dAtA) - i, nil } -func (m *DataKey) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (x *DataKey) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DataKey) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} +func (*DataKey) ProtoMessage() {} -func (m *DataKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.CreatedAt != 0 { - i = encodeVarintBadgerpb4(dAtA, i, uint64(m.CreatedAt)) - i-- - dAtA[i] = 0x20 - } - if len(m.Iv) > 0 { - i -= len(m.Iv) - copy(dAtA[i:], m.Iv) - i = encodeVarintBadgerpb4(dAtA, i, uint64(len(m.Iv))) - i-- - dAtA[i] = 0x1a - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintBadgerpb4(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x12 - } - if m.KeyId != 0 { - i = encodeVarintBadgerpb4(dAtA, i, uint64(m.KeyId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Match) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (x *DataKey) ProtoReflect() protoreflect.Message { + mi := &file_badgerpb4_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return dAtA[:n], nil -} - -func (m *Match) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return mi.MessageOf(x) } -func (m *Match) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.IgnoreBytes) > 0 { - i -= len(m.IgnoreBytes) - copy(dAtA[i:], m.IgnoreBytes) - i = encodeVarintBadgerpb4(dAtA, i, uint64(len(m.IgnoreBytes))) - i-- - dAtA[i] = 0x12 - } - if len(m.Prefix) > 0 { - i -= len(m.Prefix) - copy(dAtA[i:], m.Prefix) - i = encodeVarintBadgerpb4(dAtA, i, uint64(len(m.Prefix))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +// Deprecated: Use DataKey.ProtoReflect.Descriptor instead. +func (*DataKey) Descriptor() ([]byte, []int) { + return file_badgerpb4_proto_rawDescGZIP(), []int{5} } -func encodeVarintBadgerpb4(dAtA []byte, offset int, v uint64) int { - offset -= sovBadgerpb4(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *KV) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovBadgerpb4(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovBadgerpb4(uint64(l)) - } - l = len(m.UserMeta) - if l > 0 { - n += 1 + l + sovBadgerpb4(uint64(l)) - } - if m.Version != 0 { - n += 1 + sovBadgerpb4(uint64(m.Version)) +func (x *DataKey) GetKeyId() uint64 { + if x != nil { + return x.KeyId } - if m.ExpiresAt != 0 { - n += 1 + sovBadgerpb4(uint64(m.ExpiresAt)) - } - l = len(m.Meta) - if l > 0 { - n += 1 + l + sovBadgerpb4(uint64(l)) - } - if m.StreamId != 0 { - n += 1 + sovBadgerpb4(uint64(m.StreamId)) - } - if m.StreamDone { - n += 2 - } - return n + return 0 } -func (m *KVList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Kv) > 0 { - for _, e := range m.Kv { - l = e.Size() - n += 1 + l + sovBadgerpb4(uint64(l)) - } +func (x *DataKey) GetData() []byte { + if x != nil { + return x.Data } - if m.AllocRef != 0 { - n += 1 + sovBadgerpb4(uint64(m.AllocRef)) - } - return n + return nil } -func (m *ManifestChangeSet) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Changes) > 0 { - for _, e := range m.Changes { - l = e.Size() - n += 1 + l + sovBadgerpb4(uint64(l)) - } +func (x *DataKey) GetIv() []byte { + if x != nil { + return x.Iv } - return n + return nil } -func (m *ManifestChange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovBadgerpb4(uint64(m.Id)) +func (x *DataKey) GetCreatedAt() int64 { + if x != nil { + return x.CreatedAt } - if m.Op != 0 { - n += 1 + sovBadgerpb4(uint64(m.Op)) - } - if m.Level != 0 { - n += 1 + sovBadgerpb4(uint64(m.Level)) - } - if m.KeyId != 0 { - n += 1 + sovBadgerpb4(uint64(m.KeyId)) - } - if m.EncryptionAlgo != 0 { - n += 1 + sovBadgerpb4(uint64(m.EncryptionAlgo)) - } - if m.Compression != 0 { - n += 1 + sovBadgerpb4(uint64(m.Compression)) - } - return n + return 0 } -func (m *Checksum) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Algo != 0 { - n += 1 + sovBadgerpb4(uint64(m.Algo)) - } - if m.Sum != 0 { - n += 1 + sovBadgerpb4(uint64(m.Sum)) - } - return n -} +type Match struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *DataKey) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.KeyId != 0 { - n += 1 + sovBadgerpb4(uint64(m.KeyId)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovBadgerpb4(uint64(l)) - } - l = len(m.Iv) - if l > 0 { - n += 1 + l + sovBadgerpb4(uint64(l)) - } - if m.CreatedAt != 0 { - n += 1 + sovBadgerpb4(uint64(m.CreatedAt)) - } - return n + Prefix []byte `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` + IgnoreBytes string `protobuf:"bytes,2,opt,name=ignore_bytes,json=ignoreBytes,proto3" json:"ignore_bytes,omitempty"` // Comma separated with dash to represent ranges "1, 2-3, 4-7, 9" } -func (m *Match) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Prefix) - if l > 0 { - n += 1 + l + sovBadgerpb4(uint64(l)) +func (x *Match) Reset() { + *x = Match{} + if protoimpl.UnsafeEnabled { + mi := &file_badgerpb4_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - l = len(m.IgnoreBytes) - if l > 0 { - n += 1 + l + sovBadgerpb4(uint64(l)) - } - return n } -func sovBadgerpb4(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozBadgerpb4(x uint64) (n int) { - return sovBadgerpb4(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +func (x *Match) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *KV) 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 ErrIntOverflowBadgerpb4 - } - 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: KV: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: KV: 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 byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBadgerpb4 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBadgerpb4 - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBadgerpb4 - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBadgerpb4 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBadgerpb4 - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBadgerpb4 - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserMeta", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBadgerpb4 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBadgerpb4 - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBadgerpb4 - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UserMeta = append(m.UserMeta[:0], dAtA[iNdEx:postIndex]...) - if m.UserMeta == nil { - m.UserMeta = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - m.Version = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBadgerpb4 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Version |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) - } - m.ExpiresAt = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBadgerpb4 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExpiresAt |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBadgerpb4 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBadgerpb4 - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBadgerpb4 - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Meta = append(m.Meta[:0], dAtA[iNdEx:postIndex]...) - if m.Meta == nil { - m.Meta = []byte{} - } - iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StreamId", wireType) - } - m.StreamId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBadgerpb4 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StreamId |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StreamDone", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBadgerpb4 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.StreamDone = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipBadgerpb4(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthBadgerpb4 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *KVList) 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 ErrIntOverflowBadgerpb4 - } - 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: KVList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: KVList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kv", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBadgerpb4 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBadgerpb4 - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBadgerpb4 - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Kv = append(m.Kv, &KV{}) - if err := m.Kv[len(m.Kv)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllocRef", wireType) - } - m.AllocRef = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBadgerpb4 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AllocRef |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipBadgerpb4(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthBadgerpb4 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } +func (*Match) ProtoMessage() {} - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ManifestChangeSet) 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 ErrIntOverflowBadgerpb4 - } - 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: ManifestChangeSet: wiretype end group for non-group") +func (x *Match) ProtoReflect() protoreflect.Message { + mi := &file_badgerpb4_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - if fieldNum <= 0 { - return fmt.Errorf("proto: ManifestChangeSet: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBadgerpb4 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBadgerpb4 - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBadgerpb4 - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Changes = append(m.Changes, &ManifestChange{}) - if err := m.Changes[len(m.Changes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBadgerpb4(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthBadgerpb4 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF + return ms } - return nil + return mi.MessageOf(x) } -func (m *ManifestChange) 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 ErrIntOverflowBadgerpb4 - } - 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: ManifestChange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ManifestChange: 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 ErrIntOverflowBadgerpb4 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Op", wireType) - } - m.Op = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBadgerpb4 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Op |= ManifestChange_Operation(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) - } - m.Level = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBadgerpb4 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Level |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field KeyId", wireType) - } - m.KeyId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBadgerpb4 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.KeyId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EncryptionAlgo", wireType) - } - m.EncryptionAlgo = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBadgerpb4 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EncryptionAlgo |= EncryptionAlgo(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Compression", wireType) - } - m.Compression = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBadgerpb4 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Compression |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipBadgerpb4(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthBadgerpb4 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil +// Deprecated: Use Match.ProtoReflect.Descriptor instead. +func (*Match) Descriptor() ([]byte, []int) { + return file_badgerpb4_proto_rawDescGZIP(), []int{6} } -func (m *Checksum) 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 ErrIntOverflowBadgerpb4 - } - 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: Checksum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Checksum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Algo", wireType) - } - m.Algo = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBadgerpb4 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Algo |= Checksum_Algorithm(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType) - } - m.Sum = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBadgerpb4 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Sum |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipBadgerpb4(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthBadgerpb4 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF +func (x *Match) GetPrefix() []byte { + if x != nil { + return x.Prefix } return nil } -func (m *DataKey) 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 ErrIntOverflowBadgerpb4 - } - 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: DataKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DataKey: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field KeyId", wireType) - } - m.KeyId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBadgerpb4 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.KeyId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBadgerpb4 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBadgerpb4 - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBadgerpb4 - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Iv", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBadgerpb4 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBadgerpb4 - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBadgerpb4 - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Iv = append(m.Iv[:0], dAtA[iNdEx:postIndex]...) - if m.Iv == nil { - m.Iv = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) - } - m.CreatedAt = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBadgerpb4 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CreatedAt |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipBadgerpb4(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthBadgerpb4 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF +func (x *Match) GetIgnoreBytes() string { + if x != nil { + return x.IgnoreBytes } - return nil + return "" } -func (m *Match) 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 ErrIntOverflowBadgerpb4 - } - 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: Match: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Match: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Prefix", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBadgerpb4 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBadgerpb4 - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBadgerpb4 - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Prefix = append(m.Prefix[:0], dAtA[iNdEx:postIndex]...) - if m.Prefix == nil { - m.Prefix = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IgnoreBytes", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBadgerpb4 - } - 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 ErrInvalidLengthBadgerpb4 - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBadgerpb4 - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IgnoreBytes = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBadgerpb4(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthBadgerpb4 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipBadgerpb4(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowBadgerpb4 - } - 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, ErrIntOverflowBadgerpb4 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowBadgerpb4 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthBadgerpb4 - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupBadgerpb4 - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthBadgerpb4 - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF +var File_badgerpb4_proto protoreflect.FileDescriptor + +var file_badgerpb4_proto_rawDesc = []byte{ + 0x0a, 0x0f, 0x62, 0x61, 0x64, 0x67, 0x65, 0x72, 0x70, 0x62, 0x34, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x09, 0x62, 0x61, 0x64, 0x67, 0x65, 0x72, 0x70, 0x62, 0x34, 0x22, 0xd4, 0x01, 0x0a, + 0x02, 0x4b, 0x56, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x75, + 0x73, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, + 0x75, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, + 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, + 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x64, 0x6f, 0x6e, + 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, + 0x6f, 0x6e, 0x65, 0x22, 0x44, 0x0a, 0x06, 0x4b, 0x56, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1d, 0x0a, + 0x02, 0x6b, 0x76, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x62, 0x61, 0x64, 0x67, + 0x65, 0x72, 0x70, 0x62, 0x34, 0x2e, 0x4b, 0x56, 0x52, 0x02, 0x6b, 0x76, 0x12, 0x1b, 0x0a, 0x09, + 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x08, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x52, 0x65, 0x66, 0x22, 0x48, 0x0a, 0x11, 0x4d, 0x61, 0x6e, + 0x69, 0x66, 0x65, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x74, 0x12, 0x33, + 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x62, 0x61, 0x64, 0x67, 0x65, 0x72, 0x70, 0x62, 0x34, 0x2e, 0x4d, 0x61, 0x6e, 0x69, + 0x66, 0x65, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x73, 0x22, 0x8d, 0x02, 0x0a, 0x0e, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x02, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x02, 0x4f, 0x70, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x62, 0x61, 0x64, 0x67, 0x65, 0x72, 0x70, 0x62, 0x34, 0x2e, 0x4d, + 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x02, 0x4f, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x4c, + 0x65, 0x76, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x4c, 0x65, 0x76, 0x65, + 0x6c, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x42, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x19, 0x2e, 0x62, 0x61, 0x64, 0x67, 0x65, 0x72, 0x70, 0x62, 0x34, 0x2e, 0x45, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x67, 0x6f, 0x52, 0x0e, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x67, 0x6f, 0x12, 0x20, 0x0a, 0x0b, + 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x23, + 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x0a, 0x06, 0x43, + 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, + 0x45, 0x10, 0x01, 0x22, 0x76, 0x0a, 0x08, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, + 0x31, 0x0a, 0x04, 0x61, 0x6c, 0x67, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, + 0x62, 0x61, 0x64, 0x67, 0x65, 0x72, 0x70, 0x62, 0x34, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, + 0x75, 0x6d, 0x2e, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x52, 0x04, 0x61, 0x6c, + 0x67, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x03, 0x73, 0x75, 0x6d, 0x22, 0x25, 0x0a, 0x09, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, + 0x6d, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x52, 0x43, 0x33, 0x32, 0x43, 0x10, 0x00, 0x12, 0x0c, 0x0a, + 0x08, 0x58, 0x58, 0x48, 0x61, 0x73, 0x68, 0x36, 0x34, 0x10, 0x01, 0x22, 0x63, 0x0a, 0x07, 0x44, + 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, + 0x76, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x22, 0x42, 0x0a, 0x05, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x42, + 0x79, 0x74, 0x65, 0x73, 0x2a, 0x19, 0x0a, 0x0e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x41, 0x6c, 0x67, 0x6f, 0x12, 0x07, 0x0a, 0x03, 0x61, 0x65, 0x73, 0x10, 0x00, 0x42, + 0x23, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x67, + 0x72, 0x61, 0x70, 0x68, 0x2d, 0x69, 0x6f, 0x2f, 0x62, 0x61, 0x64, 0x67, 0x65, 0x72, 0x2f, 0x76, + 0x34, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - ErrInvalidLengthBadgerpb4 = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowBadgerpb4 = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupBadgerpb4 = fmt.Errorf("proto: unexpected end of group") + file_badgerpb4_proto_rawDescOnce sync.Once + file_badgerpb4_proto_rawDescData = file_badgerpb4_proto_rawDesc ) + +func file_badgerpb4_proto_rawDescGZIP() []byte { + file_badgerpb4_proto_rawDescOnce.Do(func() { + file_badgerpb4_proto_rawDescData = protoimpl.X.CompressGZIP(file_badgerpb4_proto_rawDescData) + }) + return file_badgerpb4_proto_rawDescData +} + +var file_badgerpb4_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_badgerpb4_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_badgerpb4_proto_goTypes = []interface{}{ + (EncryptionAlgo)(0), // 0: badgerpb4.EncryptionAlgo + (ManifestChange_Operation)(0), // 1: badgerpb4.ManifestChange.Operation + (Checksum_Algorithm)(0), // 2: badgerpb4.Checksum.Algorithm + (*KV)(nil), // 3: badgerpb4.KV + (*KVList)(nil), // 4: badgerpb4.KVList + (*ManifestChangeSet)(nil), // 5: badgerpb4.ManifestChangeSet + (*ManifestChange)(nil), // 6: badgerpb4.ManifestChange + (*Checksum)(nil), // 7: badgerpb4.Checksum + (*DataKey)(nil), // 8: badgerpb4.DataKey + (*Match)(nil), // 9: badgerpb4.Match +} +var file_badgerpb4_proto_depIdxs = []int32{ + 3, // 0: badgerpb4.KVList.kv:type_name -> badgerpb4.KV + 6, // 1: badgerpb4.ManifestChangeSet.changes:type_name -> badgerpb4.ManifestChange + 1, // 2: badgerpb4.ManifestChange.Op:type_name -> badgerpb4.ManifestChange.Operation + 0, // 3: badgerpb4.ManifestChange.encryption_algo:type_name -> badgerpb4.EncryptionAlgo + 2, // 4: badgerpb4.Checksum.algo:type_name -> badgerpb4.Checksum.Algorithm + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_badgerpb4_proto_init() } +func file_badgerpb4_proto_init() { + if File_badgerpb4_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_badgerpb4_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KV); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_badgerpb4_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KVList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_badgerpb4_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ManifestChangeSet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_badgerpb4_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ManifestChange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_badgerpb4_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Checksum); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_badgerpb4_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_badgerpb4_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Match); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_badgerpb4_proto_rawDesc, + NumEnums: 3, + NumMessages: 7, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_badgerpb4_proto_goTypes, + DependencyIndexes: file_badgerpb4_proto_depIdxs, + EnumInfos: file_badgerpb4_proto_enumTypes, + MessageInfos: file_badgerpb4_proto_msgTypes, + }.Build() + File_badgerpb4_proto = out.File + file_badgerpb4_proto_rawDesc = nil + file_badgerpb4_proto_goTypes = nil + file_badgerpb4_proto_depIdxs = nil +} diff --git a/pb/gen.sh b/pb/gen.sh index 864845bcf..03f8ca83b 100755 --- a/pb/gen.sh +++ b/pb/gen.sh @@ -3,5 +3,6 @@ # Run this script from its directory, so that badgerpb4.proto is where it's expected to # be. -go install github.com/gogo/protobuf/protoc-gen-gogofaster@latest -protoc --gogofaster_out=. --gogofaster_opt=paths=source_relative -I=. badgerpb4.proto +go install google.golang.org/protobuf/cmd/protoc-gen-go@latest +protoc --go_out=. --go_opt=paths=source_relative -I=. badgerpb4.proto +sed -i '/^\/\/ \t.*protoc .*/d' badgerpb4.pb.go diff --git a/pb/protos_test.go b/pb/protos_test.go index ebaa945d5..beea26732 100644 --- a/pb/protos_test.go +++ b/pb/protos_test.go @@ -17,6 +17,7 @@ package pb import ( "os/exec" + "runtime" "testing" "github.com/stretchr/testify/require" @@ -32,7 +33,13 @@ func Exec(argv ...string) error { } func TestProtosRegenerate(t *testing.T) { - err := Exec("./gen.sh") + var err error + + if runtime.GOOS == "windows" { + err = Exec("bash", "./gen.sh") + } else { + err = Exec("./gen.sh") + } require.NoError(t, err, "Got error while regenerating protos: %v\n", err) generatedProtos := "badgerpb4.pb.go" diff --git a/stream_test.go b/stream_test.go index 10af62836..c76f59add 100644 --- a/stream_test.go +++ b/stream_test.go @@ -25,8 +25,8 @@ import ( "strings" "testing" - "github.com/golang/protobuf/proto" "github.com/stretchr/testify/require" + "google.golang.org/protobuf/proto" bpb "github.com/dgraph-io/badger/v4/pb" "github.com/dgraph-io/badger/v4/y" diff --git a/table/builder.go b/table/builder.go index bf0ac319a..62ee8cc82 100644 --- a/table/builder.go +++ b/table/builder.go @@ -24,10 +24,10 @@ import ( "sync/atomic" "unsafe" - "github.com/golang/protobuf/proto" fbs "github.com/google/flatbuffers/go" "github.com/klauspost/compress/s2" "github.com/pkg/errors" + "google.golang.org/protobuf/proto" "github.com/dgraph-io/badger/v4/fb" "github.com/dgraph-io/badger/v4/options" diff --git a/table/table.go b/table/table.go index 010cbd1cf..0c4960f0f 100644 --- a/table/table.go +++ b/table/table.go @@ -31,10 +31,10 @@ import ( "time" "unsafe" - "github.com/golang/protobuf/proto" "github.com/klauspost/compress/snappy" "github.com/klauspost/compress/zstd" "github.com/pkg/errors" + "google.golang.org/protobuf/proto" "github.com/dgraph-io/badger/v4/fb" "github.com/dgraph-io/badger/v4/options"