diff --git a/go.mod b/go.mod index 105772c..1fdd067 100644 --- a/go.mod +++ b/go.mod @@ -3,11 +3,11 @@ module github.com/lbryio/hub go 1.16 require ( + github.com/btcsuite/btcutil v1.0.2 github.com/golang/protobuf v1.5.2 // indirect github.com/olivere/elastic/v7 v7.0.24 golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 // indirect golang.org/x/sys v0.0.0-20210317225723-c4fcb01b228e // indirect google.golang.org/grpc v1.36.0 - google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 // indirect google.golang.org/protobuf v1.26.0 ) diff --git a/go.sum b/go.sum index 07c2717..b99b06c 100644 --- a/go.sum +++ b/go.sum @@ -1,10 +1,22 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/aws/aws-sdk-go v1.38.3/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= +github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= +github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts= +github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= +github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= +github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= +github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= +github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -13,6 +25,7 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -28,8 +41,6 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1 h1:jAbXjIeW2ZSW2AwFxlGTDoc2CjI2XujLkV3ArsZFCvc= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -41,14 +52,21 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= +github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/olivere/elastic/v7 v7.0.24 h1:9ZcCQP3Pvgese7TaypYiVAL49sCEphyIwkVxtRf8jb8= github.com/olivere/elastic/v7 v7.0.24/go.mod h1:OuWmD2DiuYhddWegBKPWQuelVKBLrW0fa/VUYgxuGTY= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -62,7 +80,9 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -70,6 +90,7 @@ golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvx golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -81,6 +102,7 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -111,8 +133,6 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.36.0 h1:o1bcQ6imQMIOpdrO3SWf2z5RV72WbDwdXuK0MDlc8As= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 h1:M1YKkFIboKNieVO5DLUEVzQfGwJD30Nv2jfUgzb5UcE= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= 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= @@ -126,6 +146,9 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/main.go b/main.go index 5159651..c371503 100644 --- a/main.go +++ b/main.go @@ -2,11 +2,11 @@ package main import ( "context" + "flag" "fmt" "log" "net" "os" - "strings" "time" pb "github.com/lbryio/hub/protobuf/go" @@ -19,6 +19,32 @@ const ( port = ":50051" ) +func parseArgs(searchRequest *pb.SearchRequest) { + query:= flag.String("query", "", "query string") + claimType := flag.String("claimType", "", "claim type") + id := flag.String("id", "", "_id") + author := flag.String("author", "", "author") + title := flag.String("title", "", "title") + + flag.Parse() + + if *query != "" { + searchRequest.Query = *query + } + if *claimType != "" { + searchRequest.ClaimType = []string{*claimType} + } + if *id != "" { + searchRequest.XId = [][]byte{[]byte(*id)} + } + if *author != "" { + searchRequest.Author = []string{*author} + } + if *title != "" { + searchRequest.Title = []string{*title} + } +} + func main() { if len(os.Args) == 2 && os.Args[1] == "serve" { l, err := net.Listen("tcp", port) @@ -44,6 +70,7 @@ func main() { c := pb.NewHubClient(conn) + /* var query string if len(os.Args) > 1 { query = strings.Join(os.Args[1:], " ") @@ -51,13 +78,15 @@ func main() { log.Printf("error: no search query provided\n") os.Exit(1) } + */ ctx, cancel := context.WithTimeout(context.Background(), time.Second) defer cancel() - //searchRequest := &pb.SearchRequest{Query: query} - //searchRequest := &pb.SearchRequest{XId: [][]byte{[]byte(query)}} - searchRequest := &pb.SearchRequest{ClaimType: []string{query}} + searchRequest := &pb.SearchRequest{} + + parseArgs(searchRequest) + r, err := c.Search(ctx, searchRequest) if err != nil { log.Fatal(err) diff --git a/protobuf/definitions/hub.proto b/protobuf/definitions/hub.proto index b777bf5..8ffbcc4 100644 --- a/protobuf/definitions/hub.proto +++ b/protobuf/definitions/hub.proto @@ -8,6 +8,18 @@ service Hub { rpc Search (SearchRequest) returns (SearchReply) {} } +message RangeQuery { + enum Op { + EQ = 0; + LTE = 1; + GTE = 2; + LT = 3; + GT = 4; + } + Op op = 1; + repeated string value = 2; +} + message SearchRequest { string query = 1; string name = 2; @@ -17,52 +29,52 @@ message SearchRequest { int32 offset = 6; bool is_controlling = 7; string last_take_over_height = 20; - string claim_id = 21; - string claim_name = 22; - string normalized = 23; - string tx_position = 24; - string amount = 25; - string timestamp = 26; - string creation_timestamp = 27; - string height = 28; - string creation_height = 29; - string activation_height = 30; - string expiration_height = 31; - string release_time = 32; - string short_url = 33; - string canonical_url = 34; - string title = 35; - string author = 36; - string description = 37; + repeated string claim_id = 21; + repeated string claim_name = 22; + repeated string normalized = 23; + RangeQuery tx_position = 24; + RangeQuery amount = 25; + RangeQuery timestamp = 26; + RangeQuery creation_timestamp = 27; + RangeQuery height = 28; + RangeQuery creation_height = 29; + RangeQuery activation_height = 30; + RangeQuery expiration_height = 31; + RangeQuery release_time = 32; + repeated string short_url = 33; + repeated string canonical_url = 34; + repeated string title = 35; + repeated string author = 36; + repeated string description = 37; repeated string claim_type = 38; - string reposted = 39; - string stream_type = 40; - string media_type = 41; - string fee_amount = 42; - string fee_currency = 43; - string duration = 44; + RangeQuery reposted = 39; + repeated string stream_type = 40; + repeated string media_type = 41; + RangeQuery fee_amount = 42; + repeated string fee_currency = 43; + RangeQuery duration = 44; string reposted_claim_hash = 45; - string censor_type = 46; + RangeQuery censor_type = 46; string claims_in_channel = 47; - string channel_join = 48; + RangeQuery channel_join = 48; string signature_valid = 49; - string effective_amount = 50; - string support_amount = 51; - string trending_group = 52; - string trending_mixed = 53; - string trending_local = 54; - string trending_global = 55; - string channel_id = 56; - string tx_id = 57; + RangeQuery effective_amount = 50; + RangeQuery support_amount = 51; + RangeQuery trending_group = 52; + RangeQuery trending_mixed = 53; + RangeQuery trending_local = 54; + RangeQuery trending_global = 55; + repeated string channel_id = 56; + repeated string tx_id = 57; string tx_nout = 58; - string signature = 59; - string signature_digest = 60; - string public_key_bytes = 61; - string public_key_hash = 62; + repeated string signature = 59; + repeated string signature_digest = 60; + repeated string public_key_bytes = 61; + repeated string public_key_hash = 62; string public_key_id = 63; repeated bytes _id = 64; - string tags = 65; - string reposted_claim_id = 66; + repeated string tags = 65; + repeated string reposted_claim_id = 66; } message SearchReply { diff --git a/protobuf/go/hub.pb.go b/protobuf/go/hub.pb.go index bbb5c64..1bd29b6 100644 --- a/protobuf/go/hub.pb.go +++ b/protobuf/go/hub.pb.go @@ -20,6 +20,61 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type RangeQuery_Op int32 + +const ( + RangeQuery_EQ RangeQuery_Op = 0 + RangeQuery_LTE RangeQuery_Op = 1 + RangeQuery_GTE RangeQuery_Op = 2 + RangeQuery_LT RangeQuery_Op = 3 + RangeQuery_GT RangeQuery_Op = 4 +) + +// Enum value maps for RangeQuery_Op. +var ( + RangeQuery_Op_name = map[int32]string{ + 0: "EQ", + 1: "LTE", + 2: "GTE", + 3: "LT", + 4: "GT", + } + RangeQuery_Op_value = map[string]int32{ + "EQ": 0, + "LTE": 1, + "GTE": 2, + "LT": 3, + "GT": 4, + } +) + +func (x RangeQuery_Op) Enum() *RangeQuery_Op { + p := new(RangeQuery_Op) + *p = x + return p +} + +func (x RangeQuery_Op) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RangeQuery_Op) Descriptor() protoreflect.EnumDescriptor { + return file_hub_proto_enumTypes[0].Descriptor() +} + +func (RangeQuery_Op) Type() protoreflect.EnumType { + return &file_hub_proto_enumTypes[0] +} + +func (x RangeQuery_Op) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RangeQuery_Op.Descriptor instead. +func (RangeQuery_Op) EnumDescriptor() ([]byte, []int) { + return file_hub_proto_rawDescGZIP(), []int{0, 0} +} + type Error_Code int32 const ( @@ -56,11 +111,11 @@ func (x Error_Code) String() string { } func (Error_Code) Descriptor() protoreflect.EnumDescriptor { - return file_hub_proto_enumTypes[0].Descriptor() + return file_hub_proto_enumTypes[1].Descriptor() } func (Error_Code) Type() protoreflect.EnumType { - return &file_hub_proto_enumTypes[0] + return &file_hub_proto_enumTypes[1] } func (x Error_Code) Number() protoreflect.EnumNumber { @@ -69,7 +124,62 @@ func (x Error_Code) Number() protoreflect.EnumNumber { // Deprecated: Use Error_Code.Descriptor instead. func (Error_Code) EnumDescriptor() ([]byte, []int) { - return file_hub_proto_rawDescGZIP(), []int{4, 0} + return file_hub_proto_rawDescGZIP(), []int{5, 0} +} + +type RangeQuery struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Op RangeQuery_Op `protobuf:"varint,1,opt,name=op,proto3,enum=pb.RangeQuery_Op" json:"op"` + Value []string `protobuf:"bytes,2,rep,name=value,proto3" json:"value"` +} + +func (x *RangeQuery) Reset() { + *x = RangeQuery{} + if protoimpl.UnsafeEnabled { + mi := &file_hub_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RangeQuery) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RangeQuery) ProtoMessage() {} + +func (x *RangeQuery) ProtoReflect() protoreflect.Message { + mi := &file_hub_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RangeQuery.ProtoReflect.Descriptor instead. +func (*RangeQuery) Descriptor() ([]byte, []int) { + return file_hub_proto_rawDescGZIP(), []int{0} +} + +func (x *RangeQuery) GetOp() RangeQuery_Op { + if x != nil { + return x.Op + } + return RangeQuery_EQ +} + +func (x *RangeQuery) GetValue() []string { + if x != nil { + return x.Value + } + return nil } type SearchRequest struct { @@ -77,66 +187,66 @@ type SearchRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` - AmountOrder int32 `protobuf:"varint,3,opt,name=amount_order,json=amountOrder,proto3" json:"amount_order"` - Limit int32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit"` - OrderBy string `protobuf:"bytes,5,opt,name=order_by,json=orderBy,proto3" json:"order_by"` - Offset int32 `protobuf:"varint,6,opt,name=offset,proto3" json:"offset"` - IsControlling bool `protobuf:"varint,7,opt,name=is_controlling,json=isControlling,proto3" json:"is_controlling"` - LastTakeOverHeight string `protobuf:"bytes,20,opt,name=last_take_over_height,json=lastTakeOverHeight,proto3" json:"last_take_over_height"` - ClaimId string `protobuf:"bytes,21,opt,name=claim_id,json=claimId,proto3" json:"claim_id"` - ClaimName string `protobuf:"bytes,22,opt,name=claim_name,json=claimName,proto3" json:"claim_name"` - Normalized string `protobuf:"bytes,23,opt,name=normalized,proto3" json:"normalized"` - TxPosition string `protobuf:"bytes,24,opt,name=tx_position,json=txPosition,proto3" json:"tx_position"` - Amount string `protobuf:"bytes,25,opt,name=amount,proto3" json:"amount"` - Timestamp string `protobuf:"bytes,26,opt,name=timestamp,proto3" json:"timestamp"` - CreationTimestamp string `protobuf:"bytes,27,opt,name=creation_timestamp,json=creationTimestamp,proto3" json:"creation_timestamp"` - Height string `protobuf:"bytes,28,opt,name=height,proto3" json:"height"` - CreationHeight string `protobuf:"bytes,29,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height"` - ActivationHeight string `protobuf:"bytes,30,opt,name=activation_height,json=activationHeight,proto3" json:"activation_height"` - ExpirationHeight string `protobuf:"bytes,31,opt,name=expiration_height,json=expirationHeight,proto3" json:"expiration_height"` - ReleaseTime string `protobuf:"bytes,32,opt,name=release_time,json=releaseTime,proto3" json:"release_time"` - ShortUrl string `protobuf:"bytes,33,opt,name=short_url,json=shortUrl,proto3" json:"short_url"` - CanonicalUrl string `protobuf:"bytes,34,opt,name=canonical_url,json=canonicalUrl,proto3" json:"canonical_url"` - Title string `protobuf:"bytes,35,opt,name=title,proto3" json:"title"` - Author string `protobuf:"bytes,36,opt,name=author,proto3" json:"author"` - Description string `protobuf:"bytes,37,opt,name=description,proto3" json:"description"` - ClaimType []string `protobuf:"bytes,38,rep,name=claim_type,json=claimType,proto3" json:"claim_type"` - Reposted string `protobuf:"bytes,39,opt,name=reposted,proto3" json:"reposted"` - StreamType string `protobuf:"bytes,40,opt,name=stream_type,json=streamType,proto3" json:"stream_type"` - MediaType string `protobuf:"bytes,41,opt,name=media_type,json=mediaType,proto3" json:"media_type"` - FeeAmount string `protobuf:"bytes,42,opt,name=fee_amount,json=feeAmount,proto3" json:"fee_amount"` - FeeCurrency string `protobuf:"bytes,43,opt,name=fee_currency,json=feeCurrency,proto3" json:"fee_currency"` - Duration string `protobuf:"bytes,44,opt,name=duration,proto3" json:"duration"` - RepostedClaimHash string `protobuf:"bytes,45,opt,name=reposted_claim_hash,json=repostedClaimHash,proto3" json:"reposted_claim_hash"` - CensorType string `protobuf:"bytes,46,opt,name=censor_type,json=censorType,proto3" json:"censor_type"` - ClaimsInChannel string `protobuf:"bytes,47,opt,name=claims_in_channel,json=claimsInChannel,proto3" json:"claims_in_channel"` - ChannelJoin string `protobuf:"bytes,48,opt,name=channel_join,json=channelJoin,proto3" json:"channel_join"` - SignatureValid string `protobuf:"bytes,49,opt,name=signature_valid,json=signatureValid,proto3" json:"signature_valid"` - EffectiveAmount string `protobuf:"bytes,50,opt,name=effective_amount,json=effectiveAmount,proto3" json:"effective_amount"` - SupportAmount string `protobuf:"bytes,51,opt,name=support_amount,json=supportAmount,proto3" json:"support_amount"` - TrendingGroup string `protobuf:"bytes,52,opt,name=trending_group,json=trendingGroup,proto3" json:"trending_group"` - TrendingMixed string `protobuf:"bytes,53,opt,name=trending_mixed,json=trendingMixed,proto3" json:"trending_mixed"` - TrendingLocal string `protobuf:"bytes,54,opt,name=trending_local,json=trendingLocal,proto3" json:"trending_local"` - TrendingGlobal string `protobuf:"bytes,55,opt,name=trending_global,json=trendingGlobal,proto3" json:"trending_global"` - ChannelId string `protobuf:"bytes,56,opt,name=channel_id,json=channelId,proto3" json:"channel_id"` - TxId string `protobuf:"bytes,57,opt,name=tx_id,json=txId,proto3" json:"tx_id"` - TxNout string `protobuf:"bytes,58,opt,name=tx_nout,json=txNout,proto3" json:"tx_nout"` - Signature string `protobuf:"bytes,59,opt,name=signature,proto3" json:"signature"` - SignatureDigest string `protobuf:"bytes,60,opt,name=signature_digest,json=signatureDigest,proto3" json:"signature_digest"` - PublicKeyBytes string `protobuf:"bytes,61,opt,name=public_key_bytes,json=publicKeyBytes,proto3" json:"public_key_bytes"` - PublicKeyHash string `protobuf:"bytes,62,opt,name=public_key_hash,json=publicKeyHash,proto3" json:"public_key_hash"` - PublicKeyId string `protobuf:"bytes,63,opt,name=public_key_id,json=publicKeyId,proto3" json:"public_key_id"` - XId [][]byte `protobuf:"bytes,64,rep,name=_id,json=Id,proto3" json:"_id"` - Tags string `protobuf:"bytes,65,opt,name=tags,proto3" json:"tags"` - RepostedClaimId string `protobuf:"bytes,66,opt,name=reposted_claim_id,json=repostedClaimId,proto3" json:"reposted_claim_id"` + Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` + AmountOrder int32 `protobuf:"varint,3,opt,name=amount_order,json=amountOrder,proto3" json:"amount_order"` + Limit int32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit"` + OrderBy string `protobuf:"bytes,5,opt,name=order_by,json=orderBy,proto3" json:"order_by"` + Offset int32 `protobuf:"varint,6,opt,name=offset,proto3" json:"offset"` + IsControlling bool `protobuf:"varint,7,opt,name=is_controlling,json=isControlling,proto3" json:"is_controlling"` + LastTakeOverHeight string `protobuf:"bytes,20,opt,name=last_take_over_height,json=lastTakeOverHeight,proto3" json:"last_take_over_height"` + ClaimId []string `protobuf:"bytes,21,rep,name=claim_id,json=claimId,proto3" json:"claim_id"` + ClaimName []string `protobuf:"bytes,22,rep,name=claim_name,json=claimName,proto3" json:"claim_name"` + Normalized []string `protobuf:"bytes,23,rep,name=normalized,proto3" json:"normalized"` + TxPosition *RangeQuery `protobuf:"bytes,24,opt,name=tx_position,json=txPosition,proto3" json:"tx_position"` + Amount *RangeQuery `protobuf:"bytes,25,opt,name=amount,proto3" json:"amount"` + Timestamp *RangeQuery `protobuf:"bytes,26,opt,name=timestamp,proto3" json:"timestamp"` + CreationTimestamp *RangeQuery `protobuf:"bytes,27,opt,name=creation_timestamp,json=creationTimestamp,proto3" json:"creation_timestamp"` + Height *RangeQuery `protobuf:"bytes,28,opt,name=height,proto3" json:"height"` + CreationHeight *RangeQuery `protobuf:"bytes,29,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height"` + ActivationHeight *RangeQuery `protobuf:"bytes,30,opt,name=activation_height,json=activationHeight,proto3" json:"activation_height"` + ExpirationHeight *RangeQuery `protobuf:"bytes,31,opt,name=expiration_height,json=expirationHeight,proto3" json:"expiration_height"` + ReleaseTime *RangeQuery `protobuf:"bytes,32,opt,name=release_time,json=releaseTime,proto3" json:"release_time"` + ShortUrl []string `protobuf:"bytes,33,rep,name=short_url,json=shortUrl,proto3" json:"short_url"` + CanonicalUrl []string `protobuf:"bytes,34,rep,name=canonical_url,json=canonicalUrl,proto3" json:"canonical_url"` + Title []string `protobuf:"bytes,35,rep,name=title,proto3" json:"title"` + Author []string `protobuf:"bytes,36,rep,name=author,proto3" json:"author"` + Description []string `protobuf:"bytes,37,rep,name=description,proto3" json:"description"` + ClaimType []string `protobuf:"bytes,38,rep,name=claim_type,json=claimType,proto3" json:"claim_type"` + Reposted *RangeQuery `protobuf:"bytes,39,opt,name=reposted,proto3" json:"reposted"` + StreamType []string `protobuf:"bytes,40,rep,name=stream_type,json=streamType,proto3" json:"stream_type"` + MediaType []string `protobuf:"bytes,41,rep,name=media_type,json=mediaType,proto3" json:"media_type"` + FeeAmount *RangeQuery `protobuf:"bytes,42,opt,name=fee_amount,json=feeAmount,proto3" json:"fee_amount"` + FeeCurrency []string `protobuf:"bytes,43,rep,name=fee_currency,json=feeCurrency,proto3" json:"fee_currency"` + Duration *RangeQuery `protobuf:"bytes,44,opt,name=duration,proto3" json:"duration"` + RepostedClaimHash string `protobuf:"bytes,45,opt,name=reposted_claim_hash,json=repostedClaimHash,proto3" json:"reposted_claim_hash"` + CensorType *RangeQuery `protobuf:"bytes,46,opt,name=censor_type,json=censorType,proto3" json:"censor_type"` + ClaimsInChannel string `protobuf:"bytes,47,opt,name=claims_in_channel,json=claimsInChannel,proto3" json:"claims_in_channel"` + ChannelJoin *RangeQuery `protobuf:"bytes,48,opt,name=channel_join,json=channelJoin,proto3" json:"channel_join"` + SignatureValid string `protobuf:"bytes,49,opt,name=signature_valid,json=signatureValid,proto3" json:"signature_valid"` + EffectiveAmount *RangeQuery `protobuf:"bytes,50,opt,name=effective_amount,json=effectiveAmount,proto3" json:"effective_amount"` + SupportAmount *RangeQuery `protobuf:"bytes,51,opt,name=support_amount,json=supportAmount,proto3" json:"support_amount"` + TrendingGroup *RangeQuery `protobuf:"bytes,52,opt,name=trending_group,json=trendingGroup,proto3" json:"trending_group"` + TrendingMixed *RangeQuery `protobuf:"bytes,53,opt,name=trending_mixed,json=trendingMixed,proto3" json:"trending_mixed"` + TrendingLocal *RangeQuery `protobuf:"bytes,54,opt,name=trending_local,json=trendingLocal,proto3" json:"trending_local"` + TrendingGlobal *RangeQuery `protobuf:"bytes,55,opt,name=trending_global,json=trendingGlobal,proto3" json:"trending_global"` + ChannelId []string `protobuf:"bytes,56,rep,name=channel_id,json=channelId,proto3" json:"channel_id"` + TxId []string `protobuf:"bytes,57,rep,name=tx_id,json=txId,proto3" json:"tx_id"` + TxNout string `protobuf:"bytes,58,opt,name=tx_nout,json=txNout,proto3" json:"tx_nout"` + Signature []string `protobuf:"bytes,59,rep,name=signature,proto3" json:"signature"` + SignatureDigest []string `protobuf:"bytes,60,rep,name=signature_digest,json=signatureDigest,proto3" json:"signature_digest"` + PublicKeyBytes []string `protobuf:"bytes,61,rep,name=public_key_bytes,json=publicKeyBytes,proto3" json:"public_key_bytes"` + PublicKeyHash []string `protobuf:"bytes,62,rep,name=public_key_hash,json=publicKeyHash,proto3" json:"public_key_hash"` + PublicKeyId string `protobuf:"bytes,63,opt,name=public_key_id,json=publicKeyId,proto3" json:"public_key_id"` + XId [][]byte `protobuf:"bytes,64,rep,name=_id,json=Id,proto3" json:"_id"` + Tags []string `protobuf:"bytes,65,rep,name=tags,proto3" json:"tags"` + RepostedClaimId []string `protobuf:"bytes,66,rep,name=reposted_claim_id,json=repostedClaimId,proto3" json:"reposted_claim_id"` } func (x *SearchRequest) Reset() { *x = SearchRequest{} if protoimpl.UnsafeEnabled { - mi := &file_hub_proto_msgTypes[0] + mi := &file_hub_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -149,7 +259,7 @@ func (x *SearchRequest) String() string { func (*SearchRequest) ProtoMessage() {} func (x *SearchRequest) ProtoReflect() protoreflect.Message { - mi := &file_hub_proto_msgTypes[0] + mi := &file_hub_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -162,7 +272,7 @@ func (x *SearchRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead. func (*SearchRequest) Descriptor() ([]byte, []int) { - return file_hub_proto_rawDescGZIP(), []int{0} + return file_hub_proto_rawDescGZIP(), []int{1} } func (x *SearchRequest) GetQuery() string { @@ -221,123 +331,123 @@ func (x *SearchRequest) GetLastTakeOverHeight() string { return "" } -func (x *SearchRequest) GetClaimId() string { +func (x *SearchRequest) GetClaimId() []string { if x != nil { return x.ClaimId } - return "" + return nil } -func (x *SearchRequest) GetClaimName() string { +func (x *SearchRequest) GetClaimName() []string { if x != nil { return x.ClaimName } - return "" + return nil } -func (x *SearchRequest) GetNormalized() string { +func (x *SearchRequest) GetNormalized() []string { if x != nil { return x.Normalized } - return "" + return nil } -func (x *SearchRequest) GetTxPosition() string { +func (x *SearchRequest) GetTxPosition() *RangeQuery { if x != nil { return x.TxPosition } - return "" + return nil } -func (x *SearchRequest) GetAmount() string { +func (x *SearchRequest) GetAmount() *RangeQuery { if x != nil { return x.Amount } - return "" + return nil } -func (x *SearchRequest) GetTimestamp() string { +func (x *SearchRequest) GetTimestamp() *RangeQuery { if x != nil { return x.Timestamp } - return "" + return nil } -func (x *SearchRequest) GetCreationTimestamp() string { +func (x *SearchRequest) GetCreationTimestamp() *RangeQuery { if x != nil { return x.CreationTimestamp } - return "" + return nil } -func (x *SearchRequest) GetHeight() string { +func (x *SearchRequest) GetHeight() *RangeQuery { if x != nil { return x.Height } - return "" + return nil } -func (x *SearchRequest) GetCreationHeight() string { +func (x *SearchRequest) GetCreationHeight() *RangeQuery { if x != nil { return x.CreationHeight } - return "" + return nil } -func (x *SearchRequest) GetActivationHeight() string { +func (x *SearchRequest) GetActivationHeight() *RangeQuery { if x != nil { return x.ActivationHeight } - return "" + return nil } -func (x *SearchRequest) GetExpirationHeight() string { +func (x *SearchRequest) GetExpirationHeight() *RangeQuery { if x != nil { return x.ExpirationHeight } - return "" + return nil } -func (x *SearchRequest) GetReleaseTime() string { +func (x *SearchRequest) GetReleaseTime() *RangeQuery { if x != nil { return x.ReleaseTime } - return "" + return nil } -func (x *SearchRequest) GetShortUrl() string { +func (x *SearchRequest) GetShortUrl() []string { if x != nil { return x.ShortUrl } - return "" + return nil } -func (x *SearchRequest) GetCanonicalUrl() string { +func (x *SearchRequest) GetCanonicalUrl() []string { if x != nil { return x.CanonicalUrl } - return "" + return nil } -func (x *SearchRequest) GetTitle() string { +func (x *SearchRequest) GetTitle() []string { if x != nil { return x.Title } - return "" + return nil } -func (x *SearchRequest) GetAuthor() string { +func (x *SearchRequest) GetAuthor() []string { if x != nil { return x.Author } - return "" + return nil } -func (x *SearchRequest) GetDescription() string { +func (x *SearchRequest) GetDescription() []string { if x != nil { return x.Description } - return "" + return nil } func (x *SearchRequest) GetClaimType() []string { @@ -347,46 +457,46 @@ func (x *SearchRequest) GetClaimType() []string { return nil } -func (x *SearchRequest) GetReposted() string { +func (x *SearchRequest) GetReposted() *RangeQuery { if x != nil { return x.Reposted } - return "" + return nil } -func (x *SearchRequest) GetStreamType() string { +func (x *SearchRequest) GetStreamType() []string { if x != nil { return x.StreamType } - return "" + return nil } -func (x *SearchRequest) GetMediaType() string { +func (x *SearchRequest) GetMediaType() []string { if x != nil { return x.MediaType } - return "" + return nil } -func (x *SearchRequest) GetFeeAmount() string { +func (x *SearchRequest) GetFeeAmount() *RangeQuery { if x != nil { return x.FeeAmount } - return "" + return nil } -func (x *SearchRequest) GetFeeCurrency() string { +func (x *SearchRequest) GetFeeCurrency() []string { if x != nil { return x.FeeCurrency } - return "" + return nil } -func (x *SearchRequest) GetDuration() string { +func (x *SearchRequest) GetDuration() *RangeQuery { if x != nil { return x.Duration } - return "" + return nil } func (x *SearchRequest) GetRepostedClaimHash() string { @@ -396,11 +506,11 @@ func (x *SearchRequest) GetRepostedClaimHash() string { return "" } -func (x *SearchRequest) GetCensorType() string { +func (x *SearchRequest) GetCensorType() *RangeQuery { if x != nil { return x.CensorType } - return "" + return nil } func (x *SearchRequest) GetClaimsInChannel() string { @@ -410,11 +520,11 @@ func (x *SearchRequest) GetClaimsInChannel() string { return "" } -func (x *SearchRequest) GetChannelJoin() string { +func (x *SearchRequest) GetChannelJoin() *RangeQuery { if x != nil { return x.ChannelJoin } - return "" + return nil } func (x *SearchRequest) GetSignatureValid() string { @@ -424,60 +534,60 @@ func (x *SearchRequest) GetSignatureValid() string { return "" } -func (x *SearchRequest) GetEffectiveAmount() string { +func (x *SearchRequest) GetEffectiveAmount() *RangeQuery { if x != nil { return x.EffectiveAmount } - return "" + return nil } -func (x *SearchRequest) GetSupportAmount() string { +func (x *SearchRequest) GetSupportAmount() *RangeQuery { if x != nil { return x.SupportAmount } - return "" + return nil } -func (x *SearchRequest) GetTrendingGroup() string { +func (x *SearchRequest) GetTrendingGroup() *RangeQuery { if x != nil { return x.TrendingGroup } - return "" + return nil } -func (x *SearchRequest) GetTrendingMixed() string { +func (x *SearchRequest) GetTrendingMixed() *RangeQuery { if x != nil { return x.TrendingMixed } - return "" + return nil } -func (x *SearchRequest) GetTrendingLocal() string { +func (x *SearchRequest) GetTrendingLocal() *RangeQuery { if x != nil { return x.TrendingLocal } - return "" + return nil } -func (x *SearchRequest) GetTrendingGlobal() string { +func (x *SearchRequest) GetTrendingGlobal() *RangeQuery { if x != nil { return x.TrendingGlobal } - return "" + return nil } -func (x *SearchRequest) GetChannelId() string { +func (x *SearchRequest) GetChannelId() []string { if x != nil { return x.ChannelId } - return "" + return nil } -func (x *SearchRequest) GetTxId() string { +func (x *SearchRequest) GetTxId() []string { if x != nil { return x.TxId } - return "" + return nil } func (x *SearchRequest) GetTxNout() string { @@ -487,32 +597,32 @@ func (x *SearchRequest) GetTxNout() string { return "" } -func (x *SearchRequest) GetSignature() string { +func (x *SearchRequest) GetSignature() []string { if x != nil { return x.Signature } - return "" + return nil } -func (x *SearchRequest) GetSignatureDigest() string { +func (x *SearchRequest) GetSignatureDigest() []string { if x != nil { return x.SignatureDigest } - return "" + return nil } -func (x *SearchRequest) GetPublicKeyBytes() string { +func (x *SearchRequest) GetPublicKeyBytes() []string { if x != nil { return x.PublicKeyBytes } - return "" + return nil } -func (x *SearchRequest) GetPublicKeyHash() string { +func (x *SearchRequest) GetPublicKeyHash() []string { if x != nil { return x.PublicKeyHash } - return "" + return nil } func (x *SearchRequest) GetPublicKeyId() string { @@ -529,18 +639,18 @@ func (x *SearchRequest) GetXId() [][]byte { return nil } -func (x *SearchRequest) GetTags() string { +func (x *SearchRequest) GetTags() []string { if x != nil { return x.Tags } - return "" + return nil } -func (x *SearchRequest) GetRepostedClaimId() string { +func (x *SearchRequest) GetRepostedClaimId() []string { if x != nil { return x.RepostedClaimId } - return "" + return nil } type SearchReply struct { @@ -559,7 +669,7 @@ type SearchReply struct { func (x *SearchReply) Reset() { *x = SearchReply{} if protoimpl.UnsafeEnabled { - mi := &file_hub_proto_msgTypes[1] + mi := &file_hub_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -572,7 +682,7 @@ func (x *SearchReply) String() string { func (*SearchReply) ProtoMessage() {} func (x *SearchReply) ProtoReflect() protoreflect.Message { - mi := &file_hub_proto_msgTypes[1] + mi := &file_hub_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -585,7 +695,7 @@ func (x *SearchReply) ProtoReflect() protoreflect.Message { // Deprecated: Use SearchReply.ProtoReflect.Descriptor instead. func (*SearchReply) Descriptor() ([]byte, []int) { - return file_hub_proto_rawDescGZIP(), []int{1} + return file_hub_proto_rawDescGZIP(), []int{2} } func (x *SearchReply) GetTxos() []*Output { @@ -647,7 +757,7 @@ type Output struct { func (x *Output) Reset() { *x = Output{} if protoimpl.UnsafeEnabled { - mi := &file_hub_proto_msgTypes[2] + mi := &file_hub_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -660,7 +770,7 @@ func (x *Output) String() string { func (*Output) ProtoMessage() {} func (x *Output) ProtoReflect() protoreflect.Message { - mi := &file_hub_proto_msgTypes[2] + mi := &file_hub_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -673,7 +783,7 @@ func (x *Output) ProtoReflect() protoreflect.Message { // Deprecated: Use Output.ProtoReflect.Descriptor instead. func (*Output) Descriptor() ([]byte, []int) { - return file_hub_proto_rawDescGZIP(), []int{2} + return file_hub_proto_rawDescGZIP(), []int{3} } func (x *Output) GetTxHash() []byte { @@ -761,7 +871,7 @@ type ClaimMeta struct { func (x *ClaimMeta) Reset() { *x = ClaimMeta{} if protoimpl.UnsafeEnabled { - mi := &file_hub_proto_msgTypes[3] + mi := &file_hub_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -774,7 +884,7 @@ func (x *ClaimMeta) String() string { func (*ClaimMeta) ProtoMessage() {} func (x *ClaimMeta) ProtoReflect() protoreflect.Message { - mi := &file_hub_proto_msgTypes[3] + mi := &file_hub_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -787,7 +897,7 @@ func (x *ClaimMeta) ProtoReflect() protoreflect.Message { // Deprecated: Use ClaimMeta.ProtoReflect.Descriptor instead. func (*ClaimMeta) Descriptor() ([]byte, []int) { - return file_hub_proto_rawDescGZIP(), []int{3} + return file_hub_proto_rawDescGZIP(), []int{4} } func (x *ClaimMeta) GetChannel() *Output { @@ -922,7 +1032,7 @@ type Error struct { func (x *Error) Reset() { *x = Error{} if protoimpl.UnsafeEnabled { - mi := &file_hub_proto_msgTypes[4] + mi := &file_hub_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -935,7 +1045,7 @@ func (x *Error) String() string { func (*Error) ProtoMessage() {} func (x *Error) ProtoReflect() protoreflect.Message { - mi := &file_hub_proto_msgTypes[4] + mi := &file_hub_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -948,7 +1058,7 @@ func (x *Error) ProtoReflect() protoreflect.Message { // Deprecated: Use Error.ProtoReflect.Descriptor instead. func (*Error) Descriptor() ([]byte, []int) { - return file_hub_proto_rawDescGZIP(), []int{4} + return file_hub_proto_rawDescGZIP(), []int{5} } func (x *Error) GetCode() Error_Code { @@ -984,7 +1094,7 @@ type Blocked struct { func (x *Blocked) Reset() { *x = Blocked{} if protoimpl.UnsafeEnabled { - mi := &file_hub_proto_msgTypes[5] + mi := &file_hub_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -997,7 +1107,7 @@ func (x *Blocked) String() string { func (*Blocked) ProtoMessage() {} func (x *Blocked) ProtoReflect() protoreflect.Message { - mi := &file_hub_proto_msgTypes[5] + mi := &file_hub_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1010,7 +1120,7 @@ func (x *Blocked) ProtoReflect() protoreflect.Message { // Deprecated: Use Blocked.ProtoReflect.Descriptor instead. func (*Blocked) Descriptor() ([]byte, []int) { - return file_hub_proto_rawDescGZIP(), []int{5} + return file_hub_proto_rawDescGZIP(), []int{6} } func (x *Blocked) GetCount() uint32 { @@ -1031,208 +1141,235 @@ var File_hub_proto protoreflect.FileDescriptor var file_hub_proto_rawDesc = []byte{ 0x0a, 0x09, 0x68, 0x75, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, - 0x9e, 0x0e, 0x0a, 0x0d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x61, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0b, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x14, - 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x12, - 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0d, 0x69, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x31, - 0x0a, 0x15, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x6f, 0x76, 0x65, 0x72, - 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6c, - 0x61, 0x73, 0x74, 0x54, 0x61, 0x6b, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x48, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x15, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, - 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, - 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x74, - 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x74, 0x78, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x12, 0x2d, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x1c, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x1d, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, + 0x75, 0x0a, 0x0a, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x21, 0x0a, + 0x02, 0x6f, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x4f, 0x70, 0x52, 0x02, 0x6f, 0x70, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x2e, 0x0a, 0x02, 0x4f, 0x70, 0x12, 0x06, 0x0a, 0x02, + 0x45, 0x51, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4c, 0x54, 0x45, 0x10, 0x01, 0x12, 0x07, 0x0a, + 0x03, 0x47, 0x54, 0x45, 0x10, 0x02, 0x12, 0x06, 0x0a, 0x02, 0x4c, 0x54, 0x10, 0x03, 0x12, 0x06, + 0x0a, 0x02, 0x47, 0x54, 0x10, 0x04, 0x22, 0xde, 0x10, 0x0a, 0x0d, 0x53, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x25, + 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x31, 0x0a, 0x15, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x74, 0x61, + 0x6b, 0x65, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x14, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6c, 0x61, 0x73, 0x74, 0x54, 0x61, 0x6b, 0x65, 0x4f, 0x76, + 0x65, 0x72, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x6c, 0x61, 0x69, + 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x15, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x61, 0x69, + 0x6d, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x16, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, + 0x18, 0x17, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x0b, 0x74, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, + 0x67, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x0a, 0x74, 0x78, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x19, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x3d, 0x0a, 0x12, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x26, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x12, 0x37, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x3b, 0x0a, 0x11, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x1e, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x52, 0x10, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x3b, 0x0a, 0x11, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x1f, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x52, 0x10, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x12, 0x31, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x0b, 0x72, 0x65, 0x6c, 0x65, 0x61, + 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x5f, + 0x75, 0x72, 0x6c, 0x18, 0x21, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x73, 0x68, 0x6f, 0x72, 0x74, + 0x55, 0x72, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, + 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x22, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x61, 0x6e, 0x6f, + 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x55, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, + 0x65, 0x18, 0x23, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x24, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x25, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x69, + 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x26, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, + 0x61, 0x69, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x73, + 0x74, 0x65, 0x64, 0x18, 0x27, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x73, + 0x74, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x28, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x29, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x2d, 0x0a, 0x0a, 0x66, 0x65, 0x65, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, + 0x67, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x09, 0x66, 0x65, 0x65, 0x41, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x65, 0x65, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x63, 0x79, 0x18, 0x2b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x65, 0x65, 0x43, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x2a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, + 0x67, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x2e, 0x0a, 0x13, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6c, + 0x61, 0x69, 0x6d, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, + 0x72, 0x65, 0x70, 0x6f, 0x73, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x48, 0x61, 0x73, + 0x68, 0x12, 0x2f, 0x0a, 0x0b, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x2e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, + 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x0a, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x5f, 0x69, 0x6e, 0x5f, + 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x2f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, + 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x49, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x31, + 0x0a, 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x6a, 0x6f, 0x69, 0x6e, 0x18, 0x30, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4a, 0x6f, 0x69, + 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x18, 0x31, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x10, 0x65, 0x66, + 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x32, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x52, 0x0f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x41, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x0e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, + 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x33, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, + 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x0d, 0x73, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x0e, + 0x74, 0x72, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x34, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x52, 0x0d, 0x74, 0x72, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x12, 0x35, 0x0a, 0x0e, 0x74, 0x72, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, + 0x6d, 0x69, 0x78, 0x65, 0x64, 0x18, 0x35, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, + 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x0d, 0x74, 0x72, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4d, 0x69, 0x78, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x0e, 0x74, 0x72, + 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x18, 0x36, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x52, 0x0d, 0x74, 0x72, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x63, 0x61, + 0x6c, 0x12, 0x37, 0x0a, 0x0f, 0x74, 0x72, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x6c, + 0x6f, 0x62, 0x61, 0x6c, 0x18, 0x37, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x0e, 0x74, 0x72, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, + 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x38, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, + 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x13, 0x0a, 0x05, 0x74, 0x78, 0x5f, + 0x69, 0x64, 0x18, 0x39, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x78, 0x49, 0x64, 0x12, 0x17, + 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x6e, 0x6f, 0x75, 0x74, 0x18, 0x3a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x74, 0x78, 0x4e, 0x6f, 0x75, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x18, 0x3b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x3c, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, + 0x12, 0x28, 0x0a, 0x10, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x18, 0x3d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x4b, 0x65, 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x3e, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x22, 0x0a, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, + 0x5f, 0x69, 0x64, 0x18, 0x3f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x0f, 0x0a, 0x03, 0x5f, 0x69, 0x64, 0x18, 0x40, 0x20, + 0x03, 0x28, 0x0c, 0x52, 0x02, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, + 0x41, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x72, + 0x65, 0x70, 0x6f, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x69, 0x64, + 0x18, 0x42, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x74, 0x65, 0x64, + 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x49, 0x64, 0x22, 0xd2, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1e, 0x0a, 0x04, 0x74, 0x78, 0x6f, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x52, 0x04, 0x74, 0x78, 0x6f, 0x73, 0x12, 0x29, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, + 0x5f, 0x74, 0x78, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, + 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x54, 0x78, + 0x6f, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x12, 0x25, 0x0a, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x52, 0x07, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x65, 0x64, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x22, 0x9f, 0x01, 0x0a, + 0x06, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, + 0x6e, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x25, 0x0a, 0x05, + 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, + 0x2e, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x48, 0x00, 0x52, 0x05, 0x63, 0x6c, + 0x61, 0x69, 0x6d, 0x12, 0x21, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0f, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, + 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x06, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x22, 0xa3, + 0x05, 0x0a, 0x09, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x07, + 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, + 0x70, 0x62, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, + 0x65, 0x6c, 0x12, 0x22, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x06, + 0x72, 0x65, 0x70, 0x6f, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x5f, + 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x68, 0x6f, 0x72, 0x74, + 0x55, 0x72, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, + 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x61, 0x6e, 0x6f, + 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x55, 0x72, 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0d, 0x69, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x12, + 0x28, 0x0a, 0x10, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x68, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x74, 0x61, 0x6b, 0x65, 0x4f, + 0x76, 0x65, 0x72, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, + 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x65, 0x78, 0x70, 0x69, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x21, 0x0a, 0x0c, - 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x20, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x1b, 0x0a, 0x09, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x21, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x55, 0x72, 0x6c, 0x12, 0x23, 0x0a, 0x0d, - 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x22, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x55, 0x72, - 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x23, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x18, 0x24, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, - 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x25, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x26, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x74, 0x65, 0x64, 0x18, 0x27, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x74, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x28, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, - 0x0a, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x29, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, - 0x66, 0x65, 0x65, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x66, 0x65, 0x65, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x66, - 0x65, 0x65, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x2b, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x66, 0x65, 0x65, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x1a, - 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x13, 0x72, 0x65, - 0x70, 0x6f, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x74, 0x65, - 0x64, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x65, - 0x6e, 0x73, 0x6f, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x2e, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x63, - 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x5f, 0x69, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, - 0x18, 0x2f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x49, 0x6e, - 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x6e, - 0x65, 0x6c, 0x5f, 0x6a, 0x6f, 0x69, 0x6e, 0x18, 0x30, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, - 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4a, 0x6f, 0x69, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x31, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x32, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, - 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, - 0x0a, 0x0e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x33, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x41, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x65, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x34, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, - 0x72, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x25, 0x0a, 0x0e, - 0x74, 0x72, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x69, 0x78, 0x65, 0x64, 0x18, 0x35, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x72, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4d, 0x69, - 0x78, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x18, 0x36, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x72, 0x65, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x72, - 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x18, 0x37, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x72, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x47, 0x6c, 0x6f, - 0x62, 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, - 0x64, 0x18, 0x38, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, - 0x49, 0x64, 0x12, 0x13, 0x0a, 0x05, 0x74, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x39, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x74, 0x78, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x6e, 0x6f, - 0x75, 0x74, 0x18, 0x3a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x4e, 0x6f, 0x75, 0x74, - 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x3b, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x29, - 0x0a, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x69, 0x67, 0x65, - 0x73, 0x74, 0x18, 0x3c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x3d, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x42, 0x79, - 0x74, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, - 0x79, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x3e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x48, 0x61, 0x73, 0x68, 0x12, 0x22, 0x0a, 0x0d, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x3f, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x12, - 0x0f, 0x0a, 0x03, 0x5f, 0x69, 0x64, 0x18, 0x40, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x02, 0x49, 0x64, - 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x41, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x74, 0x61, 0x67, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x74, 0x65, 0x64, - 0x5f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x42, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x49, 0x64, - 0x22, 0xd2, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x70, 0x6c, 0x79, - 0x12, 0x1e, 0x0a, 0x04, 0x74, 0x78, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, - 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x04, 0x74, 0x78, 0x6f, 0x73, - 0x12, 0x29, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x74, 0x78, 0x6f, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x54, 0x78, 0x6f, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x07, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x65, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, - 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, - 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x22, 0x9f, 0x01, 0x0a, 0x06, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x6f, 0x75, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x6e, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x0a, - 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x25, 0x0a, 0x05, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x4d, - 0x65, 0x74, 0x61, 0x48, 0x00, 0x52, 0x05, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x12, 0x21, 0x0a, 0x05, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x70, 0x62, - 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, - 0x06, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x22, 0xa3, 0x05, 0x0a, 0x09, 0x43, 0x6c, 0x61, 0x69, - 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x22, 0x0a, 0x06, 0x72, - 0x65, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, - 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x74, 0x12, - 0x1b, 0x0a, 0x09, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x55, 0x72, 0x6c, 0x12, 0x23, 0x0a, 0x0d, - 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x55, 0x72, - 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x43, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x61, 0x6b, 0x65, - 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x0e, 0x74, 0x61, 0x6b, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x48, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x61, - 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x70, 0x69, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x10, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x5f, - 0x69, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x0f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x49, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, - 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x74, 0x65, 0x64, 0x12, 0x29, 0x0a, - 0x10, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x75, 0x70, 0x70, - 0x6f, 0x72, 0x74, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x15, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x0d, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x74, 0x72, 0x65, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x5f, 0x6d, 0x69, 0x78, 0x65, 0x64, 0x18, 0x17, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0d, - 0x74, 0x72, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4d, 0x69, 0x78, 0x65, 0x64, 0x12, 0x25, 0x0a, - 0x0e, 0x74, 0x72, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x18, - 0x18, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0d, 0x74, 0x72, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4c, - 0x6f, 0x63, 0x61, 0x6c, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x72, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x18, 0x19, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0e, 0x74, - 0x72, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x22, 0xa9, 0x01, - 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x22, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, - 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, - 0x25, 0x0a, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x52, 0x07, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x22, 0x41, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, - 0x0a, 0x0c, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x10, 0x00, - 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, - 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, - 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x03, 0x22, 0x45, 0x0a, 0x07, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x07, 0x63, 0x68, - 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, - 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, - 0x32, 0x35, 0x0a, 0x03, 0x48, 0x75, 0x62, 0x12, 0x2e, 0x0a, 0x06, 0x53, 0x65, 0x61, 0x72, 0x63, - 0x68, 0x12, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, - 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x62, 0x72, 0x79, 0x69, 0x6f, 0x2f, 0x68, 0x75, 0x62, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x62, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x67, 0x68, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x65, 0x78, 0x70, 0x69, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2a, 0x0a, 0x11, + 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x5f, 0x69, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, + 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x49, + 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6f, + 0x73, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6f, + 0x73, 0x74, 0x65, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, + 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x25, 0x0a, 0x0e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x15, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, + 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x65, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, + 0x74, 0x72, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x25, 0x0a, + 0x0e, 0x74, 0x72, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x69, 0x78, 0x65, 0x64, 0x18, + 0x17, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0d, 0x74, 0x72, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4d, + 0x69, 0x78, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x72, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x18, 0x18, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0d, 0x74, 0x72, + 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x12, 0x27, 0x0a, 0x0f, 0x74, + 0x72, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x18, 0x19, + 0x20, 0x01, 0x28, 0x02, 0x52, 0x0e, 0x74, 0x72, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x47, 0x6c, + 0x6f, 0x62, 0x61, 0x6c, 0x22, 0xa9, 0x01, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x22, + 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x70, + 0x62, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, + 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x25, 0x0a, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x65, 0x64, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x22, 0x41, 0x0a, + 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x54, 0x5f, 0x46, + 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, + 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x03, + 0x22, 0x45, 0x0a, 0x07, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x24, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x07, + 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x32, 0x35, 0x0a, 0x03, 0x48, 0x75, 0x62, 0x12, 0x2e, + 0x0a, 0x06, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x70, 0x62, + 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0x26, + 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x62, 0x72, + 0x79, 0x69, 0x6f, 0x2f, 0x68, 0x75, 0x62, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1247,35 +1384,58 @@ func file_hub_proto_rawDescGZIP() []byte { return file_hub_proto_rawDescData } -var file_hub_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_hub_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_hub_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_hub_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_hub_proto_goTypes = []interface{}{ - (Error_Code)(0), // 0: pb.Error.Code - (*SearchRequest)(nil), // 1: pb.SearchRequest - (*SearchReply)(nil), // 2: pb.SearchReply - (*Output)(nil), // 3: pb.Output - (*ClaimMeta)(nil), // 4: pb.ClaimMeta - (*Error)(nil), // 5: pb.Error - (*Blocked)(nil), // 6: pb.Blocked + (RangeQuery_Op)(0), // 0: pb.RangeQuery.Op + (Error_Code)(0), // 1: pb.Error.Code + (*RangeQuery)(nil), // 2: pb.RangeQuery + (*SearchRequest)(nil), // 3: pb.SearchRequest + (*SearchReply)(nil), // 4: pb.SearchReply + (*Output)(nil), // 5: pb.Output + (*ClaimMeta)(nil), // 6: pb.ClaimMeta + (*Error)(nil), // 7: pb.Error + (*Blocked)(nil), // 8: pb.Blocked } var file_hub_proto_depIdxs = []int32{ - 3, // 0: pb.SearchReply.txos:type_name -> pb.Output - 3, // 1: pb.SearchReply.extra_txos:type_name -> pb.Output - 6, // 2: pb.SearchReply.blocked:type_name -> pb.Blocked - 4, // 3: pb.Output.claim:type_name -> pb.ClaimMeta - 5, // 4: pb.Output.error:type_name -> pb.Error - 3, // 5: pb.ClaimMeta.channel:type_name -> pb.Output - 3, // 6: pb.ClaimMeta.repost:type_name -> pb.Output - 0, // 7: pb.Error.code:type_name -> pb.Error.Code - 6, // 8: pb.Error.blocked:type_name -> pb.Blocked - 3, // 9: pb.Blocked.channel:type_name -> pb.Output - 1, // 10: pb.Hub.Search:input_type -> pb.SearchRequest - 2, // 11: pb.Hub.Search:output_type -> pb.SearchReply - 11, // [11:12] is the sub-list for method output_type - 10, // [10:11] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 0, // 0: pb.RangeQuery.op:type_name -> pb.RangeQuery.Op + 2, // 1: pb.SearchRequest.tx_position:type_name -> pb.RangeQuery + 2, // 2: pb.SearchRequest.amount:type_name -> pb.RangeQuery + 2, // 3: pb.SearchRequest.timestamp:type_name -> pb.RangeQuery + 2, // 4: pb.SearchRequest.creation_timestamp:type_name -> pb.RangeQuery + 2, // 5: pb.SearchRequest.height:type_name -> pb.RangeQuery + 2, // 6: pb.SearchRequest.creation_height:type_name -> pb.RangeQuery + 2, // 7: pb.SearchRequest.activation_height:type_name -> pb.RangeQuery + 2, // 8: pb.SearchRequest.expiration_height:type_name -> pb.RangeQuery + 2, // 9: pb.SearchRequest.release_time:type_name -> pb.RangeQuery + 2, // 10: pb.SearchRequest.reposted:type_name -> pb.RangeQuery + 2, // 11: pb.SearchRequest.fee_amount:type_name -> pb.RangeQuery + 2, // 12: pb.SearchRequest.duration:type_name -> pb.RangeQuery + 2, // 13: pb.SearchRequest.censor_type:type_name -> pb.RangeQuery + 2, // 14: pb.SearchRequest.channel_join:type_name -> pb.RangeQuery + 2, // 15: pb.SearchRequest.effective_amount:type_name -> pb.RangeQuery + 2, // 16: pb.SearchRequest.support_amount:type_name -> pb.RangeQuery + 2, // 17: pb.SearchRequest.trending_group:type_name -> pb.RangeQuery + 2, // 18: pb.SearchRequest.trending_mixed:type_name -> pb.RangeQuery + 2, // 19: pb.SearchRequest.trending_local:type_name -> pb.RangeQuery + 2, // 20: pb.SearchRequest.trending_global:type_name -> pb.RangeQuery + 5, // 21: pb.SearchReply.txos:type_name -> pb.Output + 5, // 22: pb.SearchReply.extra_txos:type_name -> pb.Output + 8, // 23: pb.SearchReply.blocked:type_name -> pb.Blocked + 6, // 24: pb.Output.claim:type_name -> pb.ClaimMeta + 7, // 25: pb.Output.error:type_name -> pb.Error + 5, // 26: pb.ClaimMeta.channel:type_name -> pb.Output + 5, // 27: pb.ClaimMeta.repost:type_name -> pb.Output + 1, // 28: pb.Error.code:type_name -> pb.Error.Code + 8, // 29: pb.Error.blocked:type_name -> pb.Blocked + 5, // 30: pb.Blocked.channel:type_name -> pb.Output + 3, // 31: pb.Hub.Search:input_type -> pb.SearchRequest + 4, // 32: pb.Hub.Search:output_type -> pb.SearchReply + 32, // [32:33] is the sub-list for method output_type + 31, // [31:32] is the sub-list for method input_type + 31, // [31:31] is the sub-list for extension type_name + 31, // [31:31] is the sub-list for extension extendee + 0, // [0:31] is the sub-list for field type_name } func init() { file_hub_proto_init() } @@ -1285,7 +1445,7 @@ func file_hub_proto_init() { } if !protoimpl.UnsafeEnabled { file_hub_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SearchRequest); i { + switch v := v.(*RangeQuery); i { case 0: return &v.state case 1: @@ -1297,7 +1457,7 @@ func file_hub_proto_init() { } } file_hub_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SearchReply); i { + switch v := v.(*SearchRequest); i { case 0: return &v.state case 1: @@ -1309,7 +1469,7 @@ func file_hub_proto_init() { } } file_hub_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Output); i { + switch v := v.(*SearchReply); i { case 0: return &v.state case 1: @@ -1321,7 +1481,7 @@ func file_hub_proto_init() { } } file_hub_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClaimMeta); i { + switch v := v.(*Output); i { case 0: return &v.state case 1: @@ -1333,7 +1493,7 @@ func file_hub_proto_init() { } } file_hub_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Error); i { + switch v := v.(*ClaimMeta); i { case 0: return &v.state case 1: @@ -1345,6 +1505,18 @@ func file_hub_proto_init() { } } file_hub_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Error); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hub_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Blocked); i { case 0: return &v.state @@ -1357,7 +1529,7 @@ func file_hub_proto_init() { } } } - file_hub_proto_msgTypes[2].OneofWrappers = []interface{}{ + file_hub_proto_msgTypes[3].OneofWrappers = []interface{}{ (*Output_Claim)(nil), (*Output_Error)(nil), } @@ -1366,8 +1538,8 @@ func file_hub_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_hub_proto_rawDesc, - NumEnums: 1, - NumMessages: 6, + NumEnums: 2, + NumMessages: 7, NumExtensions: 0, NumServices: 1, }, diff --git a/server/search.go b/server/search.go index 208db80..0c01432 100644 --- a/server/search.go +++ b/server/search.go @@ -7,6 +7,7 @@ import ( "log" "reflect" + "github.com/btcsuite/btcutil/base58" "github.com/olivere/elastic/v7" ) @@ -15,12 +16,52 @@ type record struct { Nout uint32 `json:"tx_nout"` } -func reverseBytes(s []byte) { +func ReverseBytes(s []byte) { for i, j := 0, len(s)-1; i < j; i, j = i+1, j-1 { s[i], s[j] = s[j], s[i] } } +func StrArrToInterface(arr []string) []interface{} { + searchVals := make([]interface{}, len(arr)) + for i := 0; i < len(arr); i++ { + searchVals[i] = arr[i] + } + return searchVals +} + +func AddTermsQuery(arr []string, name string, q *elastic.BoolQuery) *elastic.BoolQuery { + if len(arr) > 0 { + searchVals := StrArrToInterface(arr) + return q.Must(elastic.NewTermsQuery(name, searchVals...)) + } + return q +} + +func AddRangeQuery(rq *pb.RangeQuery, name string, q *elastic.BoolQuery) *elastic.BoolQuery { + if rq == nil { + return q + } + + if len(rq.Value) > 1 { + if rq.Op != pb.RangeQuery_EQ { + return q + } + return AddTermsQuery(rq.Value, name, q) + } + if rq.Op == pb.RangeQuery_EQ { + return AddTermsQuery(rq.Value, name, q) + } else if rq.Op == pb.RangeQuery_LT { + return q.Must(elastic.NewRangeQuery(name).Lt(rq.Value)) + } else if rq.Op == pb.RangeQuery_LTE { + return q.Must(elastic.NewRangeQuery(name).Lte(rq.Value)) + } else if rq.Op == pb.RangeQuery_GT { + return q.Must(elastic.NewRangeQuery(name).Gt(rq.Value)) + } else { // pb.RangeQuery_GTE + return q.Must(elastic.NewRangeQuery(name).Gte(rq.Value)) + } +} + func (s *Server) Search(ctx context.Context, in *pb.SearchRequest) (*pb.SearchReply, error) { // TODO: reuse elastic client across requests client, err := elastic.NewClient(elastic.SetSniff(false)) @@ -64,12 +105,71 @@ func (s *Server) Search(ctx context.Context, in *pb.SearchRequest) (*pb.SearchRe if len(in.XId) > 0 { searchVals := make([]interface{}, len(in.XId)) for i := 0; i < len(in.XId); i++ { - reverseBytes(in.XId[i]) + ReverseBytes(in.XId[i]) searchVals[i] = hex.Dump(in.XId[i]) } - q = q.Must(elastic.NewTermsQuery("_id", searchVals...)) + if len(in.XId) == 1 && len(in.XId[0]) < 20 { + q = q.Must(elastic.NewPrefixQuery("_id", string(in.XId[0]))) + } else { + q = q.Must(elastic.NewTermsQuery("_id", searchVals...)) + } } + + if len(in.ClaimId) > 0 { + searchVals := StrArrToInterface(in.ClaimId) + if len(in.ClaimId) == 1 && len(in.ClaimId[0]) < 20 { + q = q.Must(elastic.NewPrefixQuery("claim_id.keyword", in.ClaimId[0])) + } else { + q = q.Must(elastic.NewTermsQuery("claim_id.keyword", searchVals...)) + } + } + + if in.PublicKeyId != "" { + value := hex.Dump(base58.Decode(in.PublicKeyId)[1:21]) + q = q.Must(elastic.NewTermQuery("public_key_hash.keyword", value)) + } + + q = AddTermsQuery(in.PublicKeyHash, "public_key_hash.keyword", q) + q = AddTermsQuery(in.Author, "author.keyword", q) + q = AddTermsQuery(in.Title, "title.keyword", q) + q = AddTermsQuery(in.CanonicalUrl, "canonical_url.keyword", q) + q = AddTermsQuery(in.ChannelId, "channel_id.keyword", q) + q = AddTermsQuery(in.ClaimName, "claim_name.keyword", q) + q = AddTermsQuery(in.Description, "description.keyword", q) + q = AddTermsQuery(in.MediaType, "media_type.keyword", q) + q = AddTermsQuery(in.Normalized, "normalized.keyword", q) + q = AddTermsQuery(in.PublicKeyBytes, "public_key_bytes.keyword", q) + q = AddTermsQuery(in.ShortUrl, "short_url.keyword", q) + q = AddTermsQuery(in.Signature, "signature.keyword", q) + q = AddTermsQuery(in.SignatureDigest, "signature_digest.keyword", q) + q = AddTermsQuery(in.StreamType, "stream_type.keyword", q) + q = AddTermsQuery(in.TxId, "tx_id.keyword", q) + q = AddTermsQuery(in.FeeCurrency, "fee_currency.keyword", q) + q = AddTermsQuery(in.RepostedClaimId, "reposted_claim_id.keyword", q) + q = AddTermsQuery(in.Tags, "tags.keyword", q) + + q = AddRangeQuery(in.TxPosition, "tx_position", q) + q = AddRangeQuery(in.Amount, "amount", q) + q = AddRangeQuery(in.Timestamp, "timestamp", q) + q = AddRangeQuery(in.CreationTimestamp, "creation_timestamp", q) + q = AddRangeQuery(in.Height, "height", q) + q = AddRangeQuery(in.CreationHeight, "creation_height", q) + q = AddRangeQuery(in.ActivationHeight, "activation_height", q) + q = AddRangeQuery(in.ExpirationHeight, "expiration_height", q) + q = AddRangeQuery(in.ReleaseTime, "release_time", q) + q = AddRangeQuery(in.Reposted, "reposted", q) + q = AddRangeQuery(in.FeeAmount, "fee_amount", q) + q = AddRangeQuery(in.Duration, "duration", q) + q = AddRangeQuery(in.CensorType, "censor_type", q) + q = AddRangeQuery(in.ChannelJoin, "channel_join", q) + q = AddRangeQuery(in.EffectiveAmount, "effective_amount", q) + q = AddRangeQuery(in.SupportAmount, "support_amount", q) + q = AddRangeQuery(in.TrendingGroup, "trending_group", q) + q = AddRangeQuery(in.TrendingMixed, "trending_mixed", q) + q = AddRangeQuery(in.TrendingLocal, "trending_local", q) + q = AddRangeQuery(in.TrendingGlobal, "trending_global", q) + if in.Query != "" { textQuery := elastic.NewSimpleQueryStringQuery(in.Query). FieldWithBoost("claim_name", 4).