From ff9d89bb6684347a8f334f6228dd8ccbb66f418c Mon Sep 17 00:00:00 2001 From: Ivan Kozlovic Date: Mon, 11 Jan 2021 10:11:11 -0700 Subject: [PATCH] [UPDATED] protobuf v1.3.2 This PR updates the dependency of protobuf to the latest 1.3.2 that fixes some possible unmarshal errors due to int overflow. Signed-off-by: Ivan Kozlovic --- dependencies.md | 18 +- go.mod | 2 +- go.sum | 31 +- go_tests.mod | 6 +- go_tests.sum | 85 ++- pb/protocol.pb.go | 1729 ++++++++++++++++++++++++++++++--------------- 6 files changed, 1257 insertions(+), 614 deletions(-) diff --git a/dependencies.md b/dependencies.md index 7fbb22f..b8ec67e 100644 --- a/dependencies.md +++ b/dependencies.md @@ -6,9 +6,19 @@ This file lists the dependencies used in this repository. |-|-| | Go | BSD 3-Clause "New" or "Revised" License | | github.com/nats-io/stan.go | Apache License 2.0 | -| github.com/gogo/protobuf v1.3.1 | Go | -| github.com/golang/protobuf v1.3.3 | BSD 3-Clause "New" or "Revised" License | -| github.com/nats-io/nats-server/v2 v2.1.7 | Apache License 2.0 | -| github.com/nats-io/nats-streaming-server v0.17.0 | Apache License 2.0 | +| github.com/gogo/protobuf v1.3.2 | Go | +| github.com/kisielk/errcheck v1.5.0 | MIT | +| github.com/kisielk/gotool v1.0.0 | MIT | +| github.com/nats-io/jwt v0.3.2 | Apache License 2.0 | | github.com/nats-io/nats.go v1.10.0 | Apache License 2.0 | +| github.com/nats-io/nkeys v0.1.4 | Apache License 2.0 | | github.com/nats-io/nuid v1.0.1 | Apache License 2.0 | +| github.com/yuin/goldmark v1.2.1 | MIT | +| golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 | BSD 3-Clause "New" or "Revised" License | +| golang.org/x/mod v0.3.0 | BSD 3-Clause "New" or "Revised" License | +| golang.org/x/net v0.0.0-20201021035429-f5854403a974 | BSD 3-Clause "New" or "Revised" License | +| golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 | BSD 3-Clause "New" or "Revised" License | +| golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f | BSD 3-Clause "New" or "Revised" License | +| golang.org/x/text v0.3.3 | BSD 3-Clause "New" or "Revised" License | +| golang.org/x/tools v0.0.0-20210106214847-113979e3529a | BSD 3-Clause "New" or "Revised" License | +| golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 | BSD 3-Clause "New" or "Revised" License | diff --git a/go.mod b/go.mod index 748910c..fc5181f 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/nats-io/stan.go go 1.14 require ( - github.com/gogo/protobuf v1.3.1 + github.com/gogo/protobuf v1.3.2 github.com/nats-io/nats.go v1.10.0 github.com/nats-io/nuid v1.0.1 ) diff --git a/go.sum b/go.sum index d06f658..ef6b2e6 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,6 @@ -github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +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/nats-io/jwt v0.3.2 h1:+RB5hMpXUUA2dfxuhBTEkMOrYmM+gKIZYS1KjSostMI= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= @@ -11,12 +11,33 @@ github.com/nats-io/nkeys v0.1.4 h1:aEsHIssIk6ETN5m2/MD8Y4B2X7FfXrBAUdkyRvbVYzA= github.com/nats-io/nkeys v0.1.4/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59 h1:3zb4D3T4G8jdExgVU/95+vQXfpEPiMdCaZgmGVxjNHM= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +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-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/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-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-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +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/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/go_tests.mod b/go_tests.mod index b0fb064..ff8fc42 100644 --- a/go_tests.mod +++ b/go_tests.mod @@ -3,9 +3,9 @@ module github.com/nats-io/stan.go go 1.14 require ( - github.com/gogo/protobuf v1.3.1 - github.com/nats-io/nats-server/v2 v2.1.7 - github.com/nats-io/nats-streaming-server v0.17.0 + github.com/gogo/protobuf v1.3.2 + github.com/nats-io/nats-server/v2 v2.1.9 + github.com/nats-io/nats-streaming-server v0.20.0 github.com/nats-io/nats.go v1.10.0 github.com/nats-io/nuid v1.0.1 ) diff --git a/go_tests.sum b/go_tests.sum index db5641b..43bfc9f 100644 --- a/go_tests.sum +++ b/go_tests.sum @@ -7,12 +7,13 @@ github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6D github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.2.0/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= @@ -22,43 +23,46 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw 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/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-hclog v0.9.1 h1:9PZfAcVEvez4yhLH2TBU64/h/z4xlFI80cWXRrxuKuM= github.com/hashicorp/go-hclog v0.9.1/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= +github.com/hashicorp/go-hclog v0.14.1 h1:nQcJDQwIAGnmoUWp8ubocEX40cCml/17YkF6csQLReU= +github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-msgpack v1.1.5 h1:9byZdVjKTe5mce63pRVNP1L7UAmdHOTEMGehn6KvJWs= +github.com/hashicorp/go-msgpack v1.1.5/go.mod h1:gWVc3sv/wbDmR3rQsj1CAktEZzoz1YNK9NfGLXJ69/4= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/raft v1.1.1 h1:HJr7UE1x/JrJSc9Oy6aDBHtNHUUBHjcQjTgvUVihoZs= -github.com/hashicorp/raft v1.1.1/go.mod h1:vPAJM8Asw6u8LxC3eJCUZmRP/E4QmUGE1R7g7k8sG/8= +github.com/hashicorp/raft v1.2.0 h1:mHzHIrF0S91d3A7RPBvuqkgB4d/7oFJZyvf1Q4m7GA0= +github.com/hashicorp/raft v1.2.0/go.mod h1:vPAJM8Asw6u8LxC3eJCUZmRP/E4QmUGE1R7g7k8sG/8= github.com/hashicorp/raft-boltdb v0.0.0-20171010151810-6e5ba93211ea/go.mod h1:pNv7Wc3ycL6F5oOWn+tPGo2gWD4a5X+yp/ntwdKLjRk= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +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/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10 h1:qxFzApOv4WsAL965uUPIsXzAKCZxN2p9UqdhFS4ZW10= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt v0.3.2 h1:+RB5hMpXUUA2dfxuhBTEkMOrYmM+gKIZYS1KjSostMI= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/nats-server v1.4.1 h1:Ul1oSOGNV/L8kjr4v6l2f9Yet6WY+LevH1/7cRZ/qyA= -github.com/nats-io/nats-server/v2 v2.1.4/go.mod h1:Jw1Z28soD/QasIA2uWjXyM9El1jly3YwyFOuR8tH1rg= -github.com/nats-io/nats-server/v2 v2.1.7 h1:jCoQwDvRYJy3OpOTHeYfvIPLP46BMeDmH7XEJg/r42I= -github.com/nats-io/nats-server/v2 v2.1.7/go.mod h1:rbRrRE/Iv93O/rUvZ9dh4NfT0Cm9HWjW/BqOWLGgYiE= -github.com/nats-io/nats-streaming-server v0.17.0 h1:eYhSmjRmRsCYNsoUshmZ+RgKbhq6B+7FvMHXo3M5yMs= -github.com/nats-io/nats-streaming-server v0.17.0/go.mod h1:ewPBEsmp62Znl3dcRsYtlcfwudxHEdYMtYqUQSt4fE0= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/jwt v1.1.0 h1:+vOlgtM0ZsF46GbmUoadq0/2rChNS45gtxHEa3H1gqM= +github.com/nats-io/jwt v1.1.0/go.mod h1:n3cvmLfBfnpV4JJRN7lRYCyZnw48ksGsbThGXEk4w9M= +github.com/nats-io/nats-server/v2 v2.1.9 h1:Sxr2zpaapgpBT9ElTxTVe62W+qjnhPcKY/8W5cnA/Qk= +github.com/nats-io/nats-server/v2 v2.1.9/go.mod h1:9qVyoewoYXzG1ME9ox0HwkkzyYvnlBDugfR4Gg/8uHU= +github.com/nats-io/nats-streaming-server v0.20.0 h1:+kHFbUIWsEbjZHRCUsAr0Hq2oKszq4/9B208VycRTwQ= +github.com/nats-io/nats-streaming-server v0.20.0/go.mod h1:yJjUp4TmfYqllCtctAQ6Kz6ZRy5kaLgqHvuU1TGSrCw= github.com/nats-io/nats.go v1.10.0 h1:L8qnKaofSfNFbXg0C5F71LdjPRnmQwSsA4ukmkt1TvY= github.com/nats-io/nats.go v1.10.0/go.mod h1:AjGArbfyR50+afOUotNX2Xs5SYHf+CoOa5HH1eEl2HE= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.4 h1:aEsHIssIk6ETN5m2/MD8Y4B2X7FfXrBAUdkyRvbVYzA= github.com/nats-io/nkeys v0.1.4/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/nats-io/stan.go v0.6.0/go.mod h1:eIcD5bi3pqbHT/xIIvXMwvzXYElgouBvaVRftaE+eac= +github.com/nats-io/stan.go v0.8.1/go.mod h1:Ci6mUIpGQTjl++MqK2XzkWI/0vF+Bl72uScx7ejSYmU= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -66,33 +70,58 @@ github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4 github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4= +github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0= +go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200206161412-a0c6ece9d31a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59 h1:3zb4D3T4G8jdExgVU/95+vQXfpEPiMdCaZgmGVxjNHM= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 h1:pLI5jrR7OSLijeIDcmRxNmw2api+jEfxLoykJVice/E= +golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +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-20181201002055-351d144fa1fc/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/sync v0.0.0-20181108010431-42b317875d0f/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-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/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-20190523142557-0e01d883c5c5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5 h1:LfCXLvNmTYH9kEmVgqbnsWfruoXZIrh4YBgqVHtDvw0= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201101102859-da207088b7d1 h1:a/mKvvZr9Jcc8oKfcmgzyp7OwF73JPWsQLvH1z2Kxck= +golang.org/x/sys v0.0.0-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190424220101-1e8e1cfdf96b/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +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/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 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= diff --git a/pb/protocol.pb.go b/pb/protocol.pb.go index 801c660..45fafb8 100644 --- a/pb/protocol.pb.go +++ b/pb/protocol.pb.go @@ -1,35 +1,16 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: protocol.proto -/* - Package pb is a generated protocol buffer package. - - It is generated from these files: - protocol.proto - - It has these top-level messages: - PubMsg - PubAck - MsgProto - Ack - ConnectRequest - ConnectResponse - Ping - PingResponse - SubscriptionRequest - SubscriptionResponse - UnsubscribeRequest - CloseRequest - CloseResponse -*/ package pb -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import io "io" +import ( + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -40,7 +21,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Enum for start position type. type StartPosition int32 @@ -60,6 +41,7 @@ var StartPosition_name = map[int32]string{ 3: "SequenceStart", 4: "First", } + var StartPosition_value = map[string]int32{ "NewOnly": 0, "LastReceived": 1, @@ -71,7 +53,10 @@ var StartPosition_value = map[string]int32{ func (x StartPosition) String() string { return proto.EnumName(StartPosition_name, int32(x)) } -func (StartPosition) EnumDescriptor() ([]byte, []int) { return fileDescriptorProtocol, []int{0} } + +func (StartPosition) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_2bc2336598a3f7e0, []int{0} +} // How messages are delivered to the STAN cluster type PubMsg struct { @@ -84,10 +69,38 @@ type PubMsg struct { Sha256 []byte `protobuf:"bytes,10,opt,name=sha256,proto3" json:"sha256,omitempty"` } -func (m *PubMsg) Reset() { *m = PubMsg{} } -func (m *PubMsg) String() string { return proto.CompactTextString(m) } -func (*PubMsg) ProtoMessage() {} -func (*PubMsg) Descriptor() ([]byte, []int) { return fileDescriptorProtocol, []int{0} } +func (m *PubMsg) Reset() { *m = PubMsg{} } +func (m *PubMsg) String() string { return proto.CompactTextString(m) } +func (*PubMsg) ProtoMessage() {} +func (*PubMsg) Descriptor() ([]byte, []int) { + return fileDescriptor_2bc2336598a3f7e0, []int{0} +} +func (m *PubMsg) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PubMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PubMsg.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 *PubMsg) XXX_Merge(src proto.Message) { + xxx_messageInfo_PubMsg.Merge(m, src) +} +func (m *PubMsg) XXX_Size() int { + return m.Size() +} +func (m *PubMsg) XXX_DiscardUnknown() { + xxx_messageInfo_PubMsg.DiscardUnknown(m) +} + +var xxx_messageInfo_PubMsg proto.InternalMessageInfo // Used to ACK to publishers type PubAck struct { @@ -95,10 +108,38 @@ type PubAck struct { Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` } -func (m *PubAck) Reset() { *m = PubAck{} } -func (m *PubAck) String() string { return proto.CompactTextString(m) } -func (*PubAck) ProtoMessage() {} -func (*PubAck) Descriptor() ([]byte, []int) { return fileDescriptorProtocol, []int{1} } +func (m *PubAck) Reset() { *m = PubAck{} } +func (m *PubAck) String() string { return proto.CompactTextString(m) } +func (*PubAck) ProtoMessage() {} +func (*PubAck) Descriptor() ([]byte, []int) { + return fileDescriptor_2bc2336598a3f7e0, []int{1} +} +func (m *PubAck) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PubAck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PubAck.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 *PubAck) XXX_Merge(src proto.Message) { + xxx_messageInfo_PubAck.Merge(m, src) +} +func (m *PubAck) XXX_Size() int { + return m.Size() +} +func (m *PubAck) XXX_DiscardUnknown() { + xxx_messageInfo_PubAck.DiscardUnknown(m) +} + +var xxx_messageInfo_PubAck proto.InternalMessageInfo // Msg struct. Sequence is assigned for global ordering by // the cluster after the publisher has been acknowledged. @@ -113,10 +154,38 @@ type MsgProto struct { CRC32 uint32 `protobuf:"varint,10,opt,name=CRC32,proto3" json:"CRC32,omitempty"` } -func (m *MsgProto) Reset() { *m = MsgProto{} } -func (m *MsgProto) String() string { return proto.CompactTextString(m) } -func (*MsgProto) ProtoMessage() {} -func (*MsgProto) Descriptor() ([]byte, []int) { return fileDescriptorProtocol, []int{2} } +func (m *MsgProto) Reset() { *m = MsgProto{} } +func (m *MsgProto) String() string { return proto.CompactTextString(m) } +func (*MsgProto) ProtoMessage() {} +func (*MsgProto) Descriptor() ([]byte, []int) { + return fileDescriptor_2bc2336598a3f7e0, []int{2} +} +func (m *MsgProto) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgProto.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 *MsgProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgProto.Merge(m, src) +} +func (m *MsgProto) XXX_Size() int { + return m.Size() +} +func (m *MsgProto) XXX_DiscardUnknown() { + xxx_messageInfo_MsgProto.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgProto proto.InternalMessageInfo // Ack will deliver an ack for a delivered msg. type Ack struct { @@ -124,10 +193,38 @@ type Ack struct { Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` } -func (m *Ack) Reset() { *m = Ack{} } -func (m *Ack) String() string { return proto.CompactTextString(m) } -func (*Ack) ProtoMessage() {} -func (*Ack) Descriptor() ([]byte, []int) { return fileDescriptorProtocol, []int{3} } +func (m *Ack) Reset() { *m = Ack{} } +func (m *Ack) String() string { return proto.CompactTextString(m) } +func (*Ack) ProtoMessage() {} +func (*Ack) Descriptor() ([]byte, []int) { + return fileDescriptor_2bc2336598a3f7e0, []int{3} +} +func (m *Ack) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Ack) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Ack.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 *Ack) XXX_Merge(src proto.Message) { + xxx_messageInfo_Ack.Merge(m, src) +} +func (m *Ack) XXX_Size() int { + return m.Size() +} +func (m *Ack) XXX_DiscardUnknown() { + xxx_messageInfo_Ack.DiscardUnknown(m) +} + +var xxx_messageInfo_Ack proto.InternalMessageInfo // Connection Request type ConnectRequest struct { @@ -139,10 +236,38 @@ type ConnectRequest struct { PingMaxOut int32 `protobuf:"varint,6,opt,name=pingMaxOut,proto3" json:"pingMaxOut,omitempty"` } -func (m *ConnectRequest) Reset() { *m = ConnectRequest{} } -func (m *ConnectRequest) String() string { return proto.CompactTextString(m) } -func (*ConnectRequest) ProtoMessage() {} -func (*ConnectRequest) Descriptor() ([]byte, []int) { return fileDescriptorProtocol, []int{4} } +func (m *ConnectRequest) Reset() { *m = ConnectRequest{} } +func (m *ConnectRequest) String() string { return proto.CompactTextString(m) } +func (*ConnectRequest) ProtoMessage() {} +func (*ConnectRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2bc2336598a3f7e0, []int{4} +} +func (m *ConnectRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ConnectRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ConnectRequest.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 *ConnectRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConnectRequest.Merge(m, src) +} +func (m *ConnectRequest) XXX_Size() int { + return m.Size() +} +func (m *ConnectRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ConnectRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ConnectRequest proto.InternalMessageInfo // Response to a client connect type ConnectResponse struct { @@ -159,30 +284,114 @@ type ConnectResponse struct { PublicKey string `protobuf:"bytes,100,opt,name=publicKey,proto3" json:"publicKey,omitempty"` } -func (m *ConnectResponse) Reset() { *m = ConnectResponse{} } -func (m *ConnectResponse) String() string { return proto.CompactTextString(m) } -func (*ConnectResponse) ProtoMessage() {} -func (*ConnectResponse) Descriptor() ([]byte, []int) { return fileDescriptorProtocol, []int{5} } +func (m *ConnectResponse) Reset() { *m = ConnectResponse{} } +func (m *ConnectResponse) String() string { return proto.CompactTextString(m) } +func (*ConnectResponse) ProtoMessage() {} +func (*ConnectResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2bc2336598a3f7e0, []int{5} +} +func (m *ConnectResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ConnectResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ConnectResponse.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 *ConnectResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConnectResponse.Merge(m, src) +} +func (m *ConnectResponse) XXX_Size() int { + return m.Size() +} +func (m *ConnectResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ConnectResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ConnectResponse proto.InternalMessageInfo // PING from client to server type Ping struct { ConnID []byte `protobuf:"bytes,1,opt,name=connID,proto3" json:"connID,omitempty"` } -func (m *Ping) Reset() { *m = Ping{} } -func (m *Ping) String() string { return proto.CompactTextString(m) } -func (*Ping) ProtoMessage() {} -func (*Ping) Descriptor() ([]byte, []int) { return fileDescriptorProtocol, []int{6} } +func (m *Ping) Reset() { *m = Ping{} } +func (m *Ping) String() string { return proto.CompactTextString(m) } +func (*Ping) ProtoMessage() {} +func (*Ping) Descriptor() ([]byte, []int) { + return fileDescriptor_2bc2336598a3f7e0, []int{6} +} +func (m *Ping) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Ping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Ping.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 *Ping) XXX_Merge(src proto.Message) { + xxx_messageInfo_Ping.Merge(m, src) +} +func (m *Ping) XXX_Size() int { + return m.Size() +} +func (m *Ping) XXX_DiscardUnknown() { + xxx_messageInfo_Ping.DiscardUnknown(m) +} + +var xxx_messageInfo_Ping proto.InternalMessageInfo // PING response from the server type PingResponse struct { Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` } -func (m *PingResponse) Reset() { *m = PingResponse{} } -func (m *PingResponse) String() string { return proto.CompactTextString(m) } -func (*PingResponse) ProtoMessage() {} -func (*PingResponse) Descriptor() ([]byte, []int) { return fileDescriptorProtocol, []int{7} } +func (m *PingResponse) Reset() { *m = PingResponse{} } +func (m *PingResponse) String() string { return proto.CompactTextString(m) } +func (*PingResponse) ProtoMessage() {} +func (*PingResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2bc2336598a3f7e0, []int{7} +} +func (m *PingResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PingResponse.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 *PingResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_PingResponse.Merge(m, src) +} +func (m *PingResponse) XXX_Size() int { + return m.Size() +} +func (m *PingResponse) XXX_DiscardUnknown() { + xxx_messageInfo_PingResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_PingResponse proto.InternalMessageInfo // Protocol for a client to subscribe type SubscriptionRequest struct { @@ -198,10 +407,38 @@ type SubscriptionRequest struct { StartTimeDelta int64 `protobuf:"varint,12,opt,name=startTimeDelta,proto3" json:"startTimeDelta,omitempty"` } -func (m *SubscriptionRequest) Reset() { *m = SubscriptionRequest{} } -func (m *SubscriptionRequest) String() string { return proto.CompactTextString(m) } -func (*SubscriptionRequest) ProtoMessage() {} -func (*SubscriptionRequest) Descriptor() ([]byte, []int) { return fileDescriptorProtocol, []int{8} } +func (m *SubscriptionRequest) Reset() { *m = SubscriptionRequest{} } +func (m *SubscriptionRequest) String() string { return proto.CompactTextString(m) } +func (*SubscriptionRequest) ProtoMessage() {} +func (*SubscriptionRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2bc2336598a3f7e0, []int{8} +} +func (m *SubscriptionRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SubscriptionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SubscriptionRequest.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 *SubscriptionRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubscriptionRequest.Merge(m, src) +} +func (m *SubscriptionRequest) XXX_Size() int { + return m.Size() +} +func (m *SubscriptionRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SubscriptionRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SubscriptionRequest proto.InternalMessageInfo // Response for SubscriptionRequest and UnsubscribeRequests type SubscriptionResponse struct { @@ -209,10 +446,38 @@ type SubscriptionResponse struct { Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` } -func (m *SubscriptionResponse) Reset() { *m = SubscriptionResponse{} } -func (m *SubscriptionResponse) String() string { return proto.CompactTextString(m) } -func (*SubscriptionResponse) ProtoMessage() {} -func (*SubscriptionResponse) Descriptor() ([]byte, []int) { return fileDescriptorProtocol, []int{9} } +func (m *SubscriptionResponse) Reset() { *m = SubscriptionResponse{} } +func (m *SubscriptionResponse) String() string { return proto.CompactTextString(m) } +func (*SubscriptionResponse) ProtoMessage() {} +func (*SubscriptionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2bc2336598a3f7e0, []int{9} +} +func (m *SubscriptionResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SubscriptionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SubscriptionResponse.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 *SubscriptionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubscriptionResponse.Merge(m, src) +} +func (m *SubscriptionResponse) XXX_Size() int { + return m.Size() +} +func (m *SubscriptionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SubscriptionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SubscriptionResponse proto.InternalMessageInfo // Protocol for a clients to unsubscribe. Will return a SubscriptionResponse type UnsubscribeRequest struct { @@ -222,32 +487,117 @@ type UnsubscribeRequest struct { DurableName string `protobuf:"bytes,4,opt,name=durableName,proto3" json:"durableName,omitempty"` } -func (m *UnsubscribeRequest) Reset() { *m = UnsubscribeRequest{} } -func (m *UnsubscribeRequest) String() string { return proto.CompactTextString(m) } -func (*UnsubscribeRequest) ProtoMessage() {} -func (*UnsubscribeRequest) Descriptor() ([]byte, []int) { return fileDescriptorProtocol, []int{10} } +func (m *UnsubscribeRequest) Reset() { *m = UnsubscribeRequest{} } +func (m *UnsubscribeRequest) String() string { return proto.CompactTextString(m) } +func (*UnsubscribeRequest) ProtoMessage() {} +func (*UnsubscribeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2bc2336598a3f7e0, []int{10} +} +func (m *UnsubscribeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnsubscribeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnsubscribeRequest.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 *UnsubscribeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnsubscribeRequest.Merge(m, src) +} +func (m *UnsubscribeRequest) XXX_Size() int { + return m.Size() +} +func (m *UnsubscribeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_UnsubscribeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_UnsubscribeRequest proto.InternalMessageInfo // Protocol for a client to close a connection type CloseRequest struct { ClientID string `protobuf:"bytes,1,opt,name=clientID,proto3" json:"clientID,omitempty"` } -func (m *CloseRequest) Reset() { *m = CloseRequest{} } -func (m *CloseRequest) String() string { return proto.CompactTextString(m) } -func (*CloseRequest) ProtoMessage() {} -func (*CloseRequest) Descriptor() ([]byte, []int) { return fileDescriptorProtocol, []int{11} } +func (m *CloseRequest) Reset() { *m = CloseRequest{} } +func (m *CloseRequest) String() string { return proto.CompactTextString(m) } +func (*CloseRequest) ProtoMessage() {} +func (*CloseRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2bc2336598a3f7e0, []int{11} +} +func (m *CloseRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CloseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CloseRequest.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 *CloseRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CloseRequest.Merge(m, src) +} +func (m *CloseRequest) XXX_Size() int { + return m.Size() +} +func (m *CloseRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CloseRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_CloseRequest proto.InternalMessageInfo // Response for CloseRequest type CloseResponse struct { Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` } -func (m *CloseResponse) Reset() { *m = CloseResponse{} } -func (m *CloseResponse) String() string { return proto.CompactTextString(m) } -func (*CloseResponse) ProtoMessage() {} -func (*CloseResponse) Descriptor() ([]byte, []int) { return fileDescriptorProtocol, []int{12} } +func (m *CloseResponse) Reset() { *m = CloseResponse{} } +func (m *CloseResponse) String() string { return proto.CompactTextString(m) } +func (*CloseResponse) ProtoMessage() {} +func (*CloseResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2bc2336598a3f7e0, []int{12} +} +func (m *CloseResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CloseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CloseResponse.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 *CloseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CloseResponse.Merge(m, src) +} +func (m *CloseResponse) XXX_Size() int { + return m.Size() +} +func (m *CloseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_CloseResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_CloseResponse proto.InternalMessageInfo func init() { + proto.RegisterEnum("pb.StartPosition", StartPosition_name, StartPosition_value) proto.RegisterType((*PubMsg)(nil), "pb.PubMsg") proto.RegisterType((*PubAck)(nil), "pb.PubAck") proto.RegisterType((*MsgProto)(nil), "pb.MsgProto") @@ -261,12 +611,72 @@ func init() { proto.RegisterType((*UnsubscribeRequest)(nil), "pb.UnsubscribeRequest") proto.RegisterType((*CloseRequest)(nil), "pb.CloseRequest") proto.RegisterType((*CloseResponse)(nil), "pb.CloseResponse") - proto.RegisterEnum("pb.StartPosition", StartPosition_name, StartPosition_value) } + +func init() { proto.RegisterFile("protocol.proto", fileDescriptor_2bc2336598a3f7e0) } + +var fileDescriptor_2bc2336598a3f7e0 = []byte{ + // 850 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x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, 0xc1, 0x21, 0x0c, 0xdd, + 0xa5, 0xb9, 0xef, 0xdf, 0x83, 0xf7, 0x61, 0x54, 0xd5, 0xde, 0x37, 0x8e, 0x87, 0xdf, 0xc3, 0xa8, + 0x91, 0x07, 0xdd, 0x81, 0xad, 0x17, 0xfc, 0xc7, 0x97, 0x32, 0xbd, 0x9e, 0xb4, 0xe8, 0x04, 0x86, + 0x5f, 0x33, 0x6d, 0x42, 0x1e, 0x73, 0x71, 0xc9, 0x17, 0x13, 0x42, 0x29, 0x8c, 0x6b, 0x7b, 0xf1, + 0xc5, 0x49, 0x9b, 0x3e, 0x84, 0xd1, 0x2a, 0x99, 0x12, 0x75, 0xe8, 0x36, 0xf4, 0x9e, 0x8b, 0x5c, + 0x9b, 0x49, 0xf7, 0xf3, 0xc7, 0x6f, 0xfe, 0xf4, 0x5b, 0x6f, 0x6e, 0x7c, 0xf2, 0xf6, 0xc6, 0x27, + 0x7f, 0xdc, 0xf8, 0xe4, 0x97, 0x5b, 0xbf, 0xf5, 0xf6, 0xd6, 0x6f, 0xfd, 0x7e, 0xeb, 0xb7, 0xa2, + 0x3e, 0x2e, 0xdf, 0xb3, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x92, 0x8c, 0x71, 0xda, 0x00, 0x08, + 0x00, 0x00, +} + func (m *PubMsg) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -274,59 +684,71 @@ func (m *PubMsg) Marshal() (dAtA []byte, err error) { } func (m *PubMsg) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PubMsg) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ClientID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.ClientID))) - i += copy(dAtA[i:], m.ClientID) + if len(m.Sha256) > 0 { + i -= len(m.Sha256) + copy(dAtA[i:], m.Sha256) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.Sha256))) + i-- + dAtA[i] = 0x52 } - if len(m.Guid) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.Guid))) - i += copy(dAtA[i:], m.Guid) + if len(m.ConnID) > 0 { + i -= len(m.ConnID) + copy(dAtA[i:], m.ConnID) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.ConnID))) + i-- + dAtA[i] = 0x32 } - if len(m.Subject) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.Subject))) - i += copy(dAtA[i:], m.Subject) + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x2a } if len(m.Reply) > 0 { - dAtA[i] = 0x22 - i++ + i -= len(m.Reply) + copy(dAtA[i:], m.Reply) i = encodeVarintProtocol(dAtA, i, uint64(len(m.Reply))) - i += copy(dAtA[i:], m.Reply) + i-- + dAtA[i] = 0x22 } - if len(m.Data) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.Data))) - i += copy(dAtA[i:], m.Data) + if len(m.Subject) > 0 { + i -= len(m.Subject) + copy(dAtA[i:], m.Subject) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.Subject))) + i-- + dAtA[i] = 0x1a } - if len(m.ConnID) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.ConnID))) - i += copy(dAtA[i:], m.ConnID) + if len(m.Guid) > 0 { + i -= len(m.Guid) + copy(dAtA[i:], m.Guid) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.Guid))) + i-- + dAtA[i] = 0x12 } - if len(m.Sha256) > 0 { - dAtA[i] = 0x52 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.Sha256))) - i += copy(dAtA[i:], m.Sha256) + if len(m.ClientID) > 0 { + i -= len(m.ClientID) + copy(dAtA[i:], m.ClientID) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.ClientID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *PubAck) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -334,29 +756,36 @@ func (m *PubAck) Marshal() (dAtA []byte, err error) { } func (m *PubAck) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PubAck) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Guid) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.Guid))) - i += copy(dAtA[i:], m.Guid) - } if len(m.Error) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Error) + copy(dAtA[i:], m.Error) i = encodeVarintProtocol(dAtA, i, uint64(len(m.Error))) - i += copy(dAtA[i:], m.Error) + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.Guid) > 0 { + i -= len(m.Guid) + copy(dAtA[i:], m.Guid) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.Guid))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *MsgProto) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -364,65 +793,73 @@ func (m *MsgProto) Marshal() (dAtA []byte, err error) { } func (m *MsgProto) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgProto) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Sequence != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(m.Sequence)) - } - if len(m.Subject) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.Subject))) - i += copy(dAtA[i:], m.Subject) - } - if len(m.Reply) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.Reply))) - i += copy(dAtA[i:], m.Reply) - } - if len(m.Data) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.Data))) - i += copy(dAtA[i:], m.Data) + if m.CRC32 != 0 { + i = encodeVarintProtocol(dAtA, i, uint64(m.CRC32)) + i-- + dAtA[i] = 0x50 } - if m.Timestamp != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(m.Timestamp)) + if m.RedeliveryCount != 0 { + i = encodeVarintProtocol(dAtA, i, uint64(m.RedeliveryCount)) + i-- + dAtA[i] = 0x38 } if m.Redelivered { - dAtA[i] = 0x30 - i++ + i-- if m.Redelivered { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x30 } - if m.RedeliveryCount != 0 { - dAtA[i] = 0x38 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(m.RedeliveryCount)) + if m.Timestamp != 0 { + i = encodeVarintProtocol(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x28 } - if m.CRC32 != 0 { - dAtA[i] = 0x50 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(m.CRC32)) + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x22 } - return i, nil + if len(m.Reply) > 0 { + i -= len(m.Reply) + copy(dAtA[i:], m.Reply) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.Reply))) + i-- + dAtA[i] = 0x1a + } + if len(m.Subject) > 0 { + i -= len(m.Subject) + copy(dAtA[i:], m.Subject) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.Subject))) + i-- + dAtA[i] = 0x12 + } + if m.Sequence != 0 { + i = encodeVarintProtocol(dAtA, i, uint64(m.Sequence)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *Ack) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -430,28 +867,34 @@ func (m *Ack) Marshal() (dAtA []byte, err error) { } func (m *Ack) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Ack) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Subject) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.Subject))) - i += copy(dAtA[i:], m.Subject) - } if m.Sequence != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintProtocol(dAtA, i, uint64(m.Sequence)) + i-- + dAtA[i] = 0x10 } - return i, nil + if len(m.Subject) > 0 { + i -= len(m.Subject) + copy(dAtA[i:], m.Subject) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.Subject))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ConnectRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -459,50 +902,58 @@ func (m *ConnectRequest) Marshal() (dAtA []byte, err error) { } func (m *ConnectRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ConnectRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ClientID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.ClientID))) - i += copy(dAtA[i:], m.ClientID) - } - if len(m.HeartbeatInbox) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.HeartbeatInbox))) - i += copy(dAtA[i:], m.HeartbeatInbox) + if m.PingMaxOut != 0 { + i = encodeVarintProtocol(dAtA, i, uint64(m.PingMaxOut)) + i-- + dAtA[i] = 0x30 } - if m.Protocol != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(m.Protocol)) + if m.PingInterval != 0 { + i = encodeVarintProtocol(dAtA, i, uint64(m.PingInterval)) + i-- + dAtA[i] = 0x28 } if len(m.ConnID) > 0 { - dAtA[i] = 0x22 - i++ + i -= len(m.ConnID) + copy(dAtA[i:], m.ConnID) i = encodeVarintProtocol(dAtA, i, uint64(len(m.ConnID))) - i += copy(dAtA[i:], m.ConnID) + i-- + dAtA[i] = 0x22 } - if m.PingInterval != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(m.PingInterval)) + if m.Protocol != 0 { + i = encodeVarintProtocol(dAtA, i, uint64(m.Protocol)) + i-- + dAtA[i] = 0x18 } - if m.PingMaxOut != 0 { - dAtA[i] = 0x30 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(m.PingMaxOut)) + if len(m.HeartbeatInbox) > 0 { + i -= len(m.HeartbeatInbox) + copy(dAtA[i:], m.HeartbeatInbox) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.HeartbeatInbox))) + i-- + dAtA[i] = 0x12 + } + if len(m.ClientID) > 0 { + i -= len(m.ClientID) + copy(dAtA[i:], m.ClientID) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.ClientID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *ConnectResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -510,82 +961,95 @@ func (m *ConnectResponse) Marshal() (dAtA []byte, err error) { } func (m *ConnectResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ConnectResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.PubPrefix) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.PubPrefix))) - i += copy(dAtA[i:], m.PubPrefix) + if len(m.PublicKey) > 0 { + i -= len(m.PublicKey) + copy(dAtA[i:], m.PublicKey) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.PublicKey))) + i-- + dAtA[i] = 0x6 + i-- + dAtA[i] = 0xa2 } - if len(m.SubRequests) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.SubRequests))) - i += copy(dAtA[i:], m.SubRequests) + if m.Protocol != 0 { + i = encodeVarintProtocol(dAtA, i, uint64(m.Protocol)) + i-- + dAtA[i] = 0x50 } - if len(m.UnsubRequests) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.UnsubRequests))) - i += copy(dAtA[i:], m.UnsubRequests) + if m.PingMaxOut != 0 { + i = encodeVarintProtocol(dAtA, i, uint64(m.PingMaxOut)) + i-- + dAtA[i] = 0x48 } - if len(m.CloseRequests) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.CloseRequests))) - i += copy(dAtA[i:], m.CloseRequests) + if m.PingInterval != 0 { + i = encodeVarintProtocol(dAtA, i, uint64(m.PingInterval)) + i-- + dAtA[i] = 0x40 } - if len(m.Error) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.Error))) - i += copy(dAtA[i:], m.Error) + if len(m.PingRequests) > 0 { + i -= len(m.PingRequests) + copy(dAtA[i:], m.PingRequests) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.PingRequests))) + i-- + dAtA[i] = 0x3a } if len(m.SubCloseRequests) > 0 { - dAtA[i] = 0x32 - i++ + i -= len(m.SubCloseRequests) + copy(dAtA[i:], m.SubCloseRequests) i = encodeVarintProtocol(dAtA, i, uint64(len(m.SubCloseRequests))) - i += copy(dAtA[i:], m.SubCloseRequests) + i-- + dAtA[i] = 0x32 } - if len(m.PingRequests) > 0 { - dAtA[i] = 0x3a - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.PingRequests))) - i += copy(dAtA[i:], m.PingRequests) + if len(m.Error) > 0 { + i -= len(m.Error) + copy(dAtA[i:], m.Error) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.Error))) + i-- + dAtA[i] = 0x2a } - if m.PingInterval != 0 { - dAtA[i] = 0x40 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(m.PingInterval)) + if len(m.CloseRequests) > 0 { + i -= len(m.CloseRequests) + copy(dAtA[i:], m.CloseRequests) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.CloseRequests))) + i-- + dAtA[i] = 0x22 } - if m.PingMaxOut != 0 { - dAtA[i] = 0x48 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(m.PingMaxOut)) + if len(m.UnsubRequests) > 0 { + i -= len(m.UnsubRequests) + copy(dAtA[i:], m.UnsubRequests) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.UnsubRequests))) + i-- + dAtA[i] = 0x1a } - if m.Protocol != 0 { - dAtA[i] = 0x50 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(m.Protocol)) + if len(m.SubRequests) > 0 { + i -= len(m.SubRequests) + copy(dAtA[i:], m.SubRequests) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.SubRequests))) + i-- + dAtA[i] = 0x12 } - if len(m.PublicKey) > 0 { - dAtA[i] = 0xa2 - i++ - dAtA[i] = 0x6 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.PublicKey))) - i += copy(dAtA[i:], m.PublicKey) + if len(m.PubPrefix) > 0 { + i -= len(m.PubPrefix) + copy(dAtA[i:], m.PubPrefix) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.PubPrefix))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *Ping) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -593,23 +1057,29 @@ func (m *Ping) Marshal() (dAtA []byte, err error) { } func (m *Ping) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Ping) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.ConnID) > 0 { - dAtA[i] = 0xa - i++ + i -= len(m.ConnID) + copy(dAtA[i:], m.ConnID) i = encodeVarintProtocol(dAtA, i, uint64(len(m.ConnID))) - i += copy(dAtA[i:], m.ConnID) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *PingResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -617,23 +1087,29 @@ func (m *PingResponse) Marshal() (dAtA []byte, err error) { } func (m *PingResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Error) > 0 { - dAtA[i] = 0xa - i++ + i -= len(m.Error) + copy(dAtA[i:], m.Error) i = encodeVarintProtocol(dAtA, i, uint64(len(m.Error))) - i += copy(dAtA[i:], m.Error) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *SubscriptionRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -641,72 +1117,82 @@ func (m *SubscriptionRequest) Marshal() (dAtA []byte, err error) { } func (m *SubscriptionRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SubscriptionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ClientID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.ClientID))) - i += copy(dAtA[i:], m.ClientID) - } - if len(m.Subject) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.Subject))) - i += copy(dAtA[i:], m.Subject) + if m.StartTimeDelta != 0 { + i = encodeVarintProtocol(dAtA, i, uint64(m.StartTimeDelta)) + i-- + dAtA[i] = 0x60 } - if len(m.QGroup) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.QGroup))) - i += copy(dAtA[i:], m.QGroup) + if m.StartSequence != 0 { + i = encodeVarintProtocol(dAtA, i, uint64(m.StartSequence)) + i-- + dAtA[i] = 0x58 } - if len(m.Inbox) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.Inbox))) - i += copy(dAtA[i:], m.Inbox) + if m.StartPosition != 0 { + i = encodeVarintProtocol(dAtA, i, uint64(m.StartPosition)) + i-- + dAtA[i] = 0x50 } - if m.MaxInFlight != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(m.MaxInFlight)) + if len(m.DurableName) > 0 { + i -= len(m.DurableName) + copy(dAtA[i:], m.DurableName) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.DurableName))) + i-- + dAtA[i] = 0x3a } if m.AckWaitInSecs != 0 { - dAtA[i] = 0x30 - i++ i = encodeVarintProtocol(dAtA, i, uint64(m.AckWaitInSecs)) + i-- + dAtA[i] = 0x30 } - if len(m.DurableName) > 0 { - dAtA[i] = 0x3a - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.DurableName))) - i += copy(dAtA[i:], m.DurableName) + if m.MaxInFlight != 0 { + i = encodeVarintProtocol(dAtA, i, uint64(m.MaxInFlight)) + i-- + dAtA[i] = 0x28 } - if m.StartPosition != 0 { - dAtA[i] = 0x50 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(m.StartPosition)) + if len(m.Inbox) > 0 { + i -= len(m.Inbox) + copy(dAtA[i:], m.Inbox) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.Inbox))) + i-- + dAtA[i] = 0x22 } - if m.StartSequence != 0 { - dAtA[i] = 0x58 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(m.StartSequence)) + if len(m.QGroup) > 0 { + i -= len(m.QGroup) + copy(dAtA[i:], m.QGroup) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.QGroup))) + i-- + dAtA[i] = 0x1a } - if m.StartTimeDelta != 0 { - dAtA[i] = 0x60 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(m.StartTimeDelta)) + if len(m.Subject) > 0 { + i -= len(m.Subject) + copy(dAtA[i:], m.Subject) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.Subject))) + i-- + dAtA[i] = 0x12 + } + if len(m.ClientID) > 0 { + i -= len(m.ClientID) + copy(dAtA[i:], m.ClientID) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.ClientID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *SubscriptionResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -714,29 +1200,36 @@ func (m *SubscriptionResponse) Marshal() (dAtA []byte, err error) { } func (m *SubscriptionResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SubscriptionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.AckInbox) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.AckInbox))) - i += copy(dAtA[i:], m.AckInbox) - } if len(m.Error) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.Error) + copy(dAtA[i:], m.Error) i = encodeVarintProtocol(dAtA, i, uint64(len(m.Error))) - i += copy(dAtA[i:], m.Error) + i-- + dAtA[i] = 0x1a + } + if len(m.AckInbox) > 0 { + i -= len(m.AckInbox) + copy(dAtA[i:], m.AckInbox) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.AckInbox))) + i-- + dAtA[i] = 0x12 } - return i, nil + return len(dAtA) - i, nil } func (m *UnsubscribeRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -744,41 +1237,50 @@ func (m *UnsubscribeRequest) Marshal() (dAtA []byte, err error) { } func (m *UnsubscribeRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UnsubscribeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ClientID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.ClientID))) - i += copy(dAtA[i:], m.ClientID) - } - if len(m.Subject) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.Subject))) - i += copy(dAtA[i:], m.Subject) + if len(m.DurableName) > 0 { + i -= len(m.DurableName) + copy(dAtA[i:], m.DurableName) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.DurableName))) + i-- + dAtA[i] = 0x22 } if len(m.Inbox) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.Inbox) + copy(dAtA[i:], m.Inbox) i = encodeVarintProtocol(dAtA, i, uint64(len(m.Inbox))) - i += copy(dAtA[i:], m.Inbox) + i-- + dAtA[i] = 0x1a } - if len(m.DurableName) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintProtocol(dAtA, i, uint64(len(m.DurableName))) - i += copy(dAtA[i:], m.DurableName) + if len(m.Subject) > 0 { + i -= len(m.Subject) + copy(dAtA[i:], m.Subject) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.Subject))) + i-- + dAtA[i] = 0x12 + } + if len(m.ClientID) > 0 { + i -= len(m.ClientID) + copy(dAtA[i:], m.ClientID) + i = encodeVarintProtocol(dAtA, i, uint64(len(m.ClientID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *CloseRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -786,23 +1288,29 @@ func (m *CloseRequest) Marshal() (dAtA []byte, err error) { } func (m *CloseRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CloseRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.ClientID) > 0 { - dAtA[i] = 0xa - i++ + i -= len(m.ClientID) + copy(dAtA[i:], m.ClientID) i = encodeVarintProtocol(dAtA, i, uint64(len(m.ClientID))) - i += copy(dAtA[i:], m.ClientID) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *CloseResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -810,29 +1318,40 @@ func (m *CloseResponse) Marshal() (dAtA []byte, err error) { } func (m *CloseResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CloseResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Error) > 0 { - dAtA[i] = 0xa - i++ + i -= len(m.Error) + copy(dAtA[i:], m.Error) i = encodeVarintProtocol(dAtA, i, uint64(len(m.Error))) - i += copy(dAtA[i:], m.Error) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintProtocol(dAtA []byte, offset int, v uint64) int { + offset -= sovProtocol(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *PubMsg) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.ClientID) @@ -867,6 +1386,9 @@ func (m *PubMsg) Size() (n int) { } func (m *PubAck) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Guid) @@ -881,6 +1403,9 @@ func (m *PubAck) Size() (n int) { } func (m *MsgProto) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Sequence != 0 { @@ -914,6 +1439,9 @@ func (m *MsgProto) Size() (n int) { } func (m *Ack) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Subject) @@ -927,6 +1455,9 @@ func (m *Ack) Size() (n int) { } func (m *ConnectRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.ClientID) @@ -954,6 +1485,9 @@ func (m *ConnectRequest) Size() (n int) { } func (m *ConnectResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.PubPrefix) @@ -1001,6 +1535,9 @@ func (m *ConnectResponse) Size() (n int) { } func (m *Ping) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.ConnID) @@ -1011,6 +1548,9 @@ func (m *Ping) Size() (n int) { } func (m *PingResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Error) @@ -1021,6 +1561,9 @@ func (m *PingResponse) Size() (n int) { } func (m *SubscriptionRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.ClientID) @@ -1062,6 +1605,9 @@ func (m *SubscriptionRequest) Size() (n int) { } func (m *SubscriptionResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.AckInbox) @@ -1076,6 +1622,9 @@ func (m *SubscriptionResponse) Size() (n int) { } func (m *UnsubscribeRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.ClientID) @@ -1098,6 +1647,9 @@ func (m *UnsubscribeRequest) Size() (n int) { } func (m *CloseRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.ClientID) @@ -1108,6 +1660,9 @@ func (m *CloseRequest) Size() (n int) { } func (m *CloseResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Error) @@ -1118,14 +1673,7 @@ func (m *CloseResponse) Size() (n int) { } func sovProtocol(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozProtocol(x uint64) (n int) { return sovProtocol(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -1145,7 +1693,7 @@ func (m *PubMsg) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1173,7 +1721,7 @@ func (m *PubMsg) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1183,6 +1731,9 @@ func (m *PubMsg) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1202,7 +1753,7 @@ func (m *PubMsg) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1212,6 +1763,9 @@ func (m *PubMsg) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1231,7 +1785,7 @@ func (m *PubMsg) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1241,6 +1795,9 @@ func (m *PubMsg) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1260,7 +1817,7 @@ func (m *PubMsg) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1270,6 +1827,9 @@ func (m *PubMsg) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1289,7 +1849,7 @@ func (m *PubMsg) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1298,6 +1858,9 @@ func (m *PubMsg) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1320,7 +1883,7 @@ func (m *PubMsg) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1329,6 +1892,9 @@ func (m *PubMsg) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1351,7 +1917,7 @@ func (m *PubMsg) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1360,6 +1926,9 @@ func (m *PubMsg) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1374,10 +1943,10 @@ func (m *PubMsg) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthProtocol } - if (iNdEx+skippy) > l || (iNdEx+skippy) < 0 { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy @@ -1404,7 +1973,7 @@ func (m *PubAck) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1432,7 +2001,7 @@ func (m *PubAck) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1442,6 +2011,9 @@ func (m *PubAck) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1461,7 +2033,7 @@ func (m *PubAck) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1471,6 +2043,9 @@ func (m *PubAck) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1482,10 +2057,10 @@ func (m *PubAck) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthProtocol } - if (iNdEx+skippy) > l || (iNdEx+skippy) < 0 { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy @@ -1512,7 +2087,7 @@ func (m *MsgProto) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1540,7 +2115,7 @@ func (m *MsgProto) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Sequence |= (uint64(b) & 0x7F) << shift + m.Sequence |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1559,7 +2134,7 @@ func (m *MsgProto) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1569,6 +2144,9 @@ func (m *MsgProto) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1588,7 +2166,7 @@ func (m *MsgProto) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1598,6 +2176,9 @@ func (m *MsgProto) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1617,7 +2198,7 @@ func (m *MsgProto) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1626,6 +2207,9 @@ func (m *MsgProto) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1648,7 +2232,7 @@ func (m *MsgProto) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Timestamp |= (int64(b) & 0x7F) << shift + m.Timestamp |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -1667,7 +2251,7 @@ func (m *MsgProto) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1687,7 +2271,7 @@ func (m *MsgProto) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.RedeliveryCount |= (uint32(b) & 0x7F) << shift + m.RedeliveryCount |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -1706,7 +2290,7 @@ func (m *MsgProto) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CRC32 |= (uint32(b) & 0x7F) << shift + m.CRC32 |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -1717,10 +2301,10 @@ func (m *MsgProto) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthProtocol } - if (iNdEx+skippy) > l || (iNdEx+skippy) < 0 { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy @@ -1747,7 +2331,7 @@ func (m *Ack) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1775,7 +2359,7 @@ func (m *Ack) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1785,6 +2369,9 @@ func (m *Ack) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1804,7 +2391,7 @@ func (m *Ack) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Sequence |= (uint64(b) & 0x7F) << shift + m.Sequence |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1815,10 +2402,10 @@ func (m *Ack) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthProtocol } - if (iNdEx+skippy) > l || (iNdEx+skippy) < 0 { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy @@ -1845,7 +2432,7 @@ func (m *ConnectRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1873,7 +2460,7 @@ func (m *ConnectRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1883,6 +2470,9 @@ func (m *ConnectRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1902,7 +2492,7 @@ func (m *ConnectRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1912,6 +2502,9 @@ func (m *ConnectRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1931,7 +2524,7 @@ func (m *ConnectRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Protocol |= (int32(b) & 0x7F) << shift + m.Protocol |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -1950,7 +2543,7 @@ func (m *ConnectRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1959,6 +2552,9 @@ func (m *ConnectRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1981,7 +2577,7 @@ func (m *ConnectRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.PingInterval |= (int32(b) & 0x7F) << shift + m.PingInterval |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -2000,7 +2596,7 @@ func (m *ConnectRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.PingMaxOut |= (int32(b) & 0x7F) << shift + m.PingMaxOut |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -2011,10 +2607,10 @@ func (m *ConnectRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthProtocol } - if (iNdEx+skippy) > l || (iNdEx+skippy) < 0 { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy @@ -2041,7 +2637,7 @@ func (m *ConnectResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2069,7 +2665,7 @@ func (m *ConnectResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2079,6 +2675,9 @@ func (m *ConnectResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2098,7 +2697,7 @@ func (m *ConnectResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2108,6 +2707,9 @@ func (m *ConnectResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2127,7 +2729,7 @@ func (m *ConnectResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2137,6 +2739,9 @@ func (m *ConnectResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2156,7 +2761,7 @@ func (m *ConnectResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2166,6 +2771,9 @@ func (m *ConnectResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2185,7 +2793,7 @@ func (m *ConnectResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2195,6 +2803,9 @@ func (m *ConnectResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2214,7 +2825,7 @@ func (m *ConnectResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2224,6 +2835,9 @@ func (m *ConnectResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2243,7 +2857,7 @@ func (m *ConnectResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2253,6 +2867,9 @@ func (m *ConnectResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2272,7 +2889,7 @@ func (m *ConnectResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.PingInterval |= (int32(b) & 0x7F) << shift + m.PingInterval |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -2291,7 +2908,7 @@ func (m *ConnectResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.PingMaxOut |= (int32(b) & 0x7F) << shift + m.PingMaxOut |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -2310,7 +2927,7 @@ func (m *ConnectResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Protocol |= (int32(b) & 0x7F) << shift + m.Protocol |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -2329,7 +2946,7 @@ func (m *ConnectResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2339,6 +2956,9 @@ func (m *ConnectResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2350,10 +2970,10 @@ func (m *ConnectResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthProtocol } - if (iNdEx+skippy) > l || (iNdEx+skippy) < 0 { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy @@ -2380,7 +3000,7 @@ func (m *Ping) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2408,7 +3028,7 @@ func (m *Ping) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2417,6 +3037,9 @@ func (m *Ping) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2431,10 +3054,10 @@ func (m *Ping) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthProtocol } - if (iNdEx+skippy) > l || (iNdEx+skippy) < 0 { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy @@ -2461,7 +3084,7 @@ func (m *PingResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2489,7 +3112,7 @@ func (m *PingResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2499,6 +3122,9 @@ func (m *PingResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2510,10 +3136,10 @@ func (m *PingResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthProtocol } - if (iNdEx+skippy) > l || (iNdEx+skippy) < 0 { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy @@ -2540,7 +3166,7 @@ func (m *SubscriptionRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2568,7 +3194,7 @@ func (m *SubscriptionRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2578,6 +3204,9 @@ func (m *SubscriptionRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2597,7 +3226,7 @@ func (m *SubscriptionRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2607,6 +3236,9 @@ func (m *SubscriptionRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2626,7 +3258,7 @@ func (m *SubscriptionRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2636,6 +3268,9 @@ func (m *SubscriptionRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2655,7 +3290,7 @@ func (m *SubscriptionRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2665,6 +3300,9 @@ func (m *SubscriptionRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2684,7 +3322,7 @@ func (m *SubscriptionRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.MaxInFlight |= (int32(b) & 0x7F) << shift + m.MaxInFlight |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -2703,7 +3341,7 @@ func (m *SubscriptionRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.AckWaitInSecs |= (int32(b) & 0x7F) << shift + m.AckWaitInSecs |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -2722,7 +3360,7 @@ func (m *SubscriptionRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2732,6 +3370,9 @@ func (m *SubscriptionRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2751,7 +3392,7 @@ func (m *SubscriptionRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.StartPosition |= (StartPosition(b) & 0x7F) << shift + m.StartPosition |= StartPosition(b&0x7F) << shift if b < 0x80 { break } @@ -2770,7 +3411,7 @@ func (m *SubscriptionRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.StartSequence |= (uint64(b) & 0x7F) << shift + m.StartSequence |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2789,7 +3430,7 @@ func (m *SubscriptionRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.StartTimeDelta |= (int64(b) & 0x7F) << shift + m.StartTimeDelta |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -2800,10 +3441,10 @@ func (m *SubscriptionRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthProtocol } - if (iNdEx+skippy) > l || (iNdEx+skippy) < 0 { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy @@ -2830,7 +3471,7 @@ func (m *SubscriptionResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2858,7 +3499,7 @@ func (m *SubscriptionResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2868,6 +3509,9 @@ func (m *SubscriptionResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2887,7 +3531,7 @@ func (m *SubscriptionResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2897,6 +3541,9 @@ func (m *SubscriptionResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2908,10 +3555,10 @@ func (m *SubscriptionResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthProtocol } - if (iNdEx+skippy) > l || (iNdEx+skippy) < 0 { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy @@ -2938,7 +3585,7 @@ func (m *UnsubscribeRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2966,7 +3613,7 @@ func (m *UnsubscribeRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2976,6 +3623,9 @@ func (m *UnsubscribeRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2995,7 +3645,7 @@ func (m *UnsubscribeRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3005,6 +3655,9 @@ func (m *UnsubscribeRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3024,7 +3677,7 @@ func (m *UnsubscribeRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3034,6 +3687,9 @@ func (m *UnsubscribeRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3053,7 +3709,7 @@ func (m *UnsubscribeRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3063,6 +3719,9 @@ func (m *UnsubscribeRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3074,10 +3733,10 @@ func (m *UnsubscribeRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthProtocol } - if (iNdEx+skippy) > l || (iNdEx+skippy) < 0 { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy @@ -3104,7 +3763,7 @@ func (m *CloseRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3132,7 +3791,7 @@ func (m *CloseRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3142,6 +3801,9 @@ func (m *CloseRequest) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3153,10 +3815,10 @@ func (m *CloseRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthProtocol } - if (iNdEx+skippy) > l || (iNdEx+skippy) < 0 { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy @@ -3183,7 +3845,7 @@ func (m *CloseResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3211,7 +3873,7 @@ func (m *CloseResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3221,6 +3883,9 @@ func (m *CloseResponse) Unmarshal(dAtA []byte) error { return ErrInvalidLengthProtocol } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtocol + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3232,10 +3897,10 @@ func (m *CloseResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthProtocol } - if (iNdEx+skippy) > l || (iNdEx+skippy) < 0 { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy @@ -3250,6 +3915,7 @@ func (m *CloseResponse) Unmarshal(dAtA []byte) error { func skipProtocol(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 { @@ -3281,10 +3947,8 @@ func skipProtocol(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -3301,115 +3965,34 @@ func skipProtocol(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthProtocol } - return iNdEx, nil + iNdEx += length case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProtocol - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipProtocol(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, io.ErrUnexpectedEOF - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupProtocol + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthProtocol + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthProtocol = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowProtocol = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthProtocol = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProtocol = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupProtocol = fmt.Errorf("proto: unexpected end of group") ) - -func init() { proto.RegisterFile("protocol.proto", fileDescriptorProtocol) } - -var fileDescriptorProtocol = []byte{ - // 840 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xd1, 0x6e, 0xe3, 0x44, - 0x14, 0x86, 0x3b, 0x89, 0x9d, 0xa6, 0xa7, 0x49, 0x36, 0x3b, 0x54, 0x2b, 0xab, 0x42, 0x51, 0x65, - 0x2d, 0xa8, 0xaa, 0x44, 0x57, 0xea, 0x0a, 0xb8, 0xe0, 0x0a, 0x52, 0x2d, 0x44, 0xd0, 0xdd, 0xc8, - 0x05, 0x71, 0xcb, 0xd8, 0x99, 0x75, 0x87, 0x3a, 0x33, 0x5e, 0xcf, 0xb8, 0xb4, 0x97, 0xf0, 0x04, - 0x3c, 0x08, 0x0f, 0xb2, 0x17, 0x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